View Full Version : HD Audio Drift


Ben Fury
April 25th, 2004, 07:19 AM
Hi!

I just recorded a session on the HD10 in HD and also recorded it onto DAT to get better A to D converters and no AGC on the audio. When I went to conform the MPEG-2 TS file from the HD10 and the sound that I captured into the computer from the DAT, I found that the MPEG stream was drifting forward about one frame every four minutes. After a half hour the MPEG-TS stream was a full 8 frames ahead of the sound file! I know it's not the DAT drifting since I've used this unit for years and it's always been spot on down to the millisecond.

Anybody else run into this? Any solutions or do you just have to record the sound straight to the HD10 to keep the sound and picture synced? Or is this an artifact of the bundled MPEG Pro LE software that comes with the HD10 not keeping its sync straight? Or could it possibly be the bundled capture utility is drifting?

Heath McKnight
April 25th, 2004, 10:30 PM
Interesting problem--wonder if it's because of the 30p...

I will say one thing, good job doing audio on DAT! The HD10 is still brutal going through an unbalanced jack into the camera.

heath

Les Dit
April 25th, 2004, 10:45 PM
Heath,
What are the problems you had with the unbalanced type of jack ?
-Les

<<<-- Originally posted by Heath McKnight : Interesting problem--wonder if it's because of the 30p...

I will say one thing, good job doing audio on DAT! The HD10 is still brutal going through an unbalanced jack into the camera.

heath -->>>

Heath McKnight
April 25th, 2004, 10:51 PM
The more the background noise, the more it sounds metallic.

Also, I noticed, 8 months after it was shot, in a small doc about the making of my film (shot in DV mode on the HD10--couldn't get an XL-1 that day, seriously), I'm playing putt putt golf for my interview (don't ask). I'm standing next to a small waterfall, and when I shut up, the water flows are louder, then drop when I talk. That's probably not so much the unbalanced mic jack as it's the auto audio...Sigh...

heath

ps-I need to market the HD mode more, because so far, I've made money three times with the DV mode, loaned the camera to the Palm Beach International Film Festival on SD mode and made nothing in HD.

Ben Fury
April 26th, 2004, 01:25 AM
Well, I tried CapDVHS to capture today and had the same problem. Apparently it is a clock issue. The DAT is running in real time and the HD10 is running in 29.97 drop frame so it's dropping 8 frames per hour. Now I can't use the DAT audio in MPEG Pro LE because it has zilch audio abilities and if I send it all over to Vegas to conform the audio to the MPEG drop frame stream I have to republish the MPEG file which both degrades it and takes a loooooong time.

HD is proving problematic because of the crummy audio on the HD10. If it's plugged into the AC power supply it just acts like one big antenna and buzzes like mad no matter how quiet a microphone I put on it. The only thing that works is running battery power only and positioning the microphones carefully to avoid the dread RF antenna effect.

And this still doesn't address the issues of the undefeatable AGC and the fact that it's not mic/line switchable. I didn't worry about the audio when I bought the HD10 cause I was planning on running DAT in tandem. Now the audio problems are about to ruin my business. Arrrrrgh!

Any suggestions? Solutions? Audio must go in the camera since sync issues are too much hassle. Has anyone tried impedance matching so you can use a line level mixer and then step the impedance down/up to match the HD10 microphone in?

Les Dit
April 26th, 2004, 02:32 AM
If you know the exact timing difference, can't you just re time the audio with a program like Goldwave or maybe even virtual dub?
Change the length to 99.997% or whatever the math says it should be.
-Les

Kevin Lawson
April 27th, 2004, 11:48 AM
Unfortunatly you can't just re-time the whole audio clip. Since the video drops frames at certain intervals, not constantly, you would end up with it being in-sync only immediatly after a frame drop and then it would drift out again until the next.

What model DAT do you have? I'm assuming it doesn't have time-code otherwise you could set the DAT to drop-frame and be done with it. This is why Fostex made a big name for themselves in the film business early on with time-code DATs.

I'm sure somebody has a plug-in for Pro Tools that would fix this issue, by re-timing the audio with the proper frame-sync off-set.

Time-code issues are why more and more audio engineers are losing their hair! ;>

Good luck!

Phil Wright
April 27th, 2004, 04:40 PM
Kevin - Drop-frame doesn't mean that frames are dropped during playback but that frame numbers are skipped in the counting out of the timecode. The timecode advances by two extra frames every minute except on multiples of 10 minutes.

11:59:29 goes to 12:00:02

All frames are put out at a constant rate (29.97 or 30). Drop-frame vs non drop-frame just determines how they are counted.

Ben - The error you are reporting (8 frames out after half-hour) doesn't match the difference between 29.97 and 30 fps playback. This would be 54 frames after a half-hour.

Most likely the problem is inherent to editing with MPEG-2 transport streams which have their own measure of time (Presentation Time Stamps) and was never meant to be used for editing.

For more advanced editing requirements such as synching DAT sound with video you might want to look at other editing solutions such as those offered by CineForm.

Les Dit
April 27th, 2004, 11:05 PM
yes, you can retime the sound file.
Sound is *not* represented by frames. Pictures are.
Sound *is* represented by samples, usually something like 44 thousand per second.
You are not 'dropping' frames of sound, in that sense.
I hope that helps.
Also, you may be able to have a tech tune the crystal in the DAT deck to be the same timebase as the camera. A frequency counter would be the tool used for that.
-Les

Heath McKnight
April 27th, 2004, 11:13 PM
Wouldn't it be 48k per second?

Christopher Winnicki
July 7th, 2004, 09:18 AM
<<<---
For more advanced editing requirements such as synching DAT sound with video you might want to look at other editing solutions such as those offered by CineForm. -->>>


Hi Phil.

Can you please elaborate on how CineForm could address the ("more advanced") audio/video sync (synch, synchronization, next time someone does a search all 3 synchronization abbreviations will be found) problems.

I have noticed that (and there is no way around it) when HD footage is exported to DVD (format) in Premiere Pro using MainConcept plug-in. The audio would never be synchronized (although it was synchronized in the original HD footage).
I think I get the part about counting "drop frames" business, 2 every minute but not on the 10th. It almost looks as if the issue I'm observing is due to the audio not following the congruent rule when being encoded, hence I observe the ~0.8 second drift after about 12 minutes.

Now that I think about it, I wonder what would happen if i shrank the audio 2 frames worth every minute (but not on the then) on the time line, before exporting the HD to DVD.


-Chris.

Christopher C. Murphy
July 7th, 2004, 09:27 AM
Ok, this is making me nervous!

I have the HD10u and Final Cut Pro HD - can someone tell me if I record audio with the HD10u and encode with LumiereHD into DVCPro HD codec if I'll be dealing with bad sync audio?

I've always worked DV, so audio was sync wasn't really a problem because you can click the "adjust" buttons in most NLE to allot for the 29.97 factor.

Is the HD10u screwed up no matter what you do? Anyone out there actually edit on a Mac with long video/audio footage??

Help! I'm going to be recording long-form very soon!

Murph

David Kennett
July 8th, 2004, 08:42 AM
OK HERE'S ANOTHER GUESS!

In the camera, a crystal determines the frame timing. While accurate, they can have small errors.

In the computer, a crystal determines timing. A difference between the two crystals will result in a difference in timing.

With a digital transfer of audio, the same thing happens.

With an analog transfer of audio, the same crystal always determines recording AND playback timing, in both the DAT and the computer. So no chance for timing error.

Crystals usually have tighter tolerances than this. Sometimes, crystals can be trimmed to a more accurate frequency. This requires a frequency counter. Some software allows for timing corrections.

My guess, a crystal is out of specs somewhere.

Did you use the same camera and DAT for recording and playback?

David Kennett
July 8th, 2004, 08:59 AM
ADDENDUM:

Crystals can easily maintain frequency to within 5 parts per million. This translates to slightly more than a half frame per hour. Expecting much more accuracy than this would be unrealistic.

Graeme Nattress
July 8th, 2004, 09:00 AM
Sounds to me like a DV audio v Locked DVCAM audio issue, where the problem with DV cameras is that they don't lock the audio directly to the video stream, and hence don't record a precisely 48khz rate. Perhaps this is made worse by the 6 frame GOP?

Even though the HD10 is "30p" that really means 29.97fps progressive as it's NTSC, so that's not the issue, nor would it be DF v NDF issue, as that's just how the frames are named.

Graeme

Christopher C. Murphy
July 8th, 2004, 09:01 AM
Huh, I've never heard of that before.

How many people have had audio sync problems with the HD10u?

Murph

Tom Roper
July 8th, 2004, 09:28 AM
I'm a veteran of the sync wars when recording tv programs to DVD disk. The audio gets out of sync when I make frame accurate cuts (editing commercials out) on the time line. The fix was to abandon frame accuracy, and make cuts on the I-frames only, not the B or P frames. The DVD 15 GOP (group of pictures) structure is I-B-B-P-B-B-P-B-B-P-B-B-P-B-B. Obviously, if you only edit on the I frames, your frame accuracy is only 1/2 second, but it's preferable to out of sync audio.

I think using well behaved software is the key. I shot a couple hours of video on the GR-HD1, that after editing, was 27 minutes long. I used the included MPEG Edit Studio Pro to make a zillion edits, cuts, joins and insertions on the mpeg2-ts time line. It was very tedious and clumsy software, but to its credit maintained audio sync throughout. It was easy to judge, with video of chirping birds, an audio sync problem would be easy to spot.

Upon downconversion from mpeg2-ts 1280x720 30 fps progressive to DVD NTSC mpeg2-ps 720x480 don't do any further edits/cuts/joins/insertions except on I frames...best not to do them at all since accuracy is only 1/2 second on I-frames.

The other key is finding reliable software...lots of junk out there for DVD editing. The most dependable I've found for DVD is TMPGEnc. Womble is hit or miss. It has an incredibly efficient user interface, fast scrubbing, but unfortunately, all too often screws up the PTS or timecode when using it for frame accurate edits. It has some good utility, de-muxing streams, transcoding from mpeg2-ts to mpeg2-ps without re-encoding works well, but I avoid the frame accurate editing due to constant audio sync and timecode problems.

You can fix audio drift with Gold Wave "Time Warp" but it's easier to just avoid the bad editing habits which create sync problems in the first place.

Tom Roper
July 8th, 2004, 09:42 AM
Another area where audio sync issues get introduced is when transitions, fades, wipes are inserted into the DVD time line. The video has to be re-encoded a few frames around the transition. Too many of these and...wha-lah...sync has shifted.

Again, it's probably just me, but I prefer to use the basic fades built into the camera, if any...versus taking chances of introducing audio sync problems in post.

I have not tried using transitions with the included MPEG Edit Studio Pro, because I don't want any re-encodes except the ONE necessary when downconverting to SD-NTSC to produce a DVD. (I use TMPGEnc for that.) MPEG Edit Studio Pro will let you do the basic cuts, joins and insertions to the mpeg2-ts without re-encoding. It's primitive, but reliable.

David Kennett
July 8th, 2004, 10:18 AM
I agree - KDDI software good on timing.

The DV audio (locked or unlocked) has no long term affects on timing.

Concerning GOPs and timing. To meet HDV and DVD standards, each GOP must include in its data header the number of frames in THAT GOP. (The MPG standard allows a single header at the beginning stating the number of frames - but then they must all be the same.) When the encoder encounters a cut, it immediately starts a new GOP with an I frame. It then must go back to the previous GOP (that it has cut short) and ammend the header.

On the KDDI editor, if you click on one of those frames running just below the picture monitor, you can see nearby frames. In a corner of each is a color dot. White is an I frame, and red and blue are B and P frames, but I forget which is which. You can see that the normal progression is altered around edits.

If you think about it, that's why in-camera edits are not proper in the HD10. It would be tough to go back to the tape and change the last header already recorded.

Christopher C. Murphy
July 8th, 2004, 10:43 AM
So, shooting and capturing TS streams that get converted to a new codec (in my case DVCPro HD) doesn't automatically lock the clips audio?

I thought it did...but, from what you guys are saying if I have a long clip and I've encoded it to a different codec the audio drift remains.

Sounds like you guys are all on PC? It must be the same for Mac users?

Murph

Tom Roper
July 8th, 2004, 11:27 AM
- Murph, my observation is no problems going to a new codec.

The problem is editing within a 2ps codec on non I-frames. The KDDI software seems immune to editing problems on the 2ts stream, even frame accurate on non I-frames seems okay.

As David mentioned and my observation is the same...the KDDI software for frame accurate editing on the 2ts has not caused any audio sync problems for me. Other programs doing frame accurate edits on the 2ps have caused sync issues for me, and so I avoid the frame accurate edits altogether, opting instead to cut on the I-frames only in 2ps.

To summarize:

Converting a 2ts to 2ps, no problem.
Frame accurate editing with KDDI on 2ts, no problem.
Frame accurate editing with anything on 2ps, at your peril.
Editing on 2ps I-frames, no problem but not frame accurate.

Accordingly, I do things in this order:

Basic cuts/joins/insertions with KDDI on the 2ts.
Copy the edited 2ts back to mini-DV tape for archiving.
Re-encode the 2ts to 2ps 720x480 with TMPGEnc 3.0 Xpress.
Author and burn DVD from 2ps with TMPGEnc DVD Author.

Legend:
2ts = mpeg2ts (HDTV transfer stream)
2ps = mpeg2ps (DVD compatible program stream)

Everyone has their own particular methods and techniques. I'm not stating mine are the only workable ones, just to emphasize that audio sync problems are not endemic, and CAN be avoided. The main audio sync pitfall I've encountered is making cuts/joins/insertions on non I-frames within the 2ps editor. Avoiding that pitfall, sync remains good. Your mileage may vary.

Tom Roper
July 8th, 2004, 11:46 AM
And re-reading your post Murph, I would say your audio sync problem is not caused by going from raw camera footage TS to DVCPro HD, but possibly is caused by the editing you do afterward once within the DVCPro HD editor.

The (6) GOP format for HDV is I-B-B-P-B-B. If you don't have any audio sync problems with the unbroken stream in DVCPro HD, then the next step would be to see if the audio sync is maintained by cutting on the I-frames only. It's not frame accurate that way, but the penalty is not so severe as with the 15 GOP DVD structure, since your accuracy is now 0.2 seconds.

This has no bearing on the original poster (Ben) can't keep synchronized the TS to DAT...different problem.

I can only comment my observation and experience, which is to edit carefully to avoid audio sync problems, even if that means the edits are kept simple and non-sophisticated. Audio sync problems are very distracting and serious. The audio may start out "locked," but careless editing can unlock it for sure.

As you have by now surmised...I use the PC environment.

Christopher C. Murphy
July 8th, 2004, 12:09 PM
Tom, thanks for all the great infomation.

My FCP HD import of DVCPro HD is 29.97 frames for sure. When I edit it does the drop frame thing, so I'm thinking that it should be ok. Just a suggestion, but when you guys import into PC's why not convert ASAP to a locked codec or do you need your existing system path the same? It sounds like you have more work than me and I thought the Mac users had the sucky HDV route. (LumiereHD has solved the main problem though)

Murph

Tom Roper
July 8th, 2004, 12:30 PM
I just do it as a hobby, so playing within the constraints of budget software is all that's justified for me. (But I still won't tolerate bad audio sync, and fortunately, it isn't necessary to.)