[FFmpeg-user] Levels and Primaries

Rio Kierkels riokierkels at gmail.com
Wed Feb 5 12:05:12 CET 2014


>
>
>>>  Rio Kierkels wrote:
>>>>
>>>>  Thanks Andy,
>>>>>
>>>>> If this is true it's good news for ffmpeg, bad news for the other
>>>>> apps and our current delivery pipeline. My next step would be to
>>>>> create a very basic mxf parser to determine the Y' values but as
>>>>> I've said my C skills are sub par to my python skills. Does anybody
>>>>> have some other nice tool to determine levels to cross check this.
>>>>> Or maybe someone who can verify that the ffmpeg mxf parser and
>>>>> mpeg2video decoder doesn't do anything to the levels when converting
>>>>> it to a waveform?
>>>>>
>>>>>
>>>> My C skills aren't up to much either so maybe you should have more
>>>> confidence in something you write in python.
>>>>
>>>> Attached is what I used to look (cue someone spots blindingly obvious
>>>> bug) of course looking means decoding with
>>>> ffmpeg to rawvideo either to a file or a named pipe.
>>>>
>>>> So if you compile the file - gcc -Wall yuvp-counter.c -o count-yuv
>>>>
>>>> My sanity test file is 100% bars (+ subsampling artifacts) from
>>>>
>>>> ftp://ftp.tek.com/tv/test/streams/Element/MPEG-Video/625/100b_400.m2v
>>>>
>>>> for 422 or for 420
>>>>
>>>> ftp://ftp.tek.com/tv/test/streams/Element/MPEG-Video/625/100b_060.m2v
>>>>
>>>> Save & make a named pipe somewhere -
>>>>
>>>> mkfifo myfifo
>>>>
>>>> In one terminal/konsole/whatever run
>>>>
>>>> ffmpeg -i  100b_400.m2v -f rawvideo -y myfifo
>>>>
>>>> Look at the output to get width, height and format (must be planar)
>>>>
>>>> and from another term set wide so you have a couple of hundred chars run
>>>> eg.
>>>>
>>>> ./count-yuv 704 576 422 myfifo
>>>>
>>>> To me the output from that looks sane so I assume my counter works
>>>> sometimes at least :-)
>>>
>>>
Nice example Andy,

It's good to see ffmpeg stay true to the data on disk and not like a lot of
apps I'm testing does some "smart" scaling of the values.
I'm going to keep testing and playing around to check for values. Again any
body chime in if they have any information that could be of relevance.

Now I'm trying to match the metadata. It is causing all sorts of problems
with some programs like Resolve Lite simply not seeing the file. Tested it
on 2 different machines.
It would be nice to be able to set the color metadata (color primaries,
matrix, transfer) and the GOP structure data (M=3, N=12).

I'll be trying to look at the ffmbc code, as it looks like they've solved
this problem long a go.

-- 
42


More information about the ffmpeg-user mailing list