Cannot Import GST in Python

后端 未结 4 1323
夕颜
夕颜 2020-12-10 09:58

I\'m in a quandary. I\'m following the following tutorial (specifically, 6.4.2)

http://majorsilence.com/pygtk_audio_and_video_playback_gstreamer

I\'m running

4条回答
  •  情歌与酒
    2020-12-10 10:41

    This is because you are using Python 2.7, and the GST default is 2.6. This is really easy to fix:

    Go to C:\Program Files\OSSBuild\GStreamer\v0.10.6\sdk\bindings\python\v2.7\lib

    and copy

    gstreamer-0.10 and site-packages to

    C:\Program Files\OSSBuild\GStreamer\v0.10.6\lib, replacing any existing files.

    Then delete the file C:\Program Files\OSSBuild\GStreamer\v0.10.6\lib\gstreamer-0.10\libgstpython-v2.6.dll (or change the extension to .dllx or something).

    Now it should work.

    Alternatively to changing GST to suit Python 2.7, you could just use Python 2.6.

    EDIT: After attempting to install Gstreamer on a new computer, I found that I could not import pygst until I removed the extra backslash from C:\Program Files\OSSBuild\Gstreamer\v0.10.7\lib\site-packages\ in PYTHONPATH. I believe this may have been your problem all the way along.

提交回复
热议问题