gst-sync-server icon indicating copy to clipboard operation
gst-sync-server copied to clipboard

Running on Raspberry PI

Open reinzor opened this issue 7 years ago • 7 comments

Hi,

I am trying to get the gst-sync-server to work on the raspberry pi for a videowall usecase. Do you have any experience or advice?

I tried installing the following:

  • Installing gstreamer on stretch and compile the library: this works. However, I cannot replay 720p files on stretch using gstreamer. It seems that the hardware acceleration is not working
  • Installing gstreamer on jessie, library does not compile since jessie has an older version of glib2. However, gstreamer 720p playback works but 1080p does not (omxplayer however is working).

Do you recommend compiling all gstreamer deps from source?

The library perfectly works on my linux desktop and laptops.

Thanks in advance,

Rein

reinzor avatar Aug 15 '18 16:08 reinzor

It should work is the only advice I have, as I haven't tried on a Raspberry Pi :) Please continue filing reports if you find that this is not the case, and I'll try to help.

The key thing is to make sure that you can play things locally with playbin (so make sure gst-launch-1.0 playbin uri=file:///... works fine. That is a necessary first step, so we know the player pipeline works fine before we dig into the sync bits.

ford-prefect avatar Aug 20 '18 02:08 ford-prefect

Hi @ford-prefect , thanks for your reply. It is indeed gstreamer that is not working properly. I am browsing the internet for three days but cannot figure out the best way to run gstreamer on the RaspberryPi. Do you have any recommendations?

reinzor avatar Aug 21 '18 14:08 reinzor

I'm surprised, since there are a lot of people using GStreamer on the Raspberry Pi. I'd imagine things should work out of the box with raspbian. Do you have a specific error you're seeing?

ford-prefect avatar Aug 21 '18 15:08 ford-prefect

Especially performance:

Raspbian Stretch lite

Debians

Installed using

sudo apt-get -y install x-window-system \
                        gstreamer1.0-tools \
                        gstreamer1.0-plugins-good \
                        gstreamer1.0-plugins-bad \
                        gstreamer1.0-plugins-ugly \
                        gstreamer1.0-omx \
                        gir1.2-gst-plugins-base-1.0 \
                        python-gst-1.0 \
                        pulseaudio

When using the playbin with the ximagesink, it seems that hardware acceleration is not working properly.

Also see: https://www.raspberrypi.org/forums/viewtopic.php?t=193152

Compiling from source

Ran into some troubles on Pi zero and Pi 3 using this script https://gist.github.com/Swap-File/d8511128930c93281f36f18d634f6748 . I will test this more.

Raspbian Jessie lite

Debians

Installed using:

sudo apt-get -y install x-window-system \
                        gstreamer1.0-tools \
                        gstreamer1.0-plugins-good \
                        gstreamer1.0-plugins-bad \
                        gstreamer1.0-plugins-ugly \
                        gstreamer1.0-omx \
                        gir1.2-gst-plugins-base-1.0 \
                        python-gst-1.0 \
                        pulseaudio

When using playbin with the ximagesink 720p videos seem to work, however 1080p videos show only 2 frames per second (Pi 3). On the Pi Zero, only 480p videos work properly.

Compiling from source

Did not try yet

reinzor avatar Aug 21 '18 18:08 reinzor

Is ximagesink expected to work and be hardware-accelerated on the Raspberry Pi? I'd imagine you should be using glimagesink instead.

ford-prefect avatar Aug 22 '18 08:08 ford-prefect

The following command plays the video quiet smoothly:

gst-launch-1.0 filesrc location= /home/pi/big_buck_bunny_720p_30mb.mp4 ! qtdemux ! h264parse ! omxh264dec ! videoconvert ! ximagesink

However, when I replace the ximagesink with glimagesink, the playback drops to 2 frames per second and the following message is displayed:

gstbasesink.c(2794): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstGLImageSink:glimagesink0:
There may be a timestamping problem, or this computer is too slow.

reinzor avatar Aug 22 '18 10:08 reinzor

(did not test) but i think OP was missing a fresh gst-omx end of pipeline should be h264parse ! omxh264dec ! glimagesink

see this discussion

5shekel avatar Mar 12 '20 19:03 5shekel

Either that, or the more recent v4l2h264dec should do the trick.

ford-prefect avatar Sep 07 '22 15:09 ford-prefect