I am trying to remove the sound stream from videos in a folder and save the new ones without sound in same folder with different names.
I am using a batch file comprising these commands:
set PATH=D:\movies folder
for %%a in %PATH%\*.MTS do ffmpeg -i "%%a" -c:v copy -an "%%~na.MTS" > errorlog.txt
pause
It doesn't do anything and the log file is always empty.
I tried this too
set PATH=D:\movies folder\*.MTS
for %%a in %PATH% do ffmpeg -i "%%a" -c:v copy -an "%%~na.MTS" > errorlog.txt
but same result. What am I doing wrong...?
Any hints appreciated
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
REM this would help:
set Folder="D:\movies folder" -
Since your folder name has a space in it quotes are required. And PATH is the systems search path. If you set it to something else the system won't be able to find any program that's not in the current folder (for that instance of CMD.COM). Use a different name, like Folder (as suggested by butterw). Finally, the file spec in the FOR loop should be enclosed in parenthesis.
Code:set FOLDER="D:\movies folder" for %%a in (%FOLDER%\*.MTS) do ffmpeg -i "%%a" -c:v copy -an "%%~na.MTS" > errorlog.txt pause
-
Thanks jagabo and butterw, it's working now well.
One more issue- it saves the processed files in the same location where the bat file is.
I would like to save those files in a location of my choice, it could be for example the same folder
where the initial files are and a some suffix could be added at filenames of the new files.
Is there any possible syntax to do that..? -
Code:
set FOLDER="D:\movies folder" for %%a in (%FOLDER%\*.MTS) do ffmpeg -i "%%a" -c:v copy -an "%%~dpna (no audio).MTS" > errorlog.txt pause
-
Thanks Jagabo, working now as expected.
Last edited by windranger; 25th Jul 2020 at 02:53.
Similar Threads
-
Simple Youtube-dl .Bat file for easy download
By WinSpirit in forum Video Streaming DownloadingReplies: 12Last Post: 19th Jul 2024, 15:13 -
ffmpeg bat to mux multible audio and video
By alkoon in forum Newbie / General discussionsReplies: 3Last Post: 5th Jun 2020, 11:20 -
Bat file output on single line
By sambat in forum Off topicReplies: 1Last Post: 21st Dec 2018, 10:41 -
BAT File Problem Adding Image To Audio Using ffMPEG
By Col in forum AudioReplies: 5Last Post: 7th Feb 2018, 10:43 -
10bit to 8bit bat file
By SvenVolfeid in forum Video ConversionReplies: 3Last Post: 13th Sep 2016, 09:10