Results 1 to 10 of 19

Thread: Tip: Join two avi file with mencoder

Threaded View

  1. #1
    Join Date
    Jul 2006
    Portland, OR
    Ubuntu 16.04 Xenial Xerus

    Tip: Join two avi file with mencoder

    Joining two or more avi files is easy with mencoder.

    Here is a simple script that I use to do it:

    # MjAVI - 2007
    #Mencoder needs to be installed for this script to work
    #The Numbers in this script could be changed to combine more than two files.
    # Mencoder also supports mpeg files. So the .avi could also be changed to .mpg
    echo "Script to combine two avi files, while syncing audio."
    echo "usage: ./mjavi a1.avi a2.avi combined_temp.avi final.avi" 
    cat "$1" "$2" > "$3";
    mencoder -forceidx -oac copy -ovc copy "$3" -o "$4"
    the cat command combines 1 and 2 into 3, but the audio isn't in sync. So, 3 is indexed with mencoder into 4 which has nicely synced audio.
    Attached Files Attached Files

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts