Skip to content

Instantly share code, notes, and snippets.

@0xjams
Created June 6, 2015 01:19
Show Gist options
  • Save 0xjams/b201346d03cd78c5bc66 to your computer and use it in GitHub Desktop.
Save 0xjams/b201346d03cd78c5bc66 to your computer and use it in GitHub Desktop.
Batch convert video files to a format compatible with a Pioneer 5700BHS radio
import glob
import os
files=glob.glob("*.mp4")
for file in files:
outputName=file.replace(".mp4",".avi")
os.system("ffmpeg -i \"%s\" -c:v mpeg4 -q:v 5 -tag:v DIVX -s 640x480 -c:a libmp3lame -q:a 5 -ac 2 -ar 44100 \"%s\"" % (file,outputName))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment