Open lorenzosu opened 6 years ago
Currently both an input and output file name are required: opusenc input output
If opusenc input
is permitted, it would be easy to assume that opusenc input*
would also work. However if you have files input1 and input2, you would then end up overwriting input2 since it would assume that was the output file.
A solution would be a command option that treats all files as input files, automatically generating an output file name from each input file name, which could also allow multiple input files to be encoded.
Hi mark,
Thanks for your answer, I see now what you mean... I was thinking of behaviour similar to e.g. oggenc where fore example you can do oggenc *.wav
and will get corresponding ogg files... But I guess this behaviour could be easily wrapped in a bash script :)
While we don't have opusenc *.opus
I do
for file in *; do
opusenc --bitrate 64 "$file" "${file/'.flac'/}".opus
done
(works both in terminal and bash script)
I made a PR that should partially cover this. It assumes the filename, but does not do the recursive encoding. Still, you shouldn't need to write the output filename with PR #38, although it works with both cases.
It would be nice to be able to do:
opusenc foo.wav
and get foo.opus as a result like with other encoders
Just a low-priority nice-to-have shortcut :)