VideoHelp Forum




+ Reply to Thread
Results 1 to 18 of 18
  1. 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
    Quote Quote  
  2. 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.
    Quote Quote  
  3. Member
    Join Date
    Mar 2003
    Location
    Uranus
    Search Comp PM
    "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.
    Quote Quote  
  4. 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
    Quote Quote  
  5. 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 effective
    How 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
    Quote Quote  
  6. i don`t know why that's happens,but maybe i can help you.

    1..Open TMPGEnc, mpeg tools, multiplex menu and then open the original MPEG2 and remuxed as "MPEG2 Supervideo cd VBR".

    2.Finally try cutting the "new" muxed file.

    I hope works for you!
    Quote Quote  
  7. "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
    Well said.
    Quote Quote  
  8. Member
    Join Date
    Sep 2002
    Location
    ontario ,canada
    Search Comp PM
    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
    Quote Quote  
  9. Member
    Join Date
    Mar 2003
    Location
    Uranus
    Search Comp PM
    "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
    Quote Quote  
  10. Member
    Join Date
    Jan 2003
    Location
    India
    Search Comp PM
    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.
    Quote Quote  
  11. 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.
    Quote Quote  
  12. Member
    Join Date
    Dec 2001
    Location
    Sydney, Australia
    Search Comp PM
    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.
    Quote Quote  
  13. Member
    Join Date
    Mar 2003
    Location
    Uranus
    Search Comp PM
    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.
    Quote Quote  
  14. Member cplevel42's Avatar
    Join Date
    Feb 2003
    Location
    United States
    Search Comp PM
    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
    Yep! and Ulead MS7 does a really good job at it. I was amazed when I 1st tried it.

    Does anyone know of any other programs that do a good job of editing mpeg2?
    Quote Quote  
  15. Member
    Join Date
    Mar 2003
    Location
    Uranus
    Search Comp PM
    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.
    Quote Quote  
  16. 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.
    Quote Quote  
  17. Member ZippyP.'s Avatar
    Join Date
    Nov 2002
    Location
    Lotus Land
    Search Comp PM
    Originally Posted by dinobike
    i don`t know why that's happens,but maybe i can help you.

    1..Open TMPGEnc, mpeg tools, multiplex menu and then open the original MPEG2 and remuxed as "MPEG2 Supervideo cd VBR".

    2.Finally try cutting the "new" muxed file.
    I haven't tried this but it makes sense. I have read that TMPGEnc will edit mpeg files created by itself just fine, but mpegs from other sources get screwed up.
    "Art is making something out of nothing and selling it." - Frank Zappa
    Quote Quote  
  18. Member
    Join Date
    Aug 2002
    Location
    LightCycle Grid
    Search Comp PM
    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/
    Quote Quote  



Similar Threads

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