Log in

View Full Version : Having trouble in setting delay


msaadn
17th September 2009, 00:09
I'm using megui and my audio source is .mkv, output is Nero AAC. I kept a delay of '-1000 ms' it gave me an error. when I keep a delay of '1000ms' it works. So whats the problem?

Here is the log file:

-[Error] Log for job1 (audio, A.mkv -> A.mp4)
--[Information] [9/17/2009 1:59:24 AM] Started handling job
--[Information] [9/17/2009 1:59:24 AM] Preprocessing
--[NoImage] Avisynth script
---[NoImage] DirectShowSource("C:\B\A.mkv", video=false)
---[NoImage] EnsureVBRMP3Sync()
---[NoImage] DelayAudio(-1000.0/1000.0)
---[NoImage] SSRC(48000)
---[NoImage] Normalize()
---[NoImage] return last
--[NoImage] Commandline used: -ignorelength -hev2 -br 40000 -if - -of "{0}"
--[Information] [9/17/2009 1:59:24 AM] Encoding started
--[Information] [9/17/2009 1:59:24 AM] Encode thread started
--[Information] [9/17/2009 1:59:24 AM] Avisynth script environment opened
--[Information] [9/17/2009 1:59:25 AM] Script loaded
--[Information] Output Decoder
---[NoImage] Channels: 2
---[NoImage] Bits per sample: 32
---[NoImage] Sample rate: 48000
--[NoImage] Commandline: C:\Program Files\megui\neroAacEnc.exe -ignorelength -hev2 -br 40000 -if - -of "C:\B\A.mp4"
--[Information] [9/17/2009 1:59:25 AM] Encoder process started
--[Error] An error occurred
---[NoImage] Exception message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
---[NoImage] Stacktrace
----[NoImage] at MeGUI.AviSynthClip.dimzon_avs_getaframe(IntPtr avs, IntPtr buf, Int64 sampleNo, Int64 sampleCount)
----[NoImage] at MeGUI.AviSynthAudioEncoder.encode()
---[NoImage] Inner exception: null
--[Information] [9/17/2009 1:59:25 AM] Job completed

tebasuna51
17th September 2009, 00:36
DirectShowSource("C:\B\A.mkv", video=false)
I can't know what is the exact problem, maybe your DirectShow system don't support the audio, or ...

msaadn
17th September 2009, 00:44
The audio is supported because it works when I use a delay of +1000 ms. The trouble is when I use -1000 ms.

talen9
17th September 2009, 10:55
It's definitely better to transcode the audio file without any delay, and apply the delay while muxing ....

msaadn
17th September 2009, 15:04
Ok I'll do that. Thanks for your help.

Inspector.Gadget
17th September 2009, 15:17
It's definitely better to transcode the audio file without any delay, and apply the delay while muxing ....

Why? All the delay on transcoding does is pass empty PCM data to the encoder.

tebasuna51
17th September 2009, 15:25
It's definitely better to transcode the audio file without any delay, and apply the delay while muxing ....
I don't agree.

For me the best option is cut the unnecesary audio or fill with silence to match video and audio start. Delays especified in containers can be misunderstood.

talen9
17th September 2009, 16:56
Sorry, I should have said that it was my opinion on the matter ... and on this particular situation too, since he seemed to have problems with negative delay. Right, it was not a solution but a workaround :)

Inspector.Gadget
17th September 2009, 18:09
That's totally unrelated. The reason it isn't working for him is something is borked in his DS config or plugins directory.

"MeGUI.AviSynthClip.dimzon_avs_getaframe"

Gavino
17th September 2009, 20:44
Which version of Avisynth do you have installed?
It's possible this problem may be due to a bug in the audio processing in Avisynth 2.58 (see here (http://forum.doom9.org/showthread.php?t=149457)).
If so, the workaround is to use version 2.57.

msaadn
17th September 2009, 23:24
I tried both 2.5.7 & 2.5.8 The same problem occurs. It made no difference.

That's totally unrelated. The reason it isn't working for him is something is borked in his DS config or plugins directory.

"MeGUI.AviSynthClip.dimzon_avs_getaframe"

I dont know what it is. What can be done about it?

Inspector.Gadget
18th September 2009, 00:00
Don't use DirectShowSource. Try DSS2, etc.

msaadn
18th September 2009, 00:05
Can you give an example of the command line?

Also, I used the demux tool to extract the audio .ogg Then I used that audio, it didnt make any difference either.

Inspector.Gadget
18th September 2009, 00:53
DirectShowSource2 is easy:

DSS2("C:\somefile.avi")

Avoiding this problem in the future is as easy as beginning with the demuxed audio from the original disc, which is generally handled by NicAudio and doesn't depend on external decoders.

msaadn
18th September 2009, 01:12
Megui gave me a script error on using DSS2.

Inspector.Gadget
18th September 2009, 01:20
We're not psychic. Chances are you haven't copied AVSS.dll from Haali's Media Splitter to your Avisynth directory.

By the way, DSS2 doesn't do audio. I meant it as a generally suggestion illustrating the categories of alternate input filters you might use in such a case.

Look into ffmpegsource 2.

tebasuna51
18th September 2009, 02:32
To decode ogg vorbis (not supported by NicAudio) with dedicated decoder you can try use:

BassAudioSource("C:\B\A.ogg")

but you need in AviSynth plugins folder:
Bass.dll (from http://www.un4seen.com/ )
BassAudio.dll (with BeHappy)

msaadn
18th September 2009, 02:58
Alright I get the idea now. Thankx for your help all.

b66pak
18th September 2009, 16:18
to decode ogg vorbis you also can use a CLI decoder:

http://www.rarewares.org/ogg-oggdec.php
_