[FFmpeg-trac] #11668(ffmpeg:new): "-shortest" malfunction with audio much longer than video?

FFmpeg trac at avcodec.org
Sun Jul 20 15:17:37 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           |
------------------------------------+----------------------------------
Comment (by RavenWorks):

 > Does it reproduce?
 Trying this command did *not* reproduce the problem (even after several
 attempts).
 However, it led me to something interesting:

 As already mentioned, this (usually) produces the bug:
 {{{
 ffmpeg -y -i .\25sec.wav -i .\no_audio.mp4 -shortest silent_audio.mp4
 }}}

 However, if I add -v debug, the bug consistently DOES NOT reproduce!
 {{{
 ffmpeg -y -v debug -i .\25sec.wav -i .\no_audio.mp4 -shortest
 silent_audio.mp4
 }}}

 Between these facts:
 - setting a different log level can consistently prevent the bug
 - using different compression on the input audio file can consistently
 prevent the bug
 - the bug can sometimes happen and sometimes not when repeating a command
 UNCHANGED
 I'm really thinking it must be some race condition?
 (This would also explain why it doesn't occur on your machine; the
 combination of disk speed and processor speed might require a different
 'tipping point' of input file length to work...)
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11668#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list