{"id":5396,"date":"2014-03-30T21:25:55","date_gmt":"2014-03-30T21:25:55","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/convert-exr-file-sequence-with-ffmpeg-and-x264-collection-of-common-programming-errors\/"},"modified":"2014-03-30T21:25:55","modified_gmt":"2014-03-30T21:25:55","slug":"convert-exr-file-sequence-with-ffmpeg-and-x264-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/convert-exr-file-sequence-with-ffmpeg-and-x264-collection-of-common-programming-errors\/","title":{"rendered":"Convert&#160;EXR file sequence with FFmpeg and x264-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9d96093408df0463815ff4d9b8a0c1a9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nslhck<\/p>\n<p>When I convert an EXR sequence into a QuickTime\u00a0MOV file using FFmpeg and the x264 codec, it codes the video &#8211; but in QuickTime Player and Windows Media Player it&#8217;s just black!<\/p>\n<p>But when I open it up with\u00a0VLC I can see the image and it looks fine. When I try the same thing with a JPG sequence instead of EXR it works perfectly! Does anyone have an idea what that could be?<\/p>\n<p>Here is my FFmpeg code:<\/p>\n<pre><code>ffmpeg -y -i C:\/seq_v001.%04d.exr -c:v libx264 -preset slow -crf 17 C:\/out.mov\n<\/code><\/pre>\n<p>Here is the console output:<\/p>\n<pre><code>ffmpeg version N-47062-g26c531c Copyright (c) 2000-2012 the FFmpeg developers\n  built on Nov 25 2012 12:25:21 with gcc 4.7.2 (GCC)\n  configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib\n  libavutil      52.  9.100 \/ 52.  9.100\n  libavcodec     54. 77.100 \/ 54. 77.100\n  libavformat    54. 37.100 \/ 54. 37.100\n  libavdevice    54.  3.100 \/ 54.  3.100\n  libavfilter     3. 23.102 \/  3. 23.102\n  libswscale      2.  1.102 \/  2.  1.102\n  libswresample   0. 17.101 \/  0. 17.101\n  libpostproc    52.  2.100 \/ 52.  2.100\n[image2 @ 000000000025e4c0] Stream #0: not enough frames to estimate rate; consider increasing probesize\nInput #0, image2, from 'C:\/seq_v001.%04d.exr':\n  Duration: 00:00:04.00, start: 0.000000, bitrate: N\/A\n    Stream #0:0: Video: exr, rgb48le, 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc\n[libx264 @ 0000000001fd0ea0] using SAR=1\/1\n[libx264 @ 0000000001fd0ea0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2\n[libx264 @ 0000000001fd0ea0] profile High 4:4:4 Predictive, level 5.0, 4:4:4 8-bit\n[libx264 @ 0000000001fd0ea0] 264 - core 128 r2216 198a7ea - H.264\/MPEG-4 AVC codec - Copyleft 2003-2012 - http:\/\/www.videolan.org\/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=17.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00\nOutput #0, mov, to 'C:\/out.mov':\n  Metadata:\n    encoder         : Lavf54.37.100\n    Stream #0:0: Video: h264 (avc1 \/ 0x31637661), yuv444p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 12800 tbn, 25 tbc\nStream mapping:\n  Stream #0:0 -&gt; #0:0 (exr -&gt; libx264)\nPress [q] to stop, [?] for help\n[exr @ 0000000001fddea0] Found more than one compression attribute\n[exr @ 0000000001fdda40] Found more than one compression attribute\n[exr @ 0000000001fde2e0] Found more than one compression attribute\n[exr @ 0000000001fde740] Found more than one compression attribute\n[exr @ 0000000001fdeb80] Found more than one compression attribute\n[exr @ 0000000001fdefe0] Found more than one compression attribute\nframe=    7 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fdf880] Found more than one compression attribute\n[exr @ 0000000001fdfcc0] Found more than one compression attribute\n[exr @ 0000000001fe0120] Found more than one compression attribute\n[exr @ 0000000001fe0560] Found more than one compression attribute\n[exr @ 0000000001fe09c0] Found more than one compression attribute\n[exr @ 0000000001fe0e00] Found more than one compression attribute\n[exr @ 0000000001fddea0] Found more than one compression attribute\n[exr @ 0000000001fdda40] Found more than one compression attribute\n[exr @ 0000000001fde2e0] Found more than one compression attribute\nframe=   17 fps= 16 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fdeb80] Found more than one compression attribute\n[exr @ 0000000001fdefe0] Found more than one compression attribute\n[exr @ 0000000001fdf420] Found more than one compression attribute\n[exr @ 0000000001fdf880] Found more than one compression attribute\n[exr @ 0000000001fdfcc0] Found more than one compression attribute\n[exr @ 0000000001fe0120] Found more than one compression attribute\n[exr @ 0000000001fe0560] Found more than one compression attribute\n[exr @ 0000000001fe09c0] Found more than one compression attribute\n[exr @ 0000000001fe0e00] Found more than one compression attribute\n[exr @ 0000000001fddea0] Found more than one compression attribute\nframe=   28 fps= 18 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fde2e0] Found more than one compression attribute\n[exr @ 0000000001fde740] Found more than one compression attribute\n[exr @ 0000000001fdeb80] Found more than one compression attribute\n[exr @ 0000000001fdefe0] Found more than one compression attribute\n[exr @ 0000000001fdf420] Found more than one compression attribute\n[exr @ 0000000001fdf880] Found more than one compression attribute\n[exr @ 0000000001fdfcc0] Found more than one compression attribute\n[exr @ 0000000001fe0120] Found more than one compression attribute\n[exr @ 0000000001fe0560] Found more than one compression attribute\n[exr @ 0000000001fe09c0] Found more than one compression attribute\nframe=   39 fps= 19 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fddea0] Found more than one compression attribute\n[exr @ 0000000001fdda40] Found more than one compression attribute\n[exr @ 0000000001fde2e0] Found more than one compression attribute\n[exr @ 0000000001fde740] Found more than one compression attribute\n[exr @ 0000000001fdeb80] Found more than one compression attribute\n[exr @ 0000000001fdefe0] Found more than one compression attribute\n[exr @ 0000000001fdf420] Found more than one compression attribute\n[exr @ 0000000001fdf880] Found more than one compression attribute\n[exr @ 0000000001fdfcc0] Found more than one compression attribute\n[exr @ 0000000001fe0120] Found more than one compression attribute\nframe=   50 fps= 19 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fe09c0] Found more than one compression attribute\n[exr @ 0000000001fe0e00] Found more than one compression attribute\n[exr @ 0000000001fddea0] Found more than one compression attribute\n[exr @ 0000000001fdda40] Found more than one compression attribute\n[exr @ 0000000001fde2e0] Found more than one compression attribute\n[exr @ 0000000001fde740] Found more than one compression attribute\nframe=   57 fps= 16 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fdefe0] Found more than one compression attribute\n[exr @ 0000000001fdf420] Found more than one compression attribute\n[exr @ 0000000001fdf880] Found more than one compression attribute\n[exr @ 0000000001fdfcc0] Found more than one compression attribute\n[exr @ 0000000001fe0120] Found more than one compression attribute\n[exr @ 0000000001fe0560] Found more than one compression attribute\n[exr @ 0000000001fe09c0] Found more than one compression attribute\n[exr @ 0000000001fe0e00] Found more than one compression attribute\nframe=   66 fps= 17 q=0.0 size=       0kB time=00:00:00.00 bitrate=   0.0kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fdda40] Found more than one compression attribute\n[exr @ 0000000001fde2e0] Found more than one compression attribute\n[exr @ 0000000001fde740] Found more than one compression attribute\n[exr @ 0000000001fdeb80] Found more than one compression attribute\n[exr @ 0000000001fdefe0] Found more than one compression attribute\n[exr @ 0000000001fdf420] Found more than one compression attribute\n[exr @ 0000000001fdf880] Found more than one compression attribute\nframe=   74 fps= 16 q=22.0 size=     255kB time=00:00:00.00 bitrate=   0.0kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fe0120] Found more than one compression attribute\n[exr @ 0000000001fe0560] Found more than one compression attribute\n[exr @ 0000000001fe09c0] Found more than one compression attribute\n[exr @ 0000000001fe0e00] Found more than one compression attribute\nframe=   79 fps= 16 q=22.0 size=     467kB time=00:00:00.20 bitrate=19134.5kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fdda40] Found more than one compression attribute\n[exr @ 0000000001fde2e0] Found more than one compression attribute\n[exr @ 0000000001fde740] Found more than one compression attribute\nframe=   83 fps= 15 q=22.0 size=     652kB time=00:00:00.36 bitrate=14829.5kbits\/s    \nFound more than one compression attribute\n[exr @ 0000000001fdefe0] Found more than one compression attribute\n[exr @ 0000000001fdf420] Found more than one compression attribute\n[exr @ 0000000001fdf880] Found more than one compression attribute\n[exr @ 0000000001fdfcc0] Found more than one compression attribute\nframe=  100 fps= 15 q=22.0 size=    1505kB time=-577014:-32:-22.-77 bitrate=  -0.0kbits\/s    \nframe=  100 fps=9.6 q=-1.0 Lsize=    3831kB time=00:00:03.92 bitrate=8006.7kbits\/s    \n\nvideo:3829kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.050698%\n[libx264 @ 0000000001fd0ea0] frame I:1     Avg QP:18.35  size:168478\n[libx264 @ 0000000001fd0ea0] frame P:31    Avg QP:16.10  size: 83540\n[libx264 @ 0000000001fd0ea0] frame B:68    Avg QP:20.34  size: 17093\n[libx264 @ 0000000001fd0ea0] consecutive B-frames:  7.0%  4.0%  9.0% 80.0%\n[libx264 @ 0000000001fd0ea0] mb I  I16..4: 22.6% 67.9%  9.4%\n[libx264 @ 0000000001fd0ea0] mb P  I16..4:  1.3%  7.3%  0.6%  P16..4: 20.3% 10.1%  5.7%  0.0%  0.0%    skip:54.6%\n[libx264 @ 0000000001fd0ea0] mb B  I16..4:  0.2%  0.8%  0.1%  B16..8: 30.8%  4.8%  1.2%  direct: 1.5%  skip:60.6%  L0:46.0% L1:48.6% BI: 5.4%\n[libx264 @ 0000000001fd0ea0] 8x8 transform intra:76.0% inter:78.8%\n[libx264 @ 0000000001fd0ea0] direct mvs  spatial:85.3% temporal:14.7%\n[libx264 @ 0000000001fd0ea0] coded y,u,v intra: 87.8% 56.3% 53.3% inter: 13.0% 6.1% 5.0%\n[libx264 @ 0000000001fd0ea0] i16 v,h,dc,p: 12%  9% 24% 55%\n[libx264 @ 0000000001fd0ea0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10%  8% 32%  7% 11%  8%  9%  7%  9%\n[libx264 @ 0000000001fd0ea0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12%  8%  5%  8% 23% 14% 11%  9% 11%\n[libx264 @ 0000000001fd0ea0] Weighted P-Frames: Y:0.0% UV:0.0%\n[libx264 @ 0000000001fd0ea0] ref P L0: 40.6%  9.5% 25.3% 13.3%  9.3%  2.1%\n[libx264 @ 0000000001fd0ea0] ref B L0: 64.9% 24.5%  8.7%  1.9%\n[libx264 @ 0000000001fd0ea0] ref B L1: 89.8% 10.2%\n[libx264 @ 0000000001fd0ea0] kb\/s:7841.10\n<\/code><\/pre>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9d96093408df0463815ff4d9b8a0c1a9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nslhck<\/p>\n<p>You&#8217;re converting video using the YUV 4:4:4 color space. This is not really standard &#8211; most (some?) players will only support the chroma-subsampled YUV 4:2:0 planar, including Windows Media Player and QuickTime.<\/p>\n<p>Your JPEG images will typically use YUV 4:2:0 subsampling (<code>yuvj420p<\/code>), so FFmpeg will produce compatible video by default.<\/p>\n<p>Try encoding the video with <code>-pix_fmt yuv420p<\/code> instead:<\/p>\n<pre><code>ffmpeg -y -i C:\/seq_v001.%04d.exr -c:v libx264 -pix_fmt yuv420p -preset slow -crf 17 C:\/out.mov\n<\/code><\/pre>\n<p>You probably won&#8217;t notice any huge quality loss compared to the non-subsampled version &#8211; the eye isn&#8217;t as sensitive to color information as it is to spatial information.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>slhck When I convert an EXR sequence into a QuickTime\u00a0MOV file using FFmpeg and the x264 codec, it codes the video &#8211; but in QuickTime Player and Windows Media Player it&#8217;s just black! But when I open it up with\u00a0VLC I can see the image and it looks fine. When I try the same thing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5396","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5396"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5396\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}