Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th August 2014, 12:21   #1  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 163
A/V sync Issues, Bring Audio 'ahead'??

Im having to use a Multi-channel Digital to Analog Convertor (FiiO Do7, http://www.fiio.com.cn/products/inde...nuID=105026003) in my video capture setup to take DD/DTS 5.1 audio and convert it to 2 channel stereo, but in doing this is is causing an ever so slight audio delay, which is noticable in the capture output file.

Is there a way in Avisynth to either bring the audio stream ahead ever so slightly or delay the video to match up?

Also whats a good program to use to see what the fps of the video and audio is for my capture file so i know what values i need to alter the video/audio to?
BlockABoots is offline   Reply With Quote
Old 30th August 2014, 14:14   #2  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
There's AudioTrim (EDIT or DelayAudio with a negative argument), but it's hard to find the correct offset. Alternatively, you can add an audio offset in VirtualDub (under Audio, Interleaving), where you can View, Audio waveform display to advance or delay the audio to match the video. It's best to find a video frame with a sharp audio event that can be seen on the waveform display, like a hand clap etc. With a basic video editor like Premiere Elements or Vegas Movie Studio, sliding audio sync is even easier.

Second question, if I understand what you are asking (there is no audio fps, only samples-per-second), you can use Info to view video & audio durations, or MediaInfo, [or] VirtualDub File, File information.

Last edited by raffriff42; 30th August 2014 at 17:14. Reason: DelayAudio etc
raffriff42 is offline   Reply With Quote
Old 31st August 2014, 14:37   #3  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 163
Quote:
Originally Posted by raffriff42 View Post
There's AudioTrim (EDIT or DelayAudio with a negative argument), but it's hard to find the correct offset. Alternatively, you can add an audio offset in VirtualDub (under Audio, Interleaving), where you can View, Audio waveform display to advance or delay the audio to match the video. It's best to find a video frame with a sharp audio event that can be seen on the waveform display, like a hand clap etc. With a basic video editor like Premiere Elements or Vegas Movie Studio, sliding audio sync is even easier.

Second question, if I understand what you are asking (there is no audio fps, only samples-per-second), you can use Info to view video & audio durations, or MediaInfo, [or] VirtualDub File, File information.
Thanks for the info, using VirtualDub and the file information its telling me that...

Video Stream: Length is 90184 frame (50:09.13)
Audio Stream: Length is 144441600 (50:09.20)

I would rather use Avisynth (or AvsPmod in my case) to sync the audio and video, so what command and value do i need to use please?
BlockABoots is offline   Reply With Quote
Old 31st August 2014, 18:02   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
The length of video and audio streams does not really help, you need to do as RaffRiff42 suggested above. Find a sharp audio event, eg hand clap
together with waveform display, until visible hand clap and waveform coincide. We here cannot see any hand clap nor any waveform.

Having said the above, you sometimes find that alignment should be relative to the end of a video clip, so as your audio is 70 ms (200-130) longer than video,
first thing I might try would be DelayAudio(-0.070) to advance the audio rather than delay it, should perhaps align audio and video at clip end.
You might want to follow with Trim(0,0) to chop off any odd bits of audio and/or add silence where audio is missing).
Give it a try, it might work (quite often works with VOB's).

EDIT: Look for the Waveform plugin if it dont work.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 31st August 2014, 19:36   #5  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 163
Ok i downloaded the waveform plugin, and loaded up a blip sync test video on youtube. These are the results....

No DelayAudio command....

https://www.youtube.com/watch?v=rtmu...ature=youtu.be

0.070 Delay command....

https://www.youtube.com/watch?v=0IJE...ature=youtu.be

Is it just me or does the 0.070 delay video still not seem to be 100% synced?

EDIT: Here are the raw files to download incase YouTiubes 30fps cap messes with anything...

No Delay.....https://www.dropbox.com/s/2s69tu7c4w...Delay.mp4?dl=0

0.070 Delay....https://www.dropbox.com/s/7c15ixnkzp...Delay.mp4?dl=0

Last edited by BlockABoots; 31st August 2014 at 19:41.
BlockABoots is offline   Reply With Quote
Old 31st August 2014, 22:20   #6  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,121
I would recommend playing it and changing the Delay in a mediaplayer till it sounds synced.
That's what i do, then i can set the Delay in avisynth or whatever for the permanent fix.
zerowalker is offline   Reply With Quote
Old 1st September 2014, 03:25   #7  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by StainlessS View Post
first thing I might try would be DelayAudio(-0.070) to advance the audio rather than delay it, should perhaps align audio and video at clip end.
-ve number.

If it dont work then you will have to do as ZeroWalker says or use Waveform.

EDIT: You need to align the audio 'sharp event' eg hand clip with the video hand clap (door slam, or whatever),
you can adjust by seeing how many video frames it is misaligned by, and make adjustments based on video frame duration,
eg PAL 25FPS is 1/25 secs per frame (0.040 secs). +ve number delays audio, -ve advances.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 1st September 2014 at 05:09.
StainlessS is offline   Reply With Quote
Old 1st September 2014, 10:49   #8  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Not that unless you're highly trained, you probably can't detect errors within 100ms, so just start with delays of .1, .2, etc and then fine tune them to 0.05 once you're close, if you even can. Within 100ms it's generally "close enough" to the majority of the population.
foxyshadis is offline   Reply With Quote
Old 1st September 2014, 19:09   #9  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 163
Well this is the hard thing to do, as i need to be playing a clip from the actual Xbox One console which then goes through this FiiO D07 Multi-channel Digital to Analog Convertor which is causing the audio delay.

Ill have to see if i can find a game that has a good section to use, so i can try and sync up the video with the audio i guess!?
BlockABoots is offline   Reply With Quote
Old 1st September 2014, 19:51   #10  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
This is just my observation, but, while I am quite sensitive to sync issues, my brain is more tolerant of late audio than early audio. I suspect it's to do with the fact that sound is slower than light - in real life, something at a distance of just 13m is enough to "delay" the audio by one video frame (40ms), so I think brains find that easier to cope with.

If you're really keen on being exact, I'd try making a separate video recording of the screen with a camera phone, or something, so you've got a reference sync to work with. That way you don't need to find a sharp, definitely synced sound/video event -just fire a few shots in game, then compare your video recording with your capture.

David
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.