Convert Video and Audio Script

Hay,

im trying to create an convert button like the one for images. But mine for AUDIO/VIDEO files.

I have created an very ugly bloaty script now which converts from one format to another. Can I improve my script with using JS? Or what would be better than what I have now?

@echo off
setlocal ENABLEDELAYEDEXPANSION

for /r %%s in (*.%1) do ( 
set tmp=%%s
ffmpeg.exe -i "!tmp!" "!tmp:~0,-4!.%2"
)

Thanks a'lot in advance!

Very ugly indeed :wink:

Just use an MS-DOS Button with something like this

ffmpeg.exe -i {filepath$} -c copy {filepath$|ext=mp4}
2 Likes

Thanks your answer was awesome it lead me to the final solution:

For overwriting without prompt:

ffmpeg.exe -y -i {filepath$} {filepath$|ext=mp3}

With prompt:

ffmpeg.exe -i {filepath$} {filepath$|ext=mp3}

Those both look the same. Is -y meant to be in both?

1 Like

Ur right. I'm sorry :stuck_out_tongue: thanks for pin pointing that out.

1 Like