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)
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).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
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
When I play this video (with mplayer or Media Player Classic), the audio is desync form video when VIDEO_2 is viewed.Code:mencoder -o OUT.MPG -avc copy -oac copy TITLE_1.MPG VIDEO_1.MPG TITLE_2.MPG VIDEO_2.MPG
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.
+ Reply to Thread
Results 1 to 4 of 4
-
Last edited by Jemore; 19th Dec 2011 at 04:52.
-
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. -
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. -
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
With this line, I can join 30 video clip into a single file.Last edited by Jemore; 18th Jan 2012 at 16:52.
Similar Threads
-
Encode varaiable framerate video to MPEG with mencoder cause A/V
By Jemore in forum EditingReplies: 3Last Post: 18th Jan 2012, 16:51 -
How To Join Flv Video Together Keeping Sync
By jamespoo in forum EditingReplies: 5Last Post: 15th Oct 2011, 07:28 -
tsremux ? Multiple m2ts diff fps..join result =delay
By newbtube in forum Video ConversionReplies: 2Last Post: 29th Mar 2011, 15:12 -
Mencoder // ffmpeg flv file Audio-video sync problem
By krishnareddy in forum ffmpegX general discussionReplies: 5Last Post: 26th Apr 2009, 09:13 -
Mencoder - Audio / Video Sync Problem
By krishnareddy in forum Video ConversionReplies: 0Last Post: 21st Apr 2009, 23:05