X3R0
X3R0

Reputation: 6334

FFMPEG Video with extremely long audio

The issue with ffmpeg.

  1. A 10 second video plays for 3 hours due to audio also the video is frozen on the first frame
  2. If I remove the audio using the -an flag then the video duration is correct and the video plays corretly, but I would still like to have the audio in the video.

Any idea?

Here is my FFMPEGargs

   ffmpeg -i video.webm -c:v copy -c:a copy output.mp4

Upvotes: 0

Views: 399

Answers (1)

TheEagle
TheEagle

Reputation: 5992

How to extract the audio: First, get the duration of the video with following command:

$ ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal input.webm

Sample output:

01:28:33.52

Then, use ffmpeg's -ss option to stop there:

$ ffmpeg -i video.webm -ss TIMECODE -c:v copy -c:a copy output.mp4

where TIMECODE must be replaced with the time from the first command.

Upvotes: 1

Related Questions