Hello Group,
Recently I captured Harry Potter from TV as MPEG2. There is no sync problem in the original MPEG2 files. Then I cut and removed unwanted parts at the begining and at the end using TMPGEnc.
In the resultant MPEG2 both A&V are out of sync. But when I demuxed A&V using TMPGEnc and m2v and mp2 files are same length (2:24:04)
Again if I remuxed, they are going out of sync. Could someone tell me what am I doing wrong?
Regards
Dominic
+ Reply to Thread
Results 1 to 18 of 18
-
-
Cutting encoded audio/video is a no-no unless you use a pro program like m2 Edit Pro -- and then the program will usually transcode your edited MPEG-2 stream without asking you (I find it explodes the MPEG-2 fileszie to nearly double its original size after cutting).
When you cut MPEG-2 you are chopping out I & P frames and you are also slicing out audio frames with the video. Trouble is that there is much less data in I-frames than in the audio frames you are cutting, so everything rapidly slides out of sync.
The only reasonable way to cut or otherwise edit video is to cut the original AVI. MPEG-2 was not intended to be edited, and you will typically get lots of problems if you try to edit it.
The reason for this is that MPEG-2 is a highlyc omrpessed data format which depends on interpolation with several full frames per second and many other frames which merely interpolate partial data from those full frames. By contrast, the mp2 audio uses a quite different method of compression based on eliminating spectra judge non-audible.
So editing MPEg-2 is asking for trouble.
Always edit the original AVI files. If you want to edit an MPEG-2, the ugly but foolproof solution is to convert your entire MPEG-2 file to AVI, edit it using some program like Ulead Media Stuidio Prog or Evgas Video or Adobe Premiere, then re-encode to MPEG-2.
Editing MPEG-2 within an app like Adobe Premiere si possible, but not recommended. Whenever I've done it I typically frame sync error messages when loading TMPGEnc or the MainConcept MPEG-2 encoedr. -
"Trouble is that there is much less data in I-frames than in the audio frames you are cutting, so everything rapidly slides out of sync"
So excuse me that sounds impressive but what does it mean ?.
You must be in Marketing.
You think there is more data in the audio than the video ?
You think that has anything at all to do with sync ?
There is a cretain amount of audio associated with each video frame.
If this relationship is preserved, any number of Frames may be removed
along with the right amount of audio and there will be no sync problems.
The problem is not fundamental or theoretical it's just BUGS in the code
because the data stream is so complicated. Any cut within a GOP requires
a re-encode of at least the last part of the GOP. MPEG2 frames are not
in time sequence. The audio is mixed in with this horrible mess in a variable way. Timecodes aren't rigidly enforced. On top of that some of the frames aren't even there. The previous frame has a flag that says to repeat itself. It is difficult or impossible to pick up in the middle of an MpEG2 stream and regain sync.
When an Mpeg2 system stream is cut, it's difficult to figure out what to
do with the audio.
I will refer you to Womble MPEG2VCR which I know edits
MPEG2 streams down to the frame without losing sync. To do this
they have to re-encode portions of the video. It works perfectly
EXCEPT when the stream is full of pullown flags. That is IVTC video.
At every joint there is a small fixed offset. Since they do so well at
"regular" MPEG2 it must be a screw-up. Maybe they aren't properly
counting the time for the "virtual frames" or something. Beats me
I have respect for this problem. It's much needed and still hard to get. -
You can cut mpeg's with womble mpeg2vcr and they never get out of sync and it doesn't re-encode either, unless you tell it too
-
if you wanna work around...You could de mux the mpg
and cut it into several parts without the commercial then put them back together ....all can be done with bbMPEG Over in the eidt section it tells you how to best cut an mpeg......well you can just cut it up...then put it back together again...Slow tedious but effectiveHow long could we maintain? I wondered. How long until one of us starts raving and jabbering at this boy? What will he think then?
If you like Tekno download one of my tracks
www.users.bigpond.net.au/thefox149 -
"Trouble is that there is much less data in I-frames than in the audio frames you are cutting, so everything rapidly slides out of sync"
So excuse me that sounds impressive but what does it mean ?.
You must be in Marketing.
You think there is more data in the audio than the video ?
You think that has anything at all to do with sync ?
There is a cretain amount of audio associated with each video frame.
If this relationship is preserved, any number of Frames may be removed
along with the right amount of audio and there will be no sync problems.
The problem is not fundamental or theoretical it's just BUGS in the code
because the data stream is so complicated -
I had the same same problem trying to edit mpeg2 using tmpge.Since i now capture avi using the picvideo codec,and edit from there and then convert to mpeg2 with TMPGEnc,no problem.
From what i gather,editing mpegs only takes place at the i frames,but there are a lot of p frames in the same group.If your edit point is on a p frame the program goes to the closest i frame for the cut,but the audio doesn't.When you play the first part of the video before a trim,no problem,but after a couple of cuts,sync problems.
I now edit in vegas,render as an avi,and use tmpge to create mpegs.Not one problem.
This is a note from Tmpgenc help file:
Note that the locations where the file can be cut are governed by the films GOP structure, so a film cannot be arbitrarily cut. The "GOP" structure tab of the "MPEG Settings" window contains more information about the GOP structure.bmiller,ont.canada -
"the program goes to the closest i frame for the cut,but the audio doesn't"
Why is that ? It's a bug
There are (about) 24000 audio samples per GOP (GOP15)
Why would it be so hard to grab the correct amount of samples ?
You need 5 frames ? Get 5 x 1600 or 8000 samples. No problem -
Have had problems with sync when trying to cut out in between parts. Cutting into pieces and then joining gives better results.
Sometimes it is GOK (God Only Knows)-I have an experimental divx avi file with ac3 sound-plays in sync on media player 9,power dvd and Zoom Player. Totally out of sync with Div X player. BTW-the DivX player has no problems with vob files with ac3 audio. -
I use Ulead Videostudio 7 for editing (cutting) my MPEG2 VBR files and never have a problem with audio synch. Make sure you select Same As Project Settings under the Share/Create Video File. This will use Smart Render to avoid re-encoding the entire file. Thus, maintaining the original quality of the initial capture/encode.
-
If the program has no bugs in its feature to chop VOBs or in like TMPGEnc the video and the audio separately, it should be fine. As long as you take into account possible audio delays, which is normal. You just have to find out what the delay is, only a problem when the video and audio are cut separately.
Bugs are normally the cause or human error. -
I was not aware that MS7 could edit MPEG2.
I'll have to try it. The big test is editing MPEG2 files
that have been Inverse Telecined. -
FOO Wrote:
I was not aware that MS7 could edit MPEG2.
I'll have to try it. The big test is editing MPEG2 files
that have been Inverse Telecined
Does anyone know of any other programs that do a good job of editing mpeg2? -
It has been reported that M2-Edit works but the
demo is too crippled for me to verify it.
Womble Mpeg2vcr is excellent if the video is not pulldown. -
just a quick thing... my a/v also went out of sync alot, but i set the VBV Buffer Size down to 0 on TMGEnc (as when i loaded a template it was set to 224kb), not had any problems since.
-
I'm not sure if it fits in this topic but I recently read something about the sync problem using TMPGEnc, Andreas Dittrich from Germany has a site where you can find info and a solution about this problem.
http://www-user.rhrk.uni-kl.de/~dittrich/sync/
Similar Threads
-
Flash .flv video out of sync (original video is perfect with double audio s
By TACtech in forum EditingReplies: 2Last Post: 3rd Apr 2012, 12:13 -
MKVvextract stretches extracted audio/Audio not in sync with video
By cgo in forum Video ConversionReplies: 16Last Post: 15th Jan 2012, 17:15 -
DGIndex makes Video out of sync with Audio - please help!
By VideoFanatic in forum Video ConversionReplies: 10Last Post: 16th Oct 2011, 16:53 -
An app to visually sync audio to video similar to Subtitle Edit visual sync
By cinesimon in forum AudioReplies: 3Last Post: 6th Sep 2011, 07:54 -
Windows movie maker makes the audio and video out of sync
By DaneClark in forum EditingReplies: 4Last Post: 9th Jul 2009, 20:45