[FFmpeg-user] Using ffmpeg to split a file

vsethi at iglou.com vsethi at iglou.com
Sat Nov 24 19:12:44 CET 2012


I've been trying to use ffmpeg to split a file into two pieces and am
having trouble with the audio portion.

I've tried:  ffmpeg -i file.mpg -c:v copy -c:a copy -t 00:58:22 fileout.mpg
and:  ffmpeg -i file.mpg -codec copy -acodec copy -t 00:58:33 fileout.mpg

Ffmpeg splits off the first portion of the file as requested but seems to
swap the video and audio streams.  In the source file, the video stream is
Stream 0:0 and the audio stream is 0:1, but in the new file these are
reversed.

Whether as a result of this or not, although ffplay plays the audio on the
new file, no other software that I've tried so far can do so so playback is 
silent.

How to fix this?

Thanks.
 


More information about the ffmpeg-user mailing list