VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. So I'm trying to use ffmpeg to mux two ts files together while dropping the video of the second ts file and adding subtitles. So far (without really knowing anything about ffmpeg) I've pieced together the following command:

    Code:
    ffmpeg -i "file1.ts" -i "file2.ts" -i "file3.srt" -map 0:v:0 -vcodec copy -map 0:a:0 -acodec copy -map 1:a:0 -acodec copy -map 2:s:0 -c copy -f matroska out.mkv
    ...with this I get..

    Code:
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (copy)
      Stream #1:1 -> #0:2 (copy)
      Stream #2:0 -> #0:3 (copy)
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    Ideally I want to make the audio from file1.ts default and the subtitles default as well when playing back the mkv, but I'll settle with just being able to run it through successfully for now. I'm also trying to retain all quality. I know I can do all this with MKVToolNix, but I'm trying to make a BAT file to run the whole process for me.

    Advice?
    Quote Quote  
  2. Complete ffmpeg log?

    Originally Posted by nobodyhome View Post
    I know I can do all this with MKVToolNix, but I'm trying to make a BAT file to run the whole process for me.Advice?
    Mkvmerge can be batched as well:
    mkvmerge -o "out.mkv" "file1.ts" --no-video "file2.ts" "file3.srt"
    Quote Quote  
  3. Originally Posted by sneaker View Post
    Complete ffmpeg log?

    Originally Posted by nobodyhome View Post
    I know I can do all this with MKVToolNix, but I'm trying to make a BAT file to run the whole process for me.Advice?
    Mkvmerge can be batched as well:
    mkvmerge -o "out.mkv" "file1.ts" --no-video "file2.ts" "file3.srt"
    Perfect!! I used Mkvmerge as you suggested and it did exactly as I wanted it to! Explored it more and looks like there are tons of options I can use too. Thank you for pointing me to it. I didn't realize it did batched as well. Thanks again.
    Quote Quote  



Similar Threads

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