Streaming webm + icecast
De MochilaWiki
Revisão de 23h06min de 8 de julho de 2014 por Banto Palmarino (discussão | contribs)
instalando libshout 2.3.1 e recompilando gstreamer0.10-plugins-good
em debian 7
apt-get install fakeroot dh-buildinfo
cd /usr/src
wget http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz
tar zxvf libshout-2.3.1.tar.gz
cd libshout-2.3.1
apt-get build-dep libshout3
dpkg-buildpackage -rfakeroot -b
cd ..
dpkg -i libshout*.deb
apt-get source gstreamer0.10-plugins-good
apt-get build-dep gstreamer0.10-plugins-good
dpkg-source -x gst-plugins-good0.10_0.10.31-3+nmu1.dsc
cd gst-plugins-good0.10-0.10.31/
dpkg-buildpackage -rfakeroot -b
cd ..
dpkg -i gstreamer0.10-plugins-good*.deb
em ubuntu 12.04
apt-get install build-essential fakeroot dpkg-dev dh-buildinfo
cd /usr/src
wget http://downloads.xiph.org/releases/libshout/libshout-2.3.1.tar.gz
tar zxvf libshout-2.3.1.tar.gz
cd libshout-2.3.1
apt-get build-dep libshout3
dpkg-buildpackage -rfakeroot -b
cd ..
dpkg -i libshout*.deb
apt-get source gstreamer0.10-plugins-good
apt-get build-dep gstreamer0.10-plugins-good
dpkg-source -x gst-plugins-good0.10_0.10.31-1ubuntu1.2.dsc
cd gst-plugins-good0.10-0.10.31/
dpkg-buildpackage -rfakeroot -b
cd ..
dpkg -i gstreamer0.10-plugins-good*.deb
em Fedora 20
yumdownloader --source libshout
sudo yum-builddep libshout-2.2.2-10.fc20.src.rpm --nogpgcheck
rpm -ivh libshout-2.2.2-10.fc20.src.rpm
sed -i '42d' ~/rpmbuild/SPECS/libshout.spec
sed -i '10d' ~/rpmbuild/SPECS/libshout.spec
sed -i 's/2.2.2/2.3.1/g' ~/rpmbuild/SPECS/libshout.spec
wget http://downloads.us.xiph.org/releases/libshout/libshout-2.3.1.tar.gz
mv libshout-2.3.1.tar.gz ~/rpmbuild/SOURCES/
cd ~/rpmbuild/SPECS
rpmbuild -ba libshout.spec
cd ~/rpmbuild/RPMS/x86_64/
sudo rpm -Uvh libshout-*
yumdownloader --source gstreamer-plugins-good
sudo yum-builddep gstreamer-plugins-good-0.10.31-10.fc20.src.rpm --nogpgcheck
rpmbuild --rebuild gstreamer-plugins-good-0.10.31-10.fc20.src.rpm
cd ~/rpmbuild/RPMS/x86_64/
sudo rpm -Uvh gstreamer-plugins-good-0.10.31-10.fc20.x86_64.rpm --force
yumdownloader --source gstreamer-plugins-bad
sudo yum-builddep gstreamer-plugins-bad-0.10.23-5.fc20.src.rpm --nogpgcheck
rpmbuild --rebuild gstreamer-plugins-bad-0.10.23-5.fc20.src.rpm
cd ~/rpmbuild/RPMS/x86_64/
sudo rpm -Uvh gstreamer-plugins-bad-0.10.23-5.fc20.x86_64.rpm --force
- página do projeto
http://www.webmproject.org/tools/
código fonte
echo deb http://ftp.br.debian.org/debian wheezy main contrib non-free > /etc/apt/sources.list
echo deb-src http://ftp.br.debian.org/debian wheezy main contrib non-free >> /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get build-dep gstreamer0.10-plugins-good
apt-get build-dep gstreamer0.10-plugins-base
apt-get install bison flex libvpx-dev libmatroska-dev libebml-dev
cd /usr/src
wget http://downloads.us.xiph.org/releases/libshout/libshout-2.3.1.tar.gz
wget -c http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.0.5.tar.xz
wget -c http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.0.5.tar.xz
wget -c http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.0.5.tar.xz
tar zxvf libshout-2.3.1.tar.gz
cd libshout-2.3.1/
./configure --prefix=/usr && make && make install
cd ..
tar xvf gstreamer-1.0.5.tar.xz
cd gstreamer-1.0.5
./configure --prefix=/usr && make && make install
cd ..
tar xvf gst-plugins-base-1.0.5.tar.xz
cd gst-plugins-base-1.0.5
./configure --prefix=/usr && make && make install
cd ..
tar xvf gst-plugins-good-1.0.5.tar.xz
cd gst-plugins-good-1.0.5
./configure --prefix=/usr && make && make install
transmitindo
metódo 1
gst-launch-0.10 -v -e v4l2src norm="NTSC" device=/dev/video0 ! queue ! \
videorate force-fps=15 ! videoscale ! video/x-raw-yuv, width=360, height=240 ! queue ! \
vp8enc mode=1 bitrate=120000 speed=2 ! queue ! webmmux streamable=true name=mux \
alsasrc device=default ! queue ! audio/x-raw-int,channels=2,rate=48000,depth=16 ! \
audioconvert ! queue ! vorbisenc bitrate=48000 ! mux. mux. ! queue ! \
shout2send ip="servericecast" port="8000" password="hackme" mount="/tv.webm" \
public="true" streamname=" " description=" " genre=" " url=" "
metódo 2
gst-launch-1.0 v4l2src device=/dev/video0 ! vp8enc ! queue ! webmmux streamable=true \
name=muxout ! shout2send ip=icecast.server port=8000 password=secret mount=/test.webm
metódo 3
gst-launch-1.0 v4l2src ! video/x-raw,width=320,height=240 ! vp8enc ! webmmux ! shout2send \
ip=icecast.server port=8000 password=secret mount=/test.webm
metódo 4
gst-launch-1.0 v4l2src ! queue ! video/x-raw,width=320,height=240 ! tee name=tscreen ! queue ! \
autovideosink tscreen. ! queue ! videorate ! video/x-raw,framerate=25/2 ! queue ! vp8enc ! queue ! \
webmmux name=mux pulsesrc ! queue ! audioconvert ! vorbisenc ! queue ! queue ! mux. mux. ! queue ! \
shout2send ip=hobo port=8000 mount=jamie.webm password=secret