zoukankan      html  css  js  c++  java
  • 使用live555 在linux下搭建 rtsp server

    系统环境 Debian 7 x64  / centos 7 x64  都可以

    首先去下载源码 http://www.live555.com/liveMedia/public/live555-latest.tar.gz

    wget  http://www.live555.com/liveMedia/public/live555-latest.tar.gz
    tar xzf live555-latest.tar.gz
    cd live
    ./genMakefiles linux-64bit    #注意后面这个参数是根据当前文件夹下config.<后缀>获取得到的
    make

    最后就会在当前目录下生成mediaServer 文件夹,有一个live555MediaServer可执行文件。

    cd mediaServer
    ./live555MediaServer

    这样就启动了一个 rtsp server    可以看到并不是支持所有的视频格式:

    [root@localhost mediaServer]# ./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.0.111/<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 80 for optional RTSP-over-HTTP tunneling, or for HTTP live streaming (for indexed Transport Stream files only).)

    将MP3文件《test.mp3》复制到和上面live555MediaServer可执行文件的同一个目录,
    可用vlc在打开网络中输入地址 rtsp://192.168.0.111/test.mp3 听音乐了。

  • 相关阅读:
    poj 2757 : 最长上升子序列(JAVA)
    POJ 2760: 数字三角形
    poj 1664:放苹果
    Poj 2756:二叉树
    poj机上的JAVA那些事儿
    浅谈HASH算法与CSDN密码泄漏事件
    如何防范密码被破解
    [转载自百度文库]数组拷贝(System.arraycopy,深度拷贝)--数组
    Java数学计算
    fzu Problem 1396 Large Caclulating Work
  • 原文地址:https://www.cnblogs.com/dpf-10/p/5623101.html
Copyright © 2011-2022 走看看