[FFmpeg-user] Scaling legal video levels

Andy Furniss adf.lists at gmail.com
Sat Feb 18 12:52:32 EET 2017


Elliott Balsley wrote:
> I am trying to convert a single-frame H.264 MKV to a JPEG image.
> Unfortunately the output is always clipped at 235.  The source video
> is full-range, and I want to keep it full-range.  Sample attached to
> this email.  The clipping can be seen quite obviously with this test
> pattern. If I instead rewrap from MKV to MOV with “vcodec copy”, it
> works correctly.  It seems like ffmpeg is treating the source as
> legal range, so I need to force it to treat the input as full range?

-vf scale=in_range=full

Works on this sample. Also be aware that ffmpeg when doing CSC defaults
to Rec.601 which would need tweaking if the output were eg. png.

https://www.ffmpeg.org/ffmpeg-filters.html#scale-1

If input is 709 but "unflagged" you should also be looking to set trc.


More information about the ffmpeg-user mailing list