[FFmpeg-user] Correct conversion of yuvj420p?

Paul B Mahol onemda at gmail.com
Fri Sep 11 13:38:10 EEST 2020


On Fri, Sep 11, 2020 at 11:49:01AM +0200, Peter B. wrote:
> 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
> color_range"?
> 
> 
> 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 :)

YUVJ420P === YUV420P + PC set for color_range.

Beware of unset color_range.

> 
> 
> 
> Grateful for any suggestions.
> 
> Kind regards,
> Peter B.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list