dirkvdb / ffmpegthumbnailer

Lightweight video thumbnailer that can be used by file managers to create thumbnails for video files
GNU General Public License v2.0
524 stars 72 forks source link

First (black) frame chosen as thumbnail for some files #192

Open sammoth opened 4 years ago

sammoth commented 4 years ago

Hi, I have some mpeg TS files where I get a black thumbnail, because ffmpegthumbnailer is choosing the first frame of the file instead of seeking to 20% or such. I get the output "stream 0 : no PTS found at end of file, duration not set". I think this might be because AVStream::start_time isn't being taken account of, as these files are chopped up from blu-ray m2ts streams and the resulting files' timestamps won't start at zero. In my own code I was able to generate thumbnails accurately for these files by basing seeks off of AVStream::start_time. I can provide an example if needed.

dirkvdb commented 4 years ago

I'm happy to accept a pull request. But unfortunately I have no time at the moment to perform investigation into issues.