Skip navigation
Currently Being Moderated

Liev streaming on ios using FMS

Jun 24, 2013 4:05 AM

Dear All,

 

I have made an application using cs5.5 and java with struts2 for live streaming through FMS.

 

Architecture is like:

 

Flash player makes get stream from camera and then transfer stream over FMS. And this flash player component is embedded in html page.

Flash player contains code for all work flow like making connectivity with FMS interacting user via javascript and capturing live stream from camera. This application works well on IE, mozilla.

 

But when it comes to woking on ios it fails as ios, as IOS does not support flash player. I have gone through many solution provided on different forums, I get there to use Adobe air with making connection using http live streaming protocol and then pakaging the solution for ios. But as per my point of view this would work as an apps for ios rather than browser based application as in my previous case. can anyone suggest me alternate solution to launch live video streaming solution to work on ios on its browser. If I am wrong in perception of working phenomenon of FMS with ios via flash player or adobe air then also please suggest.

 

Thanks

Nitesh Kumar

 
Replies
  • Currently Being Moderated
    Jun 25, 2013 7:02 AM   in reply to niteshkumar

    Have you tried using a third party player for testing purposes? I've used JW Player to successfully build live streaming pages for iOS and Flash streaming (still working out some issues with the Flash side of things, though). This may not be exactly what you need, but at least you can eliminate a lot of issues throught the process of elimination (e.g., making sure that your FMS server is functioning properly if you can get everything to work with JW).

     

    Try it with JW Player (use RSS playlist containing the live streams in .m3u8 playlist for iOS and a .smil file for Flash, see JW documentation):http://www.longtailvideo.com/jw-player/

     

    And follow these instructions: http://help.adobe.com/en_US/flashmediaserver/devguide/WSd391de4d9c7bd6 09-52e437a812a3725dfa0-8000.html

     

    I have a test site that you can look at if you need an example. Let me know and I'll send you the link.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 11, 2014 3:06 PM   in reply to niteshkumar

    I realize that using JW player might not be the exact solution that you are looking for (sounds like you're trying to do something customized for a particular need), but using JW player can help you test your FMS set-up to make sure everything is working. We've used JW player to stream multi-bit rate live events to both Flash and iOS devices at the same time.

     

    > So how can we make connectionn with FMS and publish stream through jwplayer.

     

    Step 1: Set up Flash Live Media Encoder and create the live streaming manifest files for JW player. These instructions are taken from this page:

    http://help.adobe.com/en_US/flashmediaserver/devguide/WSd391de4d9c7bd6 09-52e437a812a3725dfa0-8000.html

     

    FMS live Streaming instructions:

    1. Install Flash Media Encoder (FMLE) on the encoding computer (the computer what will be encoding the live stream):
      1. http://www.adobe.com/eeurope/products/flash-media-encoder.html
    2. Open the Flash Media Live Encoder rootinstall\conf\config.xml file in a text editor.
      1. Windows is C:\Program Files\Adobe\Flash Media Live Encoder 3.2
      2. Mac OS is Macintosh HD:Applications:Adobe:Flash Media Live Encoder 3.2.
      3. rootinstall\conf\config.xml
        • i.     Set the tag //flashmedialiveencoder_config/mbrconfig/streamsynchronization/enable to true
      4. Save the file.
    3. Open FMLE: single bitrate stream.
      1. Format: Click on wrench and change to appropriate settings: Profile (main), Level 4.1 Keyframes 4 or a multiple of <FragmentDuration> in the applications/livepkgr/events/_definst_/liveevent/Event.xml file. The default value of <FragmentDuration> is 4000 milliseconds.
      2. FMS URL: rtmp://localhost/livepkgr
      3. Stream: livestream?adbe-live-event=liveevent&adbe-record-mode=record
      4. Click Start.
      5. Test streaming: http://www.osmf.org/configurator/fmp/:

     
     

    Publish and play live multi-bitrate streams over HTTP

    Live multi-bitrate streams:

    1. Edit rootinstall\conf\config.xml file (step 2 above) on the FMLE computer.
    2. On the streaming server: go to FMS 4.5/applications/livepkgr/events/_definst_/liveevent

    a. Remove the Manifest.xml file from the liveevent folder or rename it.

    b.     Browse to rootinstall/applications/livepkgr/events/_definst_/liveevent and edit the Event.xml file to look like the following:

    <Event>     

    <EventID>liveevent</EventID>         

    <Recording>

    <FragmentDuration>4000</FragmentDuration> <SegmentDuration>16000</SegmentDuration>                  <DiskManagementDuration>3</DiskManagementDuration>

    </Recording> 

    </Event>

    3. Create the f4m and m3u8 manifest files: NOTE: JW player needs a .smil file, not an f4m manifest.

    a. On the FMS 4.5 computer, open rootinstall/tools/f4mconfig/configurator/f4mconfig.html in a browser.

    b. F4M manifest file:

        • Stream uri: livestream1.f4m 150kbps, livestream2.f4m 500kbps, livestream3.f4m 700kbps.
        • Base uri: http://localhost/hls-live/livepkgr/_definst_/liveevent (replace localhost with FMS internal/external IP address).
        • save the file as liveevent.f4m to rootinstall/webroot or on the webserver.
        • JW Player does not support f4m files. Must use a smil file for this.

    c. m3u8 manifest file: Open rootinstall/tools/f4mconfig/configurator/f4mconfig.html in a browser.

    #EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=150000 

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

    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=500000 

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

    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=700000 

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

     

     

    4. Publish live streams to FMS:

      1. a. Start FMLE.
      2. b. Click the wrench next to Format, Open Advanced Encoder Settings, set Keyframe frequency to 4 seconds.
        • This value matches the <FragmentDuration> value in the applications/livepkgr/events/_definst_/liveevent/Event.xml file. The <FragmentDuration> value is in milliseconds.

     

                   c. FMS URL field: rtmp://localhost/livepkgr

                 d. Stream field: livestream%i?adbe-live-event=liveevent OR livestream%i?adbe-live-event=liveevent&adbe-record-mode=record Change liveevent to whatever name you want (i.e. Test)

      • Flash Media Live Encoder uses the variable %i to create multiple stream names: livestream1, livestream2, livestream3
      • To use another encoder, provide your own unique stream names, for example, livestream1?adbe-live-event=liveevent, livestream2?adbe-live-event=liveevent.
      • PUBLISH URL: rtmp://localhost/livepkgr/livestream%i?adbe-live-event=liveevent
      • IMPORTANT: use the following query parameter: &adbe-record-mode=record

     

    5. Test live streams:

    a. Flash:

     

    b. iOS: Open Safari.

     

     

    Once you create the live streams and the smil and .m3u8 manifest files following the steps described above, set up a test page using JW player (see their documentation and download the files referred to below from their page).

         This is the basic set-up that we use to stream live multibitrate live events (using a smil and m3u8 manifest file created above):

    1. Use JW with javascript file: put <script type='text/javascript' src='jwplayer/jwplayer.js'></script>in the <head> section of the page. I've renamed the javascript file jwplayer.js (look in the JW folder to find the appropriate js file).

     

    2. Embed the player into the page: put the following code in the <body> of the page:

    <div id="jwplayer"></div>

    <script type="text/javascript">

    jwplayer('jwplayer').setup({

      'autostart': false,

      sources: [

        { 'file': "Manifests/liveevent.smil"},

        { 'file': "Manifests/liveevent.m3u8"}

      ],

      rtmp: {

        'bufferlength': 5

      },

      'width': "640",

      'height': "480",

      'image': "Splash/live-poster.png",

      'primary': "flash",

      'stretching': 'exactfit'

    });

    </script>

     

    Sample .m3u8 manifest file: (replace localhost with your ip, Test with whatever you named the stream in FMLE).

    #EXTM3U

    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=200000

    http://localhost/hls-live/livepkgr/_definst_/Test/livestream1.m3u8

    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=400000

    http://localhost/hls-live/livepkgr/_definst_/Test/livestream1.m3u8

    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=800000

    http://localhost/hls-live/livepkgr/_definst_/Test/livestream1.m3u8

     

    Sample .smil file:

    <smil>

              <head>

                        <meta base="rtmp://localhost/hds-live/livepkgr/_definst_/Test/"/>

              </head>

              <body>

                        <switch>

                                  <video src="livestream1.f4m" system-bitrate="200000" />

                                  <video src="livestream2.f4m" system-bitrate="400000" />

                                  <video src="livestream3.f4m" system-bitrate="800000" />

                        </switch>

        </body>

    </smil>

     

     

    You have to follow Adobe's FMLE instructions (linked above) and the JW documentation to get this to work.

     

    http://www.longtailvideo.com/support/forums/jw-player/setup-issues-and -embedding/22581/embedding-jw-player-and-using-with-fms-45-livestreami ng/

     

     

    Good luck.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points