I am working in a Python plugin for XBMC (xbmc.org) and I have a program (ffmpeg.exe) I want to execute my plugin without the CDD window, if I use os.system () to call ffmpeg.exe then works fine but XBMC reduces because the OS system is a CMD window for a few seconds Opens Therefore, I try to use os.spawnv () which I think is possible that I get permission to call ffmpeg.exe without the CMD window. The problem is how I can use the OS system, but I do not know how to use OSSPNV. It is trying, but does not work:
os.spawnv (os.P_DETACH, 'C: \ Program Files (x86) \ XBMC \ scripts \ Base De Datos \ ffmpeg Exe "- Y-SS-30 -i" C: \ Program Files (x86) \ xbm \ scripts \ base de detos \ movie. Avi "-mmgpeg-wefreem 1-s 720x400-" c: \ program files (x86) \ XBMC \ Scripts \ Base De Datos \ thumbnail.jpg "')" C: \ Program Files (x86) \ XBMC \ scripts \ Base de DiTos \ ffmpeg.exe "= FFMPG.EXE-A-SSS 30 -i Path = argument for Ffmpeg.exe "C: \ Prog Program files (x 86) \ Aksbimsi \ scripts \ base de Ditos \ movie. AV "= The path of the movie I want to use with ffmpeg.exe to create a thumbnail (argument for ffmpeg) .exe) -f mjpeg -vframes 1 -s 720x400 = ffmpeg.exe for more logic" C : \ Program Files (x86) \ xbmc \ scripts \ base de ditos \ thumbnail.jpg "= path to save the thumbnail.
I try several methods to create a thumbnail I am doing but I think that is actually a complex in XBMC plugin, I do not use PfMPG I can not because I can not import the module without installing the plugin, it is in the SO and my plug-in should be portable, I can use PIL but can only create thumbnails of images and I can see the video thumbnails Need to create. I know some modules in Python which allow me to call without CMD window, but on other modules like Win32api Depends that I can not import for the same reason because I can not import / import PIFFPPG ... so I'm using this "bad way" method works with the OS system, but I Loose Control of Your Plugin Window If someone knows another way to make thumbnails of video using a python, please let me know. The other thing is that my plugin should be multiplatform (at least Win and Linux), so this method is not good but it can be a big step for me.
Thank you very much. According to
, pass the argument to a list:
Os.spawnv (os.P_DETACH), "path \ to \ program.exe", ["arg1", "arg2", "arg3"])
Comments
Post a Comment