live555筆記_hi3516A


1、簡介

是一個為流媒體提供解決方案的跨平台的C++開源項目,它實現了對標准流媒體傳輸是一個為流媒體提供解決方案的跨平台的C++開源項目,它實現了對標准流媒體傳輸協議如RTP/RTCP、RTSP、SIP等的支持。Live555實現了對多種音視頻編碼格式的音視頻數據的流化、接收和處理等支持,包括MPEG、H.263+、DV、JPEG視頻和多種音頻編碼。同時由於良好的設計,Live555非常容易擴展對其他格式的支持。目前,Live555已經被用於多款播放器的流媒體播放功能的實現,如VLC(VideoLan)、MPlayer。

2、下載

點擊打開鏈接

3、移植

3.1、配置交叉編譯選項

修改配置文件config.armlinux,只需要修改第一行配置交叉編譯工具為自己所用的平台

CROSS_COMPILE?=arm-hisiv100nptl-Linux-  

保存。

3.2、生成makele 

# ./genMakefiles armlinux

3.3、交叉編譯與安裝

# make; make install

4、測試

將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

./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).)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

此時可接收試試

其它測試

testProgs文件夾中,有諸多生成的文件

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM