一.ffmpeg的编译
1.从官网http://ffmpeg.org/下载 ffmpeg-2.0.tar.gz
2.解压
tar -zxvf ffmpeg-2.0.tar.gz
3.配置生成makefile
./configure --enable-cross-compile --cross-prefix=arm-none-linux-gnueabi- --arch=arm --target-os=linux
4.编译
make
5.用法
/////////////////////////////////////////////////////////////////////////////rtsp
ffmpeg -y -i rtsp://192.168.0.50:8554/1.mkv -vcodec copy -acodec copy -f mp4 ./1.mp4
二.live555的编译
1.从官网http://www.live555.com/liveMedia/下载live.2013.07.16.tar.gz
2.解压
tar -zxvf live.2013.07.16.tar.gz
3.修改配置文件
打开config.armlinux文件
修改CROSS_COMPILE?= arm-none-linux-gnueabi-
4.配置生成makefile
./genMakefiles armlinux
5.编译
make
6.用法:
/////////////////////////////////////////////////////////////////////////////live555MediaServer LIVE555 Media Server version 0.78 (LIVE555 Streaming Media library version 2013.07.16). Play streams from this server using the URL rtsp://192.168.0.50:8554/<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 ".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 ".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 8080 for optional RTSP-over-HTTP tunneling, or for HTTP live streaming (for indexed Transport Stream files only).) 使用方法:把同目录下指定格式的文件以rtsp流输出 将上述提到的格式文件保存在live555MediaServer同个目录下(例如:1.mp3),然后在rtsp播放器(例如:VLC)中用rtsp://[ip地址]:[端口号]/[文件名]播放(例如:rtsp://192.168.0.50:8554/1.mp3)
/////////////////////////////////////////////////////////////////////////////live555ProxyServer LIVE555 Proxy Server (LIVE555 Streaming Media library version 2013.07.16) Usage: ./live555ProxyServer [-v|-V] [-t|-T <http-port>] [-u <username> <password>] [-R] <rtsp-url-1> ... <rtsp-url-n> 使用方法:将rtsp流转封装成统一格式的rtsp流 例如:运行./live555ProxyServer rtsp://192.168.0.50:8554/1.mkv 则打印下面信息 LIVE555 Proxy Server (LIVE555 Streaming Media library version 2013.07.16) RTSP stream, proxying the stream "rrtsp://192.168.0.50:8554/1.mkv" Play this stream using the URL: rtsp://192.168.0.50:8554/proxyStream (We use port 8080 for optional RTSP-over-HTTP tunneling.) 那么我们就可以直接用vlc播放rrtsp://192.168.0.50:8554/proxyStream这个地址
///////////////////////////////////////////////////////////////////////////////openRTSP Usage: ./openRTSP [-p <startPortNum>] [-r|-q|-4|-i] [-a|-v] [-V] [-d <duration>] [-D <max-inter-packet-gap-time> [-c] [-S <offset>] [-n] [-O] [-t|-T <http-port>] [-u <username> <password>] [-s <initial-seek-time>]|[-U <absolute-seek-time>] [-z <scale>] [-w <width> -h <height>] [-f <frames-per-second>] [-y] [-H] [-Q [<measurement-interval>]] [-F <filename-prefix>] [-b <file-sink-buffer-size>] [-B <input-socket-buffer-size>] [-I <input-interface-ip-address>] [-m] [<url>|-R [<port-num>]] (or ./openRTSP -o [-V] <url>) 打开rtsp流,解析保存成文件(./openRTSP -t -d 60 rtsp://192.168.0.50:8554/1.mkv)
三.mplayer的编译
1.从官网http://www.mplayerhq.hu/下载MPlayer-1.1.1.tar.xz
2.解压
xz -d MPlayer-1.1.1.tar.xz
tar xvf MPlayer-1.1.1.tar
3.配置生成makefile
./configure --cc=arm-none-linux-gnueabi-gcc --host-cc=gcc --target=arm-linux
4.编译
make
5.用法
播放usb摄像头
mplayer tv://