Kodi Community Forum
Android Run ffmpeg on android from kodi addon - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Android Run ffmpeg on android from kodi addon (/showthread.php?tid=339979)



Run ffmpeg on android from kodi addon - bojan1611 - 2019-01-31

I want to run ffmpeg from kodi addon on android, i downloaded ffmpeg binary compiled from here:

python:
https://github.com/Khang-NT/ffmpeg-binary-android/releases

but i don't know how to run it with arguments. On windows i am using this:

python:
subprocess.Popen('ffmpeg.exe -i video.mp4 ....', stdin = subprocess.PIPE, stdout = subprocess.PIPE)

This works fine on windows, but how should it look to works on android?

PS. Does someone knows why i don't get any output if i run it with subprocess, but if i use os.system() than output is fine but than i can't continue to use KODI?


RE: Run ffmpeg on android from kodi addon - bigretromike - 2019-02-14

This is my luck shoot:
python:
subprocess.Popen('ffmpeg -i video.mp4 ....', stdin = subprocess.PIPE, stdout = subprocess.PIPE)

Remember that ffmpeg need to be recognized command otherwise you need to specify full path link you extract it into kodi user dir and using xbmcaddon get that path.
same goes for input file.

Other than that I don't know, never had to use if on android.


RE: Run ffmpeg on android from kodi addon - bojan1611 - 2019-02-16

(2019-02-14, 08:26)bigretromike Wrote: This is my luck shoot:
python:
subprocess.Popen('ffmpeg -i video.mp4 ....', stdin = subprocess.PIPE, stdout = subprocess.PIPE)

Remember that ffmpeg need to be recognized command otherwise you need to specify full path link you extract it into kodi user dir and using xbmcaddon get that path.
same goes for input file.

Other than that I don't know, never had to use if on android.
I tried with terminal app on android to run ffmpeg file, but because the phone is not routet i get "permission denied", i don't know if i could run it from inside kodi addon? I will probably find some other solution that doesn't depend on ffmpeg, just on pure python.