-
-
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" | |
# |
for some reason (probably a bug), dvbsrc works more reliably with "trans-mode=8k" included as an argument
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!
@windowsair unfortunately I don't remember. Sorry.
Thank you for your reply!
Either way, it's a good start. Thank you for the script!
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..
https://github.com/rockchip-linux/gstreamer-rockchip.git is gone.
so what now?
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.
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
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 ...