I am new to ffmpeg and I was wondering what the command line options were to allow me to load several video/audio files, select one or more video and/or audio streams from each file, and copy all of the selected streams without re-encoding to a container such as avi. I've tried everything i could think of but i always end up with errors such as "Number of stream maps must match number of output streams" or "Codec type mismatch for mapping #0.1 -> #0.0". Please help me. Thank you![]()
+ Reply to Thread
Results 1 to 6 of 6
-
-
you need to manually map them,
be specific about what you used,
and what you want to achieve.
tripp"I'll give you five dollars if you let me throw a rock at you" -
Let's say i had 'A.avi' that contained 1 video stream and 1 audio stream, 'B.mp3' that contained 1 audio stream, and 'C.mpg' that contained 1 video stream and 2 audio streams. How could i get 'out.avi' that contained the audio stream from 'A.avi', the audio stream from 'B.mp3', and the video and one of the audio streams form 'C.mpg', all in their original formats (no re-encoding)? Thank you.
-
aha....
avi with 3 audio streams?
ok...
which audio stream from c, it matters.
Code:ffmpeg -i a.avi -i b.avi -i c.avi -vcodec copy -acodec copy / -vcodec copy -acodec copy out.avi -map 2.0 -map 0.1 / -map 1.1 -map 2.1 -acodec copy -newaudio -acodec copy -newaudio
tripp"I'll give you five dollars if you let me throw a rock at you" -
I'm actually writing a script that will have to deal with re-muxing in weird combinations like that. The scenario i gave was just an example of something my script might need to do. So let's say i wanted the first audio stream from C. Could you explain how you created that command line string from the example i gave? Thank you so much.
-
Originally Posted by punmaster
Code:ffmpeg -i a.avi -i b.avi -i c.avi
-map
has to start with the video stream,
then follow it with audio streams.
for each audio stream over 1,
you need to input after output is set,
audio parameters.. -newaudio
tripp"I'll give you five dollars if you let me throw a rock at you"
Similar Threads
-
Removing audio streams from multiple files
By Ygramul in forum Video ConversionReplies: 6Last Post: 7th Feb 2012, 14:16 -
How to mux .264 and .wav files to .m2ts or .mp4 using FFmpeg????
By rallymax in forum EditingReplies: 1Last Post: 31st Oct 2011, 17:04 -
ffmpeg Number of stream maps must match number of output streams
By tmiller_15 in forum Blu-ray RippingReplies: 1Last Post: 13th Nov 2010, 06:20 -
Streams with Multiple Files
By topquark in forum Newbie / General discussionsReplies: 1Last Post: 24th Apr 2010, 06:31 -
Play multiple streams in DVD (Merge multiple streams)
By sebastien91 in forum SubtitleReplies: 0Last Post: 25th Apr 2009, 18:44