[FFmpeg-user] Automatically crop longer file when merging
bouke at videotoolshed.com
Thu Jan 23 10:32:15 CET 2014
From: "Ramit Bhalla" <ramitbhalla at gmail.com>
To: "FFmpeg user questions" <ffmpeg-user at ffmpeg.org>
Sent: Thursday, January 23, 2014 7:47 AM
Subject: Re: [FFmpeg-user] Automatically crop longer file when merging
> You can tell ffmpeg to use only part of the audio input file like:
> ffmpeg -i video -i audio -t <x> ....
> the x would be 1 second less than the length of the video in seconds, this
> will take the first x seconds (or you can skip 1 second initially by using
> -ss 1 instead of -t <x>)
or easier, if the sources start at the same time, just add -shortest
(then the encoding will stop at the first file end it encounters.
> On Wed, Jan 22, 2014 at 5:23 AM, Samir <joeindien at gmail.com> wrote:
>> I have recorded separatly two files for the same sequence: an mp4 file
>> the video part and a wav for the audio part. I can mix them easily with
>> My problem is that the audio file is longer than the video file, about 1
>> second only but it produces an out of sync video...
>> I know I can crop my audio file but I need first to get the duration for
>> my files to known how many time i need to cut.
>> Is there a way to tell ffmpeg to automatically crop the audio file to fit
>> the duration of my video file?
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user