[FFmpeg-user] convert from bt601 to bt709

Gregory Ducatel gducatel at gmail.com
Thu Jun 5 05:03:02 CEST 2014


Hi Guys,
I am trying to convert a DPX image sequence into a DNXHD movie.
My issue is that I am not able to properly convert the data from bt601 into
an output of bt701 using the following command line (on Windows 7 x64).


*Command line:*

ffmpeg.exe -y -threads 8 -f image2 -r 24000/1001 -i "Source_file.%04d.dpx"
-sws_flags full_chroma_inp+full_chroma_int+accurate_rnd+print_info -c:v
dnxhd -pix_fmt yuv422p -b:v 115M -vf "[in]scale=1920:1080,
colormatrix=bt601:bt709[out]" -movflags +faststart -aspect 1.777778
"c:\test_dnxhd.mov"


*Output result:*

ffmpeg version N-63746-gfbaf73a Copyright (c) 2000-2014 the FFmpeg
developers
  built on Jun  3 2014 22:10:20 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca
--enable-libfreetyp
e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-
libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger
--enable-libsox
r --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab -
-enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-
libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 89.100 / 52. 89.100
  libavcodec     55. 66.100 / 55. 66.100
  libavformat    55. 42.100 / 55. 42.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, image2, from 'R:\test.%04d.dpx':
  Duration: 00:00:06.67, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: dpx, gbrp10le, 1920x1080 [SAR 1:1 DAR 16:9], 23.98
tbr,23.98 tbn, 23.98 tbc
[swscaler @ 0000000000383fc0] bicubic scaler, from gbrp10le to yuv422p10le
using MMXEXT
[swscaler @ 00000000003a7960] bicubic scaler, from yuv422p10le to yuv422p
using MMXEXT
[swscaler @ 00000000003a7960] using unscaled yuv422p10le -> yuv422p special
converter
Output #0, mov, to 'c:\test_dnxhd.mov':
  Metadata:
    encoder         : Lavf55.42.100
    Stream #0:0: Video: dnxhd (AVdn / 0x6E645641), yuv422p, 1920x1080 [SAR
1:1 D
AR 16:9], q=2-1024, 115000 kb/s, 23.98 fps, 19184 tbn, 23.98 tbc
    Metadata:
      encoder         : Lavc55.66.100 dnxhd
Stream mapping:
  Stream #0:0 -> #0:0 (dpx -> dnxhd)
Press [q] to stop, [?] for help
frame=    4 fps=0.0 q=1.0 size=    2368kB time=00:00:00.16
bitrate=116296.4kbits
frame=    7 fps=6.5 q=1.0 size=    4144kB time=00:00:00.29
bitrate=116295.9kbits
frame=   10 fps=6.1 q=1.0 size=    5920kB time=00:00:00.41
bitrate=116295.7kbits
frame=   13 fps=5.9 q=1.0 size=    7696kB time=00:00:00.54
bitrate=116295.6kbits
frame=   16 fps=5.8 q=1.0 size=    9472kB time=00:00:00.66
bitrate=116295.3kbits
frame=   19 fps=5.8 q=1.0 size=   11248kB time=00:00:00.79
bitrate=116295.3kbits
frame=   22 fps=5.7 q=1.0 size=   13024kB time=00:00:00.91
bitrate=116295.3kbits
frame=   25 fps=5.7 q=1.0 size=   14800kB time=00:00:01.04
bitrate=116295.3kbits
frame=   28 fps=5.7 q=1.0 size=   16576kB time=00:00:01.16
bitrate=116295.2kbits
frame=   31 fps=5.7 q=1.0 size=   18352kB time=00:00:01.29
bitrate=116295.2kbits
frame=   34 fps=5.6 q=1.0 size=   20128kB time=00:00:01.41
bitrate=116295.2kbits
frame=   37 fps=5.6 q=1.0 size=   21904kB time=00:00:01.54
bitrate=116295.2kbits
frame=   40 fps=5.6 q=1.0 size=   23680kB time=00:00:01.66
bitrate=116295.1kbits
frame=   43 fps=5.6 q=1.0 size=   25456kB time=00:00:01.79
bitrate=116295.1kbits
frame=   46 fps=5.6 q=1.0 size=   27232kB time=00:00:01.91
bitrate=116295.1kbits
frame=   49 fps=5.6 q=1.0 size=   29008kB time=00:00:02.04
bitrate=116295.1kbits
frame=   52 fps=5.6 q=1.0 size=   30784kB time=00:00:02.16
bitrate=116295.1kbits
frame=   55 fps=5.6 q=1.0 size=   32560kB time=00:00:02.29
bitrate=116295.1kbits
frame=   58 fps=5.6 q=1.0 size=   34336kB time=00:00:02.41
bitrate=116295.1kbits
frame=   61 fps=5.6 q=1.0 size=   36112kB time=00:00:02.54
bitrate=116295.1kbits
frame=   64 fps=5.6 q=1.0 size=   37888kB time=00:00:02.66
bitrate=116295.0kbits
frame=   67 fps=5.6 q=1.0 size=   39664kB time=00:00:02.79
bitrate=116295.0kbits
frame=   70 fps=5.6 q=1.0 size=   41440kB time=00:00:02.91
bitrate=116295.1kbits
frame=   73 fps=5.6 q=1.0 size=   43216kB time=00:00:03.04
bitrate=116295.0kbits
frame=   76 fps=5.5 q=1.0 size=   44992kB time=00:00:03.16
bitrate=116295.0kbits
frame=   79 fps=5.5 q=1.0 size=   46768kB time=00:00:03.29
bitrate=116295.0kbits
frame=   82 fps=5.5 q=1.0 size=   48544kB time=00:00:03.41
bitrate=116295.0kbits
frame=   85 fps=5.5 q=1.0 size=   50320kB time=00:00:03.54
bitrate=116295.0kbits
frame=   88 fps=5.5 q=1.0 size=   52096kB time=00:00:03.66
bitrate=116295.0kbits
frame=   91 fps=5.5 q=1.0 size=   53872kB time=00:00:03.79
bitrate=116295.0kbits
frame=   94 fps=5.5 q=1.0 size=   55648kB time=00:00:03.91
bitrate=116295.0kbits
frame=   97 fps=5.5 q=1.0 size=   57424kB time=00:00:04.04
bitrate=116295.0kbits
frame=  100 fps=5.5 q=1.0 size=   59200kB time=00:00:04.17
bitrate=116295.0kbits
frame=  103 fps=5.5 q=1.0 size=   60976kB time=00:00:04.29
bitrate=116295.0kbits
frame=  106 fps=5.5 q=1.0 size=   62752kB time=00:00:04.42
bitrate=116295.0kbits
frame=  109 fps=5.5 q=1.0 size=   64528kB time=00:00:04.54
bitrate=116295.0kbits
frame=  112 fps=5.5 q=1.0 size=   66304kB time=00:00:04.67
bitrate=116295.0kbits
frame=  115 fps=5.5 q=1.0 size=   68080kB time=00:00:04.79
bitrate=116295.0kbits
frame=  118 fps=5.5 q=1.0 size=   69856kB time=00:00:04.92
bitrate=116295.0kbits
frame=  121 fps=5.5 q=1.0 size=   71632kB time=00:00:05.04
bitrate=116295.0kbits
frame=  124 fps=5.5 q=1.0 size=   73408kB time=00:00:05.17
bitrate=116295.0kbits
frame=  127 fps=5.5 q=1.0 size=   75184kB time=00:00:05.29
bitrate=116295.0kbits
frame=  130 fps=5.5 q=1.0 size=   76960kB time=00:00:05.42
bitrate=116295.0kbits
frame=  133 fps=5.5 q=1.0 size=   78736kB time=00:00:05.54
bitrate=116295.0kbits
frame=  136 fps=5.5 q=1.0 size=   80512kB time=00:00:05.67
bitrate=116295.0kbits
frame=  139 fps=5.5 q=1.0 size=   82288kB time=00:00:05.79
bitrate=116295.0kbits
frame=  142 fps=5.5 q=1.0 size=   84064kB time=00:00:05.92
bitrate=116295.0kbits
frame=  145 fps=5.5 q=1.0 size=   85840kB time=00:00:06.04
bitrate=116295.0kbits
frame=  148 fps=5.5 q=1.0 size=   87616kB time=00:00:06.17
bitrate=116295.0kbits
frame=  151 fps=5.5 q=1.0 size=   89392kB time=00:00:06.29
bitrate=116295.0kbits
frame=  154 fps=5.5 q=1.0 size=   91168kB time=00:00:06.42
bitrate=116295.0kbits
frame=  157 fps=5.5 q=1.0 size=   92944kB time=00:00:06.54
bitrate=116295.0kbits
frame=  160 fps=5.5 q=1.0 size=   94720kB time=00:00:06.67
bitrate=116295.0kbits
[mov @ 00000000003836c0] Starting second pass: moving the moov atom to the
beginning of the file
frame=  160 fps=5.4 q=1.0 Lsize=   94721kB time=00:00:06.67
bitrate=116296.8kbits/s
video:94720kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.001571%



When I open the file inside QuickTime, it is like the color matrix was not
apply and the gamma is always set to 2.2... Any advice or help?
Thanks.

Greg


More information about the ffmpeg-user mailing list