Videostudio 9 audio sync problems

Moderator: Ken Berry

Donkeyoaty

Videostudio 9 audio sync problems

Post by Donkeyoaty »

My audio is out of sync with picture after I create a file.


While working on the project and using preview for the whole project file ( not clip ), the audio is fine. Once I create the file ( in any mode ? Mpeg, original etc ) the audio drops either behind or infront of the picture.


Any ideas ?
Black Lab
Posts: 7430
Joined: Wed Dec 15, 2004 3:11 pm
operating_system: Windows 8
System_Drive: C
32bit or 64bit: 64 Bit
Location: Pottstown, Pennsylvania, USA

Post by Black Lab »

Are you following the recommended procedure as outlined in the sticky at the top of this forum?

Also, please complete your system info and give us as many details as possible in regards to your clip and project properties as well as your work flow.
sjj1805
Posts: 14419
Joined: Wed Jan 26, 2005 7:20 am
operating_system: Windows XP Pro
System_Drive: C
32bit or 64bit: 32 Bit
motherboard: Equium P200-178
processor: Intel Pentium Dual-Core Processor T2080
ram: 2 GB
Video Card: Intel 945 Express
sound_card: Intel GMA 950
Hard_Drive_Capacity: 1160 GB
Location: Birmingham UK

Post by sjj1805 »

You havent said so but I bet that you are editing MPEG files.
In the list of top 10 frequently asked questions this one would rank number 1.

There are several posts concerning this and a search will find plenty of information. but in a nutshell here it is again kept simple.
Video is a series of still pictures passing in front of your eyes very fast.
In the PAL system 25 pictures every second made up of 2 frames upper and lower to make 1 complete frame and so described as 25 frames per second.
The NTSC system comprises of almost 30 pictures and so you get just under 30 frames per second (29.97). Linked to these pictures are sound files. The reason for the difference between PAL and MPEG is due to the electricity supply of that particular country.

Here I will describe the problem in PAL
Now then lets just imagine 25 BMP pictures every second each measuring
768x576 pixels. Wow thats going to be huge and one hours worth of video will devour some 60 gigabytes of Hard Drive space.

So we introduce something called compression to make the file sizes smaller. We will also need something to decompress the files again later so we have COmpression and DECompression and end up with something called a CODEC.

There are many CODECs in existence some are what are known as lossy and others lossless. Those files known as lossless are grouped together into what are termed AVI files (Audio/Video Interleaved.)
Think of these compressed AVI files like you would a TIFF file in the still image world. Smaller in file size but retaining the quality of the original BMP.

The lossy files are termed MPEG. (Before anyone jumps in I am keeping this simple and easy to understand.)

Normal video editors such as the Ulead range, Adobe Premier, Pinnacle, Sony etc are designed to work with AVI files (lossless) and so editing AVI files should not produce out of synch problems. Eventually the completed AVI files will be compressed into an MPEG (Lossy) format to create the DVD VOB files.

DVD VOB files are MPEG files but also contain slightly more information than a normal MPEG file which is why simply renaming VOB to MPEG does not always work correctly.

Now back to MPEG files.
Think of an MPEG as being the motion equivalant of its still image cousin a JPG. The picture is considerably smaller than the BMP file as a lot of details has been discarded though to the eye seemingly unoticeable.
If however you edit these files they get compressed again and even more detail gets dumped and eventually those details become very noticeable.

Another point to be considered here is that part of the MPEG compression process is that these files are not all complete pictures. Instead they are made of of groups of pictures termed a GOP.

The standard GOP file is either 12 or 15 frames long dependant usually upon if you are using NTSC or PAL.
Futher explanation of GOP here:
http://en.wikipedia.org/wiki/MPEG-2
Put simply you get a complete picture on each i-frame but only information concerning changes to that picture on the b and p frames.

There is an interesting article by Terry Stetler - Moderator of the Media Studio Pro forum about changing the size of the GOP structure when dealing with fast action movies like racing cars.
http://phpbb.ulead.com.tw/EN/viewtopic.php?t=10880

Now then back to our out of synch problem.
Tied into the GOP structure are flags in the video stream and flags in the audio stream designed to keep them synchronised. These are termed Program Time Stamps otherwise termed PTS.

The Audio stream does not have a GOP structure it remains continous.
When you cut the video then mainly due to the video GOP structure you destroy the synchronisation between the two streams and end up with the sound usualy ahead of the video. I dont know for sure but I suspect that when you cut the GOP it probably goes back to the nearest preceding i-frame.

So then, whats the cure?

1. Only edit AVI files. Only convert to MPEG when you are ready to author the DVD.
2. If option 1 is unavailable - perhaps your capture software will only capture in MPEG format (example - my Hauppauge TV card.)
Then you need to use a purpose built MPEG Editor such as Womble http://www.womble.com/products.dvd/
or
VideoRedo http://www.videoredo.com/index.html
3. You may get lucky if you pass an out of synch file through one of the above two products which have modules to try and correct PTS problems.
4. When all else fails and only as a last resort you can do a quick fix that will at least make an out of synch video watchable by following my tutorial here http://phpbb.ulead.com.tw/EN/viewtopic.php?t=11524

Regards
Steve J
Last edited by sjj1805 on Sat Jan 12, 2008 2:04 am, edited 4 times in total.
Black Lab
Posts: 7430
Joined: Wed Dec 15, 2004 3:11 pm
operating_system: Windows 8
System_Drive: C
32bit or 64bit: 64 Bit
Location: Pottstown, Pennsylvania, USA

Post by Black Lab »

:idea: Steve, what a great description of the video process. That should be part Recommended Procedure sticky. I think it would help eliminate many of the questions, problems, etc. that we constantly see here.
Donkeyoaty

Post by Donkeyoaty »

#####

I thought I had read most of the FAQ'a based around this including a forum search.

Sorry to be a pain , but that explanation was well worth it.


Yep. I captured on DV but encoded to Mpeg using TMPEng on ( mis-informed) advice . Out of 32 clips making up the final video only two have fallen out of sync.

Double ##### !
sjj1805
Posts: 14419
Joined: Wed Jan 26, 2005 7:20 am
operating_system: Windows XP Pro
System_Drive: C
32bit or 64bit: 32 Bit
motherboard: Equium P200-178
processor: Intel Pentium Dual-Core Processor T2080
ram: 2 GB
Video Card: Intel 945 Express
sound_card: Intel GMA 950
Hard_Drive_Capacity: 1160 GB
Location: Birmingham UK

Post by sjj1805 »

There is another thread starting to grow dealing with render time issues here:
http://phpbb.ulead.com.tw/EN/viewtopic. ... 5043#55043
daftest

Post by daftest »

Hi Steve,

That's a great description of video codecs. But there's another issue here: why does Nero produce a perfectly synced soundtrack while Ulead DVD Workshop fails at the same task? I used both programs to author the same video file. Surely there's problems in the Ulead encoder.

What do you think?

Regards,
David.
sjj1805
Posts: 14419
Joined: Wed Jan 26, 2005 7:20 am
operating_system: Windows XP Pro
System_Drive: C
32bit or 64bit: 32 Bit
motherboard: Equium P200-178
processor: Intel Pentium Dual-Core Processor T2080
ram: 2 GB
Video Card: Intel 945 Express
sound_card: Intel GMA 950
Hard_Drive_Capacity: 1160 GB
Location: Birmingham UK

Post by sjj1805 »

Now I bet you are going to tell me that ALL of the settings were identical in Nero. Bit rate, Audio, Compression Quality etc.

Steve J
GuyL
Posts: 444
Joined: Sun Dec 12, 2004 1:17 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS P6T
processor: I7 920
ram: 6GB
Video Card: ATI 5870
sound_card: Auzentech X-fi Forte 7.1
Hard_Drive_Capacity: 2 TB
Monitor/Display Make & Model: LG W2753V & HP w2408h
Location: Halifax, NS Canada
Contact:

Post by GuyL »

Can we make Steve's post a sticky?
Now using Adobe Premiere and Photoshop
Guy Lapierre
www.forefrontbusinesssolutions.com
daftest

Post by daftest »

sjj1805 wrote:Now I bet you are going to tell me that ALL of the settings were identical in Nero. Bit rate, Audio, Compression Quality etc.

Steve J
Hi Steve,

Are you suggesting that Ulead's sync problem could be solved by adjusting some settings? Nero's settings are automatic and produce no sync problem.

Regards,
David.
rpungin
Posts: 24
Joined: Tue Mar 14, 2006 7:13 am
Location: New York City
Contact:

Post by rpungin »

Hi Steve.

I read your explanation on editing MPEG files. Basically you're saying that by editing the MPEG files we gradually lose the synch between audio and video.

But my question is: why does the resulting MPEG file plays back flawlessly using Windows Media Player? There are no synch problems whatsoever. The problem only occures when this MPEG file is burned on the DVD!

Here is the background info:
I captured video from a DV camera to MPEG2 file using Roxio Capture. I edited the MPEG2 file using Video Studio 9 by saving a bunch of "trimmed videos" and then putting them together in different order in a new VS project. Then I saved the resulting MPEG2 file to be burned on the DVD. The resulting MPEG2 file plays flawelessly with the Media Player, but when burned on DVD, there is a gradual increase in audio lag. This happens when I burn the DVD with Video Studio, Roxio Media Creator, and TMPEnc DVD author!

Appreciate your help on this!
Raphael
http://youtube.com/rpungin2
sjj1805
Posts: 14419
Joined: Wed Jan 26, 2005 7:20 am
operating_system: Windows XP Pro
System_Drive: C
32bit or 64bit: 32 Bit
motherboard: Equium P200-178
processor: Intel Pentium Dual-Core Processor T2080
ram: 2 GB
Video Card: Intel 945 Express
sound_card: Intel GMA 950
Hard_Drive_Capacity: 1160 GB
Location: Birmingham UK

Post by sjj1805 »

[quote="rpungin"]Hi Steve.
I read your explanation on editing MPEG files. Basically you're saying that by editing the MPEG files we gradually lose the synch between audio and video.

But my question is: why does the resulting MPEG file plays back flawlessly using Windows Media Player? There are no synch problems whatsoever. The problem only occures when this MPEG file is burned on the DVD!/quote]

This is something to do with the PTS (Program Time Stamps) which will contain errors that are not apparant until you reach the stage when you convert the MPEG files to VOB's. If you run a seemingly OK MPEG file through either Womble or VideoRedo you will be amazed when it tells you it has found upwards of a 1,000 PTS errors.

Steve J
GuyL
Posts: 444
Joined: Sun Dec 12, 2004 1:17 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS P6T
processor: I7 920
ram: 6GB
Video Card: ATI 5870
sound_card: Auzentech X-fi Forte 7.1
Hard_Drive_Capacity: 2 TB
Monitor/Display Make & Model: LG W2753V & HP w2408h
Location: Halifax, NS Canada
Contact:

Post by GuyL »

Steve is right. When I was new to editing I did everything in MPEG. Many times the finished project (DVD) would be a problem. It was very frustrating but I was being stubborn. The cost of hard drive space at that time was significantly more than it is now and the hard drives were smaller too.

I've since made the investments and switched to AVI for capture and editing. I haven't had a single problem with a video in about 2 years now. In that time, I've upgraded VS 7 to 9 and made some hardware upgrades that make my life even easier.

Don't get me wrong. I still capture to MPEG when I do not plan to edit files.
Last edited by GuyL on Wed Mar 15, 2006 4:17 pm, edited 1 time in total.
Now using Adobe Premiere and Photoshop
Guy Lapierre
www.forefrontbusinesssolutions.com
rpungin
Posts: 24
Joined: Tue Mar 14, 2006 7:13 am
Location: New York City
Contact:

Post by rpungin »

OK, so going forward I will make sure I only edit the AVI files.

In the mean time I no longer have the original tape which I captured as MPEG. So I only have the MPEG video. Moreover I spent a lot of time editing it to come up with the resulting MPEG file.

So my question is: what can I do to successfully burn the resulting MPEG2 on the DVD. Since the MPEG file can be played correctly by Media Player, can I convert it to AVI using VirtualDub and then try to burn the AVI file? Would the AVI file be out of synch?
Raphael
http://youtube.com/rpungin2
sjj1805
Posts: 14419
Joined: Wed Jan 26, 2005 7:20 am
operating_system: Windows XP Pro
System_Drive: C
32bit or 64bit: 32 Bit
motherboard: Equium P200-178
processor: Intel Pentium Dual-Core Processor T2080
ram: 2 GB
Video Card: Intel 945 Express
sound_card: Intel GMA 950
Hard_Drive_Capacity: 1160 GB
Location: Birmingham UK

Post by sjj1805 »

rpungin wrote:OK, so going forward I will make sure I only edit the AVI files.

In the mean time I no longer have the original tape which I captured as MPEG. So I only have the MPEG video. Moreover I spent a lot of time editing it to come up with the resulting MPEG file.

So my question is: what can I do to successfully burn the resulting MPEG2 on the DVD. Since the MPEG file can be played correctly by Media Player, can I convert it to AVI using VirtualDub and then try to burn the AVI file? Would the AVI file be out of synch?
Not wishing to keep advertising someone elses products here but download the trial version of Womble MPEG Editor http://www.womble.com/products/mvw.html
Then run Tools | MPEG GOP fixer.

This may or may not work
Steve J
Post Reply