Highlighted

Has anyone ever successfully played a H264 live stream on iOS?

Participant ,
Jun 01, 2016

Copy link to clipboard

Copied

Hi fellas,

The last couple of weeks were really frustrating for me, I'm trying to play live h264 streams on mobile devices (with AIR, of course).

Naturally I tried NetStream over RTMP, which plays fine on Adnroid, but because of the buffering thing on iOS, I can only hear sound, so it's a no-go.

I tried running an HTTP server with m3u8 playlist (HLS streaming) but NetStream.play( URL of the playlist ) just doesn't do anything, although it's mentioned in ActionScript documentation as the correct way to play a stream on iOS.

I tried OSMF and HLS plugins for OSMF and still no luck.

After I pulled out half of my hair, I finally gave up and started to use FLVs with Sorenson Spark / Nellymoser codecs which (aside from the crappy quality at high bitrate) looks to be working fine. However it puts extra load on the encoding servers.

My question is:

Has anyone ever successfully managed to play a visible live h264 stream on iOS in AIR? At this point I accept any solutions, really, cos I'm at the edge, and about to start writing a native extension that displays a HLS video.

Thanks for your time

TOPICS
Development

Views

2.0K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Has anyone ever successfully played a H264 live stream on iOS?

Participant ,
Jun 01, 2016

Copy link to clipboard

Copied

Hi fellas,

The last couple of weeks were really frustrating for me, I'm trying to play live h264 streams on mobile devices (with AIR, of course).

Naturally I tried NetStream over RTMP, which plays fine on Adnroid, but because of the buffering thing on iOS, I can only hear sound, so it's a no-go.

I tried running an HTTP server with m3u8 playlist (HLS streaming) but NetStream.play( URL of the playlist ) just doesn't do anything, although it's mentioned in ActionScript documentation as the correct way to play a stream on iOS.

I tried OSMF and HLS plugins for OSMF and still no luck.

After I pulled out half of my hair, I finally gave up and started to use FLVs with Sorenson Spark / Nellymoser codecs which (aside from the crappy quality at high bitrate) looks to be working fine. However it puts extra load on the encoding servers.

My question is:

Has anyone ever successfully managed to play a visible live h264 stream on iOS in AIR? At this point I accept any solutions, really, cos I'm at the edge, and about to start writing a native extension that displays a HLS video.

Thanks for your time

TOPICS
Development

Views

2.0K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 01, 2016 0
Adobe Community Professional ,
Jun 01, 2016

Copy link to clipboard

Copied

I haven't done live video, but had a thought about something that might help. Net stream to a video object may not cope with hardware decoding, and live streams could be relying on that. Have you tried StageVideo? I have played local and remote H.264, with perfect performance.

I am most likely wrong about this, but it would explain the symptoms.

If you do use StageVideo don't forget to add the hardware acceleration requirement to the app descriptor for Android.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 01, 2016 0
Participant ,
Jun 01, 2016

Copy link to clipboard

Copied

Hi Colin,

Yes, of course I tried StageVideo, and although it works on Android, it doesn't work on iOS because of the buffering thing.

And to get the Sorenson stream working I had to use Video objects and software decoding which of course puts more load on the devices.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 01, 2016 0
Adobe Community Professional ,
Jun 01, 2016

Copy link to clipboard

Copied

For my interest, do you know of a public live feed that I could do tests on, in the hope that I think of other solutions? An H.264 one in particular.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 01, 2016 0
Participant ,
Jun 01, 2016

Copy link to clipboard

Copied

Hi Colin,

Which timezone are you in, and when are you available?

I'll set up a HLS live stream for you on a HTTP server.

Results of my further investigation:

  • NetStream.play( url_of_the_m3u8_playlist ) throws a StreamNotFound error if the stream is attached to a Video object
  • it doesn't throw an error if the stream is attached to StageVideo, but the stream never starts playing
  • crossdomain.xml is at the right place
  • all necessary ports are open, in fact the built-in video player on iOS plays the HLS live stream properly
  • I managed to play the live HLS stream on Android and Desktop with flashls ( GitHub - mangui/flashls: HLS Flash Plugin/Player (Chromeless,OSMF,FlowPlayer,mediaelement.js,video.j...

Thank you

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 01, 2016 0
Adobe Community Professional ,
Jun 02, 2016

Copy link to clipboard

Copied

I found this test page, which should be enough for me to try out:

HTTP Live Streaming Examples - Apple Developer

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 02, 2016 0
Participant ,
Jun 02, 2016

Copy link to clipboard

Copied

I ended up using StageWebView with its location directly set to the m3u8 playlist or a html page with an embedded video object.

Although it's not elegant and breaks my UI and the single code base / cross-platform approach, this way I can show HQ stream on iOS.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 02, 2016 0
Participant ,
Jun 02, 2016

Copy link to clipboard

Copied

I dug even further:

I thought maybe something's not right with how I encode the streams and create the playlists, so I installed the latest Adobe Media Server to see how the samples work.

NetStream.play( url_of_the_playlist ) doesn't do anything, if it's attached to a Video object, it throws a StreamNotFound error, for StageVideo there's not even an error. (Happens on Android/Desktop/iOS). If I directly access the playlist from an iOS video player (not AIR) it plays properly.

NetStream.play( url_of_the_f4v_file ) plays fine on Desktop/Android, and doesn't play on iOS.

So I'm really stuck at this point. It would be nice from Adobe just to say something like "you'll never be able to play a h264 stream on iOS in AIR. period." It would spare me (and the rest of us) some precious time, cos the AS3 reference says that

Special considerations for H.264 video in AIR 3.0 for iOS

For H.264 video, the iOS APIs for video playback accept only a URL to a file or stream. You cannot pass in a buffer of H264 video data to be decoded. Depending on your video source, pass the appropriate argument to NetStream.play() as follows:

  • For progressive playback: Pass the URL of the file (local or remote).
  • For streaming video: Pass the URL of a playlist in Apple's HTTP Live Streaming (HLS) format. This file can be hosted by any server; Flash Media Server 4.5 and higher has the advantage of being able to encode streams in HLS format.

Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 02, 2016 0
Explorer ,
Aug 26, 2016

Copy link to clipboard

Copied

Hi chris.campbell,

I would like to know it is on the plans of the team to support h264 RTMP streaming on iOS, and if not, what are the alternatives?

The implementation requires very low latency (video conferences) so I suspect HLS would not cope with that.

Thank you in advance.

Leo

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 26, 2016 1