Score:-1

Batch ffmpeg conversion: windows to linux

cn flag

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,

Artur Meinild avatar
vn flag
Here's a [bash reference sheet](https://devhints.io/bash) to get you started. You're welcome.
Score:1
jp flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.