ford-prefect / gst-sync-server

A library for synchronised network playback applications
GNU Lesser General Public License v2.1
71 stars 14 forks source link

Running on Raspberry PI #7

Closed reinzor closed 2 years ago

reinzor commented 6 years ago

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:

Do you recommend compiling all gstreamer deps from source?

The library perfectly works on my linux desktop and laptops.

Thanks in advance,

Rein

ford-prefect commented 6 years ago

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.

reinzor commented 6 years ago

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?

ford-prefect commented 6 years ago

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?

reinzor commented 6 years ago

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

ford-prefect commented 6 years ago

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

reinzor commented 6 years ago

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.
5shekel commented 4 years ago

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

see this discussion

ford-prefect commented 2 years ago

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