Luuk D. Jansen
Luuk D. Jansen

Reputation: 4508

HTTP-live steaming on Linux server

I find it hard to find some conclusive information on this. I have a dedicated server in a datacenter with Debian 5.0. I have an iPhone/iPad app which uses a JAVA EE (Glassfish 2.1) backend, and I am in the process of implementing video into the App. This includes live streaming and video's are longer than 10 minutes I need HTTP Live Streaming.

What is the best open-source/free solution to implement? This is only a pilot project, so I don't want to subscribe to any paid service. I have currently nothing in place yet for the live streaming, so am flexible to adapt any system (server or client side).

I came across:

Regarding the video's, I would ideally like to upload a 720p version to the server (for iPad) and then convert automatic (either on the fly when requested or prepared when the file is uploaded) to the required formats for iPhone/iTouch and low bandwidth. For live streaming I would like to be able to provide the content in about 30 seconds from it streaming into the server.

I am not envisaging high demands (e.g. a lot of simultaneous requests, and if so (e.g. live event) on one stream which should be able to be dealt with using HTTP-live streaming, it only needs encoding and segmenting once).

In the )not so near) future android will probably be made part of the App as well.

Any hints/tutorial/suggestions/advice would be really appreciated.

Upvotes: 5

Views: 6820

Answers (5)

wombat57
wombat57

Reputation: 1341

What is the source of the live video? The iPhone only supports playback of H.264 baseline profile level 3 or mpeg-4 video with aac audio. The iPhone itself encodes video to these specs, but most other encoders don't (including many Android phones). If your video is not encoded to this spec, you'll first have to transcode. FFMpeg (with libx264) will do this nicely. Then you'll need to generate the dynamic .m3u8 playlist file. Wowza will do this for you out of the box, and will accept an rtmp stream from FFmpeg (but is not free). I don't believe that red5 supports Apple http streaming. There are free servers that claim to, but I've never used them. Take a look at http://erlyvideo.org/. Otherwise, you can do it yourself fairly simply. FFmpeg will output an mpeg-ts stream. All that the playlist generator needs to do, then, is cut this into 188-byte-aligned chunks, and return a playlist containing the last n. You can even use an http byte offset module to make the playlist reference a single file. Read Apple's http streaming docs at https://developer.apple.com/streaming/

Upvotes: 0

Hetal Vora
Hetal Vora

Reputation: 3361

Refer to Apple's http live streaming document and best practices.

https://developer.apple.com/streaming/

This should be a good point to get started.

Upvotes: 0

Luuk D. Jansen
Luuk D. Jansen

Reputation: 4508

I am now using the Xuggler framework, which is Java based. Seems to do exactly the job I am looking for, although no build in segmented etc. is available. Instead I try now to write one myself which at the same time integrates exactly with my system

Upvotes: 0

Ecco
Ecco

Reputation: 1393

Latest development version of VLC supports HTTP live streaming. You'll have to build from source as this has been added to the git repository not so long ago.

http://wiki.videolan.org/Documentation:Streaming_HowTo/Streaming_for_the_iPhone

Upvotes: 0

Twelve47
Twelve47

Reputation: 3982

Wowza is pretty good for live streaming to iOS (as well as flash)

It isn't free though.

Upvotes: 1

Related Questions