First of all I am sorry if this is not the right place to ask, to be honest I am not even entirely sure if this is an issue with ffmpeg or cmd, as my grasp of cmd is limited to say the least. I am grateful for any answers or hints towards solving my issue. That out of the way, here's my issue:
I want ffmpeg to be started via a .bat file and loop over every file within the folder, replacing the metadata within the file with the filename.
Here's how the .bat is currently structured:
Note that $FILEPATH$ is the filepath of ffmpeg on my computer.
Code: Select all
for %%A IN (*.webm) DO ( $FILEPATH$ -i "%%A" -c copy -metadata title=%%~nfx "%%A" -y )
The issue I have is that I want to give ffmpeg the "title=" argument with the filename. If I use %%A it works, but the metadata is now "filename.webm" instead of "filename". Therefore I looked into arguments to use to get the filename without the extension. Apparently ~nfx does that. If I run this .bat though, it interprets the command as a string and replaces every metadata title with "%~nfx".
Is there a way to solve this issue? I feel like it shouldn't be too complicated but I am clearly out of my league here.
Again, thanks for any help.