I have a windows .bat file that converts all the .mp4 files of a certain folder (increases speed in a 1.5X ratio), places all the transformed files in an "out" subfolder, and finally deletes all original files. As follows:
for %%a in ("*.*") do ffmpeg -i "%%a" -filter_complex "[0:v]setpts=PTS/1.5[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" "out\%%~na.mp4"
for %%f in (*.mp4) do (del "%%~f")Could someone please "translate" it to Linux (Ubuntu)? Thanks,
11 Answer
Adapted from How do you convert an entire directory with ffmpeg?
mkdir out
for i in *.mp4; do ffmpeg -i "$i" -filter_complex "[0:v]setpts=PTS/1.5[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" "out/${i%.*}.mp4"; done