# -*- coding: utf-8 -*-
import os, os.path
startDir = "/home/fabien/Bureau/blender"
#startDir = "/media/disk/fabien/Bureau/Photos/_00Mariage_Marie_et_Samuel"
Quote='"'
directories = [startDir]
while len(directories)>0:
directory = directories.pop()
for name in os.listdir(directory):
fullpath = os.path.join(directory,name)
if os.path.isfile(fullpath):
(shortname, extension) = os.path.splitext(name)
#print extension
if extension==".avi" and "_enco.avi" not in shortname:
passe_one="mencoder "+Quote+str(fullpath)+Quote+" \
-vf scale -zoom -xy 720 \
-ffourcc DX50 \
-oac mp3lame -lameopts mode=3:vbr=2:q=6 \
-ovc lavc -lavcopts \
vcodec=mpeg4:vbitrate=1200:lumi_mask=0:dark_mask=0:vme=4:vfdct=0:idct=0:vhq:v4mv:vpass=1:turbo -o /dev/null"
print
print "passe une"
print passe_one,"...."
print fullpath
print
print
os.system(passe_one)
#print "_______________________",fullpath[-:3]
print
new_name=fullpath+"_enco.avi"
passe_two="mencoder "+Quote+str(fullpath)+Quote+" \
-vf scale -zoom -xy 720 \
-ffourcc DX50 \
-oac mp3lame -lameopts mode=3:vbr=2:q=6 \
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1200:lumi_mask=0:dark_mask=0:vme=4:vfdct=0:idct=0:vhq:v4mv:vpass=2 \
-o "+Quote+str(new_name)+Quote
print
print "passe deux"
print passe_two,"...."
print fullpath
print
print
os.system(passe_two)
elif os.path.isdir(fullpath):
directories.append(fullpath) # It's a directory, store it.
2 commentaires:
Bonjour,
je recherche depuis un moment ce type d'encodage, mais étant novice sous Linux, plus précisément Ubuntu (9.04); j'aurai voulu avoir plus de détails à comment le mettre en application.
Merci de votre aide.
Hello I'd love to thank you for such a great made forum!
thought this is a perfect way to make my first post!
Sincerely,
Edwyn Sammy
if you're ever bored check out my site!
[url=http://www.partyopedia.com/articles/st-patricks-day-party-supplies.html]st patricks day Party Supplies[/url].
Enregistrer un commentaire