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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > General > Audio encoding
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 9th July 2003, 03:32   #1  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
UpmiX: tool to automate stereo to 5.1 conversion (v0.71)

UpmiX has evolved into a tool to process many kinds of stereo audio into 5.1 AC3, MP4, or 6 wavs. See this post for information on the current version. The current download link is: http://dhost.info/kpex/UpmiXv0.71.zip (right click > save as)

Original post:
I'm not sure if this will be useful to anyone or not, but it's worth a shot.

I've put together a brief guide and AviSynth script that automates the upmixing process from stereo sound to 5.1 Dolby Digital using all freeware programs: AviSynth, BeSweet, SoX, & Nic's Call plugin. It's nothing very complex or technical [edit], it merely does some low- and high-pass filtering, normalization to different levels, and resampling. Input is any 2-channel wav file, output is a 448 kbps 5.1 DD 48000Hz AC3 file. This process was designed & tested on music, mostly hard rock or techno, but in theory could be used for movie soundtracks as well with some tweaking. This method doesn't do anything spectacular, but it is fully automated and really demonstrates the power and flexibility of AviSynth together with Call and BeSweet.

Feel free to post any comments, questions, suggestions, etc. Thanks to anyone who tries it.

Edit: Please see below for new method
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ

Last edited by KpeX; 21st May 2005 at 02:29.
KpeX is offline   Reply With Quote
Old 10th July 2003, 21:27   #2  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
If anyone's interested, I've uploaded a 25 second sample of a song encoded by this method, one sample of the encoded AC3, and one of the original 2 channel wav ripped by EAC and compressed for size purposes via lame --alt-preset standard. Get it here.
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ
KpeX is offline   Reply With Quote
Old 13th July 2003, 00:22   #3  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
@ kempfand:

Just to make sure i'm understanding you correctly: you modified the script for DTS encoding ? I'd be interested to see your changes if you don't mind posting the script. I was actually kind of hoping someone would come up with a DTS-script because I've never experimented with it. ( My amp doesn't decode DTS )

Edit: getting back to quality issues: I doubt this method will be very comparable to EoH's method, post length would be the first clue However I like it because it's automated and it works well for music: It produces a similar sound in all channels, based on what ranges/volumes those channels are suited for.
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ

Last edited by KpeX; 13th July 2003 at 00:31.
KpeX is offline   Reply With Quote
Old 13th July 2003, 21:14   #4  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
Very cool, Andreas. It's also nice to see BeSweet back in active development. I've also come up with a semi-automated method for encoding CDs: EAC --> 5.1 DD, if anyone is interested let me know and I'll post it. Filenaming is not automated, however, one still has to type in the filename at the end of each encoded track.
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ
KpeX is offline   Reply With Quote
Old 13th July 2003, 23:34   #5  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
Exact Audio Copy --> AC3

Well, here it is, my somewhat-automated method to encode AC3 right from EAC ( Exact Audio Copy ), the best CD ripper out there. If you tried my other AC3 encoding script, this is pretty similar. Here are the steps:

Requirements
============
1. Latest BeSweet beta and dll's.
2. AVS2AVI CLI encoding tool.
3. AviSynth 2.5x.
4. Nic's excellent Call plugin
5. Sox CLI audio tool




1. Download EncodeAC3v0.2.zip (Right-click - save target as)

2. Unpack the contents to the same directory as you have the latest BeSweet beta, including the latest ac3enc.dll. Also put sox.exe, call_25.dll, and avs2avi.exe in the same directory.

3. Configure EAC: Set EAC options to save files in the directory mentioned in #2 as shown hereand set the compression with the path to the EAC_to_AC3.bat included in the zip file as shown here.

4. Highlight the tracks you want encoded, and click the 'MP3' button in EAC. Each time a track is compressed, the compression will pause ( Please press any key to continue... ) at this time you can rename the file to its correct name, the .AC3 file will be in the working directory and have the name 'DolbyDigital5.1Audio.ac3'.

Notes: Make sure you don't have any other .wav files in the directory being used. This probably isn't the cleanest way to encode AC3, but it's nearly automated and hopefully will be useful. As usual, thanks to anyone who tests this method, and feel free to post any comments and suggestions or other experiences. Hope this helps,
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ

Last edited by KpeX; 13th July 2003 at 23:39.
KpeX is offline   Reply With Quote
Old 14th July 2003, 16:59   #6  |  Link
VidHack
Registered User
 
Join Date: Dec 2002
Posts: 117
KpeX

Hello,

I downloaded your tools a few days ago, and last night I played around with it. I used the P4 modified VirtualDub 1.5.1 to encode the .AVS, it appears that you have changed to a new App? The AVS2AVI CLI encoding tool? If so, please update your website. This is a very interesting idea you have going here. Being able to encode to 5.1 or DTS has some possibilities. I am pondering a GUI written in VB if I get some time. I will probably use some "AppActivate/SendKeys" to hook the apps, but what I want to do is add Slider Controls to the EQ variables, to be able to modify them on the fly, to get different setups easily and also to add a Automatic Output file naming routine. I will post the app if I get around to it. I am following this thread eagerly and hope many jump on board with this idea. Perhaps merging some of this idea with the "Virtual Microphone 5.1" idea may be possible. Hey you should give this project a name, like the "Kpexer Project" or something and a Version number, so we can track and improve it. Thanks for your work.

VidHack
__________________
VidHack
VidHack is offline   Reply With Quote
Old 14th July 2003, 21:25   #7  |  Link
VidHack
Registered User
 
Join Date: Dec 2002
Posts: 117
KpeX

Messed around with your new encoding method. I originally downloaded your tools a few days ago. I was using VirtualDub and BeSweet Version 15b18 with an older AC3enc.dll (v0.21) - All was fine.

So, I downloaded this new way, using avs2avi (CLI), got the newest BeSweet 15b19, and fired it up. Well BeSweet spit out errors on every pass. I need to add the -log option to get some debugging going, but I figured you would want to know.

Also, added the -q option to your EACtoAC3.bat, and remmed out the 'Pause' (speeds everything up.

VidHack
__________________
VidHack
VidHack is offline   Reply With Quote
Old 14th July 2003, 23:38   #8  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
@ Vidhack

1. Thanx for testing

2. It doesn't matter what you use to encode the AVS script. AVS2AVI was just what i used for the EAC guide because it was easier to call in a batch file. Perhaps I should clarify that there are two methods for this, encoding individual scripts or using the EAC batch file.

3. The 'pause' in the script is for renaming of the file (i.e. artist - trackname ) if it isn't renamed, it will be overwritten by the next file. This is one of the limitations of this method, it's more of a quick and dirty solution than anything else. What effect does -q have? I'm not familiar with that.

4. The two zip files I already uploaded are numbered (v0.1 and 0.2)

5. I hadn't really considered giving this an 'official' project name or actually licensing/releasing it, because it isn't really a program, it's just an AviSynth script that calls BeSweet, I'm no programmer, but feel free to base an actual tool off of any of these scripts/concepts.

6. Your conceived app sounds great, please do post if you code it.

7. I will update my site soon with the EAC guide, reflecting my previous post.

8. Edit: forgot, about your besweet problems, I upgraded to b19 with no problems.....did you make sure to put ac3enc.dll in the directory? what is the nature of the error messages? aside from that, yes a logfile might help.
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ

Last edited by KpeX; 14th July 2003 at 23:46.
KpeX is offline   Reply With Quote
Old 15th July 2003, 01:51   #9  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
Update: Html EAC to AC3 guide is now on my site. Thanks to anyone who tests, when having problems, make sure you are following the guide correctly, and post the exact error message and where it occurs. Hope this is helpful,
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ
KpeX is offline   Reply With Quote
Old 24th July 2003, 05:00   #10  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
v0.3: Fully Automated encoding

New scripting method, now uses batch file rather than avs script, it is now much cleaner and more efficient, and is now fully automated with automatic file naming. Basically just download my latest zip archive and see here for specific EAC configuration options. I threw the guide together rather quickly so feel free to post any problems/questions.

Edit: Almost forgot: if you just want to encode a stereo wav and not rip with EAC, just use the batch file from command line:

Encode.bat "path\infile.wav" "path\outfile.ac3"


Thanks to any and all who test, HTH,
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ

Last edited by KpeX; 24th July 2003 at 05:11.
KpeX is offline   Reply With Quote
Old 24th July 2003, 19:18   #11  |  Link
Eye of Horus
Banned
 
Eye of Horus's Avatar
 
Join Date: Jun 2002
Location: The Netherlands
Posts: 326
Re: v0.3: Fully Automated encoding

Quote:
Originally posted by KpeX
New scripting method, now uses batch file rather than avs script, it is now much cleaner and more efficient, and is now fully automated with automatic file naming. Basically just download my latest zip archive and see here for specific EAC configuration options. I threw the guide together rather quickly so feel free to post any problems/questions.

Edit: Almost forgot: if you just want to encode a stereo wav and not rip with EAC, just use the batch file from command line:

Encode.bat "path\infile.wav" "path\outfile.ac3"


Thanks to any and all who test, HTH,
I edited the paths in the convert.bat.
And tried it with a tereo 44.1/16 file.
During the process it makes (as expected) the temporary files. Each is about 40 MB. It then starts Sox and when it's all finished I end up with an emty AC3... ?

Problem is I cannot find what I'm doing wrong.

The posting of Kempand's example on Usenet : I liked the effect a lot, but got the impression that the LFE channel has some distortion compared to other versions of the same album....


kind regards,
EoH
Eye of Horus is offline   Reply With Quote
Old 24th July 2003, 19:20   #12  |  Link
Eye of Horus
Banned
 
Eye of Horus's Avatar
 
Join Date: Jun 2002
Location: The Netherlands
Posts: 326
Quote:
Originally posted by KpeX
Update: Html EAC to AC3 guide is now on my site. Thanks to anyone who tests, when having problems, make sure you are following the guide correctly, and post the exact error message and where it occurs. Hope this is helpful,
Just wanted to mention : your website stays black in my browser !
(MS IE 6 on Win 2K sp 3).

Only after selecting all the text, I'm able to read it.....

kind regards,

EoH
Eye of Horus is offline   Reply With Quote
Old 24th July 2003, 21:12   #13  |  Link
Eye of Horus
Banned
 
Eye of Horus's Avatar
 
Join Date: Jun 2002
Location: The Netherlands
Posts: 326
Quote:
Originally posted by kempfand
EoH: Modify the script to see where the error occors.

I.e. take out the 'del %workingdir%....'. Do you still have the channel1.wav-channel6.wav ?

If yes, something with besweet -ac3enc ( -b 448 ) is wrong.

Regarding AC3: I never went this route, since dts gives better sound (i.e. I feeded the channelxyz.wav's into SurCode CD). I have no LFE speaker, so didn't notice distortions ...

Also: add '-logfilea BeSweet.log' so we can see where things go wrong.

Kind regards,

Andreas
Hi Andreas,

I did and ended with the channel 1 to 6 WAV's.
Downsampled (the save as in SF) to 44.100/16 and had no problem encoding them with DTS Encoder.

I'll do it again with the logfile and add it here, but I must mention two things from extensive listening that it a. lacks a bit clarity (Could that be because work is done directly on the 16 bit Wav's. Remember the notes from the Aurora writer about 32 bits ?) b. there's still the distortion in the LFE. It's difficult to describe. But it doesn't sound clean ! It looks like something is giving resonance within the sound itself. I do not quite understand myself what I'm writing now !!! LOL !!

But there definitely is potential in this method !

EoH
Eye of Horus is offline   Reply With Quote
Old 24th July 2003, 21:26   #14  |  Link
Eye of Horus
Banned
 
Eye of Horus's Avatar
 
Join Date: Jun 2002
Location: The Netherlands
Posts: 326
Quote:
Originally posted by Eye of Horus
Hi Andreas,

I did and ended with the channel 1 to 6 WAV's.
Downsampled (the save as in SF) to 44.100/16 and had no problem encoding them with DTS Encoder.

I'll do it again with the logfile and add it here, but I must mention two things from extensive listening that it a. lacks a bit clarity (Could that be because work is done directly on the 16 bit Wav's. Remember the notes from the Aurora writer about 32 bits ?) b. there's still the distortion in the LFE. It's difficult to describe. But it doesn't sound clean ! It looks like something is giving resonance within the sound itself. I do not quite understand myself what I'm writing now !!! LOL !!

But there definitely is potential in this method !

EoH
Here is the logfile :

Error 59: Failed to sync to payload's start position : "e:\encodeac3v0.3\ac3.mux"BeSweet v1.4 by DSPguru.
--------------------------
Using hip.dll v1.13 by Myers Carpenter <myers@users.sf.net>
Using AC3enc.dll v0.2 by Gerard Lantau & Dg (http://ffmpeg.org).

Logging start : 07/24/03 , 22:22:25.

e:\encodeac3v0.3\besweet.exe -core ( -input e:\encodeac3v0.3\ac3.mux -logfilea BeSweet.log -output 01.ac3 -6ch ) -ota ( -d 1800 ) -ac3enc ( -b 448 )

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : e:\encodeac3v0.3\ac3.mux
[00:00:00:000] | Output: 01.ac3
[00:00:00:000] | Floating-Point Process: No
[00:00:01:800] | Source Sample-Rate: 48.0KHz
[00:00:01:800] +------- AC3ENC ------
[00:00:01:800] | Bitrate method : CBR
[00:00:01:800] | AC3 bitrate : 448
[00:00:01:800] | Channels Mode : 2.0
[00:00:01:800] | Error Protection: Yes
[00:00:01:800] +---------------------
Error 32: No input-data was found (wrong substream?)
Quiting...
[00:00:01:800] Conversion Completed !
Logging ends : 07/24/03 , 22:22:25.

So it doesn't find the mux.ac3 as inputfile.
But it IS there and this is its content :

e:\encodeac3v0.3\channel1.wav
e:\encodeac3v0.3\channel2.wav
e:\encodeac3v0.3\channel3.wav
e:\encodeac3v0.3\channel4.wav
e:\encodeac3v0.3\channel5.wav
e:\encodeac3v0.3\channel6.wav

regards,

EoH
Eye of Horus is offline   Reply With Quote
Old 24th July 2003, 21:30   #15  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
@ EoH and kempfand: Thanks very much for the kind words, testing, and reports.

@ EoH:

1. About my website, I'll look into that. I use mozilla firebird so maybe I should see what happens with IE. I'm very new to handcoding HTML so I appreciate the feedback.

2. As far as the resampling, the only reason I include it in the script is an AC3 must be 48000 Hz to playback over the S/PDIF of my soundcard. If it is not necessary, yes by all means remove it from the script.

3. Editing probably should be done on 32 bit wav's ideally, but that would make things more complicated and not as easy to automate.

4. I'll look more into the LFE channel issue. What type of sound/music do you notice the effect on ?

5. Edit: Just noticed your last post. Does the same thing happen with the latest beta of BeSweet (1.5b19) ? Are the individual .wav's okay ?
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ

Last edited by KpeX; 24th July 2003 at 21:33.
KpeX is offline   Reply With Quote
Old 24th July 2003, 22:37   #16  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
A little OT, but my site and ac3 guide should now work with IE. Mozilla/Firebird is still better though :P. So much to learn about CSS and HTML...
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ
KpeX is offline   Reply With Quote
Old 24th July 2003, 23:09   #17  |  Link
kempfand
Registered User
 
kempfand's Avatar
 
Join Date: Oct 2001
Location: Switzerland
Posts: 225
@ EoH:
- Try using BeSweet v1.5b19. Earlier versions of BeSweet need a 7-line mux-file to work corretly (but this 'trick' is no longer needed with the latest BeSweet).

@ KpeX: Doing the editing at 32 bit is definitely the best way to go. EoH did some extensive testing, and we also found some threats in other boards about that subject (don't have the link handy, but I posted it in EoH's Ambisonics threat).

If we can improve the LFE, it would be great to keep it in mind (could do a 'manual' test-run on a couple of songs, for comparison; if we all feel the output is better, then trying to automate the editing @ 48 kHz could we worth the effort).

Kind regards,

Andreas
kempfand is offline   Reply With Quote
Old 24th July 2003, 23:28   #18  |  Link
KpeX
Registered User
 
KpeX's Avatar
 
Join Date: Jun 2003
Location: Great Lakes, USA
Posts: 1,433
@kempfand

I was thinking of the older mux file bug as well, but that shouldn't cause BeSweet to crash - hopefully b19 will solve EoH's problem.

I don't think this type of editing will have a audible difference at 16 or 32 bits. I will test and upload a sample. I will probably have to edit with Audacity or something similar unless you can suggest a better method for editing @ 32 bits.

I'm working on improving the LFE channel. If you could post more specifically what improvements you would like to hear, that would help greatly. Regards,
__________________
KpeX
Audio FAQs: General | BeSweet | SVCD/MP2 | MP3 | Vorbis | AC3 | DTS | AAC
Linux Audio/Video FAQ
KpeX is offline   Reply With Quote
Old 25th July 2003, 04:43   #19  |  Link
Eye of Horus
Banned
 
Eye of Horus's Avatar
 
Join Date: Jun 2002
Location: The Netherlands
Posts: 326
Quote:
Originally posted by KpeX
A little OT, but my site and ac3 guide should now work with IE. Mozilla/Firebird is still better though :P. So much to learn about CSS and HTML...
Yep.......works !!

(BTW Hope the moderator doesn't see this as a shameless plug : push
the button here with my homepage. It's completely made in Notepad...)

regards,

EoH
Eye of Horus is offline   Reply With Quote
Old 25th July 2003, 04:54   #20  |  Link
Eye of Horus
Banned
 
Eye of Horus's Avatar
 
Join Date: Jun 2002
Location: The Netherlands
Posts: 326
Quote:
Originally posted by KpeX
@kempfand

I was thinking of the older mux file bug as well, but that shouldn't cause BeSweet to crash - hopefully b19 will solve EoH's problem.

I don't think this type of editing will have a audible difference at 16 or 32 bits. I will test and upload a sample. I will probably have to edit with Audacity or something similar unless you can suggest a better method for editing @ 32 bits.

I'm working on improving the LFE channel. If you could post more specifically what improvements you would like to hear, that would help greatly. Regards,
About the editing at 32 bits : read the comments in the link Kempfand suggested. It's from the guy who wrote the Aurora tools for Cooledit.
And yes : you will hear the difference.
I did a lot of testing on this in cooledit , with and without the Aurora plugins. Of course I cannot tell if it will make a difference in your method, but it could be worth the effort !


About the LFE : as I said before : it's difficult for me to describe the distortion. I loaded the LFE in SF 6 to analyze. Perhaps the crossover at 300 Hz has anything to do with it. (I'm not technical, but perhaps lowering that to 200 Hz will improve ?)

Music I tried it on : Kempfand's PF posts and I tried a few tracks from the French group Era.....

Later today I will look for a piece of music with a clean bass in stereo and try that....

EoH

Last edited by Eye of Horus; 25th July 2003 at 04:57.
Eye of Horus is offline   Reply With Quote
Reply


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 13:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.