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 > Programming and Hacking > Development

Reply
 
Thread Tools Display Modes
Old 22nd April 2002, 21:47   #1  |  Link
aquaplaning
Registered User
 
aquaplaning's Avatar
 
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
aquaplaning is offline   Reply With Quote
Old 23rd April 2002, 05:24   #2  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
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.
DSPguru is offline   Reply With Quote
Old 23rd April 2002, 07:52   #3  |  Link
BlackSun
CoreCodec
 
BlackSun's Avatar
 
Join Date: Oct 2001
Location: Toulouse
Posts: 726
Yeah I got the same problem, the gui freeze when I press the run button...

I have accepted the attachement btw
__________________
BlackSun
The Concentric Circles of Audio and Video
BlackSun is offline   Reply With Quote
Old 23rd April 2002, 22:21   #4  |  Link
aquaplaning
Registered User
 
aquaplaning's Avatar
 
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
aquaplaning is offline   Reply With Quote
Old 24th April 2002, 01:42   #5  |  Link
Dark-Cracker
Registered User
 
Dark-Cracker's Avatar
 
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.
Dark-Cracker is offline   Reply With Quote
Old 24th April 2002, 04:41   #6  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
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 .
DSPguru is offline   Reply With Quote
Old 24th April 2002, 07:59   #7  |  Link
BlackSun
CoreCodec
 
BlackSun's Avatar
 
Join Date: Oct 2001
Location: Toulouse
Posts: 726
Validated Nice job aquaplanning!
__________________
BlackSun
The Concentric Circles of Audio and Video
BlackSun is offline   Reply With Quote
Old 24th April 2002, 21:58   #8  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
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.
DSPguru is offline   Reply With Quote
Old 25th April 2002, 22:00   #9  |  Link
aquaplaning
Registered User
 
aquaplaning's Avatar
 
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...
aquaplaning is offline   Reply With Quote
Old 25th April 2002, 22:27   #10  |  Link
Nic
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
Nic is offline   Reply With Quote
Old 30th April 2002, 12:37   #11  |  Link
DrKnowLittle
Registered User
 
Join Date: Nov 2001
Posts: 26
Will mp2 (44.1Khz , 224Kpbs) output be possible to ?
DrKnowLittle is offline   Reply With Quote
Old 30th April 2002, 15:21   #12  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
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 )
this part should be generated by the gui and not changed by the user.
another little thing that i believe is missing by default - logfile creation.

Cheers,
Dg.
DSPguru is offline   Reply With Quote
Old 30th April 2002, 22:24   #13  |  Link
aquaplaning
Registered User
 
aquaplaning's Avatar
 
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
aquaplaning is offline   Reply With Quote
Old 1st May 2002, 08:22   #14  |  Link
Nic
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
Nic is offline   Reply With Quote
Old 1st May 2002, 14:54   #15  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
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 ?
DSPguru is offline   Reply With Quote
Old 1st May 2002, 14:55   #16  |  Link
Nic
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
Nic is offline   Reply With Quote
Old 1st May 2002, 14:57   #17  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
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.

Last edited by DSPguru; 1st May 2002 at 15:07.
DSPguru is offline   Reply With Quote
Old 1st May 2002, 15:24   #18  |  Link
Nic
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
Nic is offline   Reply With Quote
Old 1st May 2002, 15:35   #19  |  Link
aquaplaning
Registered User
 
aquaplaning's Avatar
 
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
aquaplaning is offline   Reply With Quote
Old 3rd May 2002, 08:07   #20  |  Link
DSPguru
BeSweet Author
 
DSPguru's Avatar
 
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..
DSPguru is offline   Reply With Quote
Reply

Thread Tools
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 15:44.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.