Skip to content

Instantly share code, notes, and snippets.

@grkblood13
Last active January 16, 2024 10:46
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save grkblood13/6dd93db225bb0bf0519585e11bf687bd to your computer and use it in GitHub Desktop.
Save grkblood13/6dd93db225bb0bf0519585e11bf687bd to your computer and use it in GitHub Desktop.
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# update pacman dbs
# sudo pacman -Syy
# install 950q driver if missing
# https://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-950Q
if [[ ! -f /lib/firware/dvb-fe-xc5000-1.6.114.fw ]]; then
wget http://www.kernellabs.com/firmware/xc5000/dvb-fe-xc5000-1.6.114.fw
mv dvb-fe-xc5000-1.6.114.fw /lib/firmware/
fi
mkdir -p $DIR/gstbuild
cd $DIR/gstbuild
git clone https://github.com/rockchip-linux/mpp.git --depth=1
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git --depth=1
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-base.git --depth=1
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-good.git --depth=1
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly.git --depth=1
git clone https://gitlab.freedesktop.org/gstreamer/gst-libav.git --depth=1
git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git --depth=1
git clone https://github.com/rockchip-linux/gstreamer-rockchip.git --depth=1
sudo apt install cmake
#sudo pacman -S cmake
cd $DIR/gstbuild/mpp
cmake -DRKPLATFORM=ON -DHAVE_DRM=ON && make -j4
sudo make install
sudo apt install pkg-config autopoint gettext libtool libglib2.0-dev liborc-0.4-dev
#sudo pacman -S pkg-config gettext libtool glib2 orc qt5-declarative --noconfirm
cd $DIR/gstbuild/gstreamer/
./autogen.sh --enable-static --enable-shared --prefix=/usr
time make -j4 ERROR_CFLAGS=""
sudo make install
cd $DIR/gstbuild/gst-plugins-base/
./autogen.sh --disable-gtk-doc --enable-static --enable-shared --prefix=/usr --disable-fatal-warnings
time make -j4
sudo make install
cd $DIR/gstbuild/gst-plugins-good/
./autogen.sh --disable-gtk-doc --enable-static --enable-shared --prefix=/usr --disable-fatal-warnings
time make -j4
sudo make install
cd $DIR/gstbuild/gst-plugins-ugly/
./autogen.sh --disable-gtk-doc --enable-static --enable-shared --prefix=/usr --disable-fatal-warnings
time make -j4
sudo make install
cd $DIR/gstbuild/gst-libav/
./autogen.sh --enable-static --enable-shared --prefix=/usr --disable-fatal-warnings
time make -j4
sudo make install
cd $DIR/gstbuild/gst-plugins-bad/
./autogen.sh --disable-gtk-doc --enable-static --enable-shared --prefix=/usr --disable-fatal-warnings
time make -j4
sudo make install
cd $DIR/gstbuild/gstreamer-rockchip/
./autogen.sh --enable-static --enable-shared --prefix=/usr
time make -j4 ERROR_CFLAGS=""
sudo make install
#export LD_LIBRARY_PATH=/usr/local/lib/
#gst-launch-1.0 -v dvbsrc frequency=503000000 delsys="atsc" modulation="8vsb" pids=49:52:3 ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! omxh264enc target-bitrate=2000000 control-rate=variable ! mpegtsmux ! hlssink max-files=5 playlist-location=/tmp/live/stream.m3u8
#gst-launch-1.0 -v dvbsrc frequency=503000000 delsys="atsc" modulation="8vsb" pids=49:52:3 ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! mpph264enc ! mpegtsmux ! hlssink max-files=5 playlist-location=/tmp/live/stream.m3u8
#sudo LD_LIBRARY_PATH=/usr/local/lib bash -c "gst-launch-1.0 -v dvbsrc frequency=503000000 delsys=atsc modulation=8vsb pids=49:52:3 ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! mpph264enc ! mpegtsmux ! hlssink max-files=5 playlist-location=/tmp/live/stream.m3u8"
#
@grkblood13
Copy link
Author

grkblood13 commented Sep 1, 2019

installation notes on arch:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
sudo pacman -S pkgconf gstreamer $(pacman -Ssq gst-plugins) qt5-declarative --noconfirm

to run:
export LD_LIBRARY_PATH=/usr/local/lib
export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0
gst-launch-1.0 ...

@grkblood13
Copy link
Author

@grkblood13
Copy link
Author

for some reason (probably a bug), dvbsrc works more reliably with "trans-mode=8k" included as an argument

@windowsair
Copy link

windowsair commented Jan 27, 2022

Hi, @grkblood13, thank you for your excellent work!

It's been a while since you posted this. Do you remember the version of gstreamer at the time? Maybe it's v1.10 ? Thank you!

@grkblood13
Copy link
Author

@windowsair unfortunately I don't remember. Sorry.

@windowsair
Copy link

Thank you for your reply!

Either way, it's a good start. Thank you for the script!

@Maigre
Copy link

Maigre commented Feb 21, 2022

Digging into gstreamer-rockchip commits, the last mention of a version is 1.14
Trying to run this script with

git clone --branch 1.14 https://gitlab.freedesktop.org/gstreamer/gstreamer.git --depth=1
git clone --branch 1.14 https://gitlab.freedesktop.org/gstreamer/gst-plugins-base.git --depth=1
git clone --branch 1.14 https://gitlab.freedesktop.org/gstreamer/gst-plugins-good.git --depth=1
git clone --branch 1.14 https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly.git --depth=1
git clone --branch 1.14 https://gitlab.freedesktop.org/gstreamer/gst-libav.git --depth=1
git clone --branch 1.14 https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git --depth=1

will see..

@trollcop
Copy link

trollcop commented Nov 7, 2022

@trollcop
Copy link

trollcop commented Nov 7, 2022

https://github.com/JeffyCN/rockchip_mirrors/tree/gstreamer-rockchip

thanks for that. this is the weirdest way to keep completely unrelated software as different branches of a git tree I've ever seen.
would have never noticed it even existed there. bizzare.

@primoitt83
Copy link

primoitt83 commented Mar 15, 2023

Thx guys..

Any sucessfull build from this new repo?

Here is not working

git clone --branch gstreamer-rockchip https://github.com/JeffyCN/rockchip_mirrors.git --depth=1
cd rockchip_mirrors/
mkdir build
meson build
cd build
ninja
ninja install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment