Y si lo quiero implementar en LXDE digamos en el pc-manfm que viene por defecto ???
El mar, 11-03-2014 a las 08:18 -0500, Alex Vergara Gil escribió: > > Bueno no se como solucionar tu problema pero te puedo dar una idea de lo > > que hice para obtener la salida de un comando que yo mismo lanzo desde > > python, mira a ver si puedes sacar algo de ahí: > > > > command = ''.join([ > > 'mencoder ', > > '-oac mp3lame -lameopts abr:br=96 -ovc xvid -xvidencopts > > bitrate=704 -vf scale=580:480,harddup -ofps 30000/1001 ', > > input_file, > > ' -o ', > > output_file > > ]) > > > > handle = subprocess.Popen(command,shell=True, stderr=subprocess.PIPE, > > stdin=subprocess.PIPE,stdout=subprocess.PIPE) > > > > percent = 0 > > while handle.poll()==None: > > v1,v2,v3=select.select([handle.stderr,handle.stdout],[],[],0) > > > > if len(v1)>0: > > for element in v1: > > readed=element.readline(300) > > if (element==handle.stderr): > > percent = -1 > > else: > > #Pos: 8.9s 269f ( 3%) 183.37fps Trem: 0min 14mb A-V:0.047 > > [353:96] > > if(re.match(".*Pos:.*", readed)): > > percent = re.findall("[\d]+%",readed) > > percent = percent[0] > > percent = re.findall("[\d]+",percent) > > percent = percent[0] > > print percent > > > > > Esto está bueno si trato de lanzar todo desde python, pero yo lanzo el > avconv desde el menú derecho de Dolphin, por eso necesitaba un demonio, a lo > mejor debo cambiar mi estrategia. Te mando lo que hago a ver si pueden darme > un norte de como hacer que el demonio me ponga el progreso en alguna parte. > > Esto es lo que lanzo en el menú secundario: > > # Copyright 2014 Alex Vergara Gil <alexvergara...@gmail.com> > # http://gutl.jovenclub.cu > # > # This program is part of the mediamorph project > # http://gutl.jovenclub.cu/foro/viewtopic.php?f=27&t=3480 > # > # This program is free software; you can redistribute it and/or modify > # it under the terms of the GNU General Public License as published by > # the Free Software Foundation; either version 2 of the License, or > # (at your option) any later version. > # > # This program is distributed in the hope that it will be useful, > # but WITHOUT ANY WARRANTY; without even the implied warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > # GNU General Public License for more details. > # > # You should have received a copy of the GNU General Public License > # along with this program; if not, write to the Free Software > # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, > # MA 02110-1301, USA. > # > [Desktop Entry] > Encoding=UTF-8 > ServiceTypes=KonqPopupMenu/Plugin,video/* > TryExec=avconv > Type=Service > Actions=tomkv;toavi;tomp4;towebm;toflv;tompg;toDVD;toVCD;toipod;toiphone;topsp; > X-KDE-Submenu=Convert To > X-KDE-Submenu[ar]=حول إلى > X-KDE-Submenu[be]=Канвертаваць у > X-KDE-Submenu[bg]=Конвертиране към > X-KDE-Submenu[bs]=Pretvori u > X-KDE-Submenu[ca]=Converteix a > X-KDE-Submenu[ca@valencia]=Converteix a > X-KDE-Submenu[cs]=Převést do > X-KDE-Submenu[da]=Konvertér til > X-KDE-Submenu[de]=Umwandeln in > X-KDE-Submenu[el]=Μετατροπή σε > X-KDE-Submenu[en_GB]=Convert To > X-KDE-Submenu[es]=Convertir a > X-KDE-Submenu[et]=Teisendamine > X-KDE-Submenu[eu]=Bihurtu hona > X-KDE-Submenu[fa]=تبدیل به > X-KDE-Submenu[fi]=Muunna muotoon > X-KDE-Submenu[fr]=Convertir en > X-KDE-Submenu[ga]=Tiontaigh Go > X-KDE-Submenu[gl]=Converter en > X-KDE-Submenu[he]=המר ל־ > X-KDE-Submenu[hne]=ये मां बदलव > X-KDE-Submenu[hr]=Pretvori u > X-KDE-Submenu[hu]=Konvertálás > X-KDE-Submenu[ia]=Converte a > X-KDE-Submenu[is]=Umbreyta í > X-KDE-Submenu[it]=Converti in > X-KDE-Submenu[ja]=変換 > X-KDE-Submenu[kk]=Келесіге аудару: > X-KDE-Submenu[km]=បម្លែងទៅ > X-KDE-Submenu[kn]=ಇದಕ್ಕೆ ಪರಿವರ್ತಿಸು > X-KDE-Submenu[ko]=다음으로 변환 > X-KDE-Submenu[ku]=Veguhezîne Ji > X-KDE-Submenu[lt]=Konvertuoti į > X-KDE-Submenu[lv]=Pārveidot uz > X-KDE-Submenu[nb]=Konverter til > X-KDE-Submenu[nds]=Ümwanneln na > X-KDE-Submenu[nl]=Converteren naar > X-KDE-Submenu[nn]=Gjer om til > X-KDE-Submenu[pa]=ਬਦਲੋ > X-KDE-Submenu[pl]=Przekształć do > X-KDE-Submenu[pt]=Converter Para > X-KDE-Submenu[pt_BR]=Converter para > X-KDE-Submenu[ro]=Convertește la > X-KDE-Submenu[ru]=Преобразовать в > X-KDE-Submenu[sk]=Previesť do > X-KDE-Submenu[sl]=Pretvori v > X-KDE-Submenu[sr]=Претвори у > X-KDE-Submenu[sr@ijekavian]=Претвори у > X-KDE-Submenu[sr@ijekavianlatin]=Pretvori u > X-KDE-Submenu[sr@latin]=Pretvori u > X-KDE-Submenu[sv]=Konvertera till > X-KDE-Submenu[tg]=Табдилкунӣ ба > X-KDE-Submenu[th]=แปลงเป็น > X-KDE-Submenu[tr]=Dönüştür > X-KDE-Submenu[ug]=ئايلاندۇر > X-KDE-Submenu[uk]=Перетворити на > X-KDE-Submenu[vi]=Chuyển đổi sang > X-KDE-Submenu[wa]=Kivierser viè > X-KDE-Submenu[x-test]=xxConvert Toxx > X-KDE-Submenu[zh_CN]=转换为 > X-KDE-Submenu[zh_TW]=轉換為 > #TryExec=convert > > [Desktop Action tomkv] > Name=MKV > Icon=video-x-generic > Exec=avconv -i %f -y "`echo %f | perl -pe 's/\\.[^.]+$//'`.mkv" > > [Desktop Action toavi] > Name=AVI > Icon=video-x-generic > Exec=avconv -i %f -y "`echo %f | perl -pe 's/\\.[^.]+$//'`.avi" > > [Desktop Action tomp4] > Name=MP4 > Icon=video-x-generic > Exec=avconv -i %f -y "`echo %f | perl -pe 's/\\.[^.]+$//'`.mp4" > > [Desktop Action towebm] > Name=WEBM > Icon=video-x-generic > Exec=avconv -i %f -s 320x240 -b 500k -ar 44100 -y "`echo %f | perl -pe > 's/\\.[^.]+$//'`.webm" > > [Desktop Action toflv] > Name=FLV > Icon=video-x-generic > Exec=avconv -i %f -s 320x240 -b 500k -ar 44100 -y "`echo %f | perl -pe > 's/\\.[^.]+$//'`.flv" > > [Desktop Action tompg] > Name=MPG > Icon=video-x-generic > Exec=avconv -i %f -y "`echo %f | perl -pe 's/\\.[^.]+$//'`.mpg" > > [Desktop Action toDVD] > Name=DVD-NTSC > Icon=video-x-generic > Exec=avconv -i %f -target ntsc-dvd -s 720x480 -r 29.97 -aspect 4:3 -ab > 128k -ar 48000 -ac 2 -acodec ac3 -y "`echo %f | perl -pe > 's/\\.[^.]+$//'`_DVD.mpg" > > [Desktop Action toVCD] > Name=VCD-NTSC > Icon=video-x-generic > Exec=avconv -i %f -target ntsc-vcd -aspect 4:3 -y "`echo %f | perl -pe > 's/\\.[^.]+$//'`_VCD.mpg" > > [Desktop Action toipod] > Name=IPOD > Icon=video-x-generic > Exec=avconv -i %f -f ipod -vcodec mpeg4 -aspect 4:3 -s 320x240 -b 700k -mbd > 2 -cmp 2 -subcmp 2 -r 30000/1001 -acodec aac -strict experimental -ar > 24000 -ab 128k -y "`echo %f | perl -pe 's/\\.[^.]+$//'`_IPOD.mp4" > > [Desktop Action toiphone] > Name=IPHONE > Icon=video-x-generic > Exec=avconv -i %f -f ipod -vcodec mpeg4 -aspect 16:9 -s 480x320 -b 700k -mbd > 2 -cmp 2 -subcmp 2 -r 30000/1001 -acodec aac -strict experimental -ar > 24000 -ab 128k -y "`echo %f | perl -pe 's/\\.[^.]+$//'`_IPHONE.mp4" > > [Desktop Action topsp] > Name=PSP > Icon=video-x-generic > Exec=avconv -i %f -f psp -vcodec mpeg4 -aspect 16:9 -s 368x208 -b 768k -mbd > 2 -cmp 2 -subcmp 2 -r 30000/1001 -acodec aac -strict experimental -ar > 24000 -ab 128k -y "`echo %f | perl -pe 's/\\.[^.]+$//'`_PSP.mp4" > > # Para instalarlo en Dolphin guardas este archivo en > ~/.kde/share/kde4/services/ServiceMenus para tu usuario > # o también puedes guardarlo en /usr/share/kde/services/ServiceMenus para > instalarlo para todos los usuarios > > > ______________________________________________________________________ > Lista de correos del Grupo de Usuarios de Tecnologías Libres de Cuba. > Gutl-l@jovenclub.cu > https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que est� limpio.
______________________________________________________________________ Lista de correos del Grupo de Usuarios de Tecnologías Libres de Cuba. Gutl-l@jovenclub.cu https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l