News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Mpeg2 Joiner

Started by cman, January 27, 2013, 12:33:38 PM

Previous topic - Next topic

cman

Anyone know of a command line application for joining Mpeg2 video? I'd like something I can integrate into a piece of software I'm writing. I've tried the DOS copy /b video1.mpg + /b video.mpg combinedVideo.mpg trick , but this affects the audio sync sometimes. How difficult would something like this be to code? Thanks for any information.

dedndave

well - i know a shortcut   :P
it may or may not suit your needs

that is to make a WPL playlist file (text file)
here is one i made for terminator 3
<?wpl version="1.0"?>
<smil>
    <head>
        <meta name="Generator" content="Microsoft Windows Media Player -- 11.0.5721.5145"/>
        <meta name="AverageRating" content="0"/>
        <meta name="TotalDuration" content="0"/>
        <meta name="ItemCount" content="2"/>
        <title>Terminator_3</title>
    </head>
    <body>
        <seq>
            <media src="Mov\Terminator 3 Rise of the Machines (2003) cd1.avi"/>
            <media src="Mov\Terminator 3 Rise of the Machines (2003) cd2.avi"/>
        </seq>
    </body>
</smil>

the AVI files are in a subfolder named "Mov"
it will work for any supported type

Tedd

You can try http://mpgtx.sourceforge.net/

If you want to do it yourself, the issue is multiplexing. You can join a single audio or video stream simply by sticking them together. The problem comes when there are multiple simultaneous streams - audio and video together - they get out of sync with each other due to scheduling (audio is ready too early or too late to match the video). In this case, you need to separate the streams, stick the parts together, and then re-multiplex the streams back together (or at least do the same on-the-fly.)
Potato2

carlos


This could be useful, is command-line only, but I don't tink it will deterr an asm programmer :bgrin:  :bgrin:

http://avisynth.org/mediawiki/Main_Page

cman

Ok , thanks for the information! I'll check these ideas out. I keep hearing about avisynth so I might give this a try. Thanks again. :t