mltframework / mltframework/mlt
Feezing and frame drops on files from action camera
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.9k
- Forks
- 387
- Avg merge
- 17h 28m
- Merged PRs (30d)
- 8
Description
Hello!
I have minor but very annoying issue while playing MP4 files recorded with GoPro action camera.
When I load that file into Shotcut or Kdenlive or just playing it with melt file.mp4 command the video starts playing and hangs for a few moments twice, first at the 17th frame and second at frame 24.
When I load large amount of clips from GoPro to project in Kdenlive or Shotcut I see this little "freezes" for every clip in the timeline when playing or freezes when just switch playhead to this clips for the first time.
After "repacking" clips with commands like MP4Box -add bad_clip.mp4 fixed_clip.mp4 or ffmpeg -i bad_clip.mp4 -c copy fixed.mp4 all this little freezes not reproduced anymore.
How to reproduce
Download example file from here:
https://www.dropbox.com/s/qdejdqu7sza77ns/20190511_141509_GH026992.MP4?dl=0
(file should has sha1 checksum: 1f3d38d6388a72f003eb6cc76e46673b0ddb2753)
OS: Arch linux x86_64
ffmpeg version n4.2.1
melt 6.16.0 (or latest git d850010)
- Put example file 20190511_141509_GH026992.MP4 to relatively slow storage (External HDD or USB Flash drive or some kind of network file system)
- Clear filesystem cache:
# sync && echo 3 > tee /proc/sys/vm/drop_caches
- Run melt and see freezes at 17th and 24th frame (maybe frame numbers may change, but for me that numbers always same):
melt 20190511_141509_GH026992.MP4
Additional steps
-
"Repack" file with command like that:
MP4Box -add 20190511_141509_GH026992.MP4 fixed.mp4orffmpeg -i 20190511_141509_GH026992.MP4 -c copy fixed.mp4 -
Clear filesystem cache:
# sync && echo 3 > tee /proc/sys/vm/drop_caches
- Run melt and see there are no freezes or hangs:
melt fixed.mp4
- You can also clear filesystem cache again and play original file with fflpay:
ffplay 20190511_141509_GH026992.MP4
or any other video player without freezes.
Maybe there are some issue in seeking or loading metadata heuristics that required to read large amount of file when it just start playing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied melt command with 20190511_141509_GH026992.MP4 after clearing the filesystem cache, then compare it with the repacked fixed.mp4 example. Use the reported frame-17 and frame-24 stalls, checksum, and tool versions as the reproduction baseline; done means the original clip plays without those freezes under the same conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100