0

So this always worked before.

I have a video file, lets call it 1.mp4 I have an audio file that plays, lets call it 2.mp3

As per this solution, Merging video and audio, with audio re-encoding, I try to merge them using this command:

ffmpeg -i 1.mp4 -i 2.mp3 -c:v copy -c:a aac output.mp4

1.mp4 has a shorter length than 2.mp3, so I want the audio to cut off at the end of the video clip.

The result file output.mp4 has no sound.

Additionally, the audio stream does show up in VLC when I play it. It shows as an audio track titled simple_aac.

I don't tend to lean towards believing VLC didn't work, as it has been a pretty stable option for playing otherwise unplayable video and audio on Linux since forever.

Blindspots
  • 3,472

1 Answers1

-1

If the video is shorter than audio or vice versa and you need to cutoff whichever's the shortest then you might want to use -shortest flag

ffmpeg -i 1.mp4 -i 2.mp3 -c:v copy -c:a aac -shortest output.mp4