[FFmpeg-user] Correct conversion of yuvj420p?
Paul B Mahol
onemda at gmail.com
Thu Sep 10 16:53:00 EEST 2020
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:
> > > [...]
> > > The source video is: yuvj420p(pc, smpte170m/bt709/bt709)
> > > The output video is: yuv420p(pc, smpte170m/bt709/bt709)
> > >
> > > What would be the right commandline to losslessly convert this to FFV1?
> > > I've tried, but so far I get differing streamhash MD5s for the video -
> > > regardless if I set the color range :(
> > ffmpeg -i input_video.mov -vf setrange=limited -c:v ffv1 out.mkv
> >
> > That command will tell ffmpeg that range is not full but limited
> > and will not do lossy conversion with swscale at all.
>
> That worked! Thank you!
> Streamhash says it's a match :)
>
>
> > You will need to signal that encoded video is still full range somehow in container,
> > otherwise you will get correct hash but output display will think
> > its really limited while it is actually still full range.
>
> 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.
>
>
>
> Thanks again Paul!
> Peter
> _______________________________________________
> 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