Skip to content

Instantly share code, notes, and snippets.

@rendfall
Created April 8, 2019 22:08
Show Gist options
  • Save rendfall/ab45c3bf8b9d51f6c55a867deed5df17 to your computer and use it in GitHub Desktop.
Save rendfall/ab45c3bf8b9d51f6c55a867deed5df17 to your computer and use it in GitHub Desktop.
Batch script to convert mp4 files to mp3
echo off
for %%a in ("./source/*.mp4") do ffmpeg -i "%%a" -b:a 320K -vn "./output/%%a.mp3"
pause
@JasonLandbridge
Copy link

Linux bash version: convert-mp4-to-mp3.sh

#! /bin/bash
for f in ./**/*.mp4;
do
    echo "Starting conversion of: $f"
    ffmpeg -i $f -b:a 320K -vn "${f/.mp4/.mp3}"
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment