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. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
BeHappy - AviSynth based audio transcoding tool (UPD 19-07-2006)
![]() Use-Case BeHappy is designed mostly for movie audiotrack transcoding. It's powerfull BeLight/BeSweet replacement. So do not ask me about:
Screenshots ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() System requirements
Installation
Original idea Workspace is hosted @ ![]() Note MeGUI since v 0.2.3.2038 23 Jan 2006 share same code with BeHappy. So you can use MeGUI for audio encoding via AviSynth too. MeGUI audio part has less functionality/flexibility but is more stable Mini FAQ: TODO
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS Last edited by dimzon; 19th July 2006 at 01:07. |
![]() |
![]() |
![]() |
#2 | Link |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 7,169
|
*** READ THIS: actualized 2023-01-18 ***
- BeHappy Workspace link don't work because GotDotNet Workspaces have been phased out. - New BeHappy home: CodePlex BeHappy project with last mod's included. - And now https://github.com/jones1913/BeHappy - And a upgrade here ------------------------------------------ *** Now the original post *** ------------------------------------------ Good job, Dimzon! For me work the 'Delay', 'Split', 'Downmix', ... Only with the 'Upmix' I get always: Error: Can't find audio stream! Please be patient with me, because I have a lot of comments: Questions In Avisynth internal plugin info say SuperEq(string filename), then wait for a parameter like this: SuperEq("C:\Equalizer Presets\Loudness.feq") Can work SuperEq(clip, values="0 0...96...0")? In Upmix using Reverberation you put the plugin reverb(). Is a external plugin and need be downloaded? EnsureVBRMP3Sync(). We can work with mp3 audio?. Is not necessary a decoder first to work with uncompressed audio? If is possible, EnsureVBRMP3Sync() must be before AudioDubEx(BlankClip(...)) or after? Petitions With buttons 'New' and 'Edit' in Source, DSP and Destination we can test others decoders, DSP functios and encoders. Please include the Downmix - DPL I, like DPL II but: ssr = MixAudio(sl, sr, 0.2222, 0.2222) ssl = Amplify(ssr, -1.0) Bugs The last buffer send to the encoder can be incomplete but is send complete, then there are extrabytes at end. The RiffChunkSize in wav header is incorrect. A example (without DSP), the same Input.wav and three outputs: Code:
Input.wav (with correct classical wav header) -------------- FileLength ..: 1920044 bytes RiffChunkSize: 1920036 Ok = FileLength - 8 = DataLength + 36 DataLength ..: 1920000 Duration ...: 10.000000 sec. Output.wav (RiffChunkSize error, Extrabytes at end of file) -------------- FileLength ..: 1933356 bytes RiffChunkSize: 1920450 Error: Must be FileLength - 8 = 1933348 DataLength ..: 1920000 Warning: ExtraBytes at end of file, bytes = 13312 Duration ...: 10.000000 sec. (with DataLength Ok, extrabytes are ignored) Output.dat (Raw PCM, without header) -------------- FileLength ..: 1933312 bytes Duration ...: 10.069333 sec. Error: Extrabytes interpreted as data Output.ogg -------------- Duration ...: 10.069333 sec. Error: Extrabytes interpreted as data m_nSizeInBytes = m_nSampleCount * nBlockAlign is > 2^32, then we need a int64 variable in source code. Last edited by tebasuna51; 18th January 2023 at 14:26. Reason: Deleted link to Shon3i package because donīt wok with actual BeHappy versions |
![]() |
![]() |
![]() |
#4 | Link | ||
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
@tebasuna51
Upmix is not forking yet, this is just algorytm, not working script yet! EnsureVBRMP3Sync - I think it must be right after decoder. I believe this is just buffering to avoid desync and it can be used with any source type (maybe i'm wrong?) Petitions Quote:
![]() Quote:
Creating new Source Use nicaudio.extension as starting point for new source. Copy it to yorsource.extension and open via notepad. Don't forget to generate new UUID(GUID) for UniqueID attribute Edit Name attribute and Edit <Script> element {0} means input file name {1} means output file name {2} means unique string (to use as part of identifier) {3} means '{' character (to allow '{' to be used) {4} means '}' character (to allow '}' to be used) Add/Delete/Edit <SupportedFileExtension> element Sample: Code:
<?xml version="1.0"?> <BeHappy.Extension xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://workspaces.gotdotnet.com/behappy"> <AudioSource Name="MySourceName" UniqueID="5D209A6D-E6EA-4640-AF60-BAE14A529792"> <Script>SomeSource("{0}")</Script> <SupportedFileExtension>ext1</SupportedFileExtension> <SupportedFileExtension>ext2</SupportedFileExtension> <SupportedFileExtension>ext3</SupportedFileExtension> </AudioSource> </BeHappy.Extension> There are 2 ways to create simple DSP: Creating very simple DSP Example: Code:
<BeHappy.Extension xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://workspaces.gotdotnet.com/behappy"> <AudioDSP Name="Normalize to 100%" UniqueID="6158f79f-d8a0-4021-89ae-b77b37c04c55"> <Script> # Some script: Normalize() </Script> </AudioDSP> </BeHappy.Extension> Take look @ DownMix.extension and UpMix.extension - good examples of multioption DSP Code:
<?xml version="1.0"?> <BeHappy.Extension xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://workspaces.gotdotnet.com/behappy"> <AudioDSP UniqueID="9579E57B-2D27-4583-99A4-921718E25B41"> <Plugin> <MultiOptionDSP Type="BeHappy.Extensions.MultiOptionDSP, BeHappy"> <TitleFormatString>DSP Name, Selected Option = {0}</TitleFormatString> <ScriptPrologue> # ScriptPrologue # this part of script will be included in resulting script without any conditions # {0} means input file name # {1} means output file name # {2} means unique string (to use as part of identifier) # {3} means '{' character (to allow '{' to be used) # {4} means '}' character (to allow '}' to be used) </ScriptPrologue> <Option> <Name>Option Name 1</Name> <Value> # this part of script will be included in resulting script only if this option is selected # {0} means input file name # {1} means output file name # {2} means unique string (to use as part of identifier) # {3} means '{' character (to allow '{' to be used) # {4} means '}' character (to allow '}' to be used) </Value> </Option> <Option> <Name>Option Name 2</Name> <Value> # this part of script will be included in resulting script only if this option is selected # {0} means input file name # {1} means output file name # {2} means unique string (to use as part of identifier) # {3} means '{' character (to allow '{' to be used) # {4} means '}' character (to allow '}' to be used) </Value> </Option> <Option> <Name>Option Name 3</Name> <Value> # this part of script will be included in resulting script only if this option is selected # {0} means input file name # {1} means output file name # {2} means unique string (to use as part of identifier) # {3} means '{' character (to allow '{' to be used) # {4} means '}' character (to allow '}' to be used) </Value> </Option> <Option> <Name>Option Name 4</Name> <Value> # this part of script will be included in resulting script only if this option is selected # {0} means input file name # {1} means output file name # {2} means unique string (to use as part of identifier) # {3} means '{' character (to allow '{' to be used) # {4} means '}' character (to allow '}' to be used) </Value> </Option> <Option> <Name>Option Name 5</Name> <Value> # this part of script will be included in resulting script only if this option is selected # {0} means input file name # {1} means output file name # {2} means unique string (to use as part of identifier) # {3} means '{' character (to allow '{' to be used) # {4} means '}' character (to allow '}' to be used) </Value> </Option> <Option> <Name>Option Name 6</Name> <Value> # this part of script will be included in resulting script only if this option is selected # {0} means input file name # {1} means output file name # {2} means unique string (to use as part of identifier) # {3} means '{' character (to allow '{' to be used) # {4} means '}' character (to allow '}' to be used) </Value> </Option> <Option> <Name>Option Name 7</Name> <Value> # this part of script will be included in resulting script only if this option is selected # {0} means input file name # {1} means output file name # {2} means unique string (to use as part of identifier) # {3} means '{' character (to allow '{' to be used) # {4} means '}' character (to allow '}' to be used) </Value> </Option> <ScriptEpilogue> # ScriptEpilogue # this part of script will be included in resulting script without any conditions # {0} means input file name # {1} means output file name # {2} means unique string (to use as part of identifier) # {3} means '{' character (to allow '{' to be used) # {4} means '}' character (to allow '}' to be used) </ScriptEpilogue> </MultiOptionDSP> </Plugin> </AudioDSP> </BeHappy.Extension> Creating new Destination is very close to new Source. Take look @ ffmpeg-ac3.extension, enc_aacPlus.extension, wavpack.extension, flac.extension <ExecutableArguments> {0} means output file name {1} means samplerate in Hz {2} means bits per sample {3} means channel count {4} means samplecount {5} means size in bytes Example: Code:
<?xml version="1.0"?> <BeHappy.Extension xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://workspaces.gotdotnet.com/behappy"> <AudioEncoder Name="EncoderName" UniqueID="83517DA6-B34F-45ee-B48C-5D9370CC6032"> <Script>#Some script to be used for this encoder</Script> <ExecutableFileName>encoder.exe</ExecutableFileName> <ExecutableArguments>- "{0}" --cbr 32000</ExecutableArguments> <SupportedFileExtension>ext1</SupportedFileExtension> <SupportedFileExtension>ext2</SupportedFileExtension> <SupportedFileExtension>ext3</SupportedFileExtension> </AudioEncoder> </BeHappy.Extension> If you are familiar with .NET you can create really fine and complex extension. Take look @ BeHappy.OggVorbis.Encoder.Extension project. You must:
PS. One *.extension can contain any amount of DSP Source and Encoder at same time
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS Last edited by dimzon; 28th December 2005 at 13:44. |
||
![]() |
![]() |
![]() |
#5 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
fresh beta out
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS Last edited by dimzon; 23rd May 2006 at 21:22. |
![]() |
![]() |
![]() |
#6 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
Now I'm using such workaround: Code:
int nHowMany = Math.Min((int) (m_aviStreamInfo.dwLength-frameSample), MAX_SAMPLES_PER_ONCE) ; AVIStreamRead(m_aviStream, frameSample, nHowMany, h.AddrOfPinnedObject(), frameBufferTotalSize, out bytesRead, out samplesRead);
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
![]() |
![]() |
![]() |
#7 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Nero7 AAC encoder extension is avaluable
![]() download it @ workspace @ gotdotnet.com
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS Last edited by dimzon; 28th December 2005 at 20:00. |
![]() |
![]() |
![]() |
#8 | Link | ||||
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 7,169
|
Thanks for your rapid and large answer. I have a lot of work to do.
First I want answer your questions. Quote:
Quote:
http://ccrma.stanford.edu/courses/42...ts/WaveFormat/ Quote:
The faad decoder (aac) can generate 'invalid' wav's > 4 GB, and fill these fields (RiffLength and DataLength) with 0xFFFFFF00. Foobar also make 'invalid' wav's > 4 GB, and fill these fields with the 4 low order bytes. Really the only way, afaik, to use a wav > 4 GB is split it in mono wav's. Then Tranzcode, WaveWizard and BeSplit can generate valid (not for BeSplit because a bug in BlockAlign field) mono wav's with the original length. The method is ignore these fields and continue working until end of file. I prefer the faad method (0xFFFFFF00) because Foobar method can be confused with valid fields. Quote:
Code:
Int64 nByteSize = streamSampleLength * m_WavHeader.nBlockAlign; target.Write(BitConverter.GetBytes((uint)Math.Min(nByteSize,uint.MaxValue)),0,4); In the actual version, the variable with possible overflow is used also in: Code:
private uint m_nSizeInBytes; ... m_nSizeInBytes = m_nSampleCount*m_wavHeader.nBlockAlign; // may be > 2^32 ... private void createEncoderProcess() ... info.Arguments = string.Format(m_commandLine, m_output, m_wavHeader.nSamplesPerSec, m_wavHeader.wBitsPerSample, m_wavHeader.nChannels,m_nSampleCount,m_nSizeInBytes); |
||||
![]() |
![]() |
![]() |
#9 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
Code:
private long m_nSizeInBytes; ... private void writeHeader(Stream target ) { const uint FAAD_MAGIC_VALUE = 0xFFFFFF00; const uint WAV_HEADER_SIZE = 36; bool useFaadTrick = m_nSizeInBytes>=(uint.MaxValue-WAV_HEADER_SIZE); target.Write(System.Text.Encoding.ASCII.GetBytes("RIFF"),0,4); target.Write(BitConverter.GetBytes(useFaadTrick?FAAD_MAGIC_VALUE:(uint)(m_nSizeInBytes + WAV_HEADER_SIZE)),0,4); target.Write(System.Text.Encoding.ASCII.GetBytes("WAVEfmt "),0,8); target.Write(BitConverter.GetBytes((uint)0x10),0,4); target.Write(BitConverter.GetBytes(m_wavHeader.wFormatTag),0,2); target.Write(BitConverter.GetBytes(m_wavHeader.nChannels),0,2); target.Write(BitConverter.GetBytes(m_wavHeader.nSamplesPerSec),0,4); target.Write(BitConverter.GetBytes(m_wavHeader.nAvgBytesPerSec),0,4); target.Write(BitConverter.GetBytes(m_wavHeader.nBlockAlign),0,2); target.Write(BitConverter.GetBytes(m_wavHeader.wBitsPerSample),0,2); target.Write(System.Text.Encoding.ASCII.GetBytes("data"),0,4); target.Write(BitConverter.GetBytes(useFaadTrick?FAAD_MAGIC_VALUE:(uint)m_nSizeInBytes),0,4); }
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
![]() |
![]() |
![]() |
#11 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
introducing new feature - Multioption encoder (wait for fresh beta)
![]()
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
![]() |
![]() |
![]() |
#12 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,655
|
I don't know whether you are already doing this:
any_audiosurce() ConvertAudioTo24bit() #or better float or 32bit downmix() / upmix() / normalize() ConvertAudioTo16bit() this should effectively reduce rounding errors.
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
![]() |
![]() |
![]() |
#13 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
![]() |
![]() |
![]() |
#14 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
New beta is out!
Get it @ workspace @ gotdotnet.com
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
![]() |
![]() |
![]() |
#15 | Link |
Registered User
Join Date: Mar 2004
Posts: 266
|
Usually, ac3 to ac3 encodings with besweet (and also with ffmpeg as i heard) has a problem, that resulting ac3 has low volume.
Has BeHappy same problem or does it manage this issue well?
__________________
Prodater64 |
![]() |
![]() |
![]() |
#16 | Link | |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Quote:
![]()
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
|
![]() |
![]() |
![]() |
#17 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
Hey! Now we can create more advanced DSP using Sox Audio Effect Filter !
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
![]() |
![]() |
![]() |
#18 | Link |
BeHappy/MeGUI developer
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
|
I need Your help!
2 All
Hi! You can help BeHappy project! I need: New DSP scripts - Dinamyc Range Compression e.t.c BeHappy logo & icons
__________________
BeHappy - AviSynth-based audio transcoding tool Audio encoding via AviSynth On2 VP7 is great in quality but it is unusable for long-term video backup puposes! Sincerely Yours, MCPD/MCTS |
![]() |
![]() |
![]() |
#19 | Link |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 7,169
|
Now BeHappy works Ok with wav header and without extrabytes at end.
I make a test with a source 5.1, 48 KHz (ac3) > 132 min. and BeHappy works Ok for wav > 4 GB and for a transcode to aac. Relevant info of input.ac3 Code:
SampleRate 0 : 48000 KHz. BitRate 15 : 448 Kb/s. Audio coding mode (acmod) 7 : 3/2 - L, C, R, SL, SR Low Frequency Effects channel 1 : Present FileSize : 444358656 bytes. Frames : 247968 Duration : 7934.976 seconds ( 2 h. 12 m. 14.976 s.) Code:
FileSize ....: 4570546220 RiffLength...: 4294967040 (= 0xFFFFFF00) Error: ... (always with > 4GB) NumChannels .: 6 SampleRate ..: 48000 OffsetData ..: 44 DataLength ..: 4294967040 (= 0xFFFFFF00) Warning: assumed Datalength = 4570546176 (FileSize - 44) Duration ...: 7934.976 sec., (2h. 12m. 14.976 s.) behappy.extension.encoder.nero7aac.exe -o "D:\...\132.mp4" -rr 48000 -rb 16 -rc 6 -vbr_streaming -aacprofile_he -codecquality_high Relevant info of output.mp4 (from Foobar2000 v0.8.3) Code:
bitrate = 191 samplerate = 48000 channels = 6 aac_profile = HE AAC codec = AAC tool = Nero AAC Codec 4.2.1.0 samples = 380878848 FileSize = 189,944,318 Bytes (181.15 MB) Length = 2:12:14.976 |
![]() |
![]() |
![]() |
#20 | Link |
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,985
|
What ideas do you have for the logo? (colors, style, some logos you like, etc.)
To buttress the Hun's suggestion: http://www.digitalprosound.com/Htm/S...ap2_Apogee.htm It deals with sample rate, not resolution but the concept still applies, expand to at 2x, preferably 4x, do the modifications, downsample.
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers |
![]() |
![]() |
![]() |
Tags |
behappy |
Thread Tools | Search this Thread |
Display Modes | |
|
|