1. 程式人生 > >live555編譯移植

live555編譯移植

1、在官網www.live555.com下載最新的原始碼包
2、解壓進入live

drwxrwxrwx 1 root root   4096 Jul 12 13:02 BasicUsageEnvironment
-r-xr-xr-x 1 root root    433 Jun 26 17:19 config.aix
-r-xr-xr-x 1 root root    429 Jun 26 17:19 config.alpha
-r-xr-xr-x 1 root root    700 Jun 26 17:19 config.armeb-uclibc
-r-xr-xr-x 1 root root    585
Jul 12 13:01 config.armlinux -r-xr-xr-x 1 root root 691 Jun 26 17:19 config.avr32-linux -r-xr-xr-x 1 root root 653 Jun 26 17:19 config.bfin-linux-uclibc -r-xr-xr-x 1 root root 651 Jun 26 17:19 config.bfin-uclinux -r-xr-xr-x 1 root root 713 Jun 26 17:19 config.bsplinux -r-xr-xr-x 1 root root 899
Jun 26 17:19 config.cris-axis-linux-gnu -r-xr-xr-x 1 root root 473 Jun 26 17:19 config.cygwin -r-xr-xr-x 1 root root 515 Jun 26 17:19 config.cygwin-for-vlc -r-xr-xr-x 1 root root 438 Jun 26 17:19 config.freebsd -r-xr-xr-x 1 root root 1272 Jun 26 17:19 config.iphoneos -r-xr-xr-x 1 root root 1436
Jun 26 17:19 config.iphone-simulator -r-xr-xr-x 1 root root 403 Jun 26 17:19 config.irix -r-xr-xr-x 1 root root 498 Jun 26 17:19 config.linux -r-xr-xr-x 1 root root 453 Jun 26 17:19 config.linux-64bit -r-xr-xr-x 1 root root 443 Jun 26 17:19 config.linux-gdb -r-xr-xr-x 1 root root 2351 Jun 26 17:19 config.linux-with-shared-libraries -r-xr-xr-x 1 root root 459 Jun 26 17:19 config.macosx -r-xr-xr-x 1 root root 469 Jun 26 17:19 config.macosx-32bit -r-xr-xr-x 1 root root 422 Jun 26 17:19 config.macosx-before-version-10.4 -r-xr-xr-x 1 root root 651 Jun 26 17:19 config.mingw -r-xr-xr-x 1 root root 433 Jun 26 17:19 config.openbsd -r-xr-xr-x 1 root root 568 Jun 26 17:19 config.qnx4 -r-xr-xr-x 1 root root 481 Jun 26 17:19 config.solaris-32bit -r-xr-xr-x 1 root root 645 Jun 26 17:19 config.solaris-64bit -r-xr-xr-x 1 root root 395 Jun 26 17:19 config.sunos -r-xr-xr-x 1 root root 751 Jun 26 17:19 config.uClinux -r-xr-xr-x 1 root root 377 Jun 26 17:19 configure -r-xr-xr-x 1 root root 24386 Jun 26 17:19 COPYING -r-xr-xr-x 1 root root 547 Jun 26 17:19 fix-makefile -r-xr-xr-x 1 root root 503 Jun 26 17:19 genMakefiles -r-xr-xr-x 1 root root 951 Jun 26 17:19 genWindowsMakefiles -r-xr-xr-x 1 root root 857 Jun 26 17:19 genWindowsMakefiles.cmd drwxrwxrwx 1 root root 4096 Jul 12 13:02 groupsock drwxrwxrwx 1 root root 131072 Jul 12 13:02 liveMedia -r-xr-xr-x 1 root root 2021 Jul 12 13:01 Makefile -r-xr-xr-x 1 root root 49 Jun 26 17:19 Makefile.head -r-xr-xr-x 1 root root 1387 Jun 26 17:19 Makefile.tail drwxrwxrwx 1 root root 4096 Jul 12 14:05 mediaServer drwxrwxrwx 1 root root 4096 Jul 12 13:02 proxyServer -r-xr-xr-x 1 root root 103 Jun 26 17:19 README drwxrwxrwx 1 root root 40960 Jul 12 13:02 testProgs drwxrwxrwx 1 root root 4096 Jul 12 13:02 UsageEnvironment -r-xr-xr-x 1 root root 1448 Jun 26 17:19 win32config -r-xr-xr-x 1 root root 1422 Jun 26 17:19 win32config.Borland drwxrwxrwx 1 root root 4096 Jul 12 09:57 WindowsAudioInputDevice

3、根據自己的平臺選擇對應的config.xxx
1)Linux平臺

#./genMakefiles config.linux
# make 即可編譯過

2)嵌入式交叉編譯
修改config.armlinux 在COMPILE_OPTS 增加-DLOCALE_NOT_USED

COMPILE_OPTS =          $(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -DNO_SSTREAM=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED
#./genMakefiles config.armlinux
# make 即可編譯過

4、直接使用live/mediaServer/live555MediaServer即可搭建RTSP伺服器環境
5、視訊檔案放在與live555MediaServer同一個目錄下,支援的格式見幫助

LIVE555 Media Server
        version 0.89 (LIVE555 Streaming Media library version 2016.06.26).
Play streams from this server using the URL
        rtsp://192.168.1.13/<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.
(We use port 8000 for optional RTSP-over-HTTP tunneling, or for HTTP live streaming (for indexed Transport Stream files only).)