Magic Lantern Forum

Using Magic Lantern => Raw Video => Raw Video Postprocessing => Topic started by: RenatoPhoto on May 30, 2013, 07:46:45 PM

Title: How to Sync RAW and Audio Issues
Post by: RenatoPhoto on May 30, 2013, 07:46:45 PM
I found some discussions burried in the threads about this aspect of video so I am creating a new thread to discuss it further if it is needed.  The last discussion that I could find a solution read:

Quote from: Shield on May 26, 2013, 11:42:56 AM
Well, I've basically been up all night trying to get the audio sync working for the 5d3.  After much trial and error, I've found that about a 103% "time stretch" does a really great job.  It's between 103-104%; probably 103.2 would be damn near perfect.  Make sure you whack the end of the audio file off first before you do the stretch.
I tested this on a 4 minute clip and it's off by maybe a nanosecond all the way at the end.
Keep in mind this is with FPS override ENABLED, and set to 24p.  If I disable this, the video gets waaaaay ahead of the audio and then "catches up" and I lose even more sleep.  :)  Hope this helps someone who shoots without an external recorder.  Workflow = Adobe after effects CS6.

You can trim the furthest point of the wav file in your composition by hitting the "alt" and ] keys (will remove everything to the right).
Shawn

Please contribute here if you have any other discussions about this topic.
Title: Re: How to Sync RAW and Audio Issues
Post by: RenatoPhoto on May 31, 2013, 05:49:14 PM
Reporting 5D3 w/1729277 + Lexar 1000X with FAT 32 format

I tested 23.97 fps (canon std), 29.97 fps (canon std), and 25 fps (fps override)

In all three cases a stretch factor of 1.027 seemed satisfactory for sync audio.

The audio had to be offset from the start of the video anywhere from 3 to 5 frames.

I noticed that the audio had some sort of defects every few seconds.  I am no audio expert so I dont know how to describe them.  I sort off muted tiny parts of the audio.  I filmed a drum beat with screwdriver and every so often it seems that the bang was missing something.  Maybe called a drop out.
Title: Re: How to Sync RAW and Audio Issues
Post by: 1% on May 31, 2013, 05:54:27 PM
Sounds like same issues I had with 600D.
Title: Re: How to Sync RAW and Audio Issues
Post by: a1ex on May 31, 2013, 05:57:22 PM
I would rewrite the audio thingie using the silent pic burst algorithm (no copying needed and zero overhead in the CBRs).
Title: Re: How to Sync RAW and Audio Issues
Post by: 1% on May 31, 2013, 06:10:17 PM
Meaning write audio with edmac? Edmac > dma_memcpy

First need a way to find more free edmacs.
Title: Re: How to Sync RAW and Audio Issues
Post by: a1ex on May 31, 2013, 06:12:33 PM
No copying at all. Silent pic burst writes the frames directly in the final buffers.
Title: Re: How to Sync RAW and Audio Issues
Post by: Danne on May 31, 2013, 10:34:14 PM
Cool to hear about trying fixing the audio. Really like the possibility to record a separate file with the same name as the moviefile. As I tried it out there is some strange drifting going on. I can,t say It,s consistent but seems you already know that. So stretching won,t help really.
Still, I,m no programmer and have no idea how to fix this. Very thankful for all your efforts.
//D
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on June 01, 2013, 01:49:53 AM
I am honored to be quoted in this thread (I mean what the heck do I know) but even more thrilled the heavyweights are starting to look at the audio issues.
Thank you so much ML staff and developers - you guys are amazing.
Title: Re: How to Sync RAW and Audio Issues
Post by: noisyboy on June 01, 2013, 04:40:06 AM
If it's dropouts is it because the sample buffer is too small? As in latency issues? I guess with recording raw AND uncompressed WAV this would kick the processor in the nuts?
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on June 01, 2013, 07:51:14 AM
Actually I've been doing more playing around with this tonight.

It's not a time stretch of 103 (although that's pretty close).

Here's what I'm working on right now (no guarantee this is perfect, but it might be as good as it gets for right now):

First of all, since technically the recorded wav file is just repeated over and over and is actually 12:25:39:243 (2,147,283,647 samples).
I cut the garbage off at the end in Soundforge.

Scene 1:  2876 DNG files.  AE says the video length is 01:59:20
The audio file, after the garbage has been cut off at the end, is 1:53.  So now I need to stretch 1:53 to 1:59:30.  This is 105.9 and lines up perfectly, but I'm sure it will be slightly behind in the beginning of the clip and slightly ahead at the end.

So I'm only sharing this tidbit for people who shoot really short scenes - this might help with onboard.  But almost 6 seconds of audio is just too much to lose - I need to do some more investigating.
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on June 01, 2013, 07:56:03 AM
Of course as soon as I say that and open the audio file in Sony Vegas, it's 1:57:17 in length.


My head hurts.  Going to bed.
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on June 01, 2013, 08:04:17 AM
Hmmm, I might be onto something here.  Dragging the audio file on the Adobe after effects 6 timeline says it's only 1:53.

But winamp, Sony Vegas, MediaInfo all say 1:57.  Like Paul Harvey said - standby for news.
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on June 01, 2013, 08:14:07 AM
Nevermind after effects was caching the filename.

New project though:

It's exactly 2 seconds off for a 1:59:19 project.

The audio file is showing 1:57:19

Could it just be dropping a second per minute cumulatively?

It's late.  I'm going to bed.
Title: Re: How to Sync RAW and Audio Issues
Post by: Danne on June 01, 2013, 11:25:36 PM
Quote from: Shield on June 01, 2013, 08:14:07 AM
Nevermind after effects was caching the filename.

New project though:

It's exactly 2 seconds off for a 1:59:19 project.

The audio file is showing 1:57:19

Could it just be dropping a second per minute cumulatively?

It's late.  I'm going to bed.

Nice findings!
Title: Re: How to Sync RAW and Audio Issues
Post by: Jakobmen on June 02, 2013, 05:14:34 AM
same problem here
Title: Re: How to Sync RAW and Audio Issues
Post by: mageye on June 02, 2013, 03:07:02 PM
In my experience the syncronisation issues that are happening are because there are dropouts in the recording (well gaps actually). The files do not need to be re-pitched. That does not work.

(http://img856.imageshack.us/img856/8752/screenshot20130601.png)
Title: Re: How to Sync RAW and Audio Issues
Post by: romeus on June 03, 2013, 03:41:10 AM
So if you record the sound on an external recorder like h4n and you sync with a claperboard there are no issues anymore
Title: Re: How to Sync RAW and Audio Issues
Post by: Oedipax on June 03, 2013, 06:41:10 AM
Quote from: romeus on June 03, 2013, 03:41:10 AM
So if you record the sound on an external recorder like h4n and you sync with a claperboard there are no issues anymore

Assuming you haven't dropped any video frames.
Title: Re: How to Sync RAW and Audio Issues
Post by: marten on June 03, 2013, 09:23:08 AM
Quote from: mageye on June 02, 2013, 03:07:02 PM
In my experience the syncronisation issues that are happening are because there are dropouts in the recording (well gaps actually). The files do not need to be re-pitched. That does not work.

This is my experience too :(
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on June 03, 2013, 12:54:54 PM
Quote from: romeus on June 03, 2013, 03:41:10 AM
So if you record the sound on an external recorder like h4n and you sync with a claperboard there are no issues anymore

The post above you shows that dropouts are happening with the onboard audio recording.  What would make you draw the conclusion that the sync would ever work?  I'm confused.
Title: Re: How to Sync RAW and Audio Issues
Post by: squig on June 03, 2013, 01:02:14 PM
I think he's talking about syncing the video. I've tested my PCM D50 and lip synced a 12min recording. That was with a week old build with FPS override on, I'll test the latest build tomorrow.
Title: Re: How to Sync RAW and Audio Issues
Post by: romeus on June 03, 2013, 04:43:28 PM
Like Squig said I'm talking about syncing the video with an external recorded audio
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on June 05, 2013, 02:47:12 AM
Has anyone made any progress with the onboard audio?  To me it's just about perfect really except for this.  I find myself spending so much time trying to sync the audio in post - so used to having a good "reference" audio track.   :)
Title: Re: How to Sync RAW and Audio Issues
Post by: swinxx on June 07, 2013, 10:53:51 AM
i would be interested in this too..
is there any progress with the recent builds?

thx.
Title: Re: How to Sync RAW and Audio Issues
Post by: ewinemiller on June 07, 2013, 01:53:48 PM
Quote from: swinxx on June 07, 2013, 10:53:51 AM
i would be interested in this too..
is there any progress with the recent builds?

thx.

As of the build available 6/6 evening east coast time, no.

I recorded a couple of test videos. One was fairly close over nearly a minute of time (~2 frames out). The other was ~3 seconds out over 15 seconds. The longer clip I could get to line up pretty well with some sizing and start twiddling, but the short one was just a mess.

I also noticed that even with an external mic, I'm only getting mono WAV files. Is this normal or am I missing something?

Thanks.
Title: Re: How to Sync RAW and Audio Issues
Post by: AnotherDave on June 07, 2013, 03:45:27 PM
What I'm considering doing for an upcoming project (since I already have an Atomos Ninja) is to run reference audio out from the SD recorder, and HDMI out of the camera into the Ninja.  Not only will this give me a ProRes reference video file (with frame and file name info) that I can immediately start cutting, but it will also allow me to sync with Pluraleyes and then use the file and frame display information on the video to create an EDL.

The only issue is that 1.1.3 will only output 29.976 instead of 23.976...

Make sense?  Sound stupid?
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on June 07, 2013, 07:27:59 PM
Quote from: ewinemiller on June 07, 2013, 01:53:48 PM
As of the build available 6/6 evening east coast time, no.

I recorded a couple of test videos. One was fairly close over nearly a minute of time (~2 frames out). The other was ~3 seconds out over 15 seconds. The longer clip I could get to line up pretty well with some sizing and start twiddling, but the short one was just a mess.

I also noticed that even with an external mic, I'm only getting mono WAV files. Is this normal or am I missing something?

Thanks.

For now I'm not relying at all on any internal audio - just grab a $75 used Zoom H1n recorder and use it - I've spent too much time trying to fix onboard audio in post.  It's fine as is for ambient audio recordings, but if you need accurate audio it's just not there right now.  To me it seems far easier than the raw video hack; I honestly think the developers just haven't spent any time working on it as they are working on more pressing issues.
It'll get there - just 6 weeks ago none of this was even available at all.
Title: Re: How to Sync RAW and Audio Issues
Post by: ewinemiller on June 09, 2013, 10:30:10 PM
Quote from: Shield on June 07, 2013, 07:27:59 PM
just grab a $75 used Zoom H1n recorder and use it

Thanks for the suggestion. I picked up one, tested it today, and it worked great. It was much easier to synch than I expected.
Title: Re: How to Sync RAW and Audio Issues
Post by: romeus on June 11, 2013, 02:38:50 AM
Quote from: ewinemiller on June 09, 2013, 10:30:10 PM
Thanks for the suggestion. I picked up one, tested it today, and it worked great. It was much easier to synch than I expected.

how ?
can you explain how did you syncronize the audio , did you use a slate?
Title: Re: How to Sync RAW and Audio Issues
Post by: ewinemiller on June 11, 2013, 05:10:24 PM
Quote from: romeus on June 11, 2013, 02:38:50 AM
how ?
can you explain how did you syncronize the audio , did you use a slate?

I didn't use a slate. I left the Sync Beep option turned on with the RAW settings on the camera. I'd start recording on the Zoom, and then start recording on the camera.

Later I'd open the WAV file in Soundbooth and tell Soundbooth that I want to see it lined up against a 23.976 fps timeline. I'd look for the beep on the WAV file and see what frame it starts.

Back in Premier I'd put the WAV file at T=0, and put the video at T=whatever I found looking at the timeline in Soundbooth. One of my test videos the beep started right on the frame boundary, one about halfway through. I just picked the closest frame. Both looked and sounded fine in the final render for about a 90 second video.

I haven't looked for a similar feature in other tools, but I suspect if you don't have Soundbooth there's other options for doing the same thing.
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on June 11, 2013, 10:14:48 PM
Quote from: ewinemiller on June 09, 2013, 10:30:10 PM
Thanks for the suggestion. I picked up one, tested it today, and it worked great. It was much easier to synch than I expected.

Since the Zoom H1 is very prone to handling noise, I also highly recommend one of these (guy ships very quickly):



http://www.ebay.com/itm/181131586191?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649 (http://www.ebay.com/itm/181131586191?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649)
Title: Re: How to Sync RAW and Audio Issues
Post by: romeus on June 12, 2013, 02:23:00 AM
Quote from: ewinemiller on June 11, 2013, 05:10:24 PM
I didn't use a slate. I left the Sync Beep option turned on with the RAW settings on the camera. I'd start recording on the Zoom, and then start recording on the camera.

Later I'd open the WAV file in Soundbooth and tell Soundbooth that I want to see it lined up against a 23.976 fps timeline. I'd look for the beep on the WAV file and see what frame it starts.

Back in Premier I'd put the WAV file at T=0, and put the video at T=whatever I found looking at the timeline in Soundbooth. One of my test videos the beep started right on the frame boundary, one about halfway through. I just picked the closest frame. Both looked and sounded fine in the final render for about a 90 second video.

I haven't looked for a similar feature in other tools, but I suspect if you don't have Soundbooth there's other options for doing the same thing.


Why you don't just shot the Timecode of your recorder with the camera?
Title: Re: How to Sync RAW and Audio Issues
Post by: ewinemiller on June 12, 2013, 03:41:26 PM
Quote from: romeus on June 12, 2013, 02:23:00 AM

Why you don't just shot the Timecode of your recorder with the camera?

That's certainly an option too, but in my case the camera is set up to capture the shot, not capture the recorder's screen well enough to read, and the recorder is mounted to the top of the camera.
Title: Re: How to Sync RAW and Audio Issues
Post by: Shield on July 25, 2013, 04:23:42 AM
Anyone know of a way to make the "beep" louder when the recording begins?  Might make it easier to sync on my timeline.
Thanks,
Shawn
Title: Re: How to Sync RAW and Audio Issues
Post by: alexp on September 01, 2013, 06:01:41 AM
Can the camera record a reference .wav file while recording n RAW? Where in ML do I go to enable this function?
Title: Re: How to Sync RAW and Audio Issues
Post by: Midphase on September 01, 2013, 09:48:34 AM
Audio has been disabled in the recent revisions since it was not working properly.

It will come back at some point in the future, but for now there is no way to enable it.
Title: Re: How to Sync RAW and Audio Issues
Post by: hjfilmspeed on September 10, 2013, 06:47:53 AM
Just recorded a a 4 minute raw clip with 5d3 and fps override at 23.976. after raw2dng and resolve processing my audio synced up perfectly with no need to stretch. i would like to use a tc counter but for this i just filmed a clap. but you should have someone announce the take number and you should display it too. I can see doing many takes and loosing track of your audio and clips very easily.
Title: Re: How to Sync RAW and Audio Issues
Post by: borpozky on September 10, 2013, 09:49:19 AM
I am still trying to get the best workflow with 5D RAW / audio. So what works for me at the moment is:

When you shoot, you can see the name of the recorded file in the display. The actual time is a part of the file-name. Read it loudly, so you can hear it at the beginning of your external audio-recordings.

For synching each take, I snap my fingers in front of the lens.

In Premiere I mark the snap and link the audiofiles to their video-counterparts (in the timeline).
The linked audio/video can then be pulled back into the project window.
Title: Re: How to Sync RAW and Audio Issues
Post by: blakekimmel on July 01, 2014, 07:51:16 PM
Finally about to cross the bridge to shooting RAW more frequently. What is the current status of RAW audio syncing and timing? Seems like this discussion kind of died out but here we are almost a year later. Searched a little on forums and didn't see much.

Does FPS override 23.976 audio sync up now?
Title: Re: How to Sync RAW and Audio Issues
Post by: Frank7D on July 01, 2014, 07:56:24 PM
Quote from: blakekimmel on July 01, 2014, 07:51:16 PM
Finally about to cross the bridge to shooting RAW more frequently. What is the current status of RAW audio syncing and timing? Seems like this discussion kind of died out but here we are almost a year later. Searched a little on forums and didn't see much.

Does FPS override 23.976 audio sync up now?

It does for me (mlv on 7D).
Title: Re: How to Sync RAW and Audio Issues
Post by: Jbowdach on August 03, 2014, 06:44:13 PM
Quote from: Frank7D on July 01, 2014, 07:56:24 PM
It does for me (mlv on 7D).

would you mind sharing you post workflow, as Ive tried everyone I can think of using a 7D and I still cant retain sync. Resolve always has either a blank track or is late w audio. Many thanks
Title: Re: How to Sync RAW and Audio Issues
Post by: jimmyD30 on August 04, 2014, 03:43:18 AM
What do you mean 'blank track'? And how are you trying to sync?
Title: Re: How to Sync RAW and Audio Issues
Post by: Jbowdach on August 06, 2014, 04:34:46 AM
Quote from: Shield on June 05, 2013, 02:47:12 AM
Has anyone made any progress with the onboard audio?  To me it's just about perfect really except for this.  I find myself spending so much time trying to sync the audio in post - so used to having a good "reference" audio track.   :)
agreed, this kills when trying to match to an audio recorder and you dont have a reference track
Title: Re: How to Sync RAW and Audio Issues
Post by: Jbowdach on August 06, 2014, 04:36:37 AM
Quote from: jimmyD30 on August 04, 2014, 03:43:18 AM
What do you mean 'blank track'? And how are you trying to sync?

Itve found I need to sync by adding each clip and audio file in its own bin. If i dont (by selecting multiple video and audio files) and select sync by timecode, it will looked as if synced (video shows audio icon) but when you look at the audio, its either blank or starts very late (several seconds late if at all). Strange thing is if I drag the wav file manually and line it up, audio is fine and is complete. Seems I MUST add clips via their own bin. Anyone else?
Title: Re: How to Sync RAW and Audio Issues
Post by: 16bit888 on August 07, 2014, 08:11:12 AM
Hi Jbowdach,

I am facing the same issues with having to create as many bins as there are files. That means if I press start and stop 100 times for different takes, I need to create 100 bins in Resolve which is ridiculous. I also face audio syncing issues. I shoot exclusively on a 5d Mkii .MLV format with sound. Found out that you cannot pull all your converted files into the "Master" folder in the Media tab, right-click, "auto sync based on timecode" and expect it to work. It will sync to the first .wav file(in other words, the top-left audio file) in the Master folder. A Resolve specialist told me it might be a problem because the 5D Mk 2 does not have embedded time code. The 5d mk 3 however, has a timecode function. There might be a clue in here for effortlessly syncing audio files.

My audio is 22/23 frames off. This might be because a.) I am not using onboard camera mics. I run my audio from a shotgun mic via XLR cable through a juicedlink and then into the camera. I suspect this might cause a in the signal or something. b.) I'm using Komputerbay 128GB 1050x cards which are simply not writing fast enough. They average at 95mb/sec but I suspect that is still too slow.

I have no reference track so must manually lip sync audio. If I don't see a person talking, I cannot sync the audio because I have no reference unless I snap my finger or use a clapper board during start of recording. But found that this is totally impractical in doc settings, which is what I do, because people feel irritated and distracted when you snap your fingers in front of their face before rolling the camera. Brings attention to yourself and the camera which is detrimental. Still figuring it out. Any ideas on how to sync audio to video seamlessly? I'm using Resolve 10. Maybe Resolve 11 will solve this?
Title: Re: How to Sync RAW and Audio Issues
Post by: budafilms on August 07, 2014, 10:05:56 AM
Quote from: 16bit888 on August 07, 2014, 08:11:12 AM
Hi Jbowdach,

I am facing the same issues with having to create as many bins as there are files. That means if I press start and stop 100 times for different takes, I need to create 100 bins in Resolve which is ridiculous. I also face audio syncing issues. I shoot exclusively on a 5d Mkii .MLV format with sound. Found out that you cannot pull all your converted files into the "Master" folder in the Media tab, right-click, "auto sync based on timecode" and expect it to work. It will sync to the first .wav file(in other words, the top-left audio file) in the Master folder. A Resolve specialist told me it might be a problem because the 5D Mk 2 does not have embedded time code. The 5d mk 3 however, has a timecode function. There might be a clue in here for effortlessly syncing audio files.

My audio is 22/23 frames off. This might be because a.) I am not using onboard camera mics. I run my audio from a shotgun mic via XLR cable through a juicedlink and then into the camera. I suspect this might cause a in the signal or something. b.) I'm using Komputerbay 128GB 1050x cards which are simply not writing fast enough. They average at 95mb/sec but I suspect that is still too slow.

I have no reference track so must manually lip sync audio. If I don't see a person talking, I cannot sync the audio because I have no reference unless I snap my finger or use a clapper board during start of recording. But found that this is totally impractical in doc settings, which is what I do, because people feel irritated and distracted when you snap your fingers in front of their face before rolling the camera. Brings attention to yourself and the camera which is detrimental. Still figuring it out. Any ideas on how to sync audio to video seamlessly? I'm using Resolve 10. Maybe Resolve 11 will solve this?

HI,

(For mac).

If you use a pay version of Magic Raw (Itunes Store), the soft promess sync both, if  your Juice Link are connected to the camera like you told.
I don't have the pay version.

Maybe you can write to the thread of MLV Mystic - the best for me to convert to DNG -  you put this function for free. Like more people are doing.

I couldn't fine more solution than that. I do the same shoot like you. and I use clapper board.
Title: Re: How to Sync RAW and Audio Issues
Post by: chmee on August 07, 2014, 10:11:20 AM
@16bit888
as i know atm only two converters write timecode into dng and wav. raw2cdng and rawmagic. because the tc-metadata are created inside the converter, the body's abilities are not important. premiere uses for syncing only the filename, resolve needs some xml-metadata inside the wavs to sync accordingly ("pure" wav was/is not able to carry tc-data).

as i showed in another thread, look into the properties of your mediafiles, if the timecode was generated properly. if they're all the same, no wonder it doesnt sync accurate.
(http://dl.phreekz.de/raw2cdng/resolve_timecode_sync_audio.jpg)

(btw blackmagic/resolve is not really interested helping us, they've got their own product ;) i asked for the metadata and mediafile-behaviour-properties. computer says no)
Title: Re: How to Sync RAW and Audio Issues
Post by: masterc on August 13, 2014, 08:56:10 PM
Is it possible to use the 5dmk3's USB port as an input for digital audio (USB) recording?

If so, the Mix Pre D would be a stellar option because it outputs killer USB audio.

Thanks in advance.
Title: Re: How to Sync RAW and Audio Issues
Post by: Frank7D on August 14, 2014, 06:01:46 PM
Quote from: Jbowdach on August 03, 2014, 06:44:13 PM
would you mind sharing you post workflow, as Ive tried everyone I can think of using a 7D and I still cant retain sync. Resolve always has either a blank track or is late w audio. Many thanks

Sorry for late reply; just saw this.

I import the dngs and wav files into After Effects, with framerate set at 23.976. Create a comp with the dngs, then drop the wav on top of it. The audio clip always extends a little beyond the video, but the sound is in sync.
Title: Re: How to Sync RAW and Audio Issues
Post by: zcream on December 15, 2016, 06:01:31 PM
Any news on sync beep in menu? Doesn't work for my 50d