[FFmpeg-user] Color Shift when encoding DNxHD QuickTime video on Windows
Yani Lathouris
ylathouris at gmail.com
Mon May 13 07:21:06 CEST 2013
Hi
I am a software developer working for an animation studio. I have been
tasked with creating DNxHD QuickTime videos which are then imported into
Avid Media Composer (An Editing Suite Application using DNxHD and MXF as
it's preferred codec and format). Our studio uses Windows 7. I have noticed
a color shift when comparing the media encoded by FFmpeg to the media
created by Avid when importing the frames directly (Note: Avid will encode
a DNxHD MXF from the image files on import). We create the QuickTime videos
ourselves because it reduces the import time given that Avid will only
change the video container without having to do any real encoding. I hope
this makes sense, I am not an expert in this area. I have compared the
output when using other software packages such as RVIO and Nuke. RVIO
doesn't match the video created by Avid but it also doesn't match the video
created by FFmpeg whereas Nuke is able to match the video created by Avid.
I am interested to learn about what causes the color shift. Attached is the
output from the FFmpeg command I am using and the output from an ffprobe
query on both an input image and the output video. Note: The input images
are in sRGB color space. Any feedback will be much appreciated.
-------------- next part --------------
C:\Windows>ffmpeg -f image2 -r 25 -i "C:\temp\input\image.%04d.tiff" -s 1920x1080 -vcodec dnxhd -b:v 185M -r 25 -pix_fmt
yuv422p -mbd rd -an "c:\temp\output_video.mov"
ffmpeg version N-34549-g13b7781, Copyright (c) 2000-2011 the FFmpeg developers
built on Nov 6 2011 22:02:08 with gcc 4.6.1
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enab
le-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --en
able-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
libavutil 51. 24. 0 / 51. 24. 0
libavcodec 53. 28. 0 / 53. 28. 0
libavformat 53. 19. 0 / 53. 19. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 47. 0 / 2. 47. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, image2, from 'C:\temp\input\image.%04d.tiff':
Duration: 00:00:00.44, start: 0.000000, bitrate: N/A
Stream #0:0: Video: tiff, rgb24, 1280x720, 25 tbr, 25 tbn, 25 tbc
[buffer @ 034E8A40] w:1280 h:720 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[scale @ 003E33E0] w:1280 h:720 fmt:rgb24 -> w:1920 h:1080 fmt:yuv422p flags:0x4
Output #0, mov, to 'c:\temp\output_video.mov':
Metadata:
encoder : Lavf53.19.0
Stream #0:0: Video: dnxhd (hq) (AVdn / 0x6E645641), yuv422p, 1920x1080, q=2-31, 185000 kb/s, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (tiff -> dnxhd)
Press [q] to stop, [?] for help
frame= 11 fps= 2 q=30.0 Lsize= 9857kB time=00:00:00.44 bitrate=183517.0kbits/s
video:9856kB audio:0kB global headers:0kB muxing overhead 0.008818%
-------------- next part --------------
C:\Windows>ffprobe -print_format json -show_format -show_streams "c:\temp\input\image.0000.tiff"
ffprobe version N-40640-g5edd4fc Copyright (c) 2007-2012 the FFmpeg developers
built on May 13 2012 18:02:34 with gcc 4.6.3
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enab
le-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschro
edinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 50.100 / 51. 50.100
libavcodec 54. 21.101 / 54. 21.101
libavformat 54. 4.100 / 54. 4.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 72.105 / 2. 72.105
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 11.100 / 0. 11.100
libpostproc 52. 0.100 / 52. 0.100
{Input #0, image2, from 'c:\temp\input\image.0000.tiff':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: tiff, rgb24, 1280x720, 25 tbr, 25 tbn, 25 tbc
"streams": [
{
"index": 0,
"codec_name": "tiff",
"codec_long_name": "TIFF image",
"codec_type": "video",
"codec_time_base": "1/25",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"width": 1280,
"height": 720,
"has_b_frames": 0,
"pix_fmt": "rgb24",
"level": -99,
"r_frame_rate": "25/1",
"avg_frame_rate": "0/0",
"time_base": "1/25",
"start_time": "0.000000",
"duration": "0.040000"
}
],
"format": {
"filename": "c:\\temp\\input\\image.0000.tiff",
"nb_streams": 1,
"format_name": "image2",
"format_long_name": "image2 sequence",
"start_time": "0.000000",
"duration": "0.040000"
}
}
-------------- next part --------------
C:\Windows>ffprobe -print_format json -show_format -show_streams "c:\temp\output_video.mov"
ffprobe version N-40640-g5edd4fc Copyright (c) 2007-2012 the FFmpeg developers
built on May 13 2012 18:02:34 with gcc 4.6.3
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enab
le-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschro
edinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 50.100 / 51. 50.100
libavcodec 54. 21.101 / 54. 21.101
libavformat 54. 4.100 / 54. 4.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 72.105 / 2. 72.105
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 11.100 / 0. 11.100
libpostproc 52. 0.100 / 52. 0.100
{Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\temp\output_video.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.19.0
Duration: 00:00:00.44, start: 0.000000, bitrate: 183516 kb/s
Stream #0:0(eng): Video: dnxhd (AVdn / 0x6E645641), yuv422p, 1920x1080, 183500 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : DataHandler
"streams": [
{
"index": 0,
"codec_name": "dnxhd",
"codec_long_name": "VC3/DNxHD",
"codec_type": "video",
"codec_time_base": "1/25",
"codec_tag_string": "AVdn",
"codec_tag": "0x6e645641",
"width": 1920,
"height": 1080,
"has_b_frames": 0,
"pix_fmt": "yuv422p",
"level": -99,
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"time_base": "1/25",
"start_time": "0.000000",
"duration": "0.440000",
"bit_rate": "183500800",
"nb_frames": "11",
"tags": {
"creation_time": "1970-01-01 00:00:00",
"language": "eng",
"handler_name": "DataHandler"
}
}
],
"format": {
"filename": "c:\\temp\\output_video.mov",
"nb_streams": 1,
"format_name": "mov,mp4,m4a,3gp,3g2,mj2",
"format_long_name": "QuickTime/MPEG-4/Motion JPEG 2000 format",
"start_time": "0.000000",
"duration": "0.440000",
"size": "10093434",
"bit_rate": "183516981",
"tags": {
"major_brand": "qt ",
"minor_version": "512",
"compatible_brands": "qt ",
"creation_time": "1970-01-01 00:00:00",
"encoder": "Lavf53.19.0"
}
}
}
More information about the ffmpeg-user
mailing list