Log in

View Full Version : bsn.dll mod with command-line options (Please Test)


Pages : [1] 2 3

E-Male
2nd June 2004, 23:53
UPDATE:
-OOP rewrite done, PLEASE TEST!!
-source included (post any questions, or requests for needed files here)

http://e-rels.dyndns.org/downloads/bsn_paramod.rar

this is the 3rd test version of my modification of bsn.dll
the basic encoding features are unchanged (i hope)
but instead of using the -config switch you can now change the options directly on the command line

these parameters are accepted:
-vbr_tape, -vbr_radio, -vbr_internet, -vbr_streaming, -vbr_normal, -vbr_extreme, -vbr_audiophile, -vbr_transcoding, -cbr *bitrate*
-codecquality_fast, -codecquality_high
-aacprofile_lc, -aacprofile_he
-downmix_no, -downmix
-usepns_no, -usepns
-muxintovideo_no, -muxintovideo
-exportaac_no, -exportaac
-hintforstreaming_no,- hintforstreaming
-preset *preset*

example:
"C:\besweet\BeSweet.exe" -core( -input "c:\besweet\test.wav" -output "c:\besweet\test-New.mp4" ) -bsn( -2ch –cbr 128 -downmix )

if a cbr bitrate is entered that is not supported by teh encoder the next lower supported bitrate will be used

presets:
additonally to the bsn.dll a preset editor is now included in the pack
it’s completely command line based
run it without parameters to get a list of the accepted parameters

example:
"C:\besweet\BeSweet.exe" -core( -input "c:\besweet\test.wav" -output "c:\besweet\test-New.mp4" ) -bsn( -2ch –preset my_preset –vbr_tape )
will use teh settings from the preset my_preset, except for the bitrate which is taken from the parameter (because that parameter comes after the preset-parameter, later parameters always win)


!!PLEASE test it and post all questions, suggestions and bugs here!!

THX to:
the doom9 comunity, especially dspguru, nic, moitah and everyone giving feedback here
credit to:
Manfred Heumann for a working free c++ registry class (made this mod possible

CU
E-Male

pogo stick
3rd June 2004, 06:03
Great! :)
I will test it when I'll fix problems with my PC.
I hope soon.
So it doesn't have any -config limitations?
Did you check problem with mono encoding, causing slow (2x) sound?

E-Male
3rd June 2004, 07:42
Originally posted by pogo stick
Did you check problem with mono encoding, causing slow (2x) sound?
no, i didn't. i wasn't aware of that problem
but since i didn't change the encoding part this dll should act just as the normal bsn.dll



So it doesn't have any -config limitations?

I'm not sure what you mean with "-config limitations"
the -config switch is still supported, but with the parameters you can set all option (except for cbr bitrate, but i might get that fixed if anyone needs that)

pogo stick
3rd June 2004, 10:28
Originally posted by E-Male
I'm not sure what you mean with "-config limitations"
the -config switch is still supported, but with the parameters you can set all option (except for cbr bitrate, but i might get that fixed if anyone needs that)
I got it.
I meant limitations made by Ahead.
Not allowing HE for high bitrates when using '-config' switch.
And PSN don't work with HE, if I remember it right.

E-Male
3rd June 2004, 10:44
you'll have to try
it all depends on where those limitations are applied
if it's done in the config dialoge, then they are gone because the registry gets edited directly by bsn.dll now
but if the encoder itself checks for them, then i can't do anything about it

pogo stick
4th June 2004, 12:58
I made a few tests to compare original and modified bsn.
I encoded files to aac with BeSweet, then back to wav with Foobar2000.
And compared contents of wavs.

codecquality_high
aacprofile_lc and aacprofile_he with all vbr modes.
Everything else tuned off.
I didn't try codecquality_fast.
All worked like it should and files made with different versions are exactly the same.
Also tried exportaac. It works too.
Safe to use.

PSN make a difference for every mode, except he, vbr tape.

HE
-│noPNS │PNS (filesize in bytes)
1│173111│173111 <-no difference in decoded wavs
2│210084│204174
3│230069│208555
4│292711│251299
5│357231│299618
6│442904│384385
7│508527│400306
8│502559│430830

LE
-│noPNS │PNS
1│250703│217001
2│305442│261244
3│410573│338033
4│455353│352732
5│563706│421717
6│686143│497411
7│721011│524890
8│799856│571043

And a little suggestion:
Make 'no' default for downmix, usepns, muxintovideo, exportaac, hintforstreaming parameters.
So, for example, if nothing is specified for downmix, then it would not be used.
And including just 'downmix' -bsn() would tune it on.

E-Male
4th June 2004, 14:46
thx for testing

default settings will be added along with backup and presets in the next version
should be avaible some time next week if reallife doesn't get in the way

bond
4th June 2004, 20:41
beaware that nero is currently working on a total rewrite of their aac encoder, with totally different settings (by using a quality slider as vorbis does already for example)

E-Male
5th June 2004, 01:01
as long as they keep the registry values as "readable" as they are now i think i should be able to adapt my code

neo75903
5th June 2004, 01:03
suggestion, a parameter that allows to switch off the downsample allowing encodes at 45khz?

Any idea when the new nero codec will be released?

Thx , and i love besweet, oagmachine, etc.

neo75903
5th June 2004, 01:04
48khz typo :)

E-Male
5th June 2004, 02:43
the forced resampling from from 48 to 44.1khz only happens when you use the options dialoge, NOT when you use the parameters (just retested that)

neo75903
5th June 2004, 13:34
ic,

is it also possible to add parameters like:
usehe_yes, usehe_no (for high eff.),
cbr=128 (for constant bitrate)?

this can remove the need to use the -config switch.

Thx

pogo stick
5th June 2004, 14:34
Originally posted by neo75903
is it also possible to add parameters like:
usehe_yes, usehe_no (for high eff.)
this can remove the need to use the -config switch.
That's what E-Male did.
There is aacprofile_lc, aacprofile_he already.

neo75903
5th June 2004, 14:52
ic, got a bit confused with those profiles, how about constant bitrate?

neo75903
5th June 2004, 14:54
i volunteer to do the testing :)
this bsn is great for batch processing, i am currently using autoit to feed the input and set the settings for wrapping my avi's into mp4s

E-Male
5th June 2004, 15:49
ok, i said i'd look into cbr if someone wants it, and now i have to keep my word :cool:

i originally had a "cbr" parameter, but it could easily crash the encode because only certain bitrates are allowed (i gues that's why), plus i'm not sure if i have to do a conversion from decimal to another number-system

I'll look into it

neo75903
5th June 2004, 16:54
maybe limiting the cbr possibilities by parameters like:
cbr_128, cbr_96, etc.

thx for keeping ur word ;)

E-Male
5th June 2004, 16:57
UPDATE:
"cbr" parameter added
see first post (all changes in this update are in italics)

neo75903
5th June 2004, 17:41
Great! and thx for the quick update, will be testing next 24h :)

E-Male
7th June 2004, 05:04
after coding all night long test version 3 is here for testing
rewrote the first post with all info
i hope i didn't forget anything (i'm tired now)

when reporting bugs please always post what version you used

and PLEASE post feedback, even a "works fine" is helpfull, but bugs reports are of course wellcome, too

CU
E-Male

iradic
7th June 2004, 06:04
bsn v3 winme...

maybe this isnt under to do list but can you make a version of bsnpreset which doesnt require msvcp71.dll and mfc71.dll...

thanks

also what the numbers in bsnpreset mean... like "DefMuxIntoVideo - 0" means No - right? Are this settings from the registry? Where are they saved when created?

another thing - bsnpreset always displays help no mather what option is used...

bye

E-Male
7th June 2004, 06:09
i think the registry class needs mfc, but i can look into it

may i ask why you don't want to use those dlls?

iradic
7th June 2004, 06:24
well at least you should state that .dll's are needed in the first place... i don't like surprises like that and finding these dll on the net also

but it's not a problem... you did a good job

bye

E-Male
7th June 2004, 06:45
i didn't know the program would need dlls that aren't included with windows, i'll see if i can change this, or pack the dll with them next time

thx for the kind words

E-Male
7th June 2004, 07:07
didn't get it to compile without these extension

E-Male
7th June 2004, 07:14
almost missed the question and the bug-report:

when you use "view" + *preset-name* you'll get more detailed than with just "view"
yes, it's the registry settings
look into HKEY_CURRENT_USER\Software\Smeshka\Nencode
it contains the key with nencodes settings
my presets key is created there aswell
info on the values can be found here (http://forum.doom9.org/showthread.php?s=&threadid=74489)

i updated the pack with a new version of bsnpreset.exe with the always-shows-help-bug fixed, was just a "{" and a "}" missing (beginners- or late-night/early-morning-mistake)

neo75903
7th June 2004, 18:01
Hi Emale,

link is down, can u check ur post plz?
previous version works fine to me, kept my 48khz in my sound file.
already rewriting my batch files :)

Thx for the new dll, great job.
Will these be inluded in the next version of bsn.dll?

E-Male
7th June 2004, 19:29
Originally posted by neo75903
link is down, can u check ur post plz? missnamed the file, fixed


previous version works fine to me, kept my 48khz in my sound file.
already rewriting my batch files :)
Thx for the new dll, great job. good to hear it didn't blew anything up, yep :D
thx for testing and for the good words


Will these be inluded in the next version of bsn.dll? that's up to Dspguru
after i did a HUGE clean-up on the code and maybe some a rewrite to make it more object oriented (it's a nothing more than a mess ATM)

neo75903
7th June 2004, 20:43
nice touche with bsnpreset.exe :)

btw, what is optimize key in my register?

E-Male
7th June 2004, 22:20
a value which nobody seems to know what it does
i always saw it as 0, that's why i made 0 default
and i don't allow changing it, since i don't know the values it takes

pogo stick
8th June 2004, 04:17
Maybe it's something like:
Optimize and Make Streamable
When checked the muxer will reorder the final bitstream so that the header information is at the beginning as well as interleaving the audio/video payload to minimize seeking, thus producing a streamable MP4 file. The process of reordering and interleaving can take a while as the entire file needs to be rewritten. This can cause an application to not respond (or pause). The duration of the pause is approximately as long as the time needed to duplicate the file.
in 3ivx DirectShow Media Muxer?
If I understand it right, there is also similar function in MP4UI.

E-Male
8th June 2004, 04:38
it could be anything
cpu-optimization, optimizing the output-file for whatever, .....

on request i will add a switch for it, that will work like preset and cbr using the folowing parameter as value
but it would clearly be an at-own-risk thing

neo75903
9th June 2004, 02:39
@emale,

can you add a command to figure out which preset is being current?

E-Male
9th June 2004, 04:15
there is no "current" preset
if you use no parameters bsn will take the settings from the "default"-preset

yaz
9th June 2004, 10:53
Originally posted by E-Male
it could be anything
cpu-optimization, optimizing the output-file for whatever, .....

on request i will add a switch for it, that will work like preset and cbr using the folowing parameter as value
but it would clearly be an at-own-risk thing pls, do ! imho, it's the 'optimization' function for the mp4 output. afaik, there's nothing to be optimized in an aac stream as it is a 'raw' audio stream; just the signals, nothing else. in contrary, encapsulating into a valid mp4 stream may involve a kinda optimization which makes parsing/seeking/playing more straightforward. for getting a hint just try to play a 100-120 min aac stream in winamp. a pain in the ass :-)

btw, i love your cuty. i don't know how would i have been able to live without it so far :-)

the bests
y

neo75903
9th June 2004, 14:18
Hi,

P.S.:would be nice if someone would write a gui-version of the preset-tool

heard your call :)
http://users.telenet.be/bugged/BsnPresetGui v0.1.zip

i have for the convenience included a copy of your Bsnpreset.exe in my zip file, hope you feel ok about it, otherwise i will remove it.

E-Male
9th June 2004, 18:58
nice gui, well done


just tested it, here's my bug report:

-selecting any vbr settings doesn't change the registry (selecting cbr does)!!

-the presets list isn't always updated after changes where made
-also settings that where changed in the gui but didn't go to the registry for whatever reason are stil lvisible in the gui
--it would be great if both the preste list and the settings are read from the registry/bsnpreset again after any change (update, new, ...; maybe add a refresh-button)

-new presets have very straneg settings

-"copy" taking the name from "rename to" might be confusing

neo75903
10th June 2004, 13:26
>> nice gui, well done

Thx :), hope this version is more usable.
http://users.telenet.be/bugged/BsnPresetGui v0.2.zip

changelog
------------------------------------------------------------------------------------------
>> -selecting any vbr settings doesn't change the registry (selecting cbr does)!!
fixed, not saving vbr settings.

>> --it would be great if both the preste list and the settings are read from the registry/bsnpreset again after any change (update, new, ...; maybe add a refresh-button)

fixed, list is refreshed after update, copy and add from reigistery settings.
------------------------------------------------------------------------------------------
>> -also settings that where changed in the gui but didn't go to the registry for whatever reason are stil lvisible in the gui

fixed, settings should reflect now, please report for specific values
------------------------------------------------------------------------------------------
>> -the presets list isn't always updated after changes where made

postponed, need to look more into java Runtime processess
Refresh button added as a temporarily solution.
------------------------------------------------------------------------------------------
>> -new presets have very straneg settings

fixed, all new presets will have fixed values

------------------------------------------------------------------------------------------
>> -"copy" taking the name from "rename to" might be confusing

fixed to "copy name"
------------------------------------------------------------------------------------------
improvements:
-disabled use button while in copy or new
-disabled bitrate selection when CBR is not selected

bond
10th June 2004, 13:41
really nice to see this moving forward :)

e-male, can you plz also update the original nencoder sources (hosted on rarewares (http://www.rarewares.org/aac.html) and make an announcement in the original development thread on hydrogenaudio (http://www.hydrogenaudio.org/index.php?showtopic=13056), so that all tools relying on nencoder can be updated regarding this great enhancement :)

E-Male
10th June 2004, 15:50
@neo75903:
will try it ASAP

@bond:
i first wanna finish the OOP rewrite and clean up the sources for release with the binaries
then i can look at nencoder (never used it, only bsn)

neo75903
10th June 2004, 17:48
no rush :)

E-Male
10th June 2004, 18:31
just looked through the new gui version , so far so good

just 2 minor things:
-when clicking the "current" butten a view times (6-8 times i think) it shows cbr instead of vbr, after the next click it's ok again, but after some more (again ~6) it's cbr again, and so on [nothing really bad, but a bug non the less, so i thought i'd post it]
-would be nice if after changing/renamning/copying to/... preset xyz it would show preset xyz instead of the fist preset in the list (i gues this happens because of the automatic refresh)

rest works as it should

can i include the gui with the next version?

EDIT: one more thing: would you release the source-code?

neo75903
10th June 2004, 22:28
Hi Emale,

-yeah u can include the Gui with your binaries.
-to make it GPL, all i need todo is to include a license file? and where can i find it? Does it need to be modified?
Source will be inlcuded next time when license is ok.


i know it is just a small program, just wanna sort that out before releasing it to the wild :)

PS: besweet is appearantly not open source?

E-Male
10th June 2004, 23:02
http://www.gnu.org/copyleft/gpl.html#SEC4
should be all you need to know
just read through, copy&paste and comment the lines out

and besweet itself is closed-source, but many dlls it uses are open and it has a plug-in interface

neo75903
11th June 2004, 00:26
Hi,

here is the latest version of BsnPresetGui:
http://users.telenet.be/bugged/BsnPresetGui v0.3.zip

changes:
--------
- released with GPL license, source is included
- current button fix
- last used preset is now selected in the list

have fun :)


Developed with netbeans http://www.netbeans.org
http://users.telenet.be/bugged/netbeans.gif

E-Male
11th June 2004, 03:30
i think GUI by now is perfectly fine

next version will be released ~next week

i'm about half way throught with the object oriented rewrite

neo75903
11th June 2004, 13:23
nice nice, looking forward to that :)


12 juni 2004:
new ver.0.4 download from:
http://users.telenet.be/bugged/BsnPresetGui v0.4.zip

new version 0.4:
Changes:
--------
1) fixed first click not showing current preset, current button.
2) fixed saving codecquality.
3) fixed Runtime process.
4) from (3) refresh button not required anymore.
5) Motif UI replaced by windows look and feel.

bond
1st July 2004, 19:36
hm did anyone already ask dspguru whether this great bsn mod will make it to the "official" sources?

also E-Male, are you still working on it? can you plz merge your changes to the official nencode sources (i think the code is available on rarewares), which bsn is originally based on?

E-Male
2nd July 2004, 01:23
i had some trouble with my OOP re-write (which was needed to make the code usefull for others) and a lack of inspiration, i'll release bsn_mod+nencode_mod+preset_tool+source_code as soon as i get it fixed