#!/usr/bin/python
import os,re,string,sys
# configuration variables
ffmpeg = 'ffmpeg -i %s -b 600k -s 320x240 -vsync 2 -async 2 %s'
log = []
total = len(sys.argv)
count = 0
if total > 1:
progress = os.popen('zenity --progress --text="Generating %d mp4..." --auto-close' % (total - 1), 'w', 0)
try:
for f in sys.argv[1:]:
fin = os.path.abspath(f)
count += 1
fout = re.sub(r'(.+)\.(ogg|VOD|mpg|flv)$', '\\1.mp4', fin)
if fout == fin:
continue
#print ffmpeg % (fin, fout)
os.system(ffmpeg % (fin, fout))
progress.write("%d\n" % (100.0*count/total))
pass
pass
except Except, e:
progress = os.popen('zenity --info --text="Error %d"' % e, 'w', 0)
pass
pass
else:
print "Please call this script inside nautilus"
sys.exit(0)
#!/usr/bin/python
import os,re,string,sys
# configuration variables
ffmpeg = 'ffmpeg -i %s -b 600k -s 320x240 -vsync 2 -async 2 %s'
log = []
total = len(sys.argv)
count = 0
if total > 1:
progress = os.popen('zenity --progress --text="Generating %d mp4..." --auto-close' % (total - 1), 'w', 0)
try:
for f in sys.argv[1:]:
fin = os.path.abspath(f)
count += 1
fout = re.sub(r'(.+)\.(ogg|VOD|mpg|flv)$', '\\1.mp4', fin)
if fout == fin:
continue
#print ffmpeg % (fin, fout)
os.system(ffmpeg % (fin, fout))
progress.write("%d\n" % (100.0*count/total))
pass
pass
except Except, e:
progress = os.popen('zenity --info --text="Error %d"' % e, 'w', 0)
pass
pass
else:
print "Please call this script inside nautilus"
sys.exit(0)
Your feedback (comment or TB), please!
Comment-back
Track-back
Ping-back
NOT AVAILABLE NOW

