Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Join two parts of a movie

  1. #1
    Join Date
    Jul 2005
    Location
    Rotterdam, NL
    Beans
    443

    Join two parts of a movie

    I have two parts of a film, named Across.CD02.avi and Across.CD01.avi.

    Both are around 700 MB.

    I would like to join them to one big file.

    When I opened a terminal and typed in:
    Code:
    cat Across.CD01.avi Across.CD02.avi > Across.avi
    I got one big file of around 1.4 GB, but when I opened it, it played only the content of the file Across.CD01.avi, and the time shown by VCL was that of Across.CD01.avi as well.

    How could I make it work?
    The first thing we do, let's kill all the lawyers.
    Shakespeare, "Henry VI", Part IV

  2. #2
    Join Date
    Feb 2006
    Location
    uk
    Beans
    Hidden!

    Re: Join two parts of a movie

    off the top of my head (ie, you may want to check) do

    Code:
    mencoder -forceidx -aoc copy -ovc copy -o outputfilename.avi input1.avi input2.avi

    the forceidx thing rebuilds the idx index, which can help with sync issues that can arise. the aoc and ovc copies are basically 'copy the audio and video and dont reencode either'

  3. #3
    Join Date
    Jul 2005
    Location
    Rotterdam, NL
    Beans
    443

    Re: Join two parts of a movie

    Quote Originally Posted by aeiah View Post
    off the top of my head (ie, you may want to check) do

    Code:
    mencoder -forceidx -aoc copy -ovc copy -o outputfilename.avi input1.avi input2.avi

    the forceidx thing rebuilds the idx index, which can help with sync issues that can arise. the aoc and ovc copies are basically 'copy the audio and video and dont reencode either'
    Uh...

    Code:
    gabriel@gabriel-laptop:~/Videos$ mencoder -forceidx -aoc copy -ovc copy -o Across.avi Across.CD01.avi Across.CD02.avi
    MEncoder 2:1.0~rc2-0ubuntu13 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Core(TM)2 CPU         T5600  @ 1.83GHz (Family: 6, Model: 15, Stepping: 6)
    CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled with runtime CPU detection.
    -aoc is not an MEncoder option
    
    Exiting... (error parsing command line)
    Help?
    The first thing we do, let's kill all the lawyers.
    Shakespeare, "Henry VI", Part IV

  4. #4
    Join Date
    Feb 2006
    Location
    uk
    Beans
    Hidden!

    Re: Join two parts of a movie

    ooops

    Code:
    mencoder -forceidx -oac copy -ovc copy -o outputfilename.avi input1.avi input2.avi
    sorry about that

  5. #5
    Join Date
    Jul 2005
    Location
    Rotterdam, NL
    Beans
    443

    Re: Join two parts of a movie

    Quote Originally Posted by aeiah View Post
    ooops

    Code:
    mencoder -forceidx -oac copy -ovc copy -o outputfilename.avi input1.avi input2.avi
    sorry about that
    Great, thanks
    The first thing we do, let's kill all the lawyers.
    Shakespeare, "Henry VI", Part IV

  6. #6
    Join Date
    Apr 2006
    Location
    Portugal
    Beans
    4
    Distro
    Ubuntu 6.10 Edgy

    Re: Join two parts of a movie

    ah great simple way of doing it:]

  7. #7
    Join Date
    Jun 2008
    Location
    Colorado
    Beans
    151
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Join two parts of a movie

    i have used this to join 4 .avi's so that i can ffmpeg them into .mpg and author a DVD with it... however, it will go through the first video, then i get the error:

    Code:
    All video files must have identical fps, resolution, and codec for -ovc copy.
    ...? what do i do here? the code i originally used was:

    Code:
    avimerge -c -o PhysII_Lec05-08.avi -i PhysII_Lec05.avi PhysII_Lec06.avi PhysII_Lec07.avi PhysII_Lec08.avi
    but the audio/video was WAY off, so then i:


    Code:
     mencoder -forceidx -oac copy -ovc copy -o PhysII_Lec05-08.avi PhysII_Lec05.avi PhysII_Lec06.avi PhysII_Lec07.avi PhysII_Lec08.avi
    this time the sync was great, but as stated above it only went through the first video and then stopped...

    any suggestions???

  8. #8
    Join Date
    Dec 2008
    Beans
    2

    Re: Join two parts of a movie

    I made an executable file called "vidmerge" in my ~/.gnome2/nautilus-scripts folder, and filled it with this:

    Code:
    #!/bin/bash
    mencoder -forceidx -oac copy -ovc copy -o $NAUTILUS_SCRIPT_CURRENT_URI/merged.avi $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
    exit
    Now all I have to do is select the files to be merged in nautilus, right-click, and select "vidmerge" from the scripts menu. Merge in progress!

    Todo:
    - instead of "merged", use the string the source files have in common, minus things like "cd" " cd" "_cd" ".cd" "-cd" "part" " part" etc. Else, if they have nothing in common, use "merged"
    - Also, check if it exists, first. Ask for overwrite.
    - ignore non-avi files (if mencoder isn't already doing that)

    That would make the ultimate script. Any suggestions on how to do that, particularly the file name manipulation, would be welcome

  9. #9
    Join Date
    Jan 2007
    Beans
    169

    Arrow Re: Join two parts of a movie

    netgrazer, feel free to adapt it for use in nautilus.

    also to open a enhacement request to ship it
    it's fully integrated with the gnome enviroment... only if notify-send was default in ubuntu....

    http://github.com/gcb/video-merger/b...c/avi_merge.sh

  10. #10
    Join Date
    Jan 2007
    Beans
    169

    Lightbulb Re: Join two parts of a movie

    see screenshot.


    it also report on completion, errors from mencoder, and warnings about file overwrite and such.
    Attached Images Attached Images

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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