View Full Version : Can we remove BeSweet audio encoding from MeGUI?
dimzon
1st March 2006, 17:47
OK first why you want remove besweet from megui. Megui is gui for cli application and besweet is cli. I not aginst avisynth based encoding but i use 98% besweet in my encodings.
AviSyhth audio is much more flexible/extendible and it's 100% open source (BeSweet is free but not open source) so we (developers) prefer to use AviSyhth audio. Sometimes it's even more correct than BeSweet (there was thread on this forum about tweakig audio for framerate - AviSynth wins)
It's hard (it reques additional resources/time) to support both of them at same time.
One of the reason to drop BeSweet support at - to spent this additional resources/time to other MeGUI tasks ;)
shon3i
1st March 2006, 17:57
AviSyhth audio is much more flexible/extendible and it's 100% open source (BeSweet is free but not open source) so we (developers) prefer to use AviSyhth audio. Sometimes it's even more correct than BeSweet (there was thread on this forum about tweakig audio for framerate - AviSynth wins)
It's hard (it reques additional resources/time) to support both of them at same time.
One of the reason to drop BeSweet support at - to spent this additional resources/time to other MeGUI tasks ;)
OK dimzon there is no problem to remove besweet from megui. I realize you problems with megui.
dimzon
1st March 2006, 18:11
I realize you problems with megui.
I just must say: I have nothing against beSweet itself...
But everyone must realize - there are nothing for free in this world (except burn, love and death). MeGUI cost nothing for you but it cost free time for it's developers. Just realize - each feature reques some amount of time to do it. Sometimes we must make a choice - wich feature (A or B) to implement bcz we dosn't have free time to implement both of them. So if you REALLY need BeSweet we will sill support it but if's possible to achive same functionality via AviSynth only we can save our free time to other features.
dimzon
1st March 2006, 18:55
Seems like proposed method is Limiting variant of DRC ;)
http://en.wikipedia.org/wiki/Companding
http://en.wikipedia.org/wiki/Audio_level_compression
http://www.harmony-central.com/Effects/Articles/Compression/
I i understand right attack/relese timerequed only if you doesn't know real range (using Normalize we always know the range, isn't it?)
So talking about my DRC i propose such algorytm (in pseudo-code)
Normalize() // Now we know lowest and highest possible values
foreach input sample do
output sample = apply_some_simple_logariphmic_function_to( input sample )
Doom9
1st March 2006, 20:14
in two stable versions I plan to bring frame accurate cutting, which is avisynth based.. we can't do that with besweet (but come to think of it, it also won't work if you want to keep your ac3/dts input).
shon3i
1st March 2006, 21:02
ok dimzon you are the boss :D better remove than be lame
Adub
1st March 2006, 21:34
Dimzon
Can you provide audio job configuration on wich Besweet is at least 50% faster than Avisynth?
Berrinam
As far as speed goes, I did a single test with 2ch AC3 input, HE-AAC, High Quality, and found that BeSweet was in fact around 50% faster.
Those were the main settings that I used. I Also tried with Lame for Mp3 for the same source. I am at school right now so I cannot provide exact data, yet I tried pretty much the same thing as Berrinam.
So Any hope for speed increases? I read about the C# code interfaces, but I do not know how to program yet.
I will run a test using FAAC with BeSweet and Avisynth when I can.
Morte66
1st March 2006, 22:03
As far as speed goes, I did a single test with 2ch AC3 input, HE-AAC, High Quality, and found that BeSweet was in fact around 50% faster.
This is just a wild guess based on some weird CPU utilisation I've seen during avisynth audio encoding, but you might want to check it out.
MeGUI updates the progress indicator every 0.01% of the job, which is many times per second in my audio usage. Making lots of minor calls to the OS to do screen updates can have processes spending half their time waiting for the calls to return. I once met a little VB5 app that sat in a loop and called a Sybase stored procedure to create some database records, it updated a counter on the screen after each call. It did 8,000 insertions per hour. I turned off the counter, and then it did 11,000 insertions per hour.
Mutant_Fruit
1st March 2006, 22:29
MeGUI updates the progress indicator every 0.01% of the job
Updating every 0.01% is overkill. Every 1 or 2% would be much better. I'm sure there'd be a bit of overhead involved in updating the screen, but i doubt it'd use up more than 30 seconds comp time.
Adub
2nd March 2006, 17:38
I second that. I do not sit at my screen staring at MeGUI cheering whenever it goes up .001%. Only when ever it goes up every 1% =)
dimzon
2nd March 2006, 17:41
Actually current progress updates every 4096 samples
dimzon
3rd March 2006, 12:06
DRC for AC3 (special NicAudio build)
http://forum.doom9.org/showthread.php?p=793573#post793573
Adub
8th March 2006, 03:46
Okay, I have some results.
After running a few test, you can remove avisynth for all that I care. The sound quality is practically the same, and besweet was just a little faster. Not 50%, as I had said previously. Although it was faster. I used FAAC to test.
Here is my MeGUI Log:
Log for job job1
Channels=2, BitsPerSample=16, SampleRate=44100Hz
C:\Program Files\BeLight\faac.exe -b 160 -o "C:\Documents and Settings\Merlin\Desktop\test.mp4" -P -X -R 44100 -B 16 -C 2 --mpeg-vers 4 -Freeware Advanced Audio Coder
FAAC 1.24.1 (May 17 2005) UNSTABLE
Average bitrate: 152 kbps
Quantization quality: 100
Bandwidth: 16000 Hz
Object type: Low Complexity(MPEG-4) + M/S
Container format: MPEG-4 File Format (MP4)
Encoding - to C:\Documents and Settings\Merlin\Desktop\test.mp4
frame | elapsed | play/CPU
44400 | 169.9 | 6.07x
----------------------------------------------------------------------------------------------------------
Starting job job2 at 6:33:07 PM
Job is an audio job. Commandline:
-core( -input "C:\Documents and Settings\Merlin\Desktop\Audio\Excerpt from the Finale of Symphony No. 9 'Choral'_4540a85aee6a42d695eae7c4ac425085.wav" -output "C:\Documents and Settings\Merlin\Desktop\test2.mp4" -logfile "C:\Documents and Settings\Merlin\Desktop\test2.besweet.log" ) -dimzon( -dllname bse_FAAC.dll -b 160 ) -ota( -g max )
successfully started encoding
Processing ended at 6:35:32 PM
----------------------------------------------------------------------------------------------------------
Log for job job2
BeSweet v1.5b31 by DSPguru.
--------------------------
[00:00:00:000] Initializing...
[00:00:00:000] -- Initializing...
[00:17:10:763] |
[00:17:12:227] Finalizing...
[00:17:12:227] Conversion Completed !
Visit DSPguru's Homepage at :
http://DSPguru.doom9.net/
----------------------------------------------------------------------------------------------------------
The First Job was with Avisynth, the Second was with BeSweet.
Avisynth took 2 minutes 52 seconds all total, BeSweet took 2 minutes 24 seconds. The encoded clip was Excerpt from the Finale of Symphony No. 9 'Choral'.wav, lasting a total time of 17 minutes 10 seconds. Classical, of course.
I am willing to live with the slightly longer time if more time is spent away from besweet development in Megui. On more usefull stuff, like more features for avisynth audio :)
Thanks all. Any questions?
berrinam
8th March 2006, 06:58
First question. You say we can do away with AviSynth audio. I presume you mean BeSweet. Am I right?
Other than that, no. It's all pretty clear -- no problems in sound quality; speed ends up being not much of an issue because audio encoding is generally so fast and the difference is small; and finally, we have a bigger customisability through AviSynth. So you now also agree with AviSynth encoding. I think the decision has already been made to only further support AviSynth anyway.
Adub
8th March 2006, 15:24
Oops, yeah of course I mean Besweet. Sorry about that. So you say that the decision has already been made? Good news. more power to you guys. Thanks for the wonderful program, man.
Laters,
Merlin7777
Oline 61
9th March 2006, 02:52
Just two questions...
1. Is DRC correctly implemented in FFDShow?
2. Is DRC in FFDShow equivalent to -c normal in AZID or -c light, -c heavy, etc....?
If not I can use the nVidia PureVideo AC3 decoder, which is very slow compared to FFDShow, but also very configurable.
dimzon
9th March 2006, 03:14
Just two questions...
1. Is DRC correctly implemented in FFDShow?
2. Is DRC in FFDShow equivalent to -c normal in AZID or -c light, -c heavy, etc....?
If not I can use the nVidia PureVideo AC3 decoder, which is very slow compared to FFDShow, but also very configurable.
yes, it acts like -c normal
new NicAudio version supports DRC too
Oline 61
9th March 2006, 03:37
Cool, how do I turn on the DRC for the new NicAudio in MeGUI though? It would be nice if MeGUI would post a snapshot of the AVISynth script it uses in the log. I want to know exactly what is going on.
dimzon
9th March 2006, 08:19
Cool, how do I turn on the DRC for the new NicAudio in MeGUI though?
This feature is not supported yet
Oline 61
9th March 2006, 13:11
Oh well. I'll just use FFDShow until it is supported then :).
Oline 61
11th March 2006, 19:33
When using FFDShow as my AC3 directshow decoder I get:
Starting job job1 at 1:32:50 PM
Job is an audio job. Commandline:
-core( -input "C:\FRIDAY_NIGHT_LIGHTS\VTS_03_1 T01 2_0ch 192Kbps DELAY 0ms.ac3" -output "C:\FRIDAY_NIGHT_LIGHTS\VTS_03_1 T01 2_0ch 192Kbps DELAY 0ms.mp4" -logfile "C:\FRIDAY_NIGHT_LIGHTS\VTS_03_1 T01 2_0ch 192Kbps DELAY 0ms.besweet.log" ) -azid( -b 128 ) -ota( -g max )
successfully started encoding
Processing ended at 1:32:51 PM
----------------------------------------------------------------------------------------------------------
Log for job job1
Error:
MeGUI.AviSynthException: DirectShowSource: Could not open as video or audio.
Video returned: "DirectShowSource: the filter graph manager won't talk to me"
Audio returned: "DirectShowSource: the filter graph manager won't talk to me"
at MeGUI.AviSynthClip..ctor(String func, String arg, AviSynthColorspace forceColorspace, AviSynthScriptEnvironment env)
at MeGUI.AviSynthAudioEncoder.encode()
----------------------------------------------------------------------------------------------------------
The PureVideo AC3 decoder works, but somehow doesn't output 5.1 to the encoder even though everything is configured to do so. Do I need some kind of AC3 source filter?
Doom9
11th March 2006, 20:09
This feature is not supported yetI wouldn't mind if you added support for that right away...
dimzon
11th March 2006, 22:25
If you want to use DRC with NicAc3Source you can write such script
nicAc3Source("bla-bla-bla.ac3", drc=1)
and use it as source in MeGUI
@Doom9
DRC is source-related setting, another sources reque another settings (LPCM source has Channels/Samplerate settings etc...)
So I think we must perform a little change in AudioPart architecture to allow such settings BUT we can do it only after BeSweet part removal....
btw. Aud-X programmers send me SDK so it's easy to add multichannel MP3 support in MeGUI :cool:
Oline 61
11th March 2006, 22:33
Thanks Dimzon. I'll do that.
Oline 61
11th March 2006, 23:52
Should I add one of these:
ConvertAudioTo32bit (clip)
ConvertAudioToFloat (clip)
After NicAC3Source()?
dimzon
12th March 2006, 00:00
Should I add one of these:
ConvertAudioTo32bit (clip)
ConvertAudioToFloat (clip)
After NicAC3Source()?
No, everything will be done by MeGUI automatically
Oline 61
12th March 2006, 00:16
Ok, thanks.
shon3i
12th March 2006, 16:57
Aud-X programmers send me SDK so it's easy to add multichannel MP3 support in MeGUI You mean Aud-X 5.1 codec support. That was be cool but can you aslo implement CT encoding.
Doom9
12th March 2006, 17:06
well.. this thread has served its purpose.. besweet support has been canned a few weeks ago, it just has not yet made it to the public (and it may take a while until it does as I have other priorities at this point.. megui doesn't pay the bills)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.