But i want use directly the encoder with PB.
So i can make a runprogram of OGGENC like the FFMPEG

I have see, on your great link also the MPC enc..perhaps it's the same things

Thanks, i try all that
I wish you a good day

Hi KCC,Kwaï chang caïne wrote:Yes i have understand now...
But i want use directly the encoder with PB.
So i can make a runprogram of OGGENC like the FFMPEG
I have see, on your great link also the MPC enc..perhaps it's the same things
Thanks, i try all that
I wish you a good day
Hiya,Kwaï chang caïne wrote:Thanks a lot JAMIROKWAI
Because with all this parameters, i don't know exactely what parameters, i must use, for create mono and better tiny sampling for obtain the more little file
Code: Select all
; Code to convert a test.wav to test.ogg using oggenc
; you may us this snippet however you like, but please give credit :)
; (p) 2009-2010 quadWorks.de
#Quality = 3 ; 3 is Standard, 0 worst, 10 best quality
#minBits = 80 ; 80 is Standard, 16 is worst, 384 is best
#maxBits = 128 ; 128 is Standard, like above
#varBits = 128 ; 128 is Standard, like above, if set to 0, then use from #minBits to #maxBits
#toMono = 0 ; 0 = Stereo, 1 = convert to Mono
#toSample = 0 ; 0 = don't downsample, everything else (11025, 22050, 32000, 44100, 48000) downsample
#inName = "test.wav"
#toName = "test.ogg"
#Path = "c:/your/path/"
; this one produces the command line options for oggenc...
Procedure.s ConvertToOgg(inName$, toName$, Quality, minBits, maxBits, varBits, toMono, toSample)
encode$ = " -q" + Str(Quality)
If varbits = 0
encode$ + " -m" + Str(minBits)
encode$ + " -M" + Str(maxBits)
Else
encode$ + " -b" + Str(varBits)
EndIf
If toMono = 1
encode$ + " --downmix"
EndIf
If toSample <> 0
encode$ + " --resample " + Str(toSample)
EndIf
encode$ + " " + Chr(34) + inName$ + Chr(34)
encode$ + " -o" + toName$
ProcedureReturn encode$
EndProcedure
; really good quality
;encode$ = ConvertToOgg(#InName, #toName, #Quality, #minBits, #maxBits, #varBits, #toMono, #toSample)
;really bad, but small... :
encode$ = ConvertToOgg(#InName, #toName, 0, 16, 32, 0, 1, 11025)
; here you have to set the full path to oggenc, and the full path to the working directory of your test.wav and test.ogg
x = RunProgram(#Path + "oggenc.exe", encode$, #Path, #PB_Program_Open|#PB_Program_Read)
If x <> 0
While ProgramRunning(x)
Debug ReadProgramString(x)
Wend
If ProgramExitCode(x) <> 0
Debug "error"
Else
Debug "success"
EndIf
CloseProgram(x)
EndIf
Code: Select all
-q0 -m16 -M32 --downmix --resample 11025 "test.wav" -otest.ogg
Hi KCC,Kwaï chang caïne wrote:Thanks a lot JAMIROKWAI
I have try your code
1/ I have put a wave in c:\
2/ I have put OGGENC.exe and the three other file in c:\
3/ I have change the #Path to c:\
And your code return an error
I have see the value of "encode$" and this is the resultPerhaps an error of space with "-otest.ogg" :roll:Code: Select all
-q0 -m16 -M32 --downmix --resample 11025 "test.wav" -otest.ogg
I have try this, and nothing better
I have add some chr(34) also...and not better...
Code: Select all
encode$ = ConvertToOgg(#InName, #toName, 0, 16, 32, 0, 0, 11025)
Code: Select all
;encode$ = ConvertToOgg(#InName, #toName, 0, 16, 32, 0, 0, 11025) ; Pour 6 Secondes ==> 65 = 16 K
encode$ = ConvertToOgg(#InName, #toName, 0, 8, 16, 0, 0, 8000) ; Pour 6 Secondes ==> 65 = 11 K
encode$ = ConvertToOgg(#InName, #toName, -1, 8, 16, 0, 0, 8000) ; Pour 6 Secondes ==> 65 = 9 K
Danke .. gute Nacht zuBonne nuit
FineKwaï chang caïne wrote:Thanks thanks JAMIROKWAI![]()
I moove i moove thanks to you and a friend in french forum also interesting by this subject
1. I think, 8000 is the lowest Hz, OGGenc will be able to use.Kwaï chang caïne wrote:I have two questions again ??
1/ Now, believe you that it's possible to go down more ???
I have try 4000 but that don't works![]()
2/ Believe you it's possible to start with a MP3 ????
You're welcome.Kwaï chang caïne wrote:Thanks to your help
Danke .. gute Nacht zuBonne nuit