Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save alice1017/1357950 to your computer and use it in GitHub Desktop.

Select an option

Save alice1017/1357950 to your computer and use it in GitHub Desktop.
movietomp3.py
#!/usr/bin/env python
#coding:utf-8
import commands
import sys
try:
file = sys.argv[1]
except:
print "movietomp3.py [filename]"
sys.exit(1)
cmd = "curl -s -F video=@"+file+" \"http://aerith.mydns.jp/bin/sphere/spheremp3.cgi\" -F codec=m320"
data = commands.getoutput(cmd)
open(file[:-4]+".mp3","w").write(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment