淺析live555媒體庫之入門編譯使用

來源:互聯網
上載者:User

標籤:

  

簡介

          Live555 是一個為流媒體提供解決方案的跨平台的C++開源項目,它實現了對標準流媒體傳輸是一個為流媒體提供解決方案的跨平台的C++開源項目,它實現了對標準流媒體傳輸協議如RTP/RTCP、RTSP、SIP等的支援。Live555實現了對多種音視頻編碼格式的音視頻資料的流化、接收和處理等支援,包括MPEG、H.263+、DV、JPEG視頻和多種音頻編碼。同時由於良好的設計,Live555非常容易擴充對其他格式的支援。

主要分支

   live555主要包括四個比較重要的庫,分別為 UsageEnvironment、groupsock、liveMedia、BasicUsageEnvironment,是我們二次開發過程中需要的一些介面實現。還有一個testProgs目錄,裡面是一些基本使用的demo程式,入手可以從這裡開始。

源碼下載

        這裡可以下載最新的live555的相關源碼,都是以.tar.gz結尾的壓縮包,windows下也是下載這個,我下載了最新的2015/8/7的。

編譯

    官網也有比較明確的不同的平台的詳細說明,說明如下:

 // Linux 平台How to configure and build the code on Unix (including Linux, Mac OS X, QNX, and other Posix-compliant systems)The source code package can be found (as a ".tar.gz" file) here. Use "tar -x" and "gunzip" (or "tar -xz", if available) to extract the package; then cd to the "live" directory. Then run    ./genMakefiles <os-platform>where <os-platform> is your target platform - e.g., "linux" or "solaris" - defined by a "config.<os-platform>" file. This will generate a Makefile in the "live" directory and each subdirectory. Then run "make".// Windows平台How to configure and build the code on WindowsUnpack and extract the ‘.tar.gz‘ file (using an application such as "WinZip").If the ‘tools‘ directory on your Windows machine is something other than "c:\Program Files\DevStudio\Vc", change the "TOOLS32 =" line in the file "win32config".In a command shell, ‘cd‘ to the "live" directory, and run    genWindowsMakefilesThis will generate - in each subdirectory - a "*.mak" makefile suitable for use by (e.g.) Microsoft Visual Studio.

因為我是在ubuntu系統下研究live555,所以順便提一下我編譯的時候錯誤問題,

執行 ./genMakefiles linux後,運行make的時候報錯如下:


出現以上情況主要是ubuntu的開發環境沒有安裝好(ubuntu系統的一個弊端,什麼都得自己來)
sudo apt-get install  build-essential//<安裝有提示依賴的話,就安裝對應提示的檔案包,如果出現版本不匹配,可以先remove,然後在install>
安裝成功後,執行make,成功之後再對應的BasicUsageEnvironment、groupsock、liveMedia、UsageEnvironment檔案夾下產生需要的.a檔案了。這裡建議不需要使用make install安裝到系統,沒有必要,需要的時候連結一下就ok了。使用       make完成之後,進入到mediaSever目錄下,會發現產生了一下live555mediaServer可執行檔,是的,這個就是live555內建的一個簡單的rtsp服務程式,讓我們使用之前大致瞭解一下live555的功能,運行後如所示
此時就表示rtsp服務正常運行,在紅色框框中,就是live555庫自動系統的一個請求檔案流的url地址,將<filename>改成在mediaSever目錄下對應的h264播放檔案即可。如我下面的播放地址為rtsp://10.0.2.15:8554/test10.264,效果如下


live555的入門編譯介紹完,後面章節,繼續深入介紹相關知識,包括四個庫的作用,自己實現檔案流的播放,以及即時視頻流的播放等。

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

淺析live555媒體庫之入門編譯使用

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.