• 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文件夹中,有诸多生成的文件

  • 相关阅读:
    Windows 7的 磁盘管理中,某个磁盘或分区,突然变成只读。
    Python 静态变量 与 静态方法
    如何用手机上网给电信固话充值
    Windows,查看进程的连接的IP地址,批量模式,最后做成Excel
    如果在VMware上免费下载驱动
    DELL iDRAC 远程虚拟机报错:虚拟介质分离或所选虚拟磁盘驱动器的虚拟介质重定向已由另一用户使用
    Windows Server 2008安装 百度Wifi 360Wifi 小米Wifi 失败的解决方法
    让Windows 8 / 8.1 以及 Windows Server 2012 / 2012 R2的桌面,显示我的电脑图标
    让Windows 8 / 8.1 以及 Windows Server 2012 / 2012 R2的任务管理器的性能面板,显示磁盘数据
    企业CIO、CTO必读的34个经典故事
  • 原文地址:https://www.cnblogs.com/subo_peng/p/6502768.html
Copyright © 2020-2023  润新知