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 > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd November 2007, 13:03   #841  |  Link
wisodev
Registered User
 
Join Date: Nov 2006
Posts: 161
Quote:
Originally Posted by tebasuna51 View Post
I don't know if Aften go to support mux files, if so then the default format must be compatible with Aften adding only support to import ansi-BeSweet format.

If Aften don't support mux files, only sintax based in monowav's, I think we don't need another format.

BTW the conversion betwen ansi and Unicode formats are easy with Notepad.
If Aften will support mux files than WAV to AC3 Encoder will support this format as its default.

The *.files format is simply plain list of files (including paths) so there is no need for new format I used the *.files files for loading and saving contents of files list.

I have no problem with conversion, it is very easy to convert text files between ansi/unicode and unicode/ansi using windows API.
wisodev is offline   Reply With Quote
Old 23rd November 2007, 04:18   #842  |  Link
xbox360
Registered User
 
xbox360's Avatar
 
Join Date: Aug 2006
Location: Region 3 with NDS Encryption
Posts: 355
Quote:
Originally Posted by tebasuna51 View Post
Aften r618 have a different command line syntax (to include monowav's encode):
Code:
usage: aften [options] <input.wav> [<input.wav> ...] -o <output.ac3>
Then the GUI's need be modified, be patient.

Edit: also r618 can't work with BeHappy, BeLight and syntax with Foobar need to be modified.
Can you provide a full working syntax sample for 6 mono wav's to 5.1 ac3 with EX mode enabled please, thank you.

Last edited by xbox360; 23rd November 2007 at 04:25.
xbox360 is offline   Reply With Quote
Old 23rd November 2007, 09:50   #843  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,914
Quote:
Originally Posted by xbox360 View Post
Can you provide a full working syntax sample for 6 mono wav's to 5.1 ac3 with EX mode enabled please, thank you.
- Warning 1: aften r618 from Kurtnoise was a test, the definitive syntax for multimono input isn't implemented yet in official svn releases (at least until r641 from wisodev).

- Warning 2: Dolby Surround EX encoded (-xbsi2 1 -dsurexmod 2) have sense if you have previously encoded the Back Center channel inside the Back Left, Back Right wav files.

Then, if you have the Kurtnoise r618, this work for me:
Code:
aftenK618 -xbsi2 1 -dsurexmod 2 e:\FL.wav e:\FR.wav e:\C.wav e:\LFE.wav e:\BL.wav e:\BR.wav -o e:\outEX.ac3
tebasuna51 is offline   Reply With Quote
Old 28th November 2007, 20:31   #844  |  Link
DarkAvenger
HeadAC3he coder
 
DarkAvenger's Avatar
 
Join Date: Oct 2001
Posts: 413
I added C# binding for Aften and would like to get some feedback. Here is a short working example, which I described in the "API C#.txt". Beware that Mono crashes, I hope 1.2.6 gets a fix, but till now I got now reaction on my report.

Code:
using System;
using System.IO;
using Aften;

namespace AftenTest
{
	public class Test
	{
		public static int Main( string[] args )
		{
			Console.WriteLine( "Aften AC3 Encoding Demo" );
			if ( args.Length != 2 ) {
				Console.WriteLine(
					"Usage: " + Path.GetFileNameWithoutExtension( Environment.CommandLine )
					 + " <input.wav> <output.ac3>" );

				return -1;
			}
			EncodingContext context = FrameEncoder.GetDefaultsContext();
			context.Channels = 2;
			context.SampleRate = 44100;
			context.AudioCodingMode = AudioCodingMode.Stereo;
			context.HasLfe = false;
			
			using ( FrameEncoder encoder = new FrameEncoderInt16( ref context ) ) {
				encoder.FrameEncoded += new EventHandler<FrameEventArgs>( encoder_FrameEncoded );
	
				using ( FileStream inputStream = new FileStream( args[0], FileMode.Open ) )
				using ( FileStream outputStream = new FileStream( args[1], FileMode.Create ) ) {
					inputStream.Seek( 44, SeekOrigin.Begin ); // Skip WAVE header...
					encoder.EncodeAndFlush( inputStream, outputStream );
				}
			}
			Console.WriteLine( "Done" );
			Console.ReadLine();
			return 0;
		}

		private static void encoder_FrameEncoded( object sender, FrameEventArgs e )
		{
			if ( e.FrameNumber % 100 == 1 )
				Console.WriteLine(
					"Frame: " + e.FrameNumber + "  Size: " + e.Size + "  Quality: " + e.Status.Quality );
		}
	}
}

Last edited by DarkAvenger; 28th November 2007 at 20:35.
DarkAvenger is offline   Reply With Quote
Old 28th November 2007, 20:51   #845  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
you want some feedback with Mono, .Net or both ?
Kurtnoise is offline   Reply With Quote
Old 28th November 2007, 21:45   #846  |  Link
DarkAvenger
HeadAC3he coder
 
DarkAvenger's Avatar
 
Join Date: Oct 2001
Posts: 413
Well, Mono won't work currently. I am more interested about what people think should be added to the Aften C# API or changed or whatever.
DarkAvenger is offline   Reply With Quote
Old 29th November 2007, 09:54   #847  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
I'll look more carefully at the API this weekend but my first attempt with .Net doesn't seem to work either.

Quote:
D:\Users\lionel\Documents\Visual Studio 2008\Projects\AftenSharp\AftenTest\bin\R
elease>AftenTest.exe "D:\Music\Rock el Casbah.wav" "D:\Music\Aften_csharp_t1
.ac3"
Aften AC3 Encoding Demo

Unhandled Exception: System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other memory is corrupt.
at Aften.FrameEncoder.aften_encode_init(EncodingContext& context)
at Aften.FrameEncoder`1..ctor(EncodingContext& context, EncodeFrameDelegate e
ncodeFrame, ToTSampleDelegate toTSample, A52SampleFormat sampleFormat) in D:\Use
rs\lionel\Documents\Visual Studio 2008\Projects\AftenSharp\AftenSharp\FrameEncod
er.cs:line 533
at Aften.FrameEncoderInt16..ctor(EncodingContext& context) in D:\Users\lionel
\Documents\Visual Studio 2008\Projects\AftenSharp\AftenSharp\FrameEncoder.cs:lin
e 696
at AftenTest.Program.Main(String[] args) in D:\Users\lionel\Documents\Visual
Studio 2008\Projects\AftenSharp\AftenTest\Program.cs:line 30

D:\Users\lionel\Documents\Visual Studio 2008\Projects\AftenSharp\AftenTest\bin\R
elease>
compilation is fine though...
Kurtnoise is offline   Reply With Quote
Old 29th November 2007, 18:10   #848  |  Link
DarkAvenger
HeadAC3he coder
 
DarkAvenger's Avatar
 
Join Date: Oct 2001
Posts: 413
Hmm, which aften.dll (C library) do you have? You need a new enough svn snapshot.

[Edit] Please try to use cmake 2.5 nightly build in conjunction with Visual Studio 2008 generator (as I see you are using VS2k8) or use stable cmake with nmake generator. The generated AftenSharp.dll + aften.dll worked for me.

[Edit2] I commited a work-around for Mono. I succesfully tested the C# bindings in Linux x86_64 with Mono 1.2.6pre2.

Last edited by DarkAvenger; 30th November 2007 at 18:46.
DarkAvenger is offline   Reply With Quote
Old 30th November 2007, 02:57   #849  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Multiple input file support is now part of Aften SVN. Below is a snippet from the commandline help that shows how to use the new options.

Code:
    [-ch_X file]   Add a mono file to the input list as the channel specified
                       These parameters are used to specify multiple mono
                       source files instead of a single multi-channel source
                       file.  Only valid AC-3 combinations are allow.  The
                       acmod, lfe, chconfig, and chmap parameters are all
                       ignored if multi-mono inputs are used.
                       ch_fl  = Front Left
                       ch_fc  = Front Center
                       ch_fr  = Front Right
                       ch_sl  = Surround Left
                       ch_s   = Surround
                       ch_sr  = Surround Right
                       ch_m1  = Dual Mono Channel 1
                       ch_m2  = Dual Mono Channel 2
                       ch_lfe = LFE
jruggle is offline   Reply With Quote
Old 30th November 2007, 03:35   #850  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,914
Thanks Justin, is a good solution.
tebasuna51 is offline   Reply With Quote
Old 30th November 2007, 16:44   #851  |  Link
wisodev
Registered User
 
Join Date: Nov 2006
Posts: 161
Quote:
Originally Posted by jruggle View Post
Multiple input file support is now part of Aften SVN. Below is a snippet from the commandline help that shows how to use the new options.

Code:
    [-ch_X file]   Add a mono file to the input list as the channel specified
                       These parameters are used to specify multiple mono
                       source files instead of a single multi-channel source
                       file.  Only valid AC-3 combinations are allow.  The
                       acmod, lfe, chconfig, and chmap parameters are all
                       ignored if multi-mono inputs are used.
                       ch_fl  = Front Left
                       ch_fc  = Front Center
                       ch_fr  = Front Right
                       ch_sl  = Surround Left
                       ch_s   = Surround
                       ch_sr  = Surround Right
                       ch_m1  = Dual Mono Channel 1
                       ch_m2  = Dual Mono Channel 2
                       ch_lfe = LFE
Updated Aften binaries (revision 683) are available for download here or here.
wisodev is offline   Reply With Quote
Old 30th November 2007, 21:19   #852  |  Link
Yobbo
Registered User
 
Join Date: Dec 2004
Posts: 145
Wisodev, thank you for your ongoing development!
Yobbo is offline   Reply With Quote
Old 1st December 2007, 19:48   #853  |  Link
MacAddict
XviD User
 
Join Date: Oct 2004
Location: Ky
Posts: 190
Outstanding job on Aften and the GUI guys. Many thanks to all of you. It's amazing how fast it is on my Opteron using 2 threads!
__________________
DFI NF4 SLI Expert | Opteron 165 CCBBE 0616 XPMW (9x325HTT=2.9Ghz) | 2x1GB G.Skill HZ (3-4-4-8-12-16-2T) | LG 62L DVD/CD | Geforce 7300GT | All SATA | Antec 650 Trio PSU | XP SP2
MacAddict is offline   Reply With Quote
Old 2nd December 2007, 20:33   #854  |  Link
G_M_C
Registered User
 
Join Date: Feb 2006
Posts: 1,076
It there an ETA for the new GUI; Especially the one with support for 6 seperate WAV's as input (" Multiple input file support ") ?

/me has a project waiting
G_M_C is offline   Reply With Quote
Old 3rd December 2007, 00:45   #855  |  Link
wisodev
Registered User
 
Join Date: Nov 2006
Posts: 161
Quote:
Originally Posted by G_M_C View Post
It there an ETA for the new GUI; Especially the one with support for 6 seperate WAV's as input (" Multiple input file support ") ?

/me has a project waiting
Pretty soon but I have made so many changes in the code of EncWAVtoEC3 so I need to do lot of testing. So please be patient and in few days will be released new version.

Thanks,
wisodev
wisodev is offline   Reply With Quote
Old 3rd December 2007, 03:52   #856  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
I need someone with better ears than me to test Aften r699 to hear for any quality changes. The audio should theoretically sound better now for the same bitrate, but my ears can't tell the difference. By the same token, VBR should theoretically give a lower bitrate and have the same quality when using the same "-q" value as compared with previous versions.

Edit: I found a sample where I can tell a slight difference. I still want lots of feedback though.

Last edited by jruggle; 3rd December 2007 at 04:27.
jruggle is offline   Reply With Quote
Old 3rd December 2007, 10:59   #857  |  Link
G_M_C
Registered User
 
Join Date: Feb 2006
Posts: 1,076
Im a bit confused;
When encoding DVD for DVD's, and keeping to the "official" standards; 448kbps should be max as i remember. But what bitdepth was that again ? Atm i use these settings as my rule-of-thumb;

192: 2-channel, 16 bits / 48 khz
224: 2-channel, 20 bits /48 khz
384: 5.1-channels, 16 bits / 48 khz
448: 5.1 channels, 20 bits / 48 khz

640 is also possible, although my version of DVD-lab pro doesnt seem to "work with it". I would encode that as 24 bits / 48 khz.

Are there "standards" somewhat ok ?
G_M_C is offline   Reply With Quote
Old 3rd December 2007, 11:19   #858  |  Link
nautilus7
Registered User
 
nautilus7's Avatar
 
Join Date: Jan 2006
Location: Athens, Greece
Posts: 1,518
AC-3 doesn't understand bitdepth. These values you 're talking about don't have any meaning for it. Only bitrate and i think sample rate have a meaning.

Last edited by nautilus7; 3rd December 2007 at 11:22.
nautilus7 is offline   Reply With Quote
Old 3rd December 2007, 11:53   #859  |  Link
G_M_C
Registered User
 
Join Date: Feb 2006
Posts: 1,076
Quote:
Originally Posted by nautilus7 View Post
AC-3 doesn't understand bitdepth. These values you 're talking about don't have any meaning for it. Only bitrate and i think sample rate have a meaning.


That would explain why i didnt find anything about that
G_M_C is offline   Reply With Quote
Old 3rd December 2007, 12:55   #860  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,779
Extremely simplified:

The AC-3 encoder converts the incoming samples (similar to MP3) into a frequency spectrum, and stores the (according to the psychoacustic model) most important frequency factors as floating-point values.

The less bitrate you allow, the less frequency factors can be kept as "important". A too low bitrate results in an incompletely restored frequency spectrum while decoding - so the result is rather a less accurate sound/tone (spectrum related) than a less accurate sample value (volume related).

If you allow enough bitrate, AC-3 has the potential to store even a higher resolution and dynamic than dts (in some more or less academic cases); do not expect to exhaust the AC-3 technology with integer PCM audio sources, professional audio studios are able to feed floating-point sample data.
__

The AC-3 (A/52) standard allows 640 kbps AC3. But the DVD-Video standard limits it to 448 kbps for DVD audio streams. Therefore, even some AC-3 decoders in cheap DVD players or homecinema sets are not able to decode AC-3 audio beyond 448 kbps.

Last edited by LigH; 3rd December 2007 at 12:59.
LigH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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:18.


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