[FFmpeg-user] Use of "-color_range"

Tim Nicholson tim.nicholson at bbc.co.uk
Tue Jul 5 08:43:01 CEST 2011

On 04/07/11 22:01, Mark Himsley wrote:
> On 04/07/2011 15:44, Tim Nicholson wrote:
>> I am struggling to find any documentation on the use of this and
>> searching the source was not very revealing, to my eye at least.
>> Apart from the fact that it expects an <int> I am none the wiser.
>> I since it is a DEV function I was hoping I could use it to force ffmpeg
>> to handle source material of a non standard range.
> Hi Tim,
> The source says:
> 0 == unspecified
> 1 == "MPEG" range
> 2 == "JPEG" range
 > Therefore, I'd expect 1 to be "broadcast" 16-235, and 2 to be "full"
> 0-255. I haven't tested this, just grepped through the source.

Bother! Missed that in my "find", which file was that in?

I presume that you are presuming MPEG => yuv=> 16-235 and JPEG => RGB 
=>0-255, which is a bit woolly for such an important parameter.

> My flip camera records 0-255 videos but flags the h.264 as 16-235 (or,
> perhaps I could word that better as the camera omits to flag the h.264
> as using the 0-255 range). It would be really nice if this option in
> ffmpeg could allow correct that - an even better if ffmpeg could then
> scale my 0-255 media to 16-235 for direct import into "broadcast"
> infrastructure.

Quite. But presumably setting the flag one way for the incoming and the 
other way for the output would sort that....

Mind you there is a lot of "broadcast" kit making things to the wrong 
spec. I know of one major application that outputs V210 YUV quicktimes 
in full range, and another that outputs RGB dpx's to reduced range......


This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

More information about the ffmpeg-user mailing list