[FFmpeg-user] help needed, combine three simple calls into one?

Ram Shaffir ram at ram.sh
Thu Nov 26 15:52:45 EET 2020


> -----Original Message-----
> From: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> On Behalf Of Ram
> Shaffir
> Sent: Thursday, November 26, 2020 2:53 PM
> To: ffmpeg-user at ffmpeg.org
> Subject: [FFmpeg-user] help needed, combine three simple calls into one?
> 
> Hello all,
> 
> I use FFmpeg in three steps, the first concat several videos into one, then
> sync the audio and finally trim the video. Is it possible to combine the
> following three calls into one call instead?
> 
> ffmpeg -y -f concat -safe 0 -copyts -i videoList.txt -muxpreload 0 -muxdelay
> 0 -c copy -b:a 128K -cpu-used 0 -preset slow -movflags +faststart
> concat.mp4
> 
> ffmpeg -y -i concat.mp4 -itsoffset 1.9 -i concat.mp4 -c:a copy -c:v copy -map
> 0:v:0 -map 1:a:0 audioFixed.mp4
> 
> ffmpeg -y -ss 35 -i audioFixed.mp4 -t 30 -c copy final.mp4
> 
> Many thanks to you all in advance!
> Best,
> Ram


Sorry, the commands I shared were not the exact ones I use.. sorry about that; the ones I use are:

ffmpeg -y -f concat -safe 0 -copyts -i videoList.txt -muxpreload 0 -muxdelay 0 -c copy -b:a 128K -cpu-used 0 -preset slow -movflags +faststart -f mp4 concat.mp4

ffmpeg -y -i concat.mp4 -itsoffset 1.9 -i concat.mp4 -c:a aac -c:v copy -map 0:v:0 -map 1:a:0 -f mp4 audioFixed.mp4

ffmpeg -y -i audioFixed.mp4 -ss 2 -to 17 -c:v copy -c:a aac -f mp4 final.mp4


More information about the ffmpeg-user mailing list