VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member
    Join Date
    Aug 2008
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    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"
    Quote Quote  
  3. Member
    Join Date
    Aug 2008
    Location
    United States
    Search Comp PM
    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.
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    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"
    Quote Quote  
  5. Member
    Join Date
    Aug 2008
    Location
    United States
    Search Comp PM
    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.
    Quote Quote  
  6. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by punmaster
    So let's say i wanted the first audio stream from C.
    i already did.


    Code:
    ffmpeg -i a.avi -i b.avi -i c.avi
    will give a list of input streams and their numberings.

    -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"
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!