FFMPEG - Batch convert subfolders

后端 未结 2 540
[愿得一人]
[愿得一人] 2021-01-03 01:21

I am trying to set up a Windows batch file to convert a number of MP4 files using FFMPEG. There are a number of files in multiple subfolders, therefore I need the script to

2条回答
  •  别那么骄傲
    2021-01-03 01:59

    This windows batch (.bat) script will remove audio from mp4 files within subfolders (or nested directories) and then delete the old file. It is slowed by a SLEEP command because there is apparently problems with file deletion before it copies in both windows and linux.

    FOR /r %%i in (*.mp4) DO ffmpeg.exe -i  "%%~fi" -vcodec copy -an "%%~dpni(2)%%~xi" &&  sleep 1 &&    del "%%~fi"
    

提交回复
热议问题