Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5882 closed defect (invalid)

Certain x264 videos do not play on Apple decoders (Quicktime/iTunes/iPad)

Reported by: Technologov Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: mov
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Certain x264 encoded videos do not play on Apple decoders (Quicktime/iTunes/iPad).

They can forward/rewind/seek first few minutes of the video, and after a certain point I can't forward/rewind/seek video (but seeking audio still works), and video stops playing after reaching that point. (usually after 2-3 minutes near the beginning)

To reproduce: Encode any problematic video with libx264 and try to play it with QuickTime on Windows.

This problem happens with ALL Apple decoders (iTunes+Quicktime on
Windows 7, Quicktime on Mac, and my Apple iOS Video Player on iPad Pro).

The problem on two problematic videos is instantly visible with
Quicktime on Windows:I get
"Error -2002: a bad public movie atom was found in the movie"

So far I was able to find 3 such videos out of a my personal collection of 700+ videos, so we speak at under 0.5% chance of hitting this super-critical bug.

The resulting video files can be played and seeked just fine using VLC or Windows Media Player. Still the problem of such severity should be documented.

How to reproduce:

$ ffmpeg -i $INPUT_Problematic-Source.y4m -b:v 1000k -pix_fmt yuv420p $OUTPUT.mp4

NOTE: Using any other bitrate also triggers this bug; no effect. Using resolution scaling (like -s 640x360) also triggers this bug; no effect. Only if the source is "problematic".

ffmpeg version N-81947-gc45ba26-1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 6.1.1 (Debian 6.1.1-11) 20160802

(also tried ffmpeg version 3.1.2-1 which comes with Debian Linux 9/testing; same results)

Platform: Debian 9/testing/x64

FFmpeg's encoder output:
http://pastebin.com/NgkJVARD

Here is an example broken video file: -- (video data was blurred on purpose.)
https://drive.google.com/open?id=0BycgkMZbeQOzaXpFRVJ5T09VeTQ

I have no clue what's Apple decoder doesn't like. Is it the MPEG4-AVC video stream or MP4 containers that ffmpeg produces?

One thing I know for sure, Audio is not related. Even if I remove audio completely and encode only video (using -map 0:0 option from *.mkv source) I still get into this bug.

-Technologov, 08.10.2016.

Change History (22)

comment:1 by Carl Eugen Hoyos, 7 years ago

Component: ffmpegundetermined
Keywords: Apple QuickTime iTunes iPad removed
Priority: criticalnormal

Please test current FFmpeg git head and provide the command line you tested together with the complete, uncut console output here on the bug tracker to make this a valid ticket (do not use external resources for the console output).

comment:2 by Technologov, 7 years ago

ffmpeg-git output. Video was cut to 8 minutes, and audio track removed.

alexey@deb9ws:~$ /usr/local/bin/ffmpeg -y -i /tmp/Pocahontas2.avi -map 0:0 -b:v 400k -pix_fmt yuv420p -to 00:08:00 /mnt/E/Video-MPEG4-AVC-test/Pocahontas2_test8min.mp4
ffmpeg version N-81947-gc45ba26-1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.1.1 (Debian 6.1.1-11) 20160802
  configuration: --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libopencv --enable-libx264
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 61.100 / 57. 61.100
  libavformat    57. 51.103 / 57. 51.103
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 63.100 /  6. 63.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, avi, from '/tmp/Pocahontas2.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2542/release)
    title           : Pokahontas.2.Puteshestvie.V.Novyj.Mir.1998.DUAL.BDRip.XviD.AC3.-HELLYWOOD
    artist          : Gummy
  Duration: 01:13:09.84, start: 0.000000, bitrate: 2841 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 704x400 [SAR 1:1 DAR 44:25], 1930 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s
[libx264 @ 0x1b4d760] using SAR=1/1
[libx264 @ 0x1b4d760] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x1b4d760] profile High, level 3.0
[libx264 @ 0x1b4d760] 264 - core 148 r2708 86b7198 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 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=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/mnt/E/Video-MPEG4-AVC-test/Pocahontas2_test8min.mp4':
  Metadata:
    artist          : Gummy
    title           : Pokahontas.2.Puteshestvie.V.Novyj.Mir.1998.DUAL.BDRip.XviD.AC3.-HELLYWOOD
    encoder         : Lavf57.51.103
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 704x400 [SAR 1:1 DAR 44:25], q=-1--1, 400 kb/s, 23.98 fps, 10000k tbn, 23.98 tbc
    Metadata:
      encoder         : Lavc57.61.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/400000 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame=11509 fps=190 q=-1.0 Lsize=   25525kB time=00:07:59.89 bitrate= 435.7kbits/s dup=1 drop=0 speed=7.91x    
video:25395kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.511982%
[libx264 @ 0x1b4d760] frame I:136   Avg QP:18.03  size: 24593
[libx264 @ 0x1b4d760] frame P:3397  Avg QP:22.66  size:  4187
[libx264 @ 0x1b4d760] frame B:7976  Avg QP:26.52  size:  1058
[libx264 @ 0x1b4d760] consecutive B-frames:  3.7%  6.0% 16.7% 73.5%
[libx264 @ 0x1b4d760] mb I  I16..4: 13.5% 68.9% 17.6%
[libx264 @ 0x1b4d760] mb P  I16..4:  1.7%  5.7%  2.1%  P16..4: 29.1%  9.3%  5.7%  0.0%  0.0%    skip:46.4%
[libx264 @ 0x1b4d760] mb B  I16..4:  0.1%  0.5%  0.4%  B16..8: 23.1%  2.7%  0.7%  direct: 0.9%  skip:71.7%  L0:47.6% L1:49.1% BI: 3.4%
[libx264 @ 0x1b4d760] final ratefactor: 25.11
[libx264 @ 0x1b4d760] 8x8 transform intra:61.0% inter:68.8%
[libx264 @ 0x1b4d760] coded y,uvDC,uvAC intra: 53.3% 57.9% 30.5% inter: 5.7% 7.2% 0.8%
[libx264 @ 0x1b4d760] i16 v,h,dc,p: 28% 29% 13% 30%
[libx264 @ 0x1b4d760] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 18% 31%  4%  4%  5%  5%  5%  5%
[libx264 @ 0x1b4d760] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 16% 23%  6%  6%  7%  7%  6%  5%
[libx264 @ 0x1b4d760] i8c dc,h,v,p: 56% 20% 19%  4%
[libx264 @ 0x1b4d760] Weighted P-Frames: Y:3.6% UV:3.1%
[libx264 @ 0x1b4d760] ref P L0: 66.2% 10.1% 16.4%  7.2%  0.1%
[libx264 @ 0x1b4d760] ref B L0: 87.0% 10.2%  2.8%
[libx264 @ 0x1b4d760] ref B L1: 96.0%  4.0%
[libx264 @ 0x1b4d760] kb/s:433.38

...The resulting video fragment (8 minutes) is somehow incompatible with Apple decoders.

Link to video fragment:
https://drive.google.com/open?id=0BycgkMZbeQOzZDhZV2Q4T29TZkE

-Technologov

comment:3 by Carl Eugen Hoyos, 7 years ago

Keywords: mov added
Resolution: invalid
Status: newclosed

Is there a reason why you chose mp4 (I don't care about compatibility with Apple) and not mov (I need QuickTime compatibility) as extension?
Use the -video_track_timescale option to fix the issue (that the mov muxer heavily warns about).

comment:4 by Technologov, 7 years ago

Yes, there is a very good reason.

I want to be compatible across the board, with multiple platforms, namely: Debian Linux, Windows 7 (and 10), Android, ChromeOS, Apple iOS, Mac OS X -- using built-in media player, without any 3rd party codecs/or players. (and Windows XP, using 3rd party codec)

The only way to achieve my goal is to use MP4 container with H.264/MPEG-4-AVC video codec and AAC-LC audio.

comment:5 by Carl Eugen Hoyos, 7 years ago

I am curious: Which of the platforms doesn't like mov?
(Old QuickTime does not support mp4.)

comment:6 by Technologov, 7 years ago

Priority: normalimportant
Resolution: invalid
Status: closedreopened

Apple supports MP4 container, and so does fmpeg. Bug reopened.

comment:7 by Technologov, 7 years ago

Actually ffmpeg complains about *.mov too...

alexey@deb9ws:~$ /usr/local/bin/ffmpeg -i /mnt/E/Video-MPEG4-AVC-test/Pocahontas2.avi -map 0:0 -b:v 600k -pix_fmt yuv420p -to 00:08:00  /mnt/E/Video-MPEG4-AVC-test/Pocahontas2.mov
ffmpeg version N-81947-gc45ba26-1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.1.1 (Debian 6.1.1-11) 20160802
  configuration: --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libopencv --enable-libx264
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 61.100 / 57. 61.100
  libavformat    57. 51.103 / 57. 51.103
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 63.100 /  6. 63.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, avi, from '/mnt/E/Video-MPEG4-AVC-test/Pocahontas2.avi':
  Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2542/release)
    title           : Pokahontas.2.Puteshestvie.V.Novyj.Mir.1998.DUAL.BDRip.XviD.AC3.-HELLYWOOD
    artist          : Gummy
  Duration: 01:13:09.84, start: 0.000000, bitrate: 2841 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 704x400 [SAR 1:1 DAR 44:25], 1930 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s
[libx264 @ 0x1fd3b60] using SAR=1/1
[libx264 @ 0x1fd3b60] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x1fd3b60] profile High, level 3.0
[libx264 @ 0x1fd3b60] 264 - core 148 r2708 86b7198 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 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=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=600 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mov @ 0x1f8cf80] WARNING codec timebase is very high. If duration is too long,
file may not be playable by quicktime. Specify a shorter timebase
or choose different container.
Output #0, mov, to '/mnt/E/Video-MPEG4-AVC-test/Pocahontas2.mov':
  Metadata:
    artist          : Gummy
    title           : Pokahontas.2.Puteshestvie.V.Novyj.Mir.1998.DUAL.BDRip.XviD.AC3.-HELLYWOOD
    encoder         : Lavf57.51.103
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 704x400 [SAR 1:1 DAR 44:25], q=-1--1, 600 kb/s, 23.98 fps, 10000k tbn, 23.98 tbc
    Metadata:
      encoder         : Lavc57.61.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/600000 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
FATAL error, file duration too long for timebase, this file will not be2.9kbits/s dup=1 drop=0 speed=5.16x    
playable with quicktime. Choose a different timebase or a different
container format
frame=11509 fps=123 q=-1.0 Lsize=   38099kB time=00:07:59.89 bitrate= 650.4kbits/s dup=1 drop=0 speed=5.13x    
video:37969kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.342819%
[libx264 @ 0x1fd3b60] frame I:136   Avg QP:14.88  size: 33303
[libx264 @ 0x1fd3b60] frame P:3397  Avg QP:19.53  size:  6406
[libx264 @ 0x1fd3b60] frame B:7976  Avg QP:23.37  size:  1578
[libx264 @ 0x1fd3b60] consecutive B-frames:  3.7%  6.0% 16.7% 73.5%
[libx264 @ 0x1fd3b60] mb I  I16..4: 11.4% 72.3% 16.4%
[libx264 @ 0x1fd3b60] mb P  I16..4:  1.6%  6.3%  2.2%  P16..4: 31.0% 12.6%  8.5%  0.0%  0.0%    skip:37.9%
[libx264 @ 0x1fd3b60] mb B  I16..4:  0.1%  0.5%  0.4%  B16..8: 26.4%  3.5%  1.1%  direct: 1.4%  skip:66.5%  L0:47.7% L1:46.4% BI: 5.9%
[libx264 @ 0x1fd3b60] final ratefactor: 22.03
[libx264 @ 0x1fd3b60] 8x8 transform intra:62.7% inter:70.1%
[libx264 @ 0x1fd3b60] coded y,uvDC,uvAC intra: 60.9% 65.8% 40.5% inter: 8.6% 10.4% 1.6%
[libx264 @ 0x1fd3b60] i16 v,h,dc,p: 31% 27% 14% 29%
[libx264 @ 0x1fd3b60] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 18% 31%  4%  5%  5%  5%  5%  6%
[libx264 @ 0x1fd3b60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 16% 22%  7%  7%  7%  7%  6%  6%
[libx264 @ 0x1fd3b60] i8c dc,h,v,p: 54% 21% 20%  5%
[libx264 @ 0x1fd3b60] Weighted P-Frames: Y:3.6% UV:3.1%
[libx264 @ 0x1fd3b60] ref P L0: 65.4%  9.4% 17.6%  7.6%  0.1%
[libx264 @ 0x1fd3b60] ref B L0: 85.6% 11.6%  2.9%
[libx264 @ 0x1fd3b60] ref B L1: 95.3%  4.7%
[libx264 @ 0x1fd3b60] kb/s:647.97

It says: "FATAL error, file duration too long for timebase, this file will not be
playable with quicktime. Choose a different timebase or a different container format"

How to fix this issue and what is "timebase" ?

Thanks in advance,

comment:8 by Technologov, 7 years ago

-video_track_timescale doesn't work.

comment:9 by Carl Eugen Hoyos, 7 years ago

Resolution: invalid
Status: reopenedclosed

It works fine here.

comment:10 by Technologov, 7 years ago

Resolution: invalid
Status: closedreopened

What works fine ? Did you test my resulting MP4 file (attached here) ?
I said, this bug occurs on 3 files out of 700 of my videos.

I have 3 video files that do NOT work on any Apple decoders.

comment:11 by Carl Eugen Hoyos, 7 years ago

Resolution: invalid
Status: reopenedclosed

in reply to:  6 comment:12 by Carl Eugen Hoyos, 7 years ago

Replying to Technologov:

Apple supports MP4 container

As you found out, the compatibility is limited (and as said, with older versions it does not work at all iirc).

Actually ffmpeg complains about *.mov too...

That's the whole point: If you use .mov as extension (I need QuickTime compatibility), FFmpeg warns you about the huge codec timebase so you can fix it with video_track_timescale.

comment:13 by Technologov, 7 years ago

Okay, but 99.5% of my videos work with MP4 container just fine on iPad. It's the remaining 0.5% that needs to be fixed.
Is there a way to fix "timebase" on MP4 containers ?

-video_track_timescale is not a documented option; ffmpeg --help doesn't even list it, and when I try to use it, ffmpeg can't find output file.

comment:14 by Carl Eugen Hoyos, 7 years ago

The output of the following command could still be useful:

$ hexdump -C Pocahontas2-Anti-Apple.y4m |head

comment:15 by Technologov, 7 years ago

alexey@deb9ws:~$ /usr/local/bin/ffmpeg  -i /mnt/E/Video-MPEG4-AVC-test/Pocahontas2.avi -map 0:0 -video_track_timescale -b:v 600k -pix_fmt yuv420p -to 00:08:00 -vcodec libx264 /mnt/E/Video-MPEG4-AVC-test/Pocahontas2.mov
...
[NULL @ 0x94a380] Unable to find a suitable output format for '600k'
600k: Invalid argument

-video_track_timescale is NOT a documented option.

in reply to:  13 comment:16 by Carl Eugen Hoyos, 7 years ago

Replying to Technologov:

Okay, but 99.5% of my videos work with MP4 container just fine on iPad. It's the remaining 0.5% that needs to be fixed.

Yes, those with invalid video timebase.

Is there a way to fix "timebase" on MP4 containers ?

Yes, -video_track_timescale

-video_track_timescale is not a documented option; ffmpeg --help doesn't even list it

$ ffmpeg -h muxer=mov

and when I try to use it, ffmpeg can't find output file.

The option needs a value depending on the (actual) frame rate of your input file, for 30000/1001 fps it would be 30000.

Last edited 7 years ago by Carl Eugen Hoyos (previous) (diff)

comment:17 by Technologov, 7 years ago

alexey@deb9ws:~$ hexdump -C /media/sf_F_DRIVE/Test-video-coding/Apple-decoder-issues/Pocahontas2-Anti-Apple.y4m | head
00000000  59 55 56 34 4d 50 45 47  32 20 57 37 30 34 20 48  |YUV4MPEG2 W704 H|
00000010  34 30 30 20 46 31 30 30  30 30 30 30 30 3a 34 31  |400 F10000000:41|
00000020  37 30 38 33 20 49 70 20  41 31 3a 31 20 43 34 32  |7083 Ip A1:1 C42|
00000030  30 6d 70 65 67 32 20 58  59 53 43 53 53 3d 34 32  |0mpeg2 XYSCSS=42|
00000040  30 4d 50 45 47 32 0a 46  52 41 4d 45 0a 10 10 10  |0MPEG2.FRAME....|
00000050  10 10 10 10 10 10 10 10  10 10 10 10 10 10 10 10  |................|
*
00044c40  10 10 10 10 10 10 10 10  10 10 10 10 10 80 80 80  |................|
00044c50  80 80 80 80 80 80 80 80  80 80 80 80 80 80 80 80  |................|
*

comment:18 by Technologov, 7 years ago

Resolution: invalid
Status: closedreopened

OKAY, the good news is that "-video_track_timescale $VALUE" indeed fixed the problem.
Ohh BTW, this parameter fixed BOTH MP4 and MOV containers. Still I think this is an ffmpeg bug.

I think ffmpeg should guess video FPS (or read from another input), just like VLC player can *and* write it's a new "video_track_timescale" automatically, even if the input is bugged.

It really sucks hunting down those issues in my video collection, that I suddenly discover after-the-fact that some of my videos do not play on an iPad.
And if I was a bit less experienced user, I would give up long ago.

Please consider checking this parameter when encoding a video, and rewrite this value if needed, giving a warning.

-Technologov

comment:19 by Carl Eugen Hoyos, 7 years ago

Priority: importantnormal
Resolution: invalid
Status: reopenedclosed

comment:20 by Technologov, 7 years ago

Resolution: invalid
Status: closedreopened

Do you realize that by closing this bug, without fixing, you make people suffer ?
Because their encoded videos will NOT work on Apple.

A lot better is to check for input "timebase" and fix it on the fly. It's a container bug.

-Technologov

comment:21 by Carl Eugen Hoyos, 7 years ago

Resolution: invalid
Status: reopenedclosed

comment:22 by Technologov, 7 years ago

[PATCH] Apple Quicktime fix -- submitted on dev mailing list on 11.10.2016.

Note: See TracTickets for help on using tickets.