Quicktime Container Issue

Any other question that don't fit into the other support categorizes.
Post Reply
mboufleur
Posts: 1
Joined: Mon Dec 01, 2014 2:47 pm

Quicktime Container Issue

Post by mboufleur » Mon Dec 01, 2014 3:19 pm

Hello everyone,

This question has already been asked in ffmpeg list, but since I haven't got any answers I decided to post here to see if anyone had encountered similar issues or solutions. Please let me know if this is against forum rules.

I am quite new to ffmpeg, but nevertheless I was trying to create an H.264 Quicktime file that could mimic the settings and behaviour of H.264 files created by Apple tools (Compressor, Quicktime Player).

I was able to create a file with the same characteristics, but when played in windows Quicktime Player (or Quicktime Player 7.6 in Mac), the video would stutter and play 16fps instead of the native 24fps. When moved frame by frame, all video frames were present. This same file plays without issues in VLC.

I decided to create a ProRes file instead and it all went well: the resulting quicktime file would play nicely in Quicktime player and could be edited in FinalCutPro. When using this ffmpeg-ProRes file in Compressor to create a H.264 file however, the resulting file would show the same stutter as the first H.264 file created by ffmpeg. There was a main difference however: this new file generated by Compressor, which used the ProRes from ffmpeg, created a 24fps H.264 with several duplicated frames that indeed caused the stutter.

Unfortunately, there are cases when I need a resulting file that need to be played by Quicktime Player, or that uses the Quicktime API to be played, so VLC isn't always an option. Does someone know what I should do to fix this issue in Quicktime container from ffmpeg generated files?

Here is my command line

Code: Select all

ffmpeg -r 24 -i Test.mxf -vf "scale=1920:1038,pad=1920:1080:0:21" -pix_fmt yuv420p -c:v libx264 -r 24 -profile:v main -level 4.1 -preset faster -coder 0 -crf 21 -x264opts keyint=60:bframes=1:ref=2:qpmin=4:b-pyramid=0 Test.mov
and console output

Code: Select all

ffmpeg version N-67501-g064a237 Copyright (c) 2000-2014 the FFmpeg
developers
  built on Nov  9 2014 22:52:31 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr
--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-zlib
  libavutil      54. 11.100 / 54. 11.100
  libavcodec     56. 12.100 / 56. 12.100
  libavformat    56. 12.103 / 56. 12.103
  libavdevice    56.  2.100 / 56.  2.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[mxf @ 0000000004e833a0] "OPAtom" with 2 ECs - assuming OP1a
Input #0, mxf, from ‘Test.mxf':
  Metadata:
    uid             : 5831cb6f-9270-4545-a789-5b79221e0074
    generation_uid  : 9583e162-55e1-46ac-b111-4ee032c5f74e
    company_name    : QubeCinema, Inc.
    product_name    : QubeMaster Pro
    product_version : 2.5
    product_uid     : a6d3ea56-8155-4dfc-86f6-664b12671427
    modification_date: 1969-08-14 04:58:00
    application_platform: win32
    timecode        : 00:00:00:00
  Duration: 00:01:38.42, start: 0.000000, bitrate: 91072 kb/s
    Stream #0:0: Video: jpeg2000 (JPEG 2000 digital cinema 2K), xyz12le,2048x858, 24 tbr, 24 tbn, 24 tbc
[libx264 @ 0000000002def280] using cpu capabilities: MMX2 SSE2Fast SSSE3SSE4.2
[libx264 @ 0000000002def280] profile Main, level 4.1
[libx264 @ 0000000002def280] 264 - core 142 r2479 dd79a61 - H.264/MPEG-4AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=4 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=36 lookahead_threads=8 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=1 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=60 keyint_min=6
scenecut=40 intra_refresh=0 rc_lookahead=20 rc=crf mbtree=1 crf=21.0 qcomp=0.60 qpmin=4 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mov, to 'Test.mov':
  Metadata:
    uid             : 5831cb6f-9270-4545-a789-5b79221e0074
    generation_uid  : 9583e162-55e1-46ac-b111-4ee032c5f74e
    company_name    : QubeCinema, Inc.
    product_name    : QubeMaster Pro
    product_version : 2.5
    product_uid     : a6d3ea56-8155-4dfc-86f6-664b12671427
    modification_date: 1969-08-14 04:58:00
    application_platform: win32
    timecode        : 00:00:00:00
    encoder         : Lavf56.12.103
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080, q=-1--1, 24 fps, 12288 tbn, 24 tbc
    Metadata:
      encoder         : Lavc56.12.100 libx264
Stream mapping:
  Stream #0:0 -> #0:0 (jpeg2000 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 2362 fps=9.4 q=-1.0 Lsize=   52668kB time=00:01:38.37
bitrate=4385.8kbits/s
video:52642kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.049134%
[libx264 @ 0000000002def280] frame I:73    Avg QP:17.39  size:139477
[libx264 @ 0000000002def280] frame P:1431  Avg QP:19.90  size: 25280
[libx264 @ 0000000002def280] frame B:858   Avg QP:20.86  size:  8797
[libx264 @ 0000000002def280] consecutive B-frames: 27.3% 72.7%
[libx264 @ 0000000002def280] mb I  I16..4: 51.5%  0.0% 48.5%
[libx264 @ 0000000002def280] mb P  I16..4: 15.0%  0.0%  2.6%  P16..4: 29.8% 6.5%  1.2%  0.0%  0.0%    skip:44.9%
[libx264 @ 0000000002def280] mb B  I16..4:  1.6%  0.0%  0.3%  B16..8: 13.1% 3.0%  0.1%  direct:11.6%  skip:70.4%  L0:38.5% L1:54.3% BI: 7.1%
[libx264 @ 0000000002def280] coded y,uvDC,uvAC intra: 34.6% 64.0% 28.7% inter: 8.6% 22.5% 1.1%
[libx264 @ 0000000002def280] i16 v,h,dc,p: 49% 21% 17% 13%
[libx264 @ 0000000002def280] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 18% 15%  7% 8%  8%  7%  7%  5%
[libx264 @ 0000000002def280] i8c dc,h,v,p: 55% 18% 21%  6%
[libx264 @ 0000000002def280] Weighted P-Frames: Y:10.3% UV:5.0%
[libx264 @ 0000000002def280] ref P L0: 74.0% 26.0%
[libx264 @ 0000000002def280] kb/s:4381.77

jbalvarado
Posts: 50
Joined: Thu Oct 03, 2013 3:47 pm

Re: Quicktime Container Issue

Post by jbalvarado » Sun Dec 07, 2014 9:48 am

Only a idea, but can you try to force ffmpeg to interpret the input and output as progressive scan?

Post Reply
'