VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. I have these two avis:

    Code:
    Input #0, avi, from '1.avi':
      Metadata:
        encoder         : MEncoder svn r34540 (Ubuntu), built with gcc-4.6
      Duration: 00:11:24.00, start: 0.000000, bitrate: 25977 kb/s
        Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 24 tbr, 24 tbn, 24 tbc
        Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
    [avi @ 0x737b80] non-interleaved AVI
    Input #1, avi, from '2.avi':
      Metadata:
        encoder         : MEncoder svn r34540 (Ubuntu), built with gcc-4.6
      Duration: 00:11:24.00, start: 0.000000, bitrate: 24206 kb/s
        Stream #1:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 24 tbr, 24 tbn, 24 tb
    I've been trying to combine all the streams into one file.
    According to ffmpeg documentation it should be doable this way:

    Code:
    ffmpeg -i 1.avi -i 2.avi -c copy 12.avi -map 0 -map 1
    For some reason I always end up with the 0 streams only. It also does not matter whether I point to the specific streams (0:0, 0:1, 1:0) or specify -vcodec copy etc.

    What am I doing wrong?
    Quote Quote  
  2. a. iirc ffmpeg is not ment to append multiple files this way, ffmpeg always first uses cat/concat/copy to append the files and then remuxes the files. Since appending files bytewise isn't really a good idea for most formats (aside from mpeg-1, mpeg-2 and DV) I would normally not use ffmpeg&cut.

    b. you could also try mencoder:
    Code:
    mencoder -oac copy -ovc copy -o 12.avi 1.avi 2.avi
    or avimerge (comes with transcode, see: http://www.transcoding.org/transcode?Avimerge)

    Cu Selur
    Quote Quote  
  3. Thanks, but I don't want to concatenate the files but mux the streams (so I have i.e. 2 videos and 1 audio track running simultaneously). Still thanks a lot especially for avimerge. Looks like a good tool to have (I have mencoder already installed).
    Quote Quote  
  4. then:
    Code:
    ffmpeg -i "1.avi" -i "2.avi" -c copy  -map 0 -map 1 "12.avi"
    should do the job,... (at least it does for me,...)

    what does:
    Code:
    ffmpeg -i 12.avi
    output if you run it after calling the above call?
    Quote Quote  
  5. Damn, it does the job indeed! I had the feeling it was something trivial. Thanks a lot Ce Selur.

    Code:
    nput #0, avi, from '12.avi':
      Metadata:
        encoder         : Lavf54.59.107
      Duration: 00:11:24.00, start: 0.000000, bitrate: 50190 kb/s
        Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 24 tbr, 24 tbn, 24 tbc
        Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
        Stream #0:2: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 1280x720, 24 tbr, 24 tbn, 24 tbc
    (putting the output file as the last one, works without ")
    Quote Quote  
  6. I normally use "-quotes since I normally use full paths and white spaces inside names
    Quote Quote  



Similar Threads

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