Opened 10 years ago

Last modified 9 years ago

#3681 new defect

ffmpeg creates broken MOV/MP4 files with invalid edit list ('elst')

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

Description

1.) convert the attached MKV to MP4 or MOV with ffmpeg
2.) QuickTime Player refuses to open the resulting MOV/MP4
3.) i've opened a bug report with Apple about QuickTime Player not opening the MP4, according to them its broken: "the edit list for the video track 'elst' has an invalid first entry: media time == -1"

How to reproduce:

%ffmpeg -i test.mkv -acodec copy -vcodec copy test.mov
ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on May  7 2014 16:26:38 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libavresample   1.  2.  0 /  1.  2.  0
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from 'test.mkv':
  Metadata:
    ENCODER         : Lavf55.19.104
  Duration: 00:00:14.10, start: 0.083000, bitrate: 3887 kb/s
    Stream #0:0: Video: h264 (High), yuv420p, 1280x534, SAR 1:1 DAR 640:267, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(ger): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Stream #0:2(eng): Subtitle: subrip
[mov @ 0x7f9489868400] track 1: codec frame size is not set
Output #0, mov, to 'test.mov':
  Metadata:
    encoder         : Lavf55.33.100
    Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p, 1280x534 [SAR 1:1 DAR 640:267], q=2-31, 23.98 fps, 16k tbn, 1k tbc (default)
    Stream #0:1(ger): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), 384 kb/s (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  331 fps=0.0 q=-1.0 Lsize=    6694kB time=00:00:13.70 bitrate=4001.0kbits/s    
video:6041kB audio:642kB subtitle:0 data:0 global headers:0kB muxing overhead 0.169263%

Change History (6)

comment:1 by julian, 10 years ago

file to large to attach, uploaded here:

https://dl.dropboxusercontent.com/u/7221986/_elst.mkv

comment:2 by Carl Eugen Hoyos, 10 years ago

Keywords: mov added

Is the problem also reproducible with current FFmpeg git head?
Does -avoid_negative_ts 1 make a difference?

comment:3 by julian, 10 years ago

yes same in GIT HEAD and -avoid_negative_ts 1 doesnt help:

./ffmpeg -i ../_elst.mkv -acodec copy -vcodec copy -avoid_negative_ts 1 ../_elst.mp4
ffmpeg version N-63501-g8518da2 Copyright (c) 2000-2014 the FFmpeg developers
  built on May 28 2014 11:48:23 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
  configuration: 
  libavutil      52. 87.100 / 52. 87.100
  libavcodec     55. 65.100 / 55. 65.100
  libavformat    55. 41.100 / 55. 41.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
Input #0, matroska,webm, from '../_elst.mkv':
  Metadata:
    ENCODER         : Lavf55.19.104
  Duration: 00:00:14.10, start: 0.083000, bitrate: 3887 kb/s
    Stream #0:0: Video: h264 (High), yuv420p, 1280x534, SAR 1:1 DAR 640:267, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(ger): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Stream #0:2(eng): Subtitle: subrip
[mp4 @ 0x7fcd2306c800] track 1: codec frame size is not set
Output #0, mp4, to '../_elst.mp4':
  Metadata:
    encoder         : Lavf55.41.100
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x534 [SAR 1:1 DAR 640:267], q=2-31, 23.98 fps, 16k tbn, 1k tbc (default)
    Stream #0:1(ger): Audio: ac3 ([165][0][0][0] / 0x00A5), 48000 Hz, 5.1(side), 384 kb/s (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  331 fps=0.0 q=-1.0 Lsize=    6694kB time=00:00:13.70 bitrate=4001.0kbits/s    
video:6041kB audio:642kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.168283%

comment:4 by muken, 10 years ago

I can't get what is broken.
media_time == -1 means an empty edit.
Empty edit is a feature of edit list.
Empty edit makes a duration of blank clip.
I guess another problem is there.

comment:5 by Carl Eugen Hoyos, 10 years ago

Version: 2.2.2git-master

comment:6 by julian, 9 years ago

i had to change the location of the uploaded file to reproduce the issue:

http://s000.tinyupload.com/?file_id=88490693729222669162

Note: See TracTickets for help on using tickets.