0

I am using avconv to convert MPEG Transport Streams to H264. My main goal is to capture high-quality screenshots from the source video files.

The TS files are interlaced, so I am first converting to H264 and attempting to capture screenshots from the encoded video. However, the quality is lacking - I see jagged edges in high contrast areas of the screen, as well as some noise that looks similar to JPEG compression artefacts.

I am experimenting with various combinations of quality presets, Yadif deinterlacing and noise reduction, but the quality still seems to be lacking.

File size is not important - I don't mind if I end up with huge video files, as long as the screenshots are of high quality. Compression time is somewhat important, but I don't mind if the encoding step takes a long time.

Which settings should I be using to achieve the highest quality screenshots from these video files? Assuming I have a 1080i input, how can I produce a screenshot that is as close to 1080p as possible? Of course, the output can not be higher quality than the input, but I want to get as close as possible.

I will be using avconv to extract the screenshots from the video, but for my testing I am pausing VLC to examine the quality.

1 Answer 1

1

Doing a lossless screenshot at the 1mn mark :

ffmpeg -i input.1080i.ts -vf yadif -ss 01:00 -vframes 1 screenshot.png

(I'm sorry for using ffmpeg, but the avconv command should be very close - if not the same)

However, you must first make sure that deinterlacing is the way to go. Just because the source is 1080i doesn't mean that it isn't progressive content interlaced, in which case you should not deinterlace.

It might be telecined content, in that case you should use the fieldmatch filter (I hope it's available in avconv..) :

ffmpeg -i input.1080i.telecined.ts -vf fieldmatch -ss 01:00 -vframes 1 screenshot.png

Finally, if the 1080i is actually progressive, you don't need either !

ffmpeg -i input.1080i.eu.ts -ss 01:00 -vframes 1 screenshot.png

Also, please note that while you will get a faster result by appending -ss 01:00 before the input, the resulting timing might be inaccurate.

4
  • Thanks Ely, I appreciate the detailed answer. avconv doesn't have the fieldmatch filter - I'll install ffmpeg and do some testing to see if it is worth switching.
    – Mike Ryan
    Commented Aug 19, 2015 at 11:04
  • No problem. It would be easier to determine if you told me the source of your 1080i sample, like which country and source (TV, bluray..) it is from. Anyway, try first without any yadif. If you see combing (ugly lines across the video) in the output, then it's either telecined or truly interlaced. If it is the latter, you may want to try -vf yadif=mode=1 as you may have a chance to get the original framerate too. If you notice duplicated frames, just do a regular -vf yadif.
    – Ely
    Commented Aug 19, 2015 at 11:07
  • The source is 1080i cable TV channel, in North America (although I'll be processing EU video eventually). I'm going to write a script which processes the video with various permutations of the command line switches you recommended, then do a comparison between them.
    – Mike Ryan
    Commented Aug 19, 2015 at 12:58
  • 1
    Yeah then if you recorded a movie or tv show, it's most likely telecined and you'll have to perform an "inverse telecine" if you want to get the original progressive video running at 23.976 fps. Good luck!
    – Ely
    Commented Aug 19, 2015 at 13:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .