码迷,mamicode.com
首页 > 其他好文 > 详细

AMS安装

时间:2016-04-13 23:39:59      阅读:462      评论:0      收藏:0      [点我收藏+]

标签:

Debian 8.1安装前准备工作:

1,确认已安装libcap2软件包(系统应已自带);

2,确认已安装libnspr4软件包(服务器上AMS安装包同一目录下)。

 

Adobe AMS 5.0 服务软件包位于服务器如下位置:

"\\172.16.16.10\common\录播服务器\RTMP\AMS\AdobeMediaServerStarter_5_x64_LS1_All.zip"

1、将软件包拷贝到目标主机后,解压;

2、在解压后的文件中,打开documentation\adobemediaserver_5_install.pdf文件,参考P4 “Install Adobe Media Server on Linux ”一节,在目标Linux主机上进行AMS服务的安装;

    注意:在Debian上如果执行installAMS时,报缺少libcap库时,需在installAMS文件同一目录下运行如下命令:

              ln -s /lib/x86_64-linux-gnu/libcap.so.2 libcap.so.1

    之后再执行installAMS,确认可继续安装。

3、安装时,安装位置可使用默认位置:/opt/adobe/ams;Apache服务可使用AMS自带的Apache服务;License可使用:1652-5002-0505-0514-5211-8476进行注册;

4、安装完毕后,启停AMS服务以及确认AMS是否正常安装皆可参考同一文档;

   注意:安装完毕后使用命令:netstat  -anp | grep "LISTEN"  查看端口号,无法找到1935端口和amsedge进程,则需要在ams安装后的目录(默认安装的话,是在"/opt/adobe/ams"下),

再次运行如下命令:

             ln -s /lib/x86_64-linux-gnu/libcap.so.2 libcap.so.1

5、更新AMS applications文件及HLS录像文件路径:

  5.1 拷贝并解压applications("\\172.16.16.10\common\录播服务器\docs\V2.1\API\applications.tbz2")文件夹到目标位置;

  5.2 使用chown、chgrp命令将applications的访问权限授予ams用户;

  5.3 修改AMS配置,参考文档:配置HLS中的”Configure the location of the live content on disk“一节。

        摘录如下:

 

Configure the location of the live content on disk

  • Open rootinstall/conf/ams.ini in a text editor. Set the VHOST.APPSDIR in parameter to one of the following:

    • (Windows) C:/applications

    • (Linux) /data/applications

  • Restart the server.

  • Create a folder at the location in step 1 and copy the livepkgr application to it.

  • Open rootinstall/Apache2.4/conf/httpd.conf in a text editor.

  • To change the location of the HDS live content, edit the directives in bold:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <Location /hds-live>
        HttpStreamingEnabled true 
    #    HttpStreamingLiveEventPath "../applications" 
    #    HttpStreamingContentPath "../applications"
        HttpStreamingLiveEventPath "C:\applications"
        HttpStreamingContentPath "C:\applications"
        HttpStreamingF4MMaxAge 2
        HttpStreamingBootstrapMaxAge 2
        HttpStreamingFragMaxAge -1
        HttpStreamingDrmmetaMaxAge 3600
        Options -Indexes FollowSymLinks
    </Location>
    </IfModule>

    Note:

    On Linux, use "/data/applications".

  • To change the location of HLS live content, edit the directives in bold:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    <IfModule hlshttp_module>
    <Location /hls-live>
        HLSHttpStreamingEnabled true
    #    HttpStreamingLiveEventPath "../applications" 
    #    HttpStreamingContentPath "../applications"
        HttpStreamingLiveEventPath "C:\applications"
        HttpStreamingContentPath "C:\applications"
        HLSMediaFileDuration 8000
        HLSSlidingWindowLength 6
        HLSFmsDirPath ".."
        HLSM3U8MaxAge 2
        HLSTSSegmentMaxAge -1
      
    # Uncomment the following directives to enable encryption
    forthislocation.
    #    HLSEncryptionScope server
    #    HLSEncryptCipherKeyFile "../creds/liveeventkey.bin"
    #    HLSEncryptKeyURI        "https://<ServerName>/hls-key/liveeventkey.bin"
      
        Options -Indexes FollowSymLinks
    </Location>
  • Restart Apache HTTP Server. The service name is FMSHttpd.

  • Open Flash Media Live Encoder and publish a stream with the following settings:

    • Video codec—H.264

    • Audio codec—AAC

    • Keyframe Frequency—4 seconds

    • AMS URL—rtmp://localhost/livepkgr

    • Stream—livestream?adbe-live-event=liveevent

  • (HDS) Open rootinstall/samples/videoPlayer/videoplayer.html in a browser and in the Stream URL text box, enter:

    http://localhost/hds-live/livepkgr/_definst_/liveevent/livestream.f4m

  • (HLS) On a device running iOS, open Safari and enter:

    http://localhost/hls-live/livepkgr/_definst_/liveevent/livestream.m3u8

    Note:

    To play content in Safari 4.0 on Mac OS, create an HTML document that uses the <video>tag.

6,配置点播

    6.1 配置HLS vod(iOS)的流媒体文件路径

         打开rootinstall/Apache2.4/conf/httpd.conf,找到如下节点:

<Location /hls-vod>
    HLSHttpStreamingEnabled true
    HLSMediaFileDuration 8000
    HttpStreamingContentPath "..\webroot\vod"

将其中的HttpStreamingContentPath修改为流媒体文件路径目录。

修改保存后,重启AMS服务。在iOS设备上VOD的访问规则为:

http://[AMS IP]/hls-vod/<录像文件名.mp4>.m3u8

     6.2 配置vod HTML5(PC)

          在Apache配置文件http.conf文件中,加入虚拟文件夹指向录像目录即可。

6.3 配置录像文件Apache静态服务

Alias /records "/data/RecordFiles"

<Directory "/data/RecordFiles">

    IndexOptions Charset=UTF-8
     Options FollowSymLinks
     AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

AMS安装

标签:

原文地址:http://www.cnblogs.com/fyxapril/p/5389070.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!