[FFmpeg-user] Creating ffv1 full-range and broadcast-range files
krueger at lesspain.de
Fri May 9 14:08:09 CEST 2014
On Fri, May 9, 2014 at 1:54 PM, Christoph Gerstbauer
<christophgerstbauer at gmx.at> wrote:
> Hello Robert,
> I am asking me that question too.
> Because I want to convert different MXF formats to ffv1 (dnxhd, xdcam etc).
> In the MXF Container itself there are often defined Levels: BlackRefLevel =
> 16 and WhiteRefLevel = 235.
> When I open the file with ffmpeg, it shows me always: yuv422p, yuv420p,
> yuv422p10le, etc... ---> the formats SHOULD have broadcast safe levels...
Not important here but you know that broadcast range and
broadcast-safe levels are not the same thing?
> But when I open the MXF files with e.g. Premiere and watches the YcbCr
> Waveform: I see levels from 0-255.
In many cases (I do not know for Premiere) these tools normalize or
convert their input so the histogramm covers the full range of the
signal, so thios might not be a good way to find out. There is the
histogram filter which will show you what ffmpeg decodes the values
as. I think that is likely to be more reliable. And if it is not, you
should file a bug report so it is next time ;-).
> So I do not think that yuv422p only saving values between 16-235 or 64-940.
> There is always headroom/footroom.
> As I know it: Pix_fmts like yuvj422p would save an additional flag that the
> content is 0-255.
> But I am not shure. :/
> What I want to say with this mail/post: I think it can never be guaranteed
> if you have a file with yuv422p (yuv422p10le) that the levels in the file
> WILL ALWAYS have broadcast levels 16-235 (64-940).
I know that in the wild you will find files which are not flagged as
full-range but do contain it (there are at least some cameras which
produce streams like that). But my question is how to artificially
produce test files that contain full-range yuv420, ... encoded as
ffv1. I know that the mechanisms within ffmpeg code are there
(libswscale understand the concept of ranges) but I find no way to
specify that on the command line. I was expecting something like an
argument to the format filter or a cl argument like -range that would
work when specified together with -pix_fmt but I don't see anything
If that is not doable I will switch to another codec with support for
the full-range formats but I was hoping to be able to do this with
ffv1 as it is the perfect codec for test data for many scenarios.
More information about the ffmpeg-user