Opened 9 years ago
Last modified 9 years ago
#5078 new defect
FFMPEG "loop=0" value results in warnings and extremely long runtime
Reported by: | eric | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
When attempting to replace the audio stream of an MP4 video with looping MP3 audio, FFmpeg begins going very slowly and generating warnings like the one below at the point when the audio starts looping.
[mp4 @ 0x7fd80a00e200] Non-monotonous DTS in output stream 0:1; previous: 678336, current: 832; changing to 678337. This may result in incorrect timestamps in the output file.
How to reproduce:
% ffmpeg -i video.mp4 -f lavfi -i "amovie=filename=audio.mp3:loop=0" -map 0:v -map 1:a -shortest -c:v copy output.mp4
Running the above command takes ~5 minutes for a 30 second video.mp4 and a 15 second audio.mp3. The resulting video at face value appears to be correct (it plays correctly, the audio was replaced, and the audio loops as expected).
If I remove the "loop=0" option, the resulting output.mp4 is only 15 seconds (as expected since the audio doesn't loop), but it's generated in less than 0.5 seconds on my machine.
Attached report file has the result of running the command with "-v 9 -loglevel 99 -report" options also specified. The resulting report was over 100 MB (due to all the warnings) so I replaced the majority of them with "..." to keep the file size down.
Tested with FFMPEG 2.8.3 on Mac OS X 10.11.1.
Possibly related to:
https://trac.ffmpeg.org/ticket/1799
https://trac.ffmpeg.org/ticket/1670
https://trac.ffmpeg.org/ticket/3315
Attachments (4)
Change History (10)
by , 9 years ago
Attachment: | ffmpeg-20151208-192018.log added |
---|
comment:2 by , 9 years ago
Component: | ffmpeg → undetermined |
---|
comment:3 by , 9 years ago
Replying to cehoyos:
Is the issue reproducible with current FFmpeg git head?
Sorry about not including that. I confirmed the issue is also affecting git head as well as 2.8.3.
comment:4 by , 9 years ago
Version: | 2.8.3 → git-master |
---|
follow-up: 6 comment:5 by , 9 years ago
Please provide input files and command lines including complete, uncut console output with default verbosity for current FFmpeg.
by , 9 years ago
Attachment: | ffmpeg-20151209-125328.log added |
---|
New report log using sample audio and video
comment:6 by , 9 years ago
Replying to cehoyos:
Please provide input files and command lines including complete, uncut console output with default verbosity for current FFmpeg.
Due to the file size limits, I wasn't able to provide the original sources, but I was able to reproduce the issue using a 1 second audio.mp3 and a 3 second video.mp4. They've been attached to the ticket. Since the video is 3 seconds, the resulting output (which still takes multiple minutes to generate) has the video from video.mp4 and the audio from audio.mp3 looped 3 times.
I included the log file (ffmpeg-20151209-125328.log) generated running this command-line but I did need to trim 90K lines from the middle in order to meet the file upload size restriction.
% ffmpeg -report -i video.mp4 -f lavfi -i "amovie=filename=audio.mp3:loop=0" -map 0:v -map 1:a -shortest -c:v copy output.mp4
Report log