Sample Header Ad - 728x90

Convert selected audio files in vifm using ffmpeg

0 votes
1 answer
69 views
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.
Asked by user247824 (103 rep)
Jul 12, 2020, 08:51 PM
Last activity: Jul 25, 2020, 12:19 PM