2
1
I created a key in the Windows registry:
HKEY_CLASSES_ROOT\*\Shell\Convert to MP3\command
with:
"D:\tools\ffmpeg.exe" -i "%1" -acodec libmp3lame -vn -ar 44100 -ac 2 -ab 256k "%1.mp3"
It works, except that the filename is not exactly what I want:
Input: test.wav
, Output: test.wav.mp3
whereas I'd like the output filename to be test.mp3
.
I also tried with:
"D:\tools\ffmpeg.exe" ... "%~n1.mp3"
like in this answer, but it doesn't work: the output is %~n1.mp3
then!
How to remove the original extension like this, and replace by .mp3?
PS: I'm looking for a solution without involving a .bat file, but only the registry. If not possible, it's ok to use a bat file.
Use a .cmd file and do it from there. It should work then. – LPChip – 2018-04-07T19:17:29.210
@LPChip Isn't there a way to do it just from a single line in registry? Are
%~n1
things supported only in cmd/bat file? – Basj – 2018-04-07T19:18:47.237As far as I know, yes. – LPChip – 2018-04-07T20:49:51.423