[FFmpeg-user] Use of "-color_range"
Tim Nicholson
tim.nicholson at bbc.co.uk
Mon Jul 11 09:07:53 CEST 2011
On 10/07/11 11:10, Thomas Worth wrote:
> Tim, did you ever get this to work properly? I tried transcoding some
> v210 footage to mjpeg, but since mjpeg requires "yuvj" pixel format
> variants, my range is always wrong because the v210 I am working with
> is broadcast range. The mjpeg encoder apparently takes the full range
> as input, so it looks at 0-1023 instead of 64-940.
>
well what I did was take two input png's of colour bars, one full range
one 601 range and output an uncompressed 8 bit mov using the code below:-
=======================================
for range in 0 1 2
do
out_file=$(basename $1).${range}.mov
ffmpeg -f image2 -loop_input -i $1 -t 5 -vcodec rawvideo -pix_fmt \
uyvy422 -color_range $range -vtag 2vuy -an -y "$out_file"
out_file=${range}.$(basename $1).mov
ffmpeg -f image2 -loop_input -color_range $range -i $1 -t 5 -vcodec \
rawvideo -pix_fmt uyvy422 -vtag 2vuy -an -y "$out_file"
done
=======================================
As you can see one variation changed the parameter for output, and the
other version changed it for input.
I then viewed all 6 files in Lightworks (public beta) so I could use the
scope function.
For any given input file all 6 outputs were identical no matter what the
setting of -color_range and whether applied to input or output. However
the differences between the input files was reflected on the outputs.
This would suggest that color_range is having no effect.
*However* I don't know if the "image2" format for input overrides the
color_range setting, so I want to run some more passes using my
generated mov's as source.
> What would be great is if I could force ffmpeg / swscale to consider
> only 64-940 as input instead of 0-1023. For most intents and purposes,
> only 64-940 is a valid range with v210.
Absolutely!
--
Tim
http://www.bbc.co.uk/
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