Coder Social home page Coder Social logo

marodru / building-gstreamer-raspberry-pi-with-srt-support Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pietroavolio/building-gstreamer-raspberry-pi-with-srt-support

0.0 1.0 0.0 34 KB

This sh script and some tips you can find in the README file will help you obtaining a running installation of gstreamer with SRT support on you Raspberry

License: MIT License

Shell 100.00%

building-gstreamer-raspberry-pi-with-srt-support's Introduction

Building-Gstreamer-Raspberry-Pi-With-SRT-Support

This sh script and some tips you can find in the README file will help you obtaining a running installation of gstreamer with SRT support on you Raspberry PI (Raspbian 10 Buster)

Why?

I struggled over a month and wasted a considerable amount of time trying to get a working version of gstreamer (at this point in time the latest release is the 1.16). I followed different guides and approaches (both official or user-written) but none of them worked standalone.

This guide is intended for very beginners like me and for myself because maybe I will need gstreamer with SRT support again and I don't wont to forget how to do it.

Contributing

I'm putting this a the beginning because there are 99% chance I will not need gstreamer in my life for a lot of time but it would be graat that people facing new problems (with new Raspbian releases or new gstreamer releases) will maintain this guide updated => feel free to commit and fork!

Let's start

Setting up the RPI

Please run sudo raspi-config and go into

- 5 Interfacing Options

and make sure to enable the camera. A reboot is recommended right after.

SRT

The project can be found here: SRT Project from GitHub.

sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential
git clone https://github.com/Haivision/srt
cd srt
./configure
make
sudo make install

Gstreamer

Download and run the .sh script you can find in this repo and everything should run smoothly. It will take a lot of time but don't worry :) Just don't waste your time in front of your PI because it will seriously take a lot of time!

At the moment of writing the latest gStreamer release is 1.16. You can change the release version you want to build just changing it on line 4 of the .sh script.

Super noob tip: after downloading the sh file make it executable using

chmod u+x gstreamer_build.sh

Please note: This will not build anything under gst-libav because I'm getting an error and I really don't need it so i just skipped it

Raspicam Src

I found this plugin for natively using the raspicam inside a gstreamer pipeline extremely usefull.

Here's how to install it:

git clone https://github.com/thaytan/gst-rpicamsrc
cd gst-rpicamsrc
./autogen.sh --prefix=/usr --libdir=/usr/local/bin
make
sudo make install

Please not the choice of libdir: we're placing them in the exact same folder of where we placed gstreamer libraries.

Usage example

On the RPI:

gst-launch-1.0 -v rpicamsrc preview=true sensor-mode=5 bitrate=8000000! video/x-h264,width=1640,height=922,framerate=40/1,profile=baseline ! mpegtsmux ! srtsink uri=srt://:8888

On the receiver you can either:

Use VLC

You can find the stream at srt://YOUR RPI IP ADDRESS:8888

Use a gStreamer Pipeline

gst-launch-1.0 srtsrc uri=srt://192.168.1.55:8888 ! decodebin ! autovideosink sync=false

building-gstreamer-raspberry-pi-with-srt-support's People

Contributors

pietroavolio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.