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 15th April 2010, 14:46   #1  |  Link
Caution
Registered User
 
Join Date: Mar 2010
Posts: 11
AAC Audio Sync

Avisynth v2.5.8
Windows 7 Home Premium

I have a small MP4 video clip (H264/AAC) that, for some reason, when sourced through avisynth via an avs script, plays completely out of sync. The resulting audio plays through at about 4 times the original speed. This happens no matter what the frame-rate is defined as. Playback is perfect if I produce the AAC stream with 6 channels of audio but problematic with 2 channel stereo.

directshowsource("TestHL2.mp4")
AssumeFPS(60, 1, true)

Quote:
Source (Mediainfo)
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 19s 983ms
Bit rate mode : Variable
Bit rate : 1 627 Kbps
Nominal bit rate : 1 500 Kbps
Maximum bit rate : 6 734 Kbps
Width : 960 pixels
Height : 540 pixels
Display aspect ratio : 16/9
Frame rate mode : Constant
Frame rate : 60.000 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.052
Stream size : 3.88 MiB (93%)
Writing library : x264 core 80 r1376 3feaec2
Encoding settings : cabac=1 / ref=1 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.0:0.0 / mixed_ref=0 /
me_range=32 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / mbaff=0 /constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=250 / keyint_min=25 / scenecut=40 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=1500 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00

Audio
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 19s 989ms
Bit rate mode : Variable
Bit rate : 120 Kbps
Maximum bit rate : 135 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 293 KiB (7%)

Last edited by Caution; 15th April 2010 at 14:49.
Caution is offline   Reply With Quote
Old 16th April 2010, 04:20   #2  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,481
Questions:

0) Did you already know this:

http://forum.doom9.org/showthread.php?t=146910
???

1) What's the filter being used for AAC decoding
(ffdshow —what version—,
CoreAAC,
DSP-WORX,
none of the above,) ?

2) What's the splitter being used for MP4 handling
(Haali Media Splitter —what version—,
Gabest MP4 Splitter —what version—) ?

3) Why do you want/need

«AssumeFPS(60, 1, true)» ?

(should be:

DirectShowSource("TestHL2.mp4", fps=60, convertfps=true)

I guess)

Last edited by Midzuki; 16th April 2010 at 04:36. Reason: clarification
Midzuki is offline   Reply With Quote
Old 16th April 2010, 06:10   #3  |  Link
Caution
Registered User
 
Join Date: Mar 2010
Posts: 11
Hi. Thanks for the reply and help.

I've tried different AAC decoders including the one W7 uses, ffdshow (3065) and currently CoreAAC (1.2.0.575 rev.3). It makes no difference.

The source video is natively 60fps. I used assumefps, as one of my many methods in trying to sync audio. In this case sync_audio=true.

By the way, the Win7DSFilterTweaker software is a great tool. It didn't help in my case, despite setting audio decoder preference, but it's still handy to have.

Splitter used: Haali Media Splitter 1.9.42.1

I don't actually need to have this sorted but have become curious about this issue over the last few months.

What I don't get is why everything runs in sync as long as the source audio isn't two channel stereo.
Caution is offline   Reply With Quote
Old 16th April 2010, 08:21   #4  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,481
Quote:
Splitter used: Haali Media Splitter 1.9.42.1
Should I then assume you haven't tried Gabest MP4 Splitter?

Version 1.3.1249.0, or better ( which doesn't always mean "newer" )

I've created an MP4 with H264 ++ stereo AAC,
played it through Avisynth in both MPC and VirtualDub,
and got no sync issues at all...

FWIW, I'm still using Windows XP...
Windows 7 (or Windows Vista), only for my next PC,
which I will buy "sometime before 2012", I hope.

P.S.: Besides, ...

AAC Decoder == ffdshow r3176 (libfaad2)

H264 decoder == DivX 8.2.0.26

Last edited by Midzuki; 16th April 2010 at 08:31.
Midzuki is offline   Reply With Quote
Old 16th April 2010, 20:00   #5  |  Link
Caution
Registered User
 
Join Date: Mar 2010
Posts: 11
I was actually hoping it wasn't to do with Haali as mine came as part of CCCP and, apparently, Gabest's MP4 splitter won't work if Haali is installed.

Okay, I'm going to try sorting everything in a way so that I have have the MP4 splitter installed and working to see what happens.

Thanks for the help
Caution is offline   Reply With Quote
Old 9th November 2012, 17:15   #6  |  Link
Caution
Registered User
 
Join Date: Mar 2010
Posts: 11
Kind of a huuuge BUMP but I lost my login details until very recently.

It turns out Win7DSFilterTweaker was a big help, thanks. I used it to fix the problem by forcing libfaad2 (via ffdshow) as the default decoder instead of Window's own and avcodec (ffdshow), both responsible for the problems. This was very soon after you suggested it to me already haha and now, years later, I managed to log back in and say thanks!

Solved.
Caution 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 01:51.


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