Correct conversion of yuvj420p?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Correct conversion of yuvj420p?

Peter B.
Hi everyone!

I've read quite a while ago that pix_fmt "yuvj420p" is deprecated, and
when trying to convert an H.264/MOV to FFV1/MKV, I get the following
message:

 > Incompatible pixel format 'yuvj420p' for codec 'ffv1', auto-selecting
format 'yuv420p'
 > [swscaler @ 0x71c9440] deprecated pixel format used, make sure you
did set range correctly

The comment in
[libavutil/pixfmt.h](https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/pixfmt.h#L78),
says:

 > AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG),
deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range


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 :(



Thanks in advance for any hints!
Peter B.



Here's what I've tried so far:
(Console output below)

// ----------------------------------------
FFMPEG="ffmpeg-4.3.1"
VIDEO_IN="../MVI_1522.MOV"

clear

$FFMPEG -i $VIDEO_IN -n -an -c:v ffv1 -pix_fmt + does_not_work.mkv
$FFMPEG -i $VIDEO_IN -n -an -c:v ffv1 -pix_fmt yuvj420p out.mkv
$FFMPEG -i $VIDEO_IN -n -an -c:v ffv1 -pix_fmt yuvj420p -color_range
jpeg -colorspace smpte170m -color_primaries bt709 -color_trc bt709
out-bt709.mkv
$FFMPEG -i $VIDEO_IN -n -an -c:v ffv1 -pix_fmt yuvj420p -color_range
jpeg out-jpeg.mkv
sleep 1

echo
echo "Source video:"
$FFMPEG -i $VIDEO_IN -f streamhash -hash md5 -v quiet -map 0 -
echo
echo "Without setting color information:"
$FFMPEG -i out.mkv -f streamhash -hash md5 -v quiet -map 0 -
echo
echo "Color information set:"
$FFMPEG -i out-bt709.mkv -f streamhash -hash md5 -v quiet -map 0 -
$FFMPEG -i out-jpeg.mkv -f streamhash -hash md5 -v quiet -map 0 -
// ----------------------------------------


ffmpeg-4.3.1 -i ../MVI_1522.MOV -n -an -c:v ffv1 -pix_fmt +
does_not_work.mkv
ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright
(c) 2000-2020 the FFmpeg developers
   built with gcc 8 (Debian 8.3.0-6)
   configuration: --enable-gpl --enable-version3 --enable-static
--disable-debug --disable-ffplay --disable-indev=sndio
--disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-gmp --enable-libgme --enable-gray
--enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis
--enable-libopus --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d
--enable-libxvid --enable-libzvbi --enable-libzimg
   libavutil      56. 51.100 / 56. 51.100
   libavcodec     58. 91.100 / 58. 91.100
   libavformat    58. 45.100 / 58. 45.100
   libavdevice    58. 10.100 / 58. 10.100
   libavfilter     7. 85.100 /  7. 85.100
   libswscale      5.  7.100 /  5.  7.100
   libswresample   3.  7.100 /  3.  7.100
   libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../MVI_1522.MOV':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CAEP
     creation_time   : 2012-07-14T20:54:32.000000Z
   Duration: 00:00:11.52, start: 0.000000, bitrate: 45262 kb/s
     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 43657 kb/s,
25 fps, 25 tbr, 25k tbn, 50k tbc (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
     Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
stereo, s16, 1536 kb/s (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> ffv1 (native))
Press [q] to stop, [?] for help
[ffv1 @ 0x5fb9500] Specified pixel format yuvj420p is invalid or not
supported
Error initializing output stream 0:0 -- Error while opening encoder for
output stream #0:0 - maybe incorrect parameters such as bit_rate, rate,
width or height
Conversion failed!



------------
ffmpeg-4.3.1 -i ../MVI_1522.MOV -n -an -c:v ffv1 -pix_fmt yuvj420p out.mkv
ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright
(c) 2000-2020 the FFmpeg developers
   built with gcc 8 (Debian 8.3.0-6)
   configuration: --enable-gpl --enable-version3 --enable-static
--disable-debug --disable-ffplay --disable-indev=sndio
--disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-gmp --enable-libgme --enable-gray
--enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis
--enable-libopus --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d
--enable-libxvid --enable-libzvbi --enable-libzimg
   libavutil      56. 51.100 / 56. 51.100
   libavcodec     58. 91.100 / 58. 91.100
   libavformat    58. 45.100 / 58. 45.100
   libavdevice    58. 10.100 / 58. 10.100
   libavfilter     7. 85.100 /  7. 85.100
   libswscale      5.  7.100 /  5.  7.100
   libswresample   3.  7.100 /  3.  7.100
   libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../MVI_1522.MOV':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CAEP
     creation_time   : 2012-07-14T20:54:32.000000Z
   Duration: 00:00:11.52, start: 0.000000, bitrate: 45262 kb/s
     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 43657 kb/s,
25 fps, 25 tbr, 25k tbn, 50k tbc (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
     Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
stereo, s16, 1536 kb/s (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> ffv1 (native))
Press [q] to stop, [?] for help
Incompatible pixel format 'yuvj420p' for codec 'ffv1', auto-selecting
format 'yuv420p'
[swscaler @ 0x82fd9c0] deprecated pixel format used, make sure you did
set range correctly
Output #0, matroska, to 'out.mkv':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CAEP
     encoder         : Lavf58.45.100
     Stream #0:0(eng): Video: ffv1 (FFV1 / 0x31564646), yuv420p,
1920x1080, q=2-31, 200 kb/s, 25 fps, 1k tbn, 25 tbc (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
       encoder         : Lavc58.91.100 ffv1
frame=  288 fps= 43 q=-0.0 Lsize=  255120kB time=00:00:11.48
bitrate=182035.0kbits/s speed= 1.7x
video:255116kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.001688%



------------
ffmpeg-4.3.1 -i ../MVI_1522.MOV -n -an -c:v ffv1 -pix_fmt yuvj420p
-color_range jpeg -colorspace smpte170m -color_primaries bt709
-color_trc bt709 out-bt709.mkv
ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright
(c) 2000-2020 the FFmpeg developers
   built with gcc 8 (Debian 8.3.0-6)
   configuration: --enable-gpl --enable-version3 --enable-static
--disable-debug --disable-ffplay --disable-indev=sndio
--disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-gmp --enable-libgme --enable-gray
--enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis
--enable-libopus --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d
--enable-libxvid --enable-libzvbi --enable-libzimg
   libavutil      56. 51.100 / 56. 51.100
   libavcodec     58. 91.100 / 58. 91.100
   libavformat    58. 45.100 / 58. 45.100
   libavdevice    58. 10.100 / 58. 10.100
   libavfilter     7. 85.100 /  7. 85.100
   libswscale      5.  7.100 /  5.  7.100
   libswresample   3.  7.100 /  3.  7.100
   libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../MVI_1522.MOV':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CAEP
     creation_time   : 2012-07-14T20:54:32.000000Z
   Duration: 00:00:11.52, start: 0.000000, bitrate: 45262 kb/s
     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 43657 kb/s,
25 fps, 25 tbr, 25k tbn, 50k tbc (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
     Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
stereo, s16, 1536 kb/s (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> ffv1 (native))
Press [q] to stop, [?] for help
Incompatible pixel format 'yuvj420p' for codec 'ffv1', auto-selecting
format 'yuv420p'
[swscaler @ 0x89c9740] deprecated pixel format used, make sure you did
set range correctly
Output #0, matroska, to 'out-bt709.mkv':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CAEP
     encoder         : Lavf58.45.100
     Stream #0:0(eng): Video: ffv1 (FFV1 / 0x31564646), yuv420p(pc,
smpte170m/bt709/bt709), 1920x1080, q=2-31, 200 kb/s, 25 fps, 1k tbn, 25
tbc (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
       encoder         : Lavc58.91.100 ffv1
frame=  288 fps= 42 q=-0.0 Lsize=  255120kB time=00:00:11.48
bitrate=182035.0kbits/s speed=1.69x
video:255116kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.001694%



------------
ffmpeg-4.3.1 -i ../MVI_1522.MOV -n -an -c:v ffv1 -pix_fmt yuvj420p
-color_range jpeg out-jpeg.mkv
ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright
(c) 2000-2020 the FFmpeg developers
   built with gcc 8 (Debian 8.3.0-6)
   configuration: --enable-gpl --enable-version3 --enable-static
--disable-debug --disable-ffplay --disable-indev=sndio
--disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-gmp --enable-libgme --enable-gray
--enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf
--enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis
--enable-libopus --enable-libtheora --enable-libvidstab
--enable-libvo-amrwbenc --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d
--enable-libxvid --enable-libzvbi --enable-libzimg
   libavutil      56. 51.100 / 56. 51.100
   libavcodec     58. 91.100 / 58. 91.100
   libavformat    58. 45.100 / 58. 45.100
   libavdevice    58. 10.100 / 58. 10.100
   libavfilter     7. 85.100 /  7. 85.100
   libswscale      5.  7.100 /  5.  7.100
   libswresample   3.  7.100 /  3.  7.100
   libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../MVI_1522.MOV':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CAEP
     creation_time   : 2012-07-14T20:54:32.000000Z
   Duration: 00:00:11.52, start: 0.000000, bitrate: 45262 kb/s
     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 43657 kb/s,
25 fps, 25 tbr, 25k tbn, 50k tbc (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
     Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
stereo, s16, 1536 kb/s (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> ffv1 (native))
Press [q] to stop, [?] for help
Incompatible pixel format 'yuvj420p' for codec 'ffv1', auto-selecting
format 'yuv420p'
[swscaler @ 0x7626480] deprecated pixel format used, make sure you did
set range correctly
Output #0, matroska, to 'out-jpeg.mkv':
   Metadata:
     major_brand     : qt
     minor_version   : 537331968
     compatible_brands: qt  CAEP
     encoder         : Lavf58.45.100
     Stream #0:0(eng): Video: ffv1 (FFV1 / 0x31564646), yuv420p(pc),
1920x1080, q=2-31, 200 kb/s, 25 fps, 1k tbn, 25 tbc (default)
     Metadata:
       creation_time   : 2012-07-14T20:54:32.000000Z
       encoder         : Lavc58.91.100 ffv1
frame=  288 fps= 43 q=-0.0 Lsize=  255120kB time=00:00:11.48
bitrate=182035.0kbits/s speed=1.71x
video:255116kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.001690%

Source video:
0,v,MD5=521af382c5493165eda080c4a49c81e2
1,a,MD5=f21269116a847f887710cfc67ecc3e6e

Without setting color information:
0,v,MD5=4fbaea423bccbfa1a6d4a9701f09effc

Color information set:
0,v,MD5=4fbaea423bccbfa1a6d4a9701f09effc
0,v,MD5=4fbaea423bccbfa1a6d4a9701f09effc


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Correct conversion of yuvj420p?

Paul B Mahol
On Mon, Sep 07, 2020 at 11:20:10PM +0200, Peter B. wrote:

> Hi everyone!
>
> I've read quite a while ago that pix_fmt "yuvj420p" is deprecated, and when
> trying to convert an H.264/MOV to FFV1/MKV, I get the following message:
>
> > Incompatible pixel format 'yuvj420p' for codec 'ffv1', auto-selecting
> format 'yuv420p'
> > [swscaler @ 0x71c9440] deprecated pixel format used, make sure you did set
> range correctly
>
> The comment in [libavutil/pixfmt.h](https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/pixfmt.h#L78),
> says:
>
> > AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG),
> deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range
>
>
> 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.
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.

FFv1, still, as time of this writting does not support signaling
this color range in any way in bitstream.
Dunno if matroska container supports it.

Anyway you will need to find another way to store such metadata.


>
>
>
> Thanks in advance for any hints!
> Peter B.
>
>
>
> Here's what I've tried so far:
> (Console output below)
>
> // ----------------------------------------
> FFMPEG="ffmpeg-4.3.1"
> VIDEO_IN="../MVI_1522.MOV"
>
> clear
>
> $FFMPEG -i $VIDEO_IN -n -an -c:v ffv1 -pix_fmt + does_not_work.mkv
> $FFMPEG -i $VIDEO_IN -n -an -c:v ffv1 -pix_fmt yuvj420p out.mkv
> $FFMPEG -i $VIDEO_IN -n -an -c:v ffv1 -pix_fmt yuvj420p -color_range jpeg
> -colorspace smpte170m -color_primaries bt709 -color_trc bt709 out-bt709.mkv
> $FFMPEG -i $VIDEO_IN -n -an -c:v ffv1 -pix_fmt yuvj420p -color_range jpeg
> out-jpeg.mkv
> sleep 1
>
> echo
> echo "Source video:"
> $FFMPEG -i $VIDEO_IN -f streamhash -hash md5 -v quiet -map 0 -
> echo
> echo "Without setting color information:"
> $FFMPEG -i out.mkv -f streamhash -hash md5 -v quiet -map 0 -
> echo
> echo "Color information set:"
> $FFMPEG -i out-bt709.mkv -f streamhash -hash md5 -v quiet -map 0 -
> $FFMPEG -i out-jpeg.mkv -f streamhash -hash md5 -v quiet -map 0 -
> // ----------------------------------------
>
>
> ffmpeg-4.3.1 -i ../MVI_1522.MOV -n -an -c:v ffv1 -pix_fmt +
> does_not_work.mkv
> ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright (c)
> 2000-2020 the FFmpeg developers
>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-gpl --enable-version3 --enable-static
> --disable-debug --disable-ffplay --disable-indev=sndio
> --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
> --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom
> --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-librubberband --enable-libsoxr
> --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus
> --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
> --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi
> --enable-libzimg
>   libavutil      56. 51.100 / 56. 51.100
>   libavcodec     58. 91.100 / 58. 91.100
>   libavformat    58. 45.100 / 58. 45.100
>   libavdevice    58. 10.100 / 58. 10.100
>   libavfilter     7. 85.100 /  7. 85.100
>   libswscale      5.  7.100 /  5.  7.100
>   libswresample   3.  7.100 /  3.  7.100
>   libpostproc    55.  7.100 / 55.  7.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../MVI_1522.MOV':
>   Metadata:
>     major_brand     : qt
>     minor_version   : 537331968
>     compatible_brands: qt  CAEP
>     creation_time   : 2012-07-14T20:54:32.000000Z
>   Duration: 00:00:11.52, start: 0.000000, bitrate: 45262 kb/s
>     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
> 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 43657 kb/s, 25
> fps, 25 tbr, 25k tbn, 50k tbc (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
>     Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
> stereo, s16, 1536 kb/s (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> ffv1 (native))
> Press [q] to stop, [?] for help
> [ffv1 @ 0x5fb9500] Specified pixel format yuvj420p is invalid or not
> supported
> Error initializing output stream 0:0 -- Error while opening encoder for
> output stream #0:0 - maybe incorrect parameters such as bit_rate, rate,
> width or height
> Conversion failed!
>
>
>
> ------------
> ffmpeg-4.3.1 -i ../MVI_1522.MOV -n -an -c:v ffv1 -pix_fmt yuvj420p out.mkv
> ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright (c)
> 2000-2020 the FFmpeg developers
>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-gpl --enable-version3 --enable-static
> --disable-debug --disable-ffplay --disable-indev=sndio
> --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
> --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom
> --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-librubberband --enable-libsoxr
> --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus
> --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
> --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi
> --enable-libzimg
>   libavutil      56. 51.100 / 56. 51.100
>   libavcodec     58. 91.100 / 58. 91.100
>   libavformat    58. 45.100 / 58. 45.100
>   libavdevice    58. 10.100 / 58. 10.100
>   libavfilter     7. 85.100 /  7. 85.100
>   libswscale      5.  7.100 /  5.  7.100
>   libswresample   3.  7.100 /  3.  7.100
>   libpostproc    55.  7.100 / 55.  7.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../MVI_1522.MOV':
>   Metadata:
>     major_brand     : qt
>     minor_version   : 537331968
>     compatible_brands: qt  CAEP
>     creation_time   : 2012-07-14T20:54:32.000000Z
>   Duration: 00:00:11.52, start: 0.000000, bitrate: 45262 kb/s
>     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
> 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 43657 kb/s, 25
> fps, 25 tbr, 25k tbn, 50k tbc (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
>     Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
> stereo, s16, 1536 kb/s (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> ffv1 (native))
> Press [q] to stop, [?] for help
> Incompatible pixel format 'yuvj420p' for codec 'ffv1', auto-selecting format
> 'yuv420p'
> [swscaler @ 0x82fd9c0] deprecated pixel format used, make sure you did set
> range correctly
> Output #0, matroska, to 'out.mkv':
>   Metadata:
>     major_brand     : qt
>     minor_version   : 537331968
>     compatible_brands: qt  CAEP
>     encoder         : Lavf58.45.100
>     Stream #0:0(eng): Video: ffv1 (FFV1 / 0x31564646), yuv420p, 1920x1080,
> q=2-31, 200 kb/s, 25 fps, 1k tbn, 25 tbc (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
>       encoder         : Lavc58.91.100 ffv1
> frame=  288 fps= 43 q=-0.0 Lsize=  255120kB time=00:00:11.48
> bitrate=182035.0kbits/s speed= 1.7x
> video:255116kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.001688%
>
>
>
> ------------
> ffmpeg-4.3.1 -i ../MVI_1522.MOV -n -an -c:v ffv1 -pix_fmt yuvj420p
> -color_range jpeg -colorspace smpte170m -color_primaries bt709 -color_trc
> bt709 out-bt709.mkv
> ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright (c)
> 2000-2020 the FFmpeg developers
>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-gpl --enable-version3 --enable-static
> --disable-debug --disable-ffplay --disable-indev=sndio
> --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
> --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom
> --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-librubberband --enable-libsoxr
> --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus
> --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
> --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi
> --enable-libzimg
>   libavutil      56. 51.100 / 56. 51.100
>   libavcodec     58. 91.100 / 58. 91.100
>   libavformat    58. 45.100 / 58. 45.100
>   libavdevice    58. 10.100 / 58. 10.100
>   libavfilter     7. 85.100 /  7. 85.100
>   libswscale      5.  7.100 /  5.  7.100
>   libswresample   3.  7.100 /  3.  7.100
>   libpostproc    55.  7.100 / 55.  7.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../MVI_1522.MOV':
>   Metadata:
>     major_brand     : qt
>     minor_version   : 537331968
>     compatible_brands: qt  CAEP
>     creation_time   : 2012-07-14T20:54:32.000000Z
>   Duration: 00:00:11.52, start: 0.000000, bitrate: 45262 kb/s
>     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
> 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 43657 kb/s, 25
> fps, 25 tbr, 25k tbn, 50k tbc (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
>     Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
> stereo, s16, 1536 kb/s (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> ffv1 (native))
> Press [q] to stop, [?] for help
> Incompatible pixel format 'yuvj420p' for codec 'ffv1', auto-selecting format
> 'yuv420p'
> [swscaler @ 0x89c9740] deprecated pixel format used, make sure you did set
> range correctly
> Output #0, matroska, to 'out-bt709.mkv':
>   Metadata:
>     major_brand     : qt
>     minor_version   : 537331968
>     compatible_brands: qt  CAEP
>     encoder         : Lavf58.45.100
>     Stream #0:0(eng): Video: ffv1 (FFV1 / 0x31564646), yuv420p(pc,
> smpte170m/bt709/bt709), 1920x1080, q=2-31, 200 kb/s, 25 fps, 1k tbn, 25 tbc
> (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
>       encoder         : Lavc58.91.100 ffv1
> frame=  288 fps= 42 q=-0.0 Lsize=  255120kB time=00:00:11.48
> bitrate=182035.0kbits/s speed=1.69x
> video:255116kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.001694%
>
>
>
> ------------
> ffmpeg-4.3.1 -i ../MVI_1522.MOV -n -an -c:v ffv1 -pix_fmt yuvj420p
> -color_range jpeg out-jpeg.mkv
> ffmpeg version 4.3.1-static https://johnvansickle.com/ffmpeg/ Copyright (c)
> 2000-2020 the FFmpeg developers
>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-gpl --enable-version3 --enable-static
> --disable-debug --disable-ffplay --disable-indev=sndio
> --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
> --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom
> --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-librubberband --enable-libsoxr
> --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus
> --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
> --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi
> --enable-libzimg
>   libavutil      56. 51.100 / 56. 51.100
>   libavcodec     58. 91.100 / 58. 91.100
>   libavformat    58. 45.100 / 58. 45.100
>   libavdevice    58. 10.100 / 58. 10.100
>   libavfilter     7. 85.100 /  7. 85.100
>   libswscale      5.  7.100 /  5.  7.100
>   libswresample   3.  7.100 /  3.  7.100
>   libpostproc    55.  7.100 / 55.  7.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../MVI_1522.MOV':
>   Metadata:
>     major_brand     : qt
>     minor_version   : 537331968
>     compatible_brands: qt  CAEP
>     creation_time   : 2012-07-14T20:54:32.000000Z
>   Duration: 00:00:11.52, start: 0.000000, bitrate: 45262 kb/s
>     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
> 0x31637661), yuvj420p(pc, smpte170m/bt709/bt709), 1920x1080, 43657 kb/s, 25
> fps, 25 tbr, 25k tbn, 50k tbc (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
>     Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz,
> stereo, s16, 1536 kb/s (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> ffv1 (native))
> Press [q] to stop, [?] for help
> Incompatible pixel format 'yuvj420p' for codec 'ffv1', auto-selecting format
> 'yuv420p'
> [swscaler @ 0x7626480] deprecated pixel format used, make sure you did set
> range correctly
> Output #0, matroska, to 'out-jpeg.mkv':
>   Metadata:
>     major_brand     : qt
>     minor_version   : 537331968
>     compatible_brands: qt  CAEP
>     encoder         : Lavf58.45.100
>     Stream #0:0(eng): Video: ffv1 (FFV1 / 0x31564646), yuv420p(pc),
> 1920x1080, q=2-31, 200 kb/s, 25 fps, 1k tbn, 25 tbc (default)
>     Metadata:
>       creation_time   : 2012-07-14T20:54:32.000000Z
>       encoder         : Lavc58.91.100 ffv1
> frame=  288 fps= 43 q=-0.0 Lsize=  255120kB time=00:00:11.48
> bitrate=182035.0kbits/s speed=1.71x
> video:255116kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.001690%
>
> Source video:
> 0,v,MD5=521af382c5493165eda080c4a49c81e2
> 1,a,MD5=f21269116a847f887710cfc67ecc3e6e
>
> Without setting color information:
> 0,v,MD5=4fbaea423bccbfa1a6d4a9701f09effc
>
> Color information set:
> 0,v,MD5=4fbaea423bccbfa1a6d4a9701f09effc
> 0,v,MD5=4fbaea423bccbfa1a6d4a9701f09effc
>
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Correct conversion of yuvj420p?

kumowoon1025
In reply to this post by Peter B.
Hi,

>  > Incompatible pixel format 'yuvj420p' for codec 'ffv1', auto-selecting
>
> format 'yuv420p'
>
>  > [swscaler @ 0x71c9440] deprecated pixel format used, make sure you
>
> did set range correctly
>
>
>
> The comment in
>
> [libavutil/pixfmt.h](https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/pixfmt.h#L78),
>
> says:
>
>
>
>  > AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG),
>
> deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range
>
> The source video is: yuvj420p(pc, smpte170m/bt709/bt709)
>
> The output video is: yuv420p(pc, smpte170m/bt709/bt709)
I think it means to force output 0-100% levels with yuv420p format if you are seeking yuvj420p, with the understanding they won’t necessarily be safe.

> 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 :(
Isn’t it unavoidable? Since the ranges are not same. Though maybe if you go from broadcast and force filter setrange=pc they might match? I’m not very sure. One thing I’d mention just in case is color range option only sets what the header claims it’s contents are, for the encoders that accept it.

Regards,
Ted
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Correct conversion of yuvj420p?

Peter B.
In reply to this post by Paul B Mahol
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)



Thanks again Paul!
Peter
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Correct conversion of yuvj420p?

Paul B Mahol
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
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Correct conversion of yuvj420p?

Peter B.
Dear Paul,

On 10.09.20 15:53, Paul B Mahol wrote:
>> 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.

Will check.

However, after reading "color_range" documentation on [1] do thought
that the "pc" means "full-range".
So I thought that is reporting the range (it thinks it has)?



Kind regards,
Peter



[1] https://ffmpeg.org/ffmpeg-all.html#Codec-Options:
 >
 > color_range integer (decoding/encoding,video)
 >
 > If used as input parameter, it serves as a hint to the decoder, which
color_range the input has. Possible values:
 >
 >     ‘tv’
 >     ‘mpeg’
 >
 >         MPEG (219*2^(n-8))
 >     ‘pc’
 >     ‘jpeg’
 >
 >         JPEG (2^n-1)



_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Correct conversion of yuvj420p?

Paul B Mahol
On Fri, Sep 11, 2020 at 10:10:31AM +0200, Peter B. wrote:

> Dear Paul,
>
> On 10.09.20 15:53, Paul B Mahol wrote:
> > > 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.
>
> Will check.
>
> However, after reading "color_range" documentation on [1] do thought that
> the "pc" means "full-range".
> So I thought that is reporting the range (it thinks it has)?

Yes, it is. Ignore my remark.

>
>
>
> Kind regards,
> Peter
>
>
>
> [1] https://ffmpeg.org/ffmpeg-all.html#Codec-Options:
> >
> > color_range integer (decoding/encoding,video)
> >
> > If used as input parameter, it serves as a hint to the decoder, which
> color_range the input has. Possible values:
> >
> >     ‘tv’
> >     ‘mpeg’
> >
> >         MPEG (219*2^(n-8))
> >     ‘pc’
> >     ‘jpeg’
> >
> >         JPEG (2^n-1)
>
>
>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Correct conversion of yuvj420p?

Peter B.
In reply to this post by Paul B Mahol
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 :)



Grateful for any suggestions.

Kind regards,
Peter B.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Correct conversion of yuvj420p?

Paul B Mahol
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
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Correct conversion of yuvj420p?

kumowoon1025
Hi,

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

Obviously those names are not relevant until the file meets the av* tools, but they are the same formats. I think yuvj420p was meant to be a separate variant of yuv420p that was not broadcast safe, from ccd sources early on, but since everything is digital nowadays and powerful enough to shift if necessary.

>> 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 :)

setrange affects the frames, not any end result SPS i think. Leaving it out doesn’t set the parameters? Does it convert to limited range by default?

Also, what are some of the benefits of reencoding footage for archival? I can maybe think of being able to detect partial corruption and possibly a increase in data/bitrate, but not much else.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".