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. |
|
|
#1 | Link |
|
Registered User
Join Date: Apr 2002
Posts: 39
|
@DSPguru
hi
i tried to integrate the besweet.dll into the vstrip gui. TheWef forwarded me your mail 'cause he's busy working on "gknot next generation". i integrated the few things you pointed out in your mail and tried to get it working. but as you can guess it doesn't yet. first of all there seemes to be a problem with the original vstrip_gui sources. they compile clean but when you hit the run button the prog freezes. (is this the compile problem you where talking about?) i think i solved the problem by removing a "synchronized" in the TVSThread.CreateVS constructor. i tried the besweet.pas unit with a small test prog and it worked fine but the vstrip_callback function sends very small data with it (5 to 8 bytes) so this ends in an exception in besweet.dll. till now it is not possible to encode more than one ac3 stream 'cause the callback function feeds only one decoder. ...many problems ahead. see attach for the source aquaplaning |
|
|
|
|
|
#2 | Link |
|
BeSweet Author
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
|
@aquaplaning
i understand that you managed to write a stand-alone proggy that uses BeSweet.dll. that's good. it's true that BeSweet.dll can only transcode one stream at a time, but maybe if you create more instances of handles to BeSweet.dll, it'll work. (hDLL1, hDLL2,..) vstrip_callback function should supply ac3 chunks at size of about 2k, so 5,8 bytes doesn't looks like the right substream. maybe you can try out with setting only a callback function to the audio substream 0x80, and see how it works. if [maven] is reading this, he might also give you some hints. @wizard_fl please moderate aqua's attach.
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
|
|
|
|
|
#4 | Link |
|
Registered User
Join Date: Apr 2002
Posts: 39
|
it seems that it is working now.
the first ac3 stream from output 0 gets encoded to <outputfile>.mp3 i included the sources and the exe in the attach, so you can give it a try. the code is no beauty but i wanted to keep it simple. aquaplaning |
|
|
|
|
|
#5 | Link |
|
Registered User
Join Date: Feb 2002
Posts: 1,195
|
wait the moderator dont have already accept the attached file.
PS: perhaps u could help me if you try to modify the vstrip src. plz read this. http://forum.doom9.org/showthread.php?s=&threadid=23160 Thank u for your answer, bye. |
|
|
|
|
|
#6 | Link |
|
BeSweet Author
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
|
@aqua
that's great news !! very impressive !i'll wait to see the results (whenever tha attach becomes public). please make sure your attach also includes a compiled version .
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
|
|
|
|
|
#8 | Link |
|
BeSweet Author
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
|
i've read the code - it's fine !
if you're planning to support mpa substreams (0xc0..0xc7 - i believe), the code should look like this : Code:
function vStrip_CallBack(data: PByte; si: tp_vs_streaminfo; user_data: cardinal): boolean; cdecl;
var info: BS_Record;
begin
info := ac3bursts(si.length, data);
{writeln(f, format('[%.2d:%.2d:%.2d:%.3d] peak: %f',
[info.hours, info.minutes, info.seconds, info.millis, info.peak]));
writeln(f, format('user_data: %d length:%d stream_id:%d substream_id:%d vob_id:%d',
[user_data, si.length, si.stream_id, si.substream_id, si.vob_id]));}
result := true;
end;
changes are : removed inc(data, 4); modified info := ac3bursts(si.length - 4, data); p.s. ---- uploaded BeSweet.dll v1.b12. Dg.
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
|
|
|
|
|
#9 | Link |
|
Registered User
Join Date: Apr 2002
Posts: 39
|
a new release again.
![]() i have added a small form to modify the dll's command line (<output> gets substituted with the selected file (which has to be done before selecting MP3 Output)). i don't think i will create a form with millions of checkboxes because i don't know the features of the besweet.dll, wich of them are important... perhaps someone else want's to try. with the command line all future releases of the dll should work without a change in the code. (the line get's saved in the registry so your preferred settings stay the default settings.) i also tried to encode multiple streams at once but that's not possible with the current dll. a second loadlibrary call returns the same handle as the first one. i would like to see my source modifications in maven's code. perhaps someone could convince him...
|
|
|
|
|
|
#10 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,273
|
Slightly off-topic, but did you try the NoOutput function, didn't seem to work on mine
Might be me making a mistake though ![]() Doesn't matter, because im using the old trick of creating the first file with the filename "NUL"... ![]() Just though i'd mention it. ![]() Cheers, -Nic ps its good to see you here aquaplaning, quite an impact in such few posts here & your bro speaks of you often
|
|
|
|
|
|
#12 | Link |
|
BeSweet Author
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
|
i believe it is possible with the current release.
whenever you check the "MP3 Output", you'll get an inputbox where you can set BeSweet commandline to "-2lame( ... )". btw, aqua, i would suggest to remove the start of the commandline : Code:
BeSweet.dll -core( -input ac3input -output <output>.mp3 ) -ota( -d 0 -G max ) -lame( --alt-preset 128 --scale 1 ) another little thing that i believe is missing by default - logfile creation. Cheers, Dg.
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
|
|
|
|
|
#13 | Link |
|
Registered User
Join Date: Apr 2002
Posts: 39
|
DSPguru reported some errors and therefore i've added some logging which can be activated by checking the new "BeSweet Logfile" checkboxe on the BeSweet form.
added also some minor improvements. @Nic does "NoOutput function" mean: getting the mp3 file without the ac3 file? (didn't seem to work for me either) and thanks for the warm welcome @DrKnowLittle http://dspguru.doom9.org/ http://besweet.notrace.dk/cli.html @DSPguru i implemented your suggestions: mpa input, different command line, optional log the link from your page to this thread makes me proud
|
|
|
|
|
|
#14 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,273
|
Hi,
No, NoOutput() Should stop an output file being produced. This is so that two pass normalization (-g max) can work without creating two output files with each pass. Im sure DSPGuru will probably fix it whenever he gets a spare moment , but until then ive just hacked together a workaround ![]() Cheers, -Nic |
|
|
|
|
|
#15 | Link |
|
BeSweet Author
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
|
@aqua
i'm not sure if the logfile would help me to trace the problem, this is something more basic : whenever i click on the "run" button - the gui quits. (only happens when "mp3 output" is checked). i'm very happy with your work, it's natural to link here .@nic what's exactly the problem with NoOutput ?
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
|
|
|
|
|
#16 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,273
|
Ill have to do more tests, but it wasn't creating the complete file even if NoOuput was called, but it was creating a file....But I havent tested it in a while so ill give you a report sometime in the future
![]() Cheers, -Nic |
|
|
|
|
|
#17 | Link |
|
BeSweet Author
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
|
funny Nic
![]() sure, the file is being CREATED, but nothing is written to it. data will be written to it only on the second pass. Dg.
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif Last edited by DSPguru; 1st May 2002 at 15:07. |
|
|
|
|
|
#18 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: England
Posts: 3,273
|
Oh, I appear to have partly missed the point of its purpose then. I see what you mean now. Ill change DVD2AVI tonight & report back.
(When I saw NoOutput creating a file, I just assumed it wasnt working quite right, so I just made it output to NUL...I am still calling NoOutput though on the first pass so, in essence, im doing it the right way )Thanks for the help, Cheers, -Nic |
|
|
|
|
|
#19 | Link |
|
Registered User
Join Date: Apr 2002
Posts: 39
|
i forgot to point this out more clearly:
now the BeSweet Command Line has to look something like this: "-ota( -d 0 -G max ) -lame( --alt-preset 128 --scale 1 )" (default) "BeSweet.dll" and the whole "-core" chunk are added automaticly. if you used an older release an old command line will be loaded from the registry and will not work without changing it to the above. @DSPguru let's wait for the new attach. a trace output is written in every new function that i added. perhaps we are lucky
|
|
|
|
|
|
#20 | Link |
|
BeSweet Author
Join Date: Oct 2001
Location: On top of a supercompact cardinal
Posts: 3,506
|
@Nic
i'm sorry if i confused you. here's a sample implementation of two-pass mp2 encoding. first pass : BeSweet -core( -input track.ac3 -output svcd.mp2 ) -azid( -g 0db ) -2lame( -b 224 ) NoOutput() second pass : BeSweet -core( -input track.ac3 -output svcd.mp2 ) -azid( -g VALUE ) -2lame( -b 224 ) @Aqua problem still here. i press the "run" button, and the gui quits ..i've also noticed the output filename isn't stored in the registry..
__________________
FAQs : BeSweet, Audio :readfaq: Homepage : DSPguru's Webpage http://dspguru.notrace.dk/cs.gif Guides : Multilingual Guides of my tools http://dspguru.notrace.dk/1zhelp.gif |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|