0

I did this steps for transcoding my rtmp live streaming to hls on ubuntu 12.04:

    apt-get -y install build-essential checkinstall git libfaac-dev libgpac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libvorbis-dev pkg-config texi2html yasm zlib1g-dev apache2

cd /usr/src/
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar -xzf yasm-1.2.0.tar.gz
cd /usr/src/yasm-1.2.0
./configure
make
sudo checkinstall --pkgname=yasm --pkgversion="1.2.0" --backup=no --deldoc=yes --fstrans=no --default

cd /usr/src/
git clone --depth 1 git://git.videolan.org/x264
cd /usr/src/x264
./configure --enable-shared
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes --fstrans=no --default

cd /usr/src/
wget http://downloads.sourceforge.net/opencore-amr/fdk-aac-0.1.0.tar.gz
tar -xzf fdk-aac-0.1.0.tar.gz
cd /usr/src/fdk-aac-0.1.0
./configure
make
sudo checkinstall --pkgname=fdk-aac --pkgversion="0.1.0" --backup=no --deldoc=yes --fstrans=no --default

cd /usr/src/
git clone --depth 1 http://git.chromium.org/webm/libvpx.git
cd /usr/src/libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default

echo "/usr/local/lib/" >> /etc/ld.so.conf
ldconfig

cd /usr/src/
wget http://libav.org/releases/libav-snapshot.tar.bz2
tar -xjf libav-snapshot.tar.bz2
cd /usr/src/liba*
./configure --disable-debug --enable-librtmp --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-version3 --enable-shared
make -j4
sudo checkinstall --pkgname=libav --pkgversion="9-887-g25a80a9" --backup=no --deldoc=yes --fstrans=no --default
ldconfig


How to do Apple HLS using Avconv
mkdir /var/www/hls
ln -s /run/shm /var/www/hls

RUN This command 
avconv -re -i 'rtmp://RED_5_IP/live/stream_name' -bsf h264_mp4toannexb -vcodec libx264 -acodec libfaac -b:v 448k -b:a 40k -ar 22050 -s 640x360 -hls_time 10 -hls_list_size 4 /var/www/hls/output_a_.m3u8

but when i ran last part, my streaming didn't start and I've get this error:

avconv: relocation error: /usr/local/lib/libavfilter.so.3: symbol sws_isSupportedEndiannessConversion, version LIBSWSCALE_2 not defined in file libswscale.so.2 with link time reference

what i should to do?

Thanks.

1 Answers1

0

The problem is that avconv is unable to load the correct libav libraries. Probably the issue is that /usr/local/lib is not in your linker path. You can add it to the /etc/ld.so.conf file and then run ldconfig.

Another solution is to compile libav statically. That can be done by changing this

./configure --disable-debug --enable-librtmp --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-version3 --enable-shared

to this

./configure --disable-debug --enable-librtmp --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-libx264 --enable-gpl --enable-version3 --enable-static

vipw
  • 7,593
  • 4
  • 25
  • 48
  • Thank you. i did second solution but this error occurred: Closing connection: NetStream.Play.StreamNotFound rtmp://192.168.1.109/live/1lv: Unknown error occurred – Mohammad Ali Fayyaz Oct 15 '13 at 19:35
  • @MohammadAliFayyaz You can ask a new question focused on the error. But are you sure the stream exists with that name? – vipw Oct 16 '13 at 09:23
  • no body answer my question! my stream name is right and i can play my streaming. if you can please check this error. – Mohammad Ali Fayyaz Oct 16 '13 at 11:20