View Full Version : Audio Delay Issue
epow0317
7th January 2012, 05:29
I've been trying to encode a 1080i MPEG2 into a 720p H.264 using both DGIndex and Megui.
But after muxing both video and audio, it turns out to be out of sync.
I guess DGIndex doesn't catch audio delay exactly.
Although i also tried Mediainfo, still out of sync.
Afterall i manually catched audio delay and applied it...
I don't understand why both DGIndex and Mediainfo can't catch audio delay exactly while media player can.
If this situation shows up once more, do i have to fix it manually?
I uploaded the 1080i MPEG2 in case you need more information.
It is Japanese HDTV source.
http://www.megaupload.com/?d=AO8GEUF1
(+)
Mediaplayer plays it smoothly.
DGindex says it has 10ms audio delay.
MediaInfo says it has 24ms audio delay.
But manually, it turns out to be about 100ms audio delay.
Guest
7th January 2012, 12:57
The stream has two audio tracks. Which one are you talking about?
Did you re-encode the AAC audio to something else? Please tell your entire exact process, including your script.
>I don't understand why both DGIndex and Mediainfo can't catch audio delay exactly while media player can.
MediaPlayer has access to the timestamps in the TS, which are lost when demuxing.
epow0317
7th January 2012, 14:34
The stream has two audio tracks. Which one are you talking about?
I mean the first audio stream (187Kbsp, 48.0KHz, AAC ADTS).
Please tell your entire exact process, including your script.
And my entire process is here,
-- video encoding --
1. open the video with DGIndex.
2. Audio - Output Method - Demux All Tracks
3. File - Save Project
Then, it creates two files.
The one named "Perfume - Nee (Music Station - 2010.11.19).d2v".
And the other one named "Perfume - Nee (Music Station - 2010.11.19) PID 112 DELAY 10ms.aac".
4. load .d2v with Megui's Avisynth script creator (Ctrl+R).
5. Resize to 960x540.
6. In Filters menu,
Source type: Interaced
Field order: Top Field First
Deinterlace: Yadif
Resize Filter: Spline36 (Neutral)
7. Click the save button.
8. Encoder settings's not so special..
program --preset slower --pass 2 --bitrate 12000 --stats ".stats" --bframes 8 --qcomp 0.8 --merange 64 --no-dct-decimate --no-fast-pskip --output "output" "input"
9. Encode the video.
-- audio encoding --
1. Wrap the aac into .mp4 with mp4box.
2. Decode wrapped aac(.mp4) into .wav with NeroAACDec
3. Load decoded aac(.wav) with Megui.
4. Extension: .m4a (to use mp3gain)
5. Delay: 10ms (automatically)
6. Encoder settings is here.
Preferred Decoder: NicAudio
Output Channels: Downmix multichannel to Stereo
SampleRate: Keep Original
Normalize Peaks to 100
Constant Bitrate @ 160 kbit/s
AAC Profile: AAC-LC
7. Encode the audio.
-- muxing --
Simply mux both video and audio with mp4box.
And the result is out of sync slightly compared to original source.
At a glance, you may not notice.
Why does this situation occur...?
Guest
8th January 2012, 01:23
>And the result is out of sync slightly compared to original source.
Please quantify that for me.
Guest
8th January 2012, 03:08
I performed this experiment:
As the reported delay of 10ms is within the AV standards for many satellite providers, I choose to do nothing to adjust the AV sync.
I make my project. I convert the audio to AC3 using EAC3TO. I make a simple script dubbing the video to the audio decoded with NicAC3Source().
loadplugin("DGDecode.dll")
vid=mpeg2source("Perfume - Nee (Music Station - 2010.11.19).d2v")
aud=nicac3source("perfume.ac3",2)
audiodub(vid,aud)
I play the script in VirtualDub.
The result is fine for me.
I could use DelayAudio() in the script to correct the 10ms, but who cares?
>But manually, it turns out to be about 100ms audio delay.
Of course it's possible that desync can be in the source, but as I said the above script plays fine for me. So maybe your "manually" is not as accurate as you think. Human perception of desync is notoriously unreliable.
epow0317
8th January 2012, 05:09
>Please quantify that for me.
Well.. i don't know how i can demonstrate that..
Just.. both the original and the encoded one are not same in sync.
The result is fine for me.
Yes. i understand.
About 100ms gap may not bother..
Hmm..
I'm wondering if you could append 100ms delay to audio stream and check it again.
I'm sure you would notice both video and audio are much more in harmony.
MediaPlayer has access to the timestamps in the TS, which are lost when demuxing.
Simply put, all i want to know is just two answers.
I guess you've already answered the first question with the above statement.
1. Is it possible both DGIndex and Mediainfo can't catch audio delay exactly while media player can? - already answered
2. Then.. i should fix it manually?
Thank you neuron2 for helping me so constantly..!!
hello_hello
8th January 2012, 14:46
Well.. i don't know how i can demonstrate that..
Just.. both the original and the encoded one are not same in sync.
Whenever I'm not sure if the audio sync is the same I open the original and encoded videos using 2 instances of MPC-HC and run the video (starting and stopping one to sync the audio) until the audio in the 2 tracks is perfectly synced (usually it'll produce a phasing type of effect if they are).
Then it's easy to watch the two videos to see if scene changes are happening at exactly the same time in both players. If they're not then the audio sync isn't the same in both files.
Guest
8th January 2012, 16:54
I'm wondering if you could append 100ms delay to audio stream and check it again.
I'm sure you would notice both video and audio are much more in harmony. It seems to be so. Investigating further...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.