一、簡介linux
是一個爲流媒體提供解決方案的跨平臺的C++開源項目,它實現了對標準流媒體傳輸是一個爲流媒體提供解決方案的跨平臺的C++開源項目,它實現了對標準流媒體傳輸協議如RTP/RTCP、RTSP、SIP等的支持。Live555實現了對多種音視頻編碼格式的音視頻數據的流化、接收和處理等支持,包括MPEG、H.263+、DV、JPEG視頻和多種音頻編碼。同時因爲良好的設計,Live555很是容易擴展對其餘格式的支持。目前,Live555已經被用於多款播放器的流媒體播放功能的實現,如VLC(VideoLan)、MPlayer。c++
二、下載web
點擊打開連接windows
三、移植網絡
3.一、配置交叉編譯選項ide
修改配置文件config.armlinux,只須要修改第一行配置交叉編譯工具爲本身所用的平臺工具
CROSS_COMPILE?=arm-hisiv100nptl-Linux- 測試
保存。this
3.二、生成makele 編碼
# ./genMakefiles armlinux
3.三、交叉編譯與安裝
# make; make install
四、測試
將mediaServer目錄下面的live555MediaServer拷貝至ipc環境下,運行。
在windows平臺上,經過VLC media player軟件中打開網絡串流輸入地址:rtsp://172.18.197.152/test.264能夠點播視頻文件
(172.18.197.152 IPC的地址,test.264是放在運行live555MediaServer目錄下的視頻文件)
備註:
運行以前,拷貝在運行目錄下放置.264後綴的視頻文件。
live555MediaServer的運行依賴C++庫libstdc++.so.6,該庫能夠在hisi-SDK中能夠找到,拷貝進ipc,用命令export LD_LIBRARY_PATH=./添加庫的環境變量。
問題:在make時報錯了,錯誤信息以下:
In file included from MPEG4GenericRTPSink.cpp:22:
include/Locale.hh:47: fatal error: xlocale.h: No such file or directory
compilation terminated.
make[1]: *** [MPEG4GenericRTPSink.o] Error 1
make[1]: Leaving directory `/mnt/hgfs/share/live555/live/liveMedia'
make: *** [all] Error 2
緣由:
因爲海思使用的是uClinux,並無xlocale.h這個頭文件,而live555內部的一個locale模塊調用了(見liveMeida/locale.hh),所以經過編譯選項把他去掉。
解決:
在COMPILE_OPTS選項末尾加入-DLOCALE_NOT_USED選項,保存,從新運行./genMakefile ,生成makefile 以後從新編譯,能夠正常經過
./live555MediaServer
LIVE555 Media Server
version 0.88 (LIVE555 Streaming Media library version 2016.01.29). Play streams from this server using the URL //推送的rtsp流 rtsp://115.28.158.166/<filename> where <filename> is a file present in the current directory. Each file's type is inferred from its name suffix: //此處可得知,支持的格式有限 ".264" => a H.264 Video Elementary Stream file ".265" => a H.265 Video Elementary Stream file ".aac" => an AAC Audio (ADTS format) file ".ac3" => an AC-3 Audio file ".amr" => an AMR Audio file ".dv" => a DV Video file ".m4e" => a MPEG-4 Video Elementary Stream file ".mkv" => a Matroska audio+video+(optional)subtitles file ".mp3" => a MPEG-1 or 2 Audio file ".mpg" => a MPEG-1 or 2 Program Stream (audio+video) file ".ogg" or ".ogv" or ".opus" => an Ogg audio and/or video file ".ts" => a MPEG Transport Stream file (a ".tsx" index file - if present - provides server 'trick play' support) ".vob" => a VOB (MPEG-2 video with AC-3 audio) file ".wav" => a WAV Audio file ".webm" => a WebM audio(Vorbis)+video(VP8) file See http://www.live555.com/mediaServer/ for additional documentation. //默認80端口,不然被佔用 (We use port 80 for optional RTSP-over-HTTP tunneling, or for HTTP live streaming (for indexed Transport Stream files only).)
此時可接收試試
在testProgs
文件夾中,有諸多生成的文件