[FFmpeg-trac] #5456(undetermined:new): Videos produced with -shortest are longer than the audio

FFmpeg trac at avcodec.org
Tue Feb 20 20:32:18 EET 2024


#5456: Videos produced with -shortest are longer than the audio
-------------------------------------+-------------------------------------
             Reporter:  Igal         |                    Owner:  (none)
  Tabachnik                          |
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by areweAV1yet):

 I am still having issues creating 8k/4k videos with this. The interleave
 trick helped but was still leading to 50% longer videos (than the audio
 length)

 I found that converting to `aac` before and then doing a `copy` seemed to
 fix it

 ```for i in *.mp3;
  do (
 ffmpeg -i "$i" -b:a 256k "${i%.*}.aac";
 ffmpeg -r 0.01 -i image.jpg -i "${i%.*}.aac" -c:a copy -shortest
 -max_interleave_delta 500M -c:v libx265 -x265-params lossless=1 -pix_fmt
 yuvj420p -vf "loop=-1:1" -movflags faststart "${i%.*}.mp4");
 done```
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/5456#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list