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. |
1st February 2012, 00:17 | #1 | Link | |
Registered User
Join Date: Apr 2005
Posts: 179
|
Simple FadeIn script with MeGUI?
I'm trying to do a simple FadeIn/FadeOut in MeGUI:
Quote:
Thanks for your help. Code:
Complete name : C:\Users\Floren\Videos\Sample.mkv Format : Matroska Format version : Version 2 File size : 129 MiB Duration : 3mn 13s Overall bit rate : 5 578 Kbps Encoded date : UTC 2012-01-31 22:06:39 Writing application : mkvmerge v5.2.1 ('A Far Off Place') built on Jan 2 2012 23:21:10 Writing library : libebml v1.2.3 + libmatroska v1.3.0 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Codec ID : V_MPEG4/ISO/AVC Duration : 3mn 13s Bit rate : 4 827 Kbps Width : 1 280 pixels Height : 688 pixels Display aspect ratio : 1.860 Frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.229 Stream size : 112 MiB (87%) Language : English Default : Yes Forced : No Audio ID : 2 Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Muxing mode : Header stripping Codec ID : A_AC3 Duration : 3mn 13s Bit rate mode : Constant Bit rate : 640 Kbps Channel(s) : 6 channels Channel positions : Front: L C R, Side: L R, LFE Sampling rate : 48.0 KHz Bit depth : 16 bits Compression mode : Lossy Delay relative to video : 2ms Stream size : 14.8 MiB (11%) Title : English Language : English Default : Yes Forced : No Last edited by TECK; 1st February 2012 at 00:25. |
|
1st February 2012, 07:28 | #2 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Test with Info() so see what the Direct Show world is actually giving you. i.e.
Code:
DirectShowSource("C:\Users\Floren\Videos\Sample.mkv", fps=23.976, audio=true, convertfps=true) Info() If Info() indicates that there is not an Audio stream, then you need to check your Direct Show environment to make sure you have an AC-3 decoder that is prepared to negotiate with DirectShowSource(). The new Windows 7 media library stuff does not count it has to be proper Direct Show. |
1st February 2012, 07:49 | #3 | Link |
Registered User
Join Date: Apr 2005
Posts: 179
|
Thanks for the tip, Ian. Everything looks fine, the audio is present into sample:
This is the AVS script I used: Code:
DirectShowSource("C:\Users\Floren\Videos\Sample-orig.mkv", fps=23.976, convertfps=true) AssumeFPS(24000,1001) FadeIn2(90) FadeOut2(90) Info() Next, I queue the audio and video, then I process the queue. When I listen to the newly processed audio sample, it is mute. Yet the original .ac3 file extracted from MKV container plays fine. I'm not sure what I'm missing. |
1st February 2012, 11:13 | #4 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
I have a vague memory about some old issue to do with Aften and Float audio under Megui, my Google-fu is failing me tonight and I cannot find a reference to it.
Try adding a ConvertAudioTo16bit() to the end of your script, just to check if DirectShowSource() is actually rendering correct audio samples. If that works maybe a MeGUI/Aften expert will be along shortly to help out with getting full quality audio. If the ConvertAudioTo16bit() does not help, then you may need to poke at your AC-3 decoder setting to find a mode that is compatible with DirectShowSource(). Are you using ffdshow for AC-3 or something else? _________________________________ Also you will lose quality decoding and reencoding your audio track, might it not be better to just slice out the AC-3 audio stream and remux it back into the reencoded video. |
1st February 2012, 13:24 | #5 | Link |
Registered User
Join Date: Apr 2005
Posts: 179
|
Adding the ConvertAudioTo16bit() did not helped, unfortunately. It does shows into Info as Integer 16 bit, instead of Float 32 bit.
My goal is to FadeIn/Out the sample. The video fade works perfect, only the audio fails. What I could try also is something to encode the audio file separately and create the audio fade effect. In theory, the FadeIn() should do it for both audio and video. I don't even know if you could use Avisynth to do the FadeIn() for audio only. if You can, then the problem is solved as my samples will always have few minutes of time only. On software side, I use Avisynth, CoreAVC, AC3File, DirectVobSub and Haali Media Splitter. I also have a license purchased for DGDecNV, used with MeGUI. |
2nd February 2012, 23:28 | #6 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
As you want to fade the audio then yes you need to reprocess it.
Have you tried loading your Sample.avs into Virtualdub to check if it plays there. You will need the ConvertAudioTo16bit() and also a ConvertToMono() to be able to test play the audio in Virtualdub as it does not play 5.1 or float. If Virtualdub works then DirectShowSource() is actually rendering correct audio samples and we are looking for a MeGUI/encoder problem. If Virtualdub did not work, then you need to poke at your AC-3 decoder setting to find a mode that is compatible with DirectShowSource(). i.e. We are looking for a direct show decoder problem. Are you using ffdshow for AC-3 direct show decoding or something else? i.e. AC3File? |
29th September 2012, 23:05 | #7 | Link |
Registered User
Join Date: Apr 2005
Posts: 179
|
I'm revisiting this thread, as I did not find a simple solution to my audio problems.
All I want is to take a MKV/MP4 format and add Fade In/Out to it. Is there a simple procedure to successfully do this in MeGUI? Using FadeIO or FadeIn/FadeOut fades only the video, not the audio. Thank you for your help. |
29th September 2012, 23:35 | #8 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Play this exact script in VirtualDub :-
Code:
DirectShowSource("C:\Users\Floren\Videos\Sample-orig.mkv", fps=23.976, convertfps=true) Info() ConvertAudioTo16bit() ConvertToMono() If NO! Then fix your DirectShow audio setup until the sound works. If yes then proceed to this script :- Code:
DirectShowSource("C:\Users\Floren\Videos\Sample-orig.mkv", fps=23.976, convertfps=true) AssumeFPS(24000,1001) FadeIn2(90) FadeOut2(90) Info() ConvertAudioTo16bit() ConvertToMono() If No! then we have some Fade debugging to do. If yes then encode this script :- Code:
DirectShowSource("C:\Users\Floren\Videos\Sample-orig.mkv", fps=23.976, convertfps=true) AssumeFPS(24000,1001) FadeIn2(90) FadeOut2(90) If yes If NO! then try this stereo script :- Code:
Colorbars(1280, 688, Pixel_Type="YV12") AssumeFPS(24000,1001) Trim(0, -4650) FadeIn2(90) FadeOut2(90) Code:
Colorbars(1280, 688, Pixel_Type="YV12") AssumeFPS(24000,1001) Trim(0, -4650) FadeIn2(90) FadeOut2(90) Centre=ConvertToMono() MergeChannels(Last, Centre, Last, Centre) Last edited by IanB; 29th September 2012 at 23:48. |
30th September 2012, 02:39 | #9 | Link | |
Registered User
Join Date: Apr 2005
Posts: 179
|
Quote:
Honestly, I have no idea why everything has to be so complicated. Is a simple FadeIn I try to achive, not going to the moon. Last edited by TECK; 30th September 2012 at 02:47. |
|
30th September 2012, 07:38 | #10 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
CoreAVC is a good H.264 video codec, I assume you are seeing the video just fine, it is the audio that is being recalcitrant.
What DirectShow AC-3 Audio decoder do you have installed? If you open the .mkv in GraphEdit or GraphStudio what does the default graph look like? Does it play both video and audio correctly? Maybe you could try FFmpegSource for the audio. Code:
V=DirectShowSource("C:\Users\Floren\Videos\Sample-orig.mkv", fps=23.976, convertfps=true, Audio=False) A=FFAudioSource("C:\Users\Floren\Videos\Sample-orig.mkv") # You may need some options AudioDub(V, A) Info() ConvertAudioTo16bit() ConvertToMono() |
30th September 2012, 07:43 | #11 | Link |
Registered User
Join Date: Apr 2005
Posts: 179
|
None, Windows 7 Ultimate plays fine AC3 files.
Once I encode the audio with MeGUI from DTS to AC3 5.1, it plays perfect in Windows Media Player. The point is: I don't see why is necessary to install additional audio codecs if I have a perfectly supported one already installed. Last edited by TECK; 30th September 2012 at 07:54. |
30th September 2012, 09:16 | #12 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Okay, you may have noticed I have been harping on about DirectShow AC-3 Audio decoder.
Microsloth in their infinite wisdom have mutated the AV playback world again. The default Windows 7 playback modules are not Direct Show, they are Media Foundation. See this topic Tool for changing preferred DirectShow filters in Windows 7 Also there are many other threads discussing this topic. Probably FFMpegSource is going to be the easiest path forward. |
30th September 2012, 18:23 | #14 | Link |
Registered User
Join Date: Apr 2005
Posts: 179
|
I see that FFMpegSource is already installed in MeGUI? How can I use it?
|
6th October 2012, 10:56 | #15 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
|
You might get AC3Filter/AC3File and have a freely available AC3 and DTS DirectShow Decoder on your system.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
Thread Tools | Search this Thread |
Display Modes | |
|
|