saltydog4791;184205 Wrote:
> Wow, what a great tool. I was just curious if anyone has attempted a
> shell script that can convert all dts files in a directory to flac. I
> know it can be done, just not by me unfortunately. ;)
I can help with the first part of the script: I've uploaded version 0.4
of the utility to 'post #3'
(http://forums.slimdevices.com/showpost.php?p=72544&postcount=3), which
changes its input arguments. Previously one would supply a single input
file name, and an optional output file name. I've changed that so that
output file names must be specified with the *--output OUTPUT_FILE*
option (one name per option, but you can supply the option multiple
times). You can now specify multiple input file names as arguments in
one go, and you can use wildcards too:
Code:
--------------------
*"c:\Program Files\spdifconvert\spdifconvert.py" 01.ac3 02.ac3
something-else.dts abc*.dts foo.ac3*
--------------------
If you want to override the default output names with *--output*,
ensure there are exactly as many output names as there are input files.
Wildcards -are not- supported for output names, so if your input of
"*.ac3" expands to 5 files, you need 5 output options.
Important note about wildcards: a wildcard argument is expanded into a
list of files and then sorted alphabetically. This means that if you
have more than 9 numbered files, they MUST have leading zeroes to be
sorted properly -- else we'll process "1.ac3", "10.ac3", "2.ac3", and
so on.
(If you like, you can also use the new *--join* option to concatenate
the input files, but it's unlikely you'd want to!)
There's a good reason for this new multiple-input-files feature, beyond
simple convenience: the utility will automatically fix problems with
consecutive files not being aligned to frame boundaries. I've seen
cases where a DVD's chapter mark wasn't exactly aligned with an AC3
frame, so converting chapter 10 (say) would result in a message that
the final frame was too short. Chapter 11 in this example had the
second half of the frame, which was rejected as junk. Result: a frame
of data was lost in conversion. Running the new version of the utility
with "*.ac3", this situation is spotted and a short frame from the end
of one file is carried over to the start of the next. (Disable this
behaviour with *--no-massage*.) [Thanks to mswlogo for providing me
with data which exhibited this problem in the first place.]
saltydog, back to your shell script... if you're using Windows, you
could put this into a batch file:
Code:
--------------------
*"c:\Program Files\spdifconvert\spdifconvert.py" %*
for %%f in (*.wav) do "c:\program files\flac\flac.exe" "%%f"*
--------------------
To run it, change into the directory containing the dts files and run:
*\some\path\my-batch-file.bat *.dts* (where "\some\path" refers to
wherever you stored the batch file).
The first line applies the utility to all arguments (*%** in a batch
file only works from Windows 2000 onwards, I think). The second
applies flac to all WAV files -in the current directory- (but you may
need to change the flac path). The use of a double-percent is because
it's in a batch file btw; if you ran that line at the command prompt
you'd use just one percent sign.
--
smst
------------------------------------------------------------------------
smst's Profile: http://forums.slimdevices.com/member.php?userid=752
View this thread: http://forums.slimdevices.com/showthread.php?t=19260
_______________________________________________
ripping mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/ripping