Difference between revisions of "HTTP Live Streaming Server"

From MythTV Official Wiki
Jump to: navigation, search
(It's a start)
 
(clarify ongoing enhancements (not dead!), wikipedia link)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Experimental support for streaming Myth content to other devices (iOS, other HLS players) via http live streaming protocol was added in 0.25 and enhanced for 0.26
+
Experimental support for streaming Myth content to other devices (iOS, other HLS players) via [http://en.wikipedia.org/wiki/HTTP_Live_Streaming http live streaming] was added in 0.25 and has been enhanced subsequently.
 +
 
 +
==Background==
 +
From wikipdedia:  "[HLS] works by breaking the overall stream into a sequence of small HTTP-based file downloads, each download loading one short chunk of an overall potentially unbounded transport stream. As the stream is played, the client may select from a number of different alternate streams containing the same material encoded at a variety of data rates, allowing the streaming session to adapt to the available data rate. At the start of the streaming session, it downloads an extended M3U (m3u8) playlist containing the metadata for the various sub-streams which are available.
 +
Since its requests use only standard HTTP transactions, HTTP Live Streaming is capable of traversing any firewall or proxy server that lets through standard HTTP traffic ..."
  
 
==Pre-requisites==
 
==Pre-requisites==
Line 6: Line 10:
  
 
==Quick Start==
 
==Quick Start==
From inside your local network go to <http://backend.ip.addr:6544/>
+
Open http://127.0.0.1:6544/ from your Myth backend, if you have bound this to a routable address use <http://your.backend.ip.address:6544/>
 +
 
 +
Check that you have installed JW Player under '''3rd Party Software -> JW Player'''.
 +
 
 +
  Note: If your prompted for a password when installing JW Player try the mythbackend default: admin / mythtv
 +
  # http://www.gossamer-threads.com/lists/mythtv/users/509445?do=post_view_threaded#509445
  
 
Click API->Examples->HTTP Live Streaming
 
Click API->Examples->HTTP Live Streaming
Line 16: Line 25:
 
Wait a few moments for the transcoding to get going (depending on the power of your backend, more time may be required).  A status will appear above.
 
Wait a few moments for the transcoding to get going (depending on the power of your backend, more time may be required).  A status will appear above.
  
Click play and a screen will appear with JWplayer (which might need to be installed first). On mythbuntu, there was a password or pin that I needed.  Search to find out how to do this (its not your db password)
+
Click play and a screen will appear with JWplayer.
  
 
When you are done watching the stream, click delete to free up some space.
 
When you are done watching the stream, click delete to free up some space.

Latest revision as of 13:46, 3 March 2014

Experimental support for streaming Myth content to other devices (iOS, other HLS players) via http live streaming was added in 0.25 and has been enhanced subsequently.

Background

From wikipdedia: "[HLS] works by breaking the overall stream into a sequence of small HTTP-based file downloads, each download loading one short chunk of an overall potentially unbounded transport stream. As the stream is played, the client may select from a number of different alternate streams containing the same material encoded at a variety of data rates, allowing the streaming session to adapt to the available data rate. At the start of the streaming session, it downloads an extended M3U (m3u8) playlist containing the metadata for the various sub-streams which are available. Since its requests use only standard HTTP transactions, HTTP Live Streaming is capable of traversing any firewall or proxy server that lets through standard HTTP traffic ..."

Pre-requisites

Your backend must have been compiled with "--enable-libx264 and --enable-libmp3lame" to support the H.264 video and MP3 audio used in the HLS streams generated by MythTV v0.25. Without those, you'll never get anything transcoded. Some packagers are already doing this for you, but if you build by hand, you'll have to remember to do it yourself.

Quick Start

Open http://127.0.0.1:6544/ from your Myth backend, if you have bound this to a routable address use <http://your.backend.ip.address:6544/>

Check that you have installed JW Player under 3rd Party Software -> JW Player.

 Note: If your prompted for a password when installing JW Player try the mythbackend default: admin / mythtv
 # http://www.gossamer-threads.com/lists/mythtv/users/509445?do=post_view_threaded#509445

Click API->Examples->HTTP Live Streaming

Search for a file name/storage group that you want to stream and click the appropriate radio button for the .mpg file (not the pngs)

Click add stream (adjust the size bandwidth settings to meet your needs)

Wait a few moments for the transcoding to get going (depending on the power of your backend, more time may be required). A status will appear above.

Click play and a screen will appear with JWplayer.

When you are done watching the stream, click delete to free up some space.

You should be able to fast forward and rewind, I can do it fine in JW Player on my system as well as on the iOS devices I test with.

Possible future enhancements

HLS TODO list:

  • cutlist support (both internal and user-supplied)
  • 'start at position X' support
  • support multiple bitrate streams vs just the single video bitrate and audio-ony stream.
  • add 'resume' support to restart a stopped transcode.
  • investigate encoding streams on-demand to allow seeking forward to a point in the video which has not been encoded yet.
  • settings editor (# of encoding threads, http content directory, etc.)
  • MythWeb integration via JW Player
  • enhancements around tracking which files are being streamed (ie, track whether a file is a recording, video, etc. to allow the client to get access to metadata on HLS sessions easier)
  • (better) autodetection of which profiles to use for encoding
  • realtime transcoding support to allow mythtranscode to create HLS streams for recordings in progress or LiveTV.
  • mythtranscode enhancements related to the ffmpeg libav* code:
  • WEBM support for pre-transcoding full files
  • HLS transcodes run on the BE that you send the command to as long as it has access to the recording. Long-term, I'd like to get support either integrated into the JobQueue or another queueing method.