View Full Version : AC3 encode from commandline ?
Eye of Horus
3rd August 2003, 15:31
blabla
Eye of Horus
3rd August 2003, 23:27
blabla
nuked
23rd August 2003, 20:18
Did you ever figure out how to do this? I saw where softencode says it should do it, but I haven't tried yet. You have any luck?
Eye of Horus
23rd August 2003, 23:42
blabla
vmesquita
8th October 2003, 03:38
Thanks to a DSP guru tip pointing to a Eye of hours Post (http://forum.doom9.org/showthread.php?s=&threadid=60137&perpage=31&pagenumber=2), I just realized this is possible. Try Sftencdd.exe -help to get the options.
There's a great explanation in this thread http://www.dvdrhelp.com/forum/archive/t161413.html
which I transcript below:
Here's my semi automated solution:
Assumptions
Input file is 48khz wav file. The Program only accepts .wav file input, it's not very good at re-sampling the khz either, SSRC is better suited for that task.
I use three files for my batch setup:
-----------
svcd.ini - Stores settings for use by encoder.
Contents of file:
:
[Parameters]
DataRate=224
SampleRate=0
UseLFE=Off
CodeMode=2
BSMode=0
DlgNorm=-27 dB
DolbySurround=0
CopyRight=On
Original=On
CompressionType=1
Deemphasis=Off
DCFilter=On
BandWidthFilter=On
RFCmpInUse=On
-----------
svcd.bat - Batch file that accepts two paramters, the source wav file name (%1) and the target ac3 file name (%2). This batch file executes the encoder in a silent mode.
Contents of file:
:
Sftencdd.exe -A -P C:\program files\Sonic Foundry Soft Encode\svcd.ini -o %2 -L %1 -R %1 -N
Notes:
Notice that the path/file name value following the -P parameter doesn't have quotes around it. The application will not work properly if quotes surround this parameter.
-A: tells the application to run in a silent command line mode.
-P: and the value following the parameter tells the application to use the settings stored in the specified ini file for some of the encoder options.
-o: and the value following the parameter specifies the name of the output file.
-L: and the value following the parameter specifies the name of the input file for the left channel.
-R: and the value following the parameter specifies the name of the input file for the right channel.
-N: specifies to store the AC-3 file in non-Intel byte order
-----------
batchenc.bat - Batch file used to process several input files at once.
Contents of file:
:
call svcd.bat P:\DVDOut\VIDEO_TS\VTS_01_1.wav P:\DVDOut\VIDEO_TS\VTS_01_1.ac3
call svcd.bat P:\DVDOut\VIDEO_TS\VTS_02_1.wav P:\DVDOut\VIDEO_TS\VTS_02_1.ac3
call svcd.bat P:\DVDOut\VIDEO_TS\VTS_03_1.wav P:\DVDOut\VIDEO_TS\VTS_03_1.ac3
call svcd.bat P:\DVDOut\VIDEO_TS\VTS_04_1.wav P:\DVDOut\VIDEO_TS\VTS_04_1.ac3
call svcd.bat P:\DVDOut\VIDEO_TS\VTS_05_1.wav P:\DVDOut\VIDEO_TS\VTS_05_1.ac3
call svcd.bat P:\DVDOut\VIDEO_TS\VTS_06_1.wav P:\DVDOut\VIDEO_TS\VTS_06_1.ac3
Notes:
Notice that the path/file name for the two parameters don't have quotes around them. The application will not work properly if quotes surround the parameters.
And this is the standard -help output:
Sonic Foundry Sonic Foundry Soft Encode - Dolby Digital 5.1
-A -o <outputfile> -L <left> -R <right> -C <center> -l <sleft> -r <sright> -e <LFE>
-A Auto Encode
-o Output file encoded
-L Left channel file
-C Center channel file
-R Right channel file
-l Left surround channel file
-r Right surround channel file
-e LFE channel file
-O<channel> to -5<channel> Set channel of given file
e.g. -2L (use second channel of left file)
-c Audio coding mode (default 7 = 3/2 mode)
0 = 1+1 (L, R)
1 = 1/0 (C)
2 = 2/0 (L, R)
3 = 3/0 (L, C, R)
4 = 2/1 (L, R, l)
5 = 3/1 (L, C, R, l)
6 = 2/2 (L, R, l, r)
7 = 3/2 (L, C, R, l, r)
-cr RF overmodulation protection on/off (default 1 = on)
0 = off
1 = on
-f Frame size code (default 14 = 384 kbps)
0 = 32 kbps 7 = 112 kbps 14 = 384 kbps
1 = 40 kbps 8 = 128 kbps 15 = 448 kbps
2 = 48 kbps 9 = 160 kbps 16 = 512 kbps
3 = 56 kbps 10 = 192 kbps 17 = 576 kbps
4 = 64 kbps 11 = 224 kbps 18 = 640 kbps
5 = 80 kbps 12 = 256 kbps
6 = 96 kbps 13 = 320 kbps
-g LFE filter flag (default enabled)
-j DC filter flag (default disabled)
-k Compression characteristic (0..5) (default 0 = off)
0 = no compression
1 = film standard compression
2 = film light compression
3 = music standard compression
4 = music light compression
5 = speech compression
-F Low frequency effects channel on/off (default 1 = on)
-m Perform digital deemphasis (default disabled)
-s Sample rate code (default 0 = 48 kHz)
0 = 48 kHz
1 = 44.1 kHz
2 = 32 kHz
-w Bandwidth filter flag (default disabled)
-9 90 deg phase shift surrounds (default disabled)
-$ Enable 3 dB surround attenuation (default disabled)
-N Store in non-Intel byte order (default 0 = off)
-T Time stamp frames starting at 00:00 (default 0 = off)
Enjoy!
[]'s
VMesquita
Stabmaster-Arson
19th April 2004, 00:34
please help out a brother. I tried encoding using this exact comandline. My current path is c:\sonic
from here:
Help a brother out here please. I made an ini file with same information. Whenever softencode runs it deletes everything in the ini file and crashes almost immediately. (About 5 seconds or so) resulting in an 884K bunk ac3 file.
If I set the ini file to read only it does not delete the contents, but it still does not work.
here is my commandline
sftencdd.exe -A -P c:\sonic\softenc.ini -o c:\test.ac3 -L g:\tpb\1.wav -R g:\tpb\1.wav
And here is my ini file in c:\sonic
[Parameters]
DataRate=224
SampleRate=0
UseLFE=Off
CodeMode=2
BSMode=0
DlgNorm=-27 dB
DolbySurround=0
CopyRight=On
Original=On
CompressionType=1
Deemphasis=Off
DCFilter=On
BandWidthFilter=On
RFCmpInUse=On
What is wrong here? the encode fails just as soon as it estimates the time remaining.
1.wav is a stereo, 16-bit, 48 000 hz audio file
I process ALOT of wav files for dvd and would very much love to get the batch process working. I read the howto at doom9 here and dvdrhelp.com (the threads linked to each other with the same info) Also note the paths I have in my comand are all correct, this is wher the wav files are.
Matthew
19th April 2004, 00:49
Maybe the order of the parameters? This one is fine for me...
[Parameters]
DataRate=224
CodeMode=2
BSMode=0
DlgNorm=26
SampleRate=0
UseLFE=Off
Cmix=0
SurMix=0
DolbySurround=0
CopyRight=On
Original=On
RoomType=2
MixLevel=26
Deemphasis=Off
DCFilter=On
BandWidthFilter=On
LFEFilter=Off
Phase90=Off
Cut3dB=Off
CompressiOnType=1
RFCmpInUse=On
NOnIntel=Off
TimeStamp=On
ADLANCAS
12th July 2004, 02:35
Iīm using SoftEncode 1.0 build 19.
My commandline is:
Sftencdd.exe -A -P G:\DVD.ini -o I:\test.ac3 -L I:\test.wav -R I:\test.wav
Source (test.wav) is stereo,16bit,48Khz
DVD.ini:
[Parameters]
DataRate=224
SampleRate=-1
CodeMode=2
BSMode=0
DlgNorm=27
NonIntel=On
UseLFE=Off
Cmix=0
SurMix=0
DolbySurround=0
CopyRight=Off
Original=Off
MixLevel=25
RoomType=2
CompressionType=1
RFCmpInUse=On
Deemphasis=Off
DCFilter=On
BandWidthFilter=On
I tried a lot of changes in .ini file, but I think that the problem is in command line (SoftEncode bug ?).
Then, I splitted this test.wave in 2 files, one file with only left channel and another file with only right channel.
This last test produces:
Sftencdd.exe -A -P G:\DVD.ini -o I:\test.ac3 -L I:\left.wav -R I:\left.wav
-> produces also a mono sound
Sftencdd.exe -A -P G:\DVD.ini -o I:\test.ac3 -L I:\right.wav -R I:\right.wav
-> produces silent
Thanks in advance,
Alexandre
PS. Using Soft Encode in normal way it works perfectly (stereo).
gircobain
12th July 2004, 03:43
Shouldn't you feed SoftEncode with 2 mono wav's, one for each stereo channel (i.e., Sftencdd.exe -A -P G:\DVD.ini -o I:\test.ac3 -L I:\left.wav -R I:\right.wav)?
vmesquita
12th July 2004, 12:25
SoftEncode has a annoying dying bug, that happens when you cancel a conversion, and it's exactly like you described. To fix it, remove the softencode keys in the registry. You can do that using this simple .reg:
---------------------- cut - start here -----------------------
REGEDIT4
[-HKEY_LOCAL_MACHINE\SOFTWARE\Sonic Foundry\Soft Encode]
[-HKEY_CURRENT_USER\Software\Sonic Foundry\Soft Encode]
------------------------ end here ---------------------------
ADLANCAS
13th July 2004, 01:25
@gircobain
I made your suggest and... sound only in left channel!
I donīt believe that is necessary to separate channels to produce a ac3 file. Thanks anyway.
@VMesquita
I used this .reg without sucess.
After run it, I needed reinstall Soft Encode and it continues to produce a MONO ac3.
Did I miss something ?
Thanks,
Alexandre
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.