Skip to main content
Participant
March 27, 2015
Question

Publishing video live stream by HLS

  • March 27, 2015
  • 1 reply
  • 6321 views

We've setup an AMS 5 environment and publish a live video on an URL like : rtmp://<my_ams_host>/livepkgr/events/_definst_/liveevent/testlive02 then we were able to read the stream by RTMP as well.

But we wanted to read the live stream using HLS protocol. We've setup the bundled apache (with AMS) as recommaned in the technical documentation.

Normaly we would be able to read the stream at the URL : http://<my_ams_host>/events/_definst_/liveevent/testlive02.m3u8.
But we got 404 errors as if the resource was not found.

The "hls-live" location is configured as following

<Location /hls-live>

    HLSHttpStreamingEnabled true

    HttpStreamingLiveEventPath "/opt/adobe/ams/applications"

    HttpStreamingContentPath "/opt/adobe/ams/applications"

    HLSMediaFileDuration 8000

    HLSSlidingWindowLength 6

    HLSFmsDirPath "/opt/adobe/ams"

    HttpStreamingUnavailableResponseCode 503

    HLSM3U8MaxAge 2

    HLSTSSegmentMaxAge -1

    HLSMetaMaxAge 3600

    HLSMaxEventAge 300

    Options -Indexes FollowSymLinks

</Location>

The hls module is loaded. Vérication made by the following command

sshams@mv271:~$ sudo /opt/adobe/ams/Apache2.2/bin/apachectl -M

[Fri Mar 27 08:48:14 2015] [debug] mod_f4fhttp.cpp(985): mod_f4fhttp - found Professional license

[Fri Mar 27 08:48:14 2015] [debug] mod_f4fhttp.cpp(992): mod_f4fhttp - timeout is unlimited

[Fri Mar 27 08:48:14 2015] [debug] mod_f4fhttp.cpp(1005): mod_f4fhttp - phds permitted by license

[Fri Mar 27 08:48:14 2015] [debug] mod_ioshttp.cpp(958): mod_hlshttp - found Professional license

[Fri Mar 27 08:48:14 2015] [debug] mod_ioshttp.cpp(965): mod_hlshttp - timeout is unlimited

[Fri Mar 27 08:48:14 2015] [debug] mod_ioshttp.cpp(978): mod_hlshttp - Vanilla/PHLS encryption permitted by license

[Fri Mar 27 08:48:14 2015] [debug] mod_ioshttp.cpp(958): mod_hlshttp - found Professional license

[Fri Mar 27 08:48:14 2015] [debug] mod_ioshttp.cpp(965): mod_hlshttp - timeout is unlimited

[Fri Mar 27 08:48:14 2015] [debug] mod_ioshttp.cpp(978): mod_hlshttp - Vanilla/PHLS encryption permitted by license

[Fri Mar 27 08:48:14 2015] [info] mod_jithttp - AMS installation path: "/opt/adobe/ams"

[Fri Mar 27 08:48:14 2015] [debug] mod_jithttp.cpp(813): mod_jithttp - found Professional license

[Fri Mar 27 08:48:14 2015] [debug] mod_jithttp.cpp(820): mod_jithttp - timeout is unlimited

[Fri Mar 27 08:48:14 2015] [debug] mod_jithttp.cpp(833): mod_jithttp - PHDS is enabled

httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.1.71 for ServerName

Loaded Modules:

...

...

cache_module (shared)

disk_cache_module (shared)

alias_module (shared)

f4fhttp_module (shared)

hlshttp_module (shared)

jithttp_module (shared)

ctrlplane_module (shared)

Syntax OK

After activating debug mode on Apache, we got the following detail in the apache error log

...

[Thu Mar 26 17:18:52 2015] [debug] mod_cache.c(141): Adding CACHE_SAVE filter for /hls-live/livepkgr/events/_definst_/liveevent/testlive02.m3u8

[Thu Mar 26 17:18:52 2015] [debug] mod_cache.c(148): Adding CACHE_REMOVE_URL filter for /hls-live/livepkgr/events/_definst_/liveevent/testlive02.m3u8

[Thu Mar 26 17:18:52 2015] [debug] requesthandler.cpp(246): Reading application wide configs.

[Thu Mar 26 17:18:52 2015] [debug] requesthandler.cpp(246):  generating prog index for event:livepkgr/events/events/_definst_ stream name:liveevent/testlive02

[Thu Mar 26 17:18:52 2015] [error] [client 41.190.237.66] File does not exist: /opt/adobe/ams/webroot/hls-live

...

What could be the issue ?

- Our Settings ?

- Our HLS-LIVE URL ?

Any help will be welcome !!!

Regards.

Mamisoa RAMANITRARIVO.

    This topic has been closed for replies.

    1 reply

    Pushpendra_yadav1
    Adobe Employee
    Adobe Employee
    March 30, 2015

    Hi Mamisoa,

    Welcome to adobe forums.

    Kindly check your HLS url it should be like this : http://<my_ams_host>/hls-live/livepkgr/_definst_/liveevent/livestream.m3u8 and make sure that you play HLS stream on Mac safari browser.

    And please place the crossdomain.xml file inside your server webroot so that It can allow connections from other domain, you can edit this xml file based upon your requirement.

    Here is the sample crossdomain.xml:

    <?xml version="1.0"?>

    <!-- http://www.osmf.org/crossdomain.xml -->

    <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

    <cross-domain-policy>

        <allow-access-from domain="*" />

        <site-control permitted-cross-domain-policies="all"/>

    </cross-domain-policy>

    Let me know if you need any help.

    Regards,

    Puspendra

    mams0503Author
    Participant
    April 7, 2015

    Hi Pushpendra and thanks for your answer.
    But, unfortunately I keep on to have the same error.

    Actually, I've made a mistake in my message above. My HLS-LIVE URL is http://<my_ams_host>/hls-live/livepkgr/events/_definst_/liveevent/testlive02.m3u8.
    Could you explain me why I had the following line in my apache's error_log

    ...

    [Thu Mar 26 17:18:52 2015] [debug] mod_cache.c(141): Adding CACHE_SAVE filter for /hls-live/livepkgr/events/_definst_/liveevent/testlive02.m3u8

    [Thu Mar 26 17:18:52 2015] [debug] mod_cache.c(148): Adding CACHE_REMOVE_URL filter for /hls-live/livepkgr/events/_definst_/liveevent/testlive02.m3u8

    [Thu Mar 26 17:18:52 2015] [debug] requesthandler.cpp(246): Reading application wide configs.

    [Thu Mar 26 17:18:52 2015] [debug] requesthandler.cpp(246):  generating prog index for event:livepkgr/events/events/_definst_ stream name:liveevent/testlive02

    [Thu Mar 26 17:18:52 2015] [error] [client 41.190.237.66] File does not exist: /opt/adobe/ams/webroot/hls-live

    ...

    Why did Apache try to find the resource under the "webroot" directory. I thought it's a kind of "virtual resource". Isn't it ???

    Thanks in advance.

    Mamisoa.

    Pushpendra_yadav1
    Adobe Employee
    Adobe Employee
    April 9, 2015

    Did you placed crossdomain.xml file inside webroot of AMS.

    Regards,

    Puspendra