[FFmpeg-user] convert from bt601 to bt709

Rio Kierkels riokierkels at gmail.com
Thu Jun 5 09:57:34 CEST 2014


On 5 June 2014 05:03, Gregory Ducatel <gducatel at gmail.com> wrote:

> 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=  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
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>

My first advice would be to not use QuickTime for color accurate viewing.
However I've yet to find a good/trustable viewer for this kind of work.
VLC/DJV/Lightworks seem to work nice on my Linux workstation though. If
anybody has any good suggestions they'd me more than welcome.

On the DNxHD question I've yet to find a good way of actually getting a
good dependable color accurate DNxHD QT.
Maybe try not to use the sws_flags at all and only use filters_complex.
sws_flags have never really worked for me.
But to be honest I've not really looked at this problem in quite a while.
We've settled for a DPX -> Prores work flow internally for workable
previews.

-- 
C018 4C82 3701 9CAC B723  4C29 2C04 E81A 7418 D158


More information about the ffmpeg-user mailing list