Using Gstreamer and souphttpsrc in Jupyter Notebook
Jimmy Bush
mr.jimmybush at gmail.com
Mon Sep 21 15:15:11 UTC 2020
Tony, thanks for all your help. The debian package worked. I guess I
didn't check that because the Jupyter installation guide made no mention of
a debian package. I haven't gotten the soup part working yet, but I was
able to create the Gst element ok, so I'm back on the right path.
Thanks,
Jimmy
On Sun, Sep 20, 2020 at 7:52 AM Tony Houghton <h at realh.co.uk> wrote:
> I googled "jupyter deb" and found this
> <https://pkgs.org/download/jupyter-notebook>. There also seems to be at
> least one PPA containing it. I'm not sure what you mean about the namespace
> error, but I googled that too, and it seems that could be because the
> python bindings for gstreamer are missing. There should be packages called
> python3-gst-1.0 and/or python-gst-1.0.
>
> If none of this works, you could also try installing gstreamer-plugins-bad
> and use the curl plugin instead of soup. Or is soup necessary to integrate
> with Jupyter?
>
> On Sun, 20 Sep 2020 at 05:14, Jimmy Bush <mr.jimmybush at gmail.com> wrote:
>
>> Well, I'd be happy to use the 1.16 version that comes with Linux Mint 20
>> (which I think is what apt would be), but I haven't found how to get
>> gstreamer to work in the Jupyter Notebook. At least the conda-forge
>> version fixes the namespace error.
>>
>> I have only found conda and pip ways of installing Jupyter Notebook. If
>> there's an apt way to do that, that might get me further.
>>
>> Barring that, should I continue to try the local build route? I also
>> found the article linked below suggesting that GI_TYPELIB_PATH might be the
>> issue. Does gstreamer/gobject-introspection rely on environment variables
>> that Notebook might not be seeing?
>>
>>
>> https://stackoverflow.com/questions/50440365/raise-valueerrornamespace-s-not-available-namespace-valueerror-namespace
>>
>> On Sat, Sep 19, 2020 at 5:49 PM Tony Houghton <h at realh.co.uk> wrote:
>>
>>> Couldn't you just use apt instead of conda?
>>>
>>> On Sat, 19 Sep 2020 at 20:48, Jimmy Bush <mr.jimmybush at gmail.com> wrote:
>>>
>>>> When I execute
>>>>
>>>> conda install gst-plugins-good
>>>>
>>>> it causes gstreamer, gst-plugins-base, and gst-plugins good to be
>>>> installed. All are 1.14.5. Same behavior, as gst-inspect-1.0 reports "No
>>>> such element or plugin 'souphttpsrc'.
>>>>
>>>> After uninstalling these conda packages, I also attempted to install
>>>> jupyter notebook with pip in my conda workspace. This installed okay, and
>>>> it didn't break my command line usage of souphttpsrc. In the notebook,
>>>> however, when I try to gi.require_version("Gst", "1.0"), it gives me an
>>>> error that "Namespace Gst not available", even though I have
>>>> gobject-introspection and pygobject installed. If this is an easier
>>>> problem to attack, it would let me use 1.16, which might be preferable
>>>> given that a lot of gst_plugins packages aren't available in conda.
>>>>
>>>> Thanks,
>>>> Jimmy
>>>>
>>>> On Sat, Sep 19, 2020 at 1:15 PM Tony Houghton <h at realh.co.uk> wrote:
>>>>
>>>>> It looks like soup is in gst-plugins-good, so try installing that too.
>>>>>
>>>>> On Sat, 19 Sep 2020 at 17:21, Jimmy Bush <mr.jimmybush at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hey, everyone, sorry if this is the wrong forum for this.
>>>>>>
>>>>>> I have been working for the last week to run gstreamer inside a
>>>>>> Jupyter notebook, and for the most part I have been successful. From the
>>>>>> command line of Linux Mint 20, I am able to run the 1.16.2 version of
>>>>>> gstreamer with gst-launch-1.0 call, and I use souphttpsrc and youtube-dl to
>>>>>> watch a youtube clip.
>>>>>>
>>>>>> From
>>>>>> http://lifestyletransfer.com/how-to-watch-youtube-videos-with-gstreamer/
>>>>>>
>>>>>> gst-launch-1.0 souphttpsrc is-live=true location="$(youtube-dl
>>>>>> --format "best[ext=mp4][protocol=https]" --get-url
>>>>>> https://www.youtube.com/watch?v=ndl1W4ltcmg)" ! decodebin !
>>>>>> videoconvert ! autovideosink
>>>>>>
>>>>>> Works great. When I install Jupyter in conda, it pulls 1.14.5
>>>>>> versions of gstreamer and gst-plugins-base. I have been able to pop up the
>>>>>> videotestsrc within Jupyter Notebook as one would expect. However, I
>>>>>> can no longer use souphttpsrc. If I gst-inspect-1.0 souphttpsrc, I get "No
>>>>>> such element or plugin 'souphttpsrc'". Same is true if I conda install
>>>>>> gstreamer by itself. From my readings, I think that means that
>>>>>> --enable-soup was not used.
>>>>>>
>>>>>> My questions:
>>>>>> 1) Has anyone gotten this to work?
>>>>>> 2) Is there a version of gstreamer for conda with soup enabled?
>>>>>> 3) Should my next step be to build gstreamer locally, enabling soup
>>>>>> myself?
>>>>>> 4) Would there be value in trying to publish a soup-enabled version
>>>>>> to conda-forge? Would 1.14.5, 1.16.2 or 1.18 be the best candidate should I
>>>>>> get that far?
>>>>>>
>>>>>> I've used Linux for several years, but this would be my first foray
>>>>>> into contributing to the open source community, so please help with any
>>>>>> baseline misunderstandings on my part.
>>>>>>
>>>>>> Thanks,
>>>>>> Jimmy
>>>>>>
>>>>>> _______________________________________________
>>>>>> gstreamer-devel mailing list
>>>>>> gstreamer-devel at lists.freedesktop.org
>>>>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> TH
>>>>>
>>>>> _______________________________________________
>>>>> gstreamer-devel mailing list
>>>>> gstreamer-devel at lists.freedesktop.org
>>>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>>>
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>>
>>>
>>>
>>> --
>>> TH
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
>
> --
> TH
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200921/f55aa3da/attachment-0001.htm>
More information about the gstreamer-devel
mailing list