I'm trying to create a command for converting all audio files selected in vifm using ffmpeg. Here's what I've tried so far:
command opus ffmpeg -i %f -q 7 %f:s|flac|opus|
This has two problems, however.
First, it only works if only one file is selected. If, for example, two are selected, ffmpeg stops with the question, File 'foo.flac' already exists. Overwrite ? [y/N]
, where foo.flac
is the second file.
Second, it only works if the extension of the original files is flac
. (I used vifm's substitution macro for replacing flac
with opus
in the file name in the example.) I don't know how to include other extensions, too.