D
D
Dwellss2021-08-09 00:35:03
linux
Dwellss, 2021-08-09 00:35:03

How can I make ffmpeg process the entire folder?

Goodnight. I have this command:

/usr/bin/ffmpeg -y -i /home/domains/test/test.mp4 -vcodec libx264 -movflags +faststart -threads 0 -r 25 -g 50 -crf 25 -me_method hex -trellis 0 -bf 8 -acodec aac -strict -2 -ar 44100 -ab 128k -f mp4 -vf "movie=/home/domains/test/watermark.png [wm];[in][wm] overlay='if(gte(t,9) *lte(t,29), W-((W+w)/20)*mod(t-9,20), -w-1000)':'0' [out]" /home/domains/test/ new/test.mp4 2>&1


Please tell me, is it possible in principle to force ffmpeg to process all .mp4 files in the /test/ folder with one command and put them in the /test/new/ folder while preserving the file name?
Or do you need to write a more complex script for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Drno, 2021-08-09
@Dwellss

Батник для винды... ffmpeg лежит в той же папке что и видеофайлы... по идее в Вашей ситуации можно просто попробовать указать входящий файл - *.mp4
/home/domains/test/*.mp4
for %%a in ("*.mp4") do !ffmpeg.exe -y -i "%%a" -c:v h264_nvenc -b:v 10000k -s 1920x1080 -aspect 16:9 "D:\CONVERT\DST\%%~na.mp4"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question