VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Dec 2011
    Location
    Paris, FR
    Search PM
    Hi All.

    I use the MENCODER (r34401-4.6.2, win32) in command line to convert all my personnal video files (handmade with a phone, 3GP or MP4) to standard MPEG DVD file s(PAL DVD compliant) .

    Step-1 : I convert all the 3GP and MP4 video to MEPG DVD compliant files (AC3 stereo, PAL resolution)
    Code:
    -of mpeg -mpegopts format=dvd:tsaf
    -vf scale=720:576,harddup
    -af lavcresample=48000 -af-add channels=2:2 -srate 48000 -mc 3
    -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9
    -ofps 25
    Step-2 : I generate still image to do "inter-title" with the date/time of the video. I use the same settings (AC3 Stereo with blank sound, pal res). I use "-mf" option of Mencoder to create a short mpeg video from a PNG file (duration=1 second).
    I checked with MediaInfo for this inter-tile video : audio and video duration are the same (1s), codecs are ok.

    Step-3 : I join all this vids togother to create a single MPEG video
    Code:
    mencoder -o OUT.MPG -avc copy -oac copy TITLE_1.MPG VIDEO_1.MPG TITLE_2.MPG VIDEO_2.MPG
    When I play this video (with mplayer or Media Player Classic), the audio is desync form video when VIDEO_2 is viewed.
    If I join / merge only the video (not the title) : result is the same.

    My question : what are the best settings to create theses intermediates videos and the final mpeg ? I tried to re-encode to MPEG at step-3 (same settings as in step-2) but result is the same : audio/video out of sync.

    Thanks in advance.

    I will provide a solution if I found another way to do this.
    Last edited by Jemore; 19th Dec 2011 at 04:52.
    Quote Quote  
  2. Here is the command-line (command-prompt) method to join .mpg files.
    personally never tried in Windows, but, should work perfect.

    1. Click Start >> Run.

    2. Type cmd and press Enter. This will open the command prompt.

    3. In the command prompt, type
    copy /b "C:\path-to-video\FirstClip.mpg" + "C:\path-to-video\SecondClip.mpg" + "C:\path-to-video\ThirdClip.mpg" "C:\path-to-output-video\FullOutputMovie.mpg"

    where as...

    FirstClip.mpg, SecondClip.mpg, and ThirdClip.mpg are the video files to join must have same in size and same audio specifications. You can specify any number of files to join.as long as they bear same media-specs.

    FullOutputMovie.mpg is the resultant combined output video file.

    4. Press enter and the files will be joined.

    Alternatively....
    You can use AVIDemux in Video (COPY), and Audio (COPY) to join .mpg files, as long as they bear same video-n-audio media-specs.
    Quote Quote  
  3. Member
    Join Date
    Dec 2011
    Location
    Paris, FR
    Search PM
    thanks Bonie.
    Using copy or cat do not produce a valid mpeg, i have to re-encode the file (maybe demux and remux all streams), and last time i tried this, my audio/video was out of sync.
    I will try different command line tools soon.
    Quote Quote  
  4. Member
    Join Date
    Dec 2011
    Location
    Paris, FR
    Search PM
    I did a lot of tests, and here are the result :
    - mencoder can join a lot of mpeg together if they have the same caracteristic (sire, bitrate, codecs of course), but a small audio delay is always inserted. So i use the following command line :

    Code:
    mencoder -audio-preload 0.0 -oac copy -ovc copy -of mpeg -mpegopts format=dvd:tsaf -idx -mc 0 FILE1.MPG FILE2.MPG FILE3.MPG -o FINAL.MPG
    Is it important here to indicate "-audio-preload 0.0" to avoid audio desynchro. Also, I have to indicate "-of mpeg" to cleary have a valid MPEG file. And the "-idx -mc 0" will duplicate frames if necessarry even if the incomming mpeg files do not have duplicates frame.
    With this line, I can join 30 video clip into a single file.
    Last edited by Jemore; 18th Jan 2012 at 16:52.
    Quote Quote  



Similar Threads

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