import glob, os from os.path import join, getsize vlc_ps3 = "\"C:\Program Files\Red Kawa\Video Converter\Tools\FFmpeg\\ffmpeg.exe\" -y -i \"FILENAME_SRC\" -f mp4 -vcodec xvid -r 24000/1001 -b 1536k -bufsize 2500k -maxrate 2500k -g 250 -acodec aac -ac 2 -ab 128k \"FILENAME_DST\"" vlc_n95 = "\"C:\Program Files\Red Kawa\Video Converter\Tools\FFmpeg\\ffmpeg.exe\" -i \"FILENAME_SRC\" -s 320x240 \"FILENAME_DST\"" raiz = "d:\\" filelist = [] while(1): for root, dirs, files in os.walk(raiz): for item in files: item = item.lower() if (item.rfind('.mp4') == -1 and item.rfind('.avi') != -1): filelist.append(root + "\\" + item) print filelist for file in filelist: print file vlc_ps3 = vlc_ps3.replace("FILENAME_SRC", file) vlc_ps3 = vlc_ps3.replace("FILENAME_DST", file.replace(".avi", ".mp4")) print vlc_ps3 os.popen(vlc_ps3) vlc_n95 = vlc_n95.replace("FILENAME_SRC", file.replace(".avi", ".mp4")) vlc_n95 = vlc_n95.replace("FILENAME_DST", file.replace(".avi", ".N95.mp4")) print vlc_n95 os.popen(vlc_n95) #os.remove(file) print "FILE", file, " HAS BEEN ENCODED !!" Thread.sleep(60000) filelist = [] 1 #!/bin/sh 2 3 # Copyright 2001,2005 Free Software Foundation, Inc. 4 # 5 # This file is part of GNU Radio 6 # 7 # GNU Radio is free software; you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation; either version 2, or (at your option) 10 # any later version. 11 # 12 # GNU Radio is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with GNU Radio; see the file COPYING. If not, write to 19 # the Free Software Foundation, Inc., 51 Franklin Street, 20 # Boston, MA 02110-1301, USA.