[FFmpeg-user] Correct conversion of yuvj420p?

Peter B. pb at das-werkstatt.com
Fri Sep 11 12:49:01 EEST 2020

Hi again :)

I thought this was solved, but...

On 10.09.20 15:53, Paul B Mahol wrote:
> On Tue, Sep 08, 2020 at 04:12:30PM +0200, Peter B. wrote:
>> Dear Paul,
>> On 07.09.20 23:57, Paul B Mahol wrote:
>>> On Mon, Sep 07, 2020 at 11:20:10PM +0200, Peter B. wrote:
>> Thanks for pointing that out.
>> I've done the following:
>> $FFMPEG -i $VIDEO_IN -an -c:v ffv1 \
>>   -vf setrange=limited \
>>   -pix_fmt yuv420p \
>>   -color_range jpeg \
>>   -colorspace smpte170m \
>>   -color_primaries bt709 \
>>   -color_trc bt709 \
>> out.mkv
>> The streamhash matches, and the color interpretation metadata seems to be
>> identical to the source:
>>    * Source video (h.264):
>>      yuvj420p(pc, smpte170m/bt709/bt709)
>>    * Target video (ffv1):
>>      yuv420p(pc, smpte170m/bt709/bt709)
> This is not reporting color range. Better check it matches.

I've noticed something very odd:
When applying the same FFmpeg command as above, but "-c:v libx264 -crf 
21" (instead of FFV1), FFmpeg says it's output is:

 > yuv420p(pc, smpte170m/bt709/bt709)

...but when reading the created file using FFprobe (current git master), 
it's back to "yuvj420p":

 > yuvj420p(pc, smpte170m/bt709/bt709)

So, is the file now "AV_PIX_FMT_YUVJ420P" or "AV_PIX_FMT_YUV420P + set 

My problem is, that I have literally hundreds (actually more than 1000+) 
of these H.264/yuvj420p files that are to be auto-converted to archival 
FFV1, but because of the "j" the "pix_fmt +" option cannot be used, 
which throws all those files into error - and I'd like to fix this :)

Grateful for any suggestions.

Kind regards,
Peter B.

More information about the ffmpeg-user mailing list