3

I've got a 10-minute long mp4 file which plays just fine with VLC. Apple Quicktime however plays only the first 6.5 seconds, stops and can't be convinced to jump past that.

Similarly, when I try transcoding it with ffmpeg, it stops at precisely frame 336.

I have figured out the following: when I run ffmpeg with 'loglevel 48' it tells me that there's something called an 'EDIT LIST' inside the file which tells it to drop all frames beyond 336:

ffmpeg -i VIDEO.mp4 -t 20 -pix_fmt yuv420p -c:v rawvideo -loglevel 48 output.avi  
(...) 
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] Processing st: 0, edit list 0 - media time: 0, duration: 6719
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] drop a frame at curr_cts: 6727 @ 336
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] drop a frame at curr_cts: 6747 @ 337
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] drop a frame at curr_cts: 6763 @ 338
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] drop a frame at curr_cts: 6786 @ 339
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] drop a frame at curr_cts: 6803 @ 340
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] drop a frame at curr_cts: 6816 @ 341
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] drop a frame at curr_cts: 6847 @ 342
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] drop a frame at curr_cts: 6863 @ 343
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5617d7c1a880] drop a frame at curr_cts: 6884 @ 344
(...)

Question: is there a way to tell ffmpeg to ignore this EDIT LIST and carry on regardless?

3

Yes, there's a private option for the MOV demuxer.

ffmpeg -ignore_editlist 1 -i VIDEO.mp4 ...
  • Thanks! I was looking into why ffmpeg would not cut (-ss -to) from I-frame to I-frame, the 1st one would be skipped, playback image would freeze (but playback bar would scroll) until the 2nd one came, but not start from the point I would want it to. With ignore_editlist it plays right away from the right point. Really weird this one, it's as if if ss is a keyframe, it will ignore it and edit list in the next keyframe. Tested on multiple clips and I-frame time points, same thing on ALL of them. Must be a bug. – JasonXA Nov 18 '19 at 0:13
  • Which ffmpeg version are you using? – Gyan Nov 18 '19 at 5:45
  • N-94664-g0821bc4eee @ 20190807, zeranoe builds – JasonXA Nov 19 '19 at 14:39
  • Well, I found something odd... been using pkt_pts_time to get time for mp4, but on wmv it was missing, found out it's pkt_dts_time but I ended up at some improper output. When digging further, I got varying outputs for when using skip_frame nokey vs just listing and filtering frame,1. Shouldn't skip_frame nokey match only the frame,1? In my case it matches only the preceding P frame. – JasonXA Nov 21 '19 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.