IBBoard / cawbird

A fork of the Corebird GTK Twitter client that continues to work with Twitter
https://ibboard.co.uk/cawbird/
GNU General Public License v3.0
309 stars 37 forks source link

Can't play video #437

Closed glasserc closed 2 years ago

glasserc commented 2 years ago

Thanks again for Cawbird! I use it every day.

Describe the bug I'm trying to set up Cawbird on my new laptop running Pop!_OS and I was able to compile it with my own Twitter API keys, and it seems to work except that clicking on a Tweet with a video (even an animated GIF) doesn't cause it to play. Sometimes clicking such a video brings up a new window, as though to display the video, but just displays a GStreamer error instead. Sometimes it causes Cawbird to crash.

To Reproduce On this Tweet, if I click the image, I get a window with this error:

../gst/isomp4/qtdemux.c(6545): gst_qtdemux_loop (): /GstPlayBin:video/GstURIDecodeBin:uridecodebin2/GstDecodeBin:decodebin2/GstQTDemux:qtdemux2: streaming stopped, reason error (-5)

I see a similar error message in the terminal where I am running the command to launch Cawbird:

(cawbird:224299): cawbird-CRITICAL **: 21:15:52.064: ../gst/isomp4/qtdemux.c(6545): gst_qtdemux_loop (): /GstPlayBin:video/GstURIDecodeBin:uridecodebin2/GstDecodeBin:decodebin2/GstQTDemux:qtdemux2: streaming stopped, reason error (-5)

To try to debug, I thought I would try to ensure that all the gstreamer packages installed on my old computer (which ran Cawbird without problems) were on this one too. Here's the output of dpkg -l '*gst*' on the new computer:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                   Version         Architecture Description
+++-======================================-===============-============-=========================================================================
ii  gir1.2-gst-plugins-bad-1.0:amd64       1.18.5-1ubuntu1 amd64        GObject introspection data for the GStreamer libraries from the "bad" set
ii  gir1.2-gst-plugins-base-1.0:amd64      1.18.5-1        amd64        GObject introspection data for the GStreamer Plugins Base library
ii  gir1.2-gstreamer-1.0:amd64             1.18.5-1        amd64        GObject introspection data for the GStreamer library
ii  gstreamer1.0-alsa:amd64                1.18.5-1        amd64        GStreamer plugin for ALSA
un  gstreamer1.0-audiosink                 <none>          <none>       (no description available)
un  gstreamer1.0-audiosource               <none>          <none>       (no description available)
ii  gstreamer1.0-clutter-3.0:amd64         3.0.27-2build1  amd64        Clutter PLugin for GStreamer 1.0
un  gstreamer1.0-doc                       <none>          <none>       (no description available)
ii  gstreamer1.0-gl:amd64                  1.18.5-1        amd64        GStreamer plugins for GL
ii  gstreamer1.0-gtk3:amd64                1.18.5-1ubuntu2 amd64        GStreamer plugin for GTK+3
ii  gstreamer1.0-libav:amd64               1.18.5-1        amd64        ffmpeg plugin for GStreamer
ii  gstreamer1.0-pipewire:amd64            0.3.32-1        amd64        GStreamer 1.0 plugin for the PipeWire multimedia server
ii  gstreamer1.0-plugins-bad:amd64         1.18.5-1ubuntu1 amd64        GStreamer plugins from the "bad" set
ii  gstreamer1.0-plugins-bad-apps          1.18.5-1ubuntu1 amd64        GStreamer helper programs from the "bad" set
un  gstreamer1.0-plugins-bad-faad          <none>          <none>       (no description available)
un  gstreamer1.0-plugins-bad-videoparsers  <none>          <none>       (no description available)
ii  gstreamer1.0-plugins-base:amd64        1.18.5-1        amd64        GStreamer plugins from the "base" set
ii  gstreamer1.0-plugins-base-apps         1.18.5-1        amd64        GStreamer helper programs from the "base" set
ii  gstreamer1.0-plugins-good:amd64        1.18.5-1ubuntu2 amd64        GStreamer plugins from the "good" set
ii  gstreamer1.0-plugins-ugly:amd64        1.18.5-1        amd64        GStreamer plugins from the "ugly" set
un  gstreamer1.0-plugins-ugly-amr          <none>          <none>       (no description available)
ii  gstreamer1.0-pulseaudio:amd64          1.18.5-1ubuntu2 amd64        GStreamer plugin for PulseAudio (transitional package)
ii  gstreamer1.0-tools                     1.18.5-1        amd64        Tools for use with GStreamer
ii  gstreamer1.0-vaapi:amd64               1.18.5-1        amd64        VA-API plugins for GStreamer
un  gstreamer1.0-vaapi-doc                 <none>          <none>       (no description available)
un  gstreamer1.0-videosink                 <none>          <none>       (no description available)
un  gstreamer1.0-videosource               <none>          <none>       (no description available)
un  gstreamer1.0-visualization             <none>          <none>       (no description available)
ii  gstreamer1.0-x:amd64                   1.18.5-1        amd64        GStreamer plugins for X11 and Pango
ii  libclutter-gst-3.0-0:amd64             3.0.27-2build1  amd64        Open GL based interactive canvas library GStreamer elements
ii  libgstreamer-gl1.0-0:amd64             1.18.5-1        amd64        GStreamer GL libraries
ii  libgstreamer-opencv1.0-0:amd64         1.18.5-1ubuntu1 amd64        GStreamer OpenCV libraries
ii  libgstreamer-plugins-bad1.0-0:amd64    1.18.5-1ubuntu1 amd64        GStreamer libraries from the "bad" set
ii  libgstreamer-plugins-bad1.0-dev:amd64  1.18.5-1ubuntu1 amd64        GStreamer development files for libraries from the "bad" set
ii  libgstreamer-plugins-base1.0-0:amd64   1.18.5-1        amd64        GStreamer libraries from the "base" set
ii  libgstreamer-plugins-base1.0-dev:amd64 1.18.5-1        amd64        GStreamer development files for libraries from the "base" set
ii  libgstreamer-plugins-good1.0-0:amd64   1.18.5-1ubuntu2 amd64        GStreamer development files for libraries from the "good" set
ii  libgstreamer-plugins-good1.0-dev       1.18.5-1ubuntu2 amd64        GStreamer development files for libraries from the "good" set
ii  libgstreamer1.0-0:amd64                1.18.5-1        amd64        Core GStreamer libraries and elements
ii  libgstreamer1.0-dev:amd64              1.18.5-1        amd64        GStreamer core development files
un  libgtk-4-media-gstreamer               <none>          <none>       (no description available)
un  libreoffice-avmedia-backend-gstreamer  <none>          <none>       (no description available)
un  totem-gstreamer                        <none>          <none>       (no description available)

This is a superset of the packages installed on the old computer (running Ubuntu).

I'm not 100% sure how to debug this because I never got good at gstreamer. Do I need to recompile Cawbird after every package installation? Do I need the lib packages as well as the -dev versions?

System details:

Additional context I tried running with G_MESSAGES_DEBUG=cawbird cawbird and the output is essentially the same, but preceded by

(cawbird:224857): cawbird-DEBUG: 21:19:32.551: Buffering: 1
(cawbird:224857): cawbird-DEBUG: 21:19:32.556: Buffering: 2
(cawbird:224857): cawbird-DEBUG: 21:19:32.645: Buffering: 3
(cawbird:224857): cawbird-DEBUG: 21:19:32.645: Buffering: 100
IBBoard commented 2 years ago

This is more than likely a GStreamer/Pop OS problem rather than Cawbird.

I've checked the tweet and it works for me on openSUSE. To test whether it's Cawbird or GStreamer then you need to copy the URL (right-click the image in the timeline and click "Copy URL") and then run gst-play-1.0 https://… (e.g. gst-play-1.0 https://video.twimg.com/tweet_video/FNLvUiCXEAQtcdQ.mp4 for that GIF). It will most likely fail with the same error.

The -5 error code is apparently a "flow error", which suggests an issue between you and Twitter's server.

With regards packages, if you're building locally then you'll need -dev packages. The lib packages will be needed for runtime. You probably won't need all of them for GStreamer, but having extras shouldn't harm anything. You shouldn't need to keep recompiling after installing packages, as GStreamer will load its plugins at runtime.

glasserc commented 2 years ago

Hmm, OK, when I do that sometimes I see something that doesn't correspond to the image and sometimes when I do that I get a SEGV. I guess this is a GStreamer or PopOS problem. I found someone else with some problem that may be similar and posted to that: https://github.com/pop-os/pop/issues/1473. Thanks for helping me troubleshoot.