Maybe somebody can point me to good source for this issue, but here is question.
Why is MPEG2 file out of sync after splitting, demuxing or authoring when original file is not ?
I captured couple of files with my capture card. When played they are fine and no sync problem at all. But after authoring (I think during that process file is demuxed) when played in DVD player, it is out of sync. What is technical explanation of this and why is it so difficult to keep it in sync ?
I hope that there is some guru reading this...![]()
+ Reply to Thread
Results 1 to 30 of 60
-
Pinnacle Studio 8 and DV home video editing (ver.9 already home)
-
Well, it's usually pretty simple. Both the video and the audio in a MPEG2 file have time indexes embeded in their packet headers. Windows Media Player just grabs a video packet and an audio packet and sends them to the output (I used to pull out my hair trying to use WMP to sync my audio and video, until I discovered this "property" of the program). When you mux the two, the indexes will be sync'ed up - ie, video index 00:02:31.23 will be matched with audio index 00:02:31.23.
But why are your captures ending up out-of-sync (OOS)? Probably there is an AUDIO DELAY that isn't being factored in. Tell us: What are you using to cap? What are you using to demux? What are you using to author? Is your audio OOS the same amount the entire DVD? Or, does it start out in sync and gradually get progressively OOS?
I capture RT MPEG2 and I have never had a problem with my audio/video syncing up. -
Well... I was trying to have this discussion in some kind of theoretical level about OOS issue. Main concern was that original file plays just fine. OOS issue is introduced after any modification of file. I saw this in a lot of posts and I was trying to find reason. But here is my list of steps.
1. Captured by Pinnacle PCTV Deluxe (USB hardware encoder with audio) as MPEG-2 VBR 5000kBps and MPEG audio 48kHz, 16bit stereo, 224kbps
2. File is OK and no OOS issue while playning in WMP.
not couple of otpion how to make it OOS.
A. Authored with Ulead DVD MovieFactory 2 Trial.
B. Cut into smaller peaces in TMPGEnc Plus 2.5 using "Merge&Cut" tool.
C. De-multiplex in TMPGEnc Plus 2.5 using "De-Multiplex" tool.
Audio starts out in sync and gradually get progressively OOS. Video is behind audio. I know that it might be because lost frames but what doesn't make sence is why first file dosn't have OOS issue.Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
Similar issue as one reportef here :
ALL captures fine with wintv-pvr-250 until modified, A/V synPinnacle Studio 8 and DV home video editing (ver.9 already home) -
Well, the theoretical discussion is that your timecodes are different for your two streams. I suspect that your video is timed using DROP FRAME TIMING while your audio is NON DROP FRAME (or, vice versa). This will cause about a 6 to 7 second OOS difference for every hour of play. WMP is not a good program to test this sync issue. Try viewing your file using PowerDVD V4.0.
How much is your audio out of sync at the end of about one hour? Are you running a 3:2 PULLDOWN on your video?
Try running PULLDOWN without adding the pulldown flags (if encoding at 29.97fps) and change the timing to DROP_FRAME = FALSE. -
Out-of-sync is about 0.5s after 1:30:00 (1h30min). Whichis not bad at all, but still it is there.
Encoding is done by hardware and I am not aware of any "3:2 PULLDOWN".Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
Originally Posted by SLK001Pinnacle Studio 8 and DV home video editing (ver.9 already home)
-
Originally Posted by donpedro
Also, are you getting any reports of dropped frames? -
No. My capture sofware for external USB encoder does not provide that information. Is there some way how I can check that after capture ?
Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
Here is question... Is it possible that differen't software can do better job in de-muxing ?
Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
Originally Posted by SLK001Pinnacle Studio 8 and DV home video editing (ver.9 already home)
-
Is there a problem with the Ulead trial package? I seem to remember a long time ago that there were sync issues with Ulead stuff (but, then again, that may just be the memory going!). How do the elementry streams get imported into the package? What format is of your audio in (WAV?)?
TMPG'S MPEG TOOLS is about the best you can get for demuxing to elementry streams. -
I used original mpeg file or de-multiplexed m2v and mpa file.
I will have to try somthing else to author to rule out Ulead.Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
the main reason you lose sync is because when these programs, re/demux the file it does not include the padding streams that come along with them. Padding streams are used on capture to help video and audio sync. If you want to solve your sync issues, I STRONGLY SUGGEST GETTING A TIME BASE CORRECTOR.
-
Tell me more about padding streams. Or if you can point me to good source. By doing search here what I was able found was some kind of VCD file size and bites per sector size.
Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
Originally Posted by mazinz
TIA -
i do not know if their is an actual software based tbc. it is a hardware piece itself. I have one that is built into the dvd homdeck recorder i have, so if i want to do the full nine yards on dvds, i run my video through my dvd recorder so it passes the machines tbc and then it goes into my pc. They do sell tbc's on their own but they are not that cheap
A time base corrector gives numbers for each frame of vidoe regardless of quality so when items like our PC capture cards see this, it sees it as a real signal and not noise. this is what happens sometimes on older videos. it may look fine but their is degrade that although captures in sync, actually throws the 2 off if you have to do anything to it.
this board had more info on padding streams:
http://216.222.202.78/phpBB/index.php -
Got some ideas from the ReplayTV guys on Padding Streams. This is primarily concerning MPEG-2 captures.
Seems that various events cause a frame droppage that is filled in (?) by using this "padding stream". The frame drops cause errors in the timecodes, also GOP errors, although there may be causes for these OTHER than frame drops. The Padding Stream compensates for this somehow, though apparently some software players don't utilize it or compensate another way, as some will ocrrectly play such a padded stream and others will gradually lose synch. WinDVD works well.
It is the errors in Timecode and GOP that cause the MPEG-2 editors to lose audio synch. The Timefix program apparently breaks up the video to individually correct streams, possibly a large number of them, depending on number of errors. These can then be put back together and edited correctly, but I haven't tried this yet. Also, this may automatically locate commercial breaks. Another suggested fix was to use PVAStrumento.
If you Demux a file, and there is a Padding Stream, demux that and if it has any size then there were errors in the capture. These may involve ONLY GOP and/or Timecodes, and are not necessarily dropped frames.
Imagine you think you are getting one big zip file and instead it is several files zipped in different formats by various programs, but now we have packed it into one big file. Someone on AVSforum noted, and this I have seen, that editing a continous movie capture is far more accurate than editing one with commercials. This was Cable or Satellite, NOT VHS.
What DOES work is editing and re-encoding. Now, I don't want to change the actual frames of video, I just want to rebuild them into a continous stream which is coherent with the audio. Piece of cake, right?
The TBC thing is a great idea, I have a Sima Copymaster which is supposed to rebuild or repair or replace (?) the Timecodes, but it is said not to be a "TRUE" TimeBase Corrector, whatever that means. I will try that and the timefix.exe, also PVASTRUMENTO. If you can't win, CHEAT, there is ALWAYS a way. -
Originally Posted by Nelson37
Maybe you missed something....
I tryed to de-mux with PVAStrumento, but result (after authoring in Pinnacle Impression DVD SE) is same.... Still looking for solution.Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
That bit came from a guy who noted that when his padding stream was zero length he could edit it successfully, when it had size his audio was out of synch.
My results so far - no joy. PVAstrumento seems to create a file Womble plays as in synch but edit either locks or says "invalid audio stream". Almost any other fix Womble plays as OOS.
Timefix.exe does not fix problem.
TMPGenc Cut gives a file that is in synch, BUT the cut points are off by 10 seconds or more. -
So when I am trying to demux I should see some "padding stream" ? Not just Audio and Video ? What tool should show me that ?
Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
tmpg's demuxer will sho you padding streams. use its regualr demuxer, not the "simple demux".
But to let you guys know remuxing with the padding stream has never helped nor fixed anything in my cases. My sync issues fully went away with the time base corrector. trust me i have tried everthing when trying to get some videos to work. Now i no longer have issues -
1. TMPGEnc (regular demuxer, not simple) doesn't show aby padding stream for me.
2. My understanding is that Time Based Corrector is expensive solution and I am not sure if it can be used with my configuration.
3. I use external TV "card" with hardware encoder inside of box. So cable goes to box, TV Signal is created there, encoded to MPEG2 by hardware itself and then tranfered to PC via USB cable. So where will I be able to put TBC ?
So... just to repeat. Original file is in sync. No padding stream in TMPGEnc. Out-of-sync is only 0.5s in 1h20min after authoring (de-muxing).Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
So far no one can tell us how to get an editable capture without a TBC. I am beginning to wonder if all we can do is demux -> reencode the video -> remux -> and then edit. This has worked for me in the past.
-
I don't like that solution. That was reason why I bought hardware mpeg2 encoder so I don't have to encode. And re-encode mpeg2 ? Loss of quality. I will be looking around if I can make it work somehow..
Pinnacle Studio 8 and DV home video editing (ver.9 already home) -
I'm a bit interested in the problem myself. I had so much trouble with that I gave up and took my mpeg2 encoder card back to the store.
However, after reading this thread and looking at some info about timefix, I discovered that womble has a tool in their mpeg2 editor that may fix this problem. It looks like you can get a demo from their site, and hopefully the tool is fully functional.
It's called "MPEG Video GOP Fixer". Even if this doesn't fix the problem, there was some interesting info in their help file that might add the the "General Discussion".
MPEG Video GOP Fixer
This tool lets you check and correct GOP time code errors, audio PTS (presentation time stamp) errors, and DVD GOP size violations, which may be present in an MPEG data file.
GOP Time Code Error
In MPEG compression, a video sequence is divided into groups of image frames. A typical example is coded pictures of "I B B P B B P B B P B B P B B”. This is called a GOP (group of pictures). A header is usually stored before the I-picture, and is called a GOP header, and it’s usually an 8-byte data segment. One of the important information stored in this header is a 25-bit integer, called a SMPTE time code (SMPTE: Society of Motion Picture and Television Engineers). This time code refers to the first picture of the GOP in display order.
This GOP header and its time code provide very convenient points for managing a coded MPEG movie. It allows our MPEG editor to randomly access a lengthy MPEG movie very efficiently. However, this also makes the editor highly dependent on the accuracy of time codes in the GOP header, especially dependent on the continuity of the time codes in a complete MPEG movie. Unfortunately, an MPEG movie may have errors in the time code, or the time code may be disrupted, or the time code may not correctly reflect the coded image sequence. When any of these happens to an MPEG file, we consider it a GOP time code error.
The GOP fixer tool will correct the GOP time code errors based on its calculation from the complete video sequence. It will only modify those errorous 25-bit integers.
Audio PTS Error
Audio Presentation Time Stamps are 33-bit integers inserted in an MPEG stream to allow an MPEG decoder to synchronize the decoded audio sound with the decoded video image display. Those PTS values should match the playback time length of the decoded audio sound. When they are in error, the MPEG movie cannot be played correctly, and the audio and the video will be out of sync.
The GOP fixer tool will correct the audio PTS errors based on its calculation from the complete audio data. It will only modify those errorous 33-bit integers.
DVD GOP Size Violation
The DVD standard has special restrictions on the size of a GOP for a movie to be compressed into MPEG. Specifically, it requires that no GOP should have more than 18 frames for NTSC TV system and 15 frames for PAL TV system, even though the MPEG standards have no such limitations.
To make an MPEG file compliant with the DVD restriction on GOP size, the GOP fixer tool will find the violator and break it into multiple GOP’s of small sizes. For other GOP’s, it will simply copy over. -
Hmm... Interesting.....
Just downloaded it. Istalled it... but ....
File: <E:\aaa.mpg> is an 'MPEG-2 Program Stream'
To upgrade to an MPEG-2 full version, go to .....comPinnacle Studio 8 and DV home video editing (ver.9 already home) -
Too bad about the trial version.
Here is a link to the mpeg2 version:
http://www.womble.com/exe/MPEG2VCR.EXE
Now if you purchase the serial number you can give it a try.
Seriously, I did some searches and I'm not sure it works. My german's not too good and that was the only discussion about it I could find. But hopefully the text from the help file added some info for the 'General discussion'. -
Hey all,
I've just noticed that if you ask TMPGEnc to encode to separate streams instead of one big mpeg2, the video and audio files are of different lengths. Anyone else noticed this?
Regards,
Rob -
Do you mean time ? And by "encode to separate streams" you mean de-mutiplex ?
Yes. My de-multiplexed audio and video files have different time lenght.Pinnacle Studio 8 and DV home video editing (ver.9 already home)
Similar Threads
-
VirtualDub Sync Issue
By EzK in forum EditingReplies: 1Last Post: 13th Jul 2011, 11:30 -
Need help again, Re: A/V sync issue :(
By takearushfan in forum AudioReplies: 8Last Post: 1st Sep 2010, 12:32 -
DTS Sync Issue
By cg1200 in forum Video ConversionReplies: 28Last Post: 24th Apr 2010, 19:53 -
XVID4PSP: VOB to MPEG2 (hard subs) progressive av sync issue
By txporter in forum DVD RippingReplies: 1Last Post: 24th Feb 2009, 11:48 -
Assistance with audio sync issues (and general cleaning)
By DB83 in forum AudioReplies: 2Last Post: 8th Oct 2008, 07:31