Bulk Convert .Webm to .MP4 in BASH

After grabbing the entirety of DBZ Abridged from YT, I needed a way to make all the videos .mp4. There are plenty of options, but this was definitely the most convenient - especially if you already have ffmpeg installed.

    for file in *.webm; do
      # Construct the new file name by replacing the .webm extension with .mp4
      newfile="${file%.webm}.mp4"
      # Convert the file
      ffmpeg -i "$file" -c:v copy -c:a aac "$newfile"
    done

Save this in a .sh script, chmod +x, run in the folder with .webm, and wait.

Previous: Spaceman Next: Argylle