LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   merging mpg files (https://www.linuxquestions.org/questions/linux-software-2/merging-mpg-files-347222/)

karhu 07-27-2005 04:48 AM

merging mpeg files
 
Hi,

I have recently downloaded a movie from Internet (with Azureus).

The movie was divided in 2 (big) mpg files and I would like to join them back together.

Is there an application that I can use to join this 2 mpg files ?


thanks in advance

----------------------------------------------------------
edited:
----------
I found some information using Google...


> According to an article in Linux Journal you can just cat the files together:
>
> cat *.mpg > video.mpg
>
> This seems to be entirely too easy.
>The LJ article is online. It has the answer to you movie making question >as well.
>
> http://www.linuxjournal.com/article.php?sid=6953


therefore, if I can join 2 or more mpg files together using 'cat',

Can I divide a mpg in smaller files using 'split' ? (and every piece still be recognized as a mpg movie by mplayer ? )



maroonbaboon 07-27-2005 05:33 AM

Something like this might work:

cat file1.mpeg file2 mpeg | mencoder -aoc copy -voc copy -o output.mpeg

(Taken from the mplayer-users mailing list, where it's also noted there might be synchronisation problems).

karhu 07-27-2005 05:37 AM

Quote:

Originally posted by maroonbaboon
Something like this might work:

cat file1.mpeg file2 mpeg | mencoder -aoc copy -voc copy -o output.mpeg

(Taken from the mplayer-users mailing list, where it's also noted there might be synchronisation problems).


thanks for the reply.

btw, if the first part of the command
Quote:

cat file1.mpeg file2 mpeg
is already joining the mpgeg files. then, what is the second part of the command doing ?

Quote:

mencoder -aoc copy -voc copy -o output.mpeg

maroonbaboon 07-27-2005 06:31 AM

I'm sure an mpeg files is much more than just a sequence of pictures, each with its own bit of sound. For example I guess each file has some sort of header giving picture size and so on, which you don't want stuck in the middle of the joined file. Of course if your player is smart enough it can probably deal with that, so e.g.

cat 1.mpeg 2.mpeg | mplayer -

is probably fine.

Passing through mencoder should ensure that the output conforms to the mpeg format, although carrying sound/picture synch across the join might be a problem.

jayakrishnan 07-28-2005 05:25 AM

try

http://mpgtx.sourceforge.net/


All times are GMT -5. The time now is 04:21 PM.