Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

GStreamer is not included in pyinstaller package #462

Closed
joras opened this Issue · 2 comments

3 participants

@joras

GStreamer libraries and python wrappers are not included in pyinstaller generated package, thus video playing is not possible.

It is possible to resolve the second half of the problem by adding following line to the pyinstaller [project].spec file:

import pygst; pygst.require('0.10')

@tito
Owner

So, by just adding the pygst import/require, have you been able to package the app correctly? Or is something is not working after that?

@tito tito was assigned
@Rio

I think I'm having the same problem. I'm making a simple app that just display's a video stream. But in the test case I'm using a test.mp4 file just to make sure it all gets packaged. I've tried it with --onedir and with --onefile (prefered)
and with the python you link against and my own. Also I've tried putting the import pygst line in the .spec file.

The instructions I've used are the ones updated for pyinstaller 2.0.

It fails on gstreamer after it enters the main loop as seen below.

You'll note the runtime warnings, I'm using the 2.7 python that came with OSX Lion but the same happends with your own python.

Last login: Tue Sep 25 13:47:27 on ttys002
Rios-MacBook-Pro:~ rio$ /Users/rio/Desktop/kivyPackage/pyinstaller-2.0/videoplayer/dist/videoplayer/videoplayer ; exit;
[INFO ] Kivy v1.4.0
[INFO ] [Logger ] Record log in /Users/rio/.kivy/logs/kivy_12-09-25_18.txt
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.event' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.properties' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.instructions' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.buffer' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.vbo' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.transformation' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.texture' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.context_instructions' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.compiler' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.shader' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.fbo' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.context' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
[DEBUG ] [Cache ] register with limit=None, timeout=60s
[DEBUG ] [Cache ] register with limit=None, timeout=Nones
[WARNING] [Image ] Unable to use as loader!
[DEBUG ]
Traceback (most recent call last):
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.core", line 97, in core_register_libs
File "/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py", line 409, in importHook
raise ImportError("No module named %s" % fqname)
ImportError: No module named kivy.core.image.img_dds
[WARNING] [Image ] Unable to use as loader!
[DEBUG ]
Traceback (most recent call last):
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.core", line 97, in core_register_libs
File "/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py", line 409, in importHook
raise ImportError("No module named %s" % fqname)
ImportError: No module named kivy.core.image.img_pil
[WARNING] [Image ] Unable to use as loader!
[DEBUG ]
Traceback (most recent call last):
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.core", line 97, in core_register_libs
File "/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py", line 409, in importHook
raise ImportError("No module named %s" % fqname)
ImportError: No module named kivy.core.image.img_gif
[DEBUG ] [Cache ] register with limit=1000, timeout=60s
[DEBUG ] [Cache ] register with limit=1000, timeout=60s
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.opengl_utils' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.opengl' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.vertex_instructions' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.stencil_instructions' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
/Users/rio/Desktop/kivyPackage/pyinstaller-2.0/PyInstaller/loader/iu.py:105: RuntimeWarning: compiletime version 2.6 of module 'kivy.graphics.gl_instructions' does not match runtime version 2.7
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
[INFO ] [Factory ] 122 symbols loaded
[DEBUG ] [Cache ] register with limit=None, timeout=Nones
[INFO ] [Text ] using as text provider
[DEBUG ] [Cache ] register with limit=500, timeout=60s
[INFO ] [Loader ] using as thread loader
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
[INFO ] [Video ] using as video provider
[DEBUG ] [App ] kv <./my.kv> not found
[INFO ] [Window ] using as window provider
[INFO ] [GL ] OpenGL version <2.1 ATI-7.32.12>
[INFO ] [GL ] OpenGL vendor
[INFO ] [GL ] OpenGL renderer
[INFO ] [GL ] Shading version <1.20>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [Shader ] fragment compiled successfully
[INFO ] [Shader ] vertex compiled successfully
[DEBUG ] [ImagePygame ] Load
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [OSC ] using for socket
[DEBUG ] [Base ] Create provider from mouse
[INFO ] [Base ] Start application main loop
[INFO ] [Base ] Leaving application in progress...
Traceback (most recent call last):
File "", line 76, in
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.app", line 542, in run
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.base", line 428, in runTouchApp
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.core.window.window_pygame", line 303, in mainloop
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.core.window.window_pygame", line 213, in mainloop
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.base", line 277, in idle
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.clock", line 313, in tick
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.clock", line 420, in _process_events
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.clock", line 232, in tick
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.uix.video", line 154, in _do_video_load
File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.core.video.video_gstreamer", line 72, in __init

File "videoplayer/build/pyi.darwin/videoplayer/out00-PYZ.pyz/kivy.core.video.video_gstreamer", line 77, in gst_init
gst.ElementNotFoundError: appsink
Exception AttributeError: "'VideoGStreamer' object has no attribute 'playbin'" in <bound method VideoGStreamer.__del
of > ignored
logout

[Process completed]

@tito tito referenced this issue from a commit
@tito tito pyinstaller: correctly set the GST_PLUGIN_PATH when kivy is running, …
…but it will work only if plugins and libs are included. refs #462
3f63aba
@tito tito closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.