[FFmpeg-trac] #11668(ffmpeg:new): "-shortest" malfunction with audio much longer than video? (was: Audio being much longer than video will make -shortest clamp to 1 second)
FFmpeg
trac at avcodec.org
Sun Jul 20 12:29:46 EEST 2025
#11668: "-shortest" malfunction with audio much longer than video?
------------------------------------+----------------------------------
Reporter: RavenWorks | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: ffmpeg
Version: 7.1 | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 1 |
------------------------------------+----------------------------------
Changes (by MasterQuestionable):
* analyzed: 0 => 1
* cc: MasterQuestionable (added)
* component: undetermined => ffmpeg
* summary:
Audio being much longer than video will make -shortest clamp to 1
second
=> "-shortest" malfunction with audio much longer than video?
Comment:
͏ Does it reproduce?
͏ `ffmpeg -y -v debug -hide_banner -nostdin -nostats -f lavfi -i
"anullsrc=mono:d=50" -f lavfi -i "testsrc2=r=60:d=0.15" -shortest
"Out.mp4"`
͏ Verification helper:
͏ `ffprobe -hide_banner -threads 0 -show_entries
"stream=time_base:format=size" -of "flat=h=0" "Out.mp4"`
͏ `ffprobe -v warning -hide_banner -threads 0 -show_entries "frame"
-select_streams v:0 -of "xml" "Out.mp4" -o "Out.mp4.xml"`
͏ `ffprobe -v warning -hide_banner -threads 0 -show_entries "frame"
-select_streams a:0 -of "xml" "Out.mp4" -o "Out.mp4.a.xml"`
͏ The input audio is likely equivalent as that generated by:
͏ `ffmpeg -y -v debug -hide_banner -nostdin -nostats -f lavfi -i
"anullsrc=mono:d=50" "long.wav"`
͏ ; alike.
͏ Your [/raw-attachment/ticket/11668/silent_audio.mp4
͏"silent_audio.mp4"] had unusually long audio.
͏ Nevertheless I cannot seem to reproduce your problem.
͏ (haven't tested the exact Gyan build on Windows though)
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11668#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list