[mythtv-firehose] mythtv/master commit: 7e1a77063 by Chris Pinkham (cpinkham)

MythTV noreply at mythtv.org
Thu Dec 1 06:11:18 UTC 2011


      Author:  Chris Pinkham <cpinkham at mythtv.org>
 Change Date:  2011-11-30T22:08:48-08:00
   Push Date:  2011/11/30 22:10:47 -0800
  Repository:  mythtv
      Branch:  master
New Revision:  7e1a77063e3f002c118149c91d2e5e86b3bb2c5a
   Changeset:  https://github.com/MythTV/mythtv/commit/7e1a77063

Log:

Add backend support for HTTP Live Streaming of recordings and videos.

This commit adds several classes, logic in mythtranscode, and
mythbackend services API glue to allow mythbackend to generate
HTTP Live Streams.  These are composed of a .m3u8 playlist
listing multiple segments of video contained in MPEG-ts files
with libx264 encoded video and libmp3lame encoded MP3 audio.

In order to use HTTP Live Streaming, you must configure and compile
with --enablelibx264 and --enable-libmp3lame.

The /Content backend service has several new calls added to
start, stop, query, list, and remove live streams.  The following
have been added:

  /Content/AddLiveStream
  /Content/AddRecordingLiveStream
  /Content/StopLiveStream
  /Content/RemoveLiveStream
  /Content/GetLiveStream
  /Content/GetLiveStreamList

  For more info on these, see /Content/wsdl

Live Stream files are written to a 'Streaming' Storage Group if
one is defined, otherwise they will go in ~/.mythtv/tmp/hls.

Two sample .qsp files are included for listing recordings
(/samples/livestream_rec.qsp) and Storage Group files
(/samples/livestream_sg.qsp).  These sample pages can be used
to start/stop/list/stream/remove Live Streams.  The 'Play' links
directly to the .m3u8 file which is playable directly under
Safari and via external helper apps in other browsers.  The
Live Streams generated have also been tested with the JW Player
flash HTTP Live Streaming support using their adaptiveProvider.swf
provider.

NOTE: This bumps the binary API version, so make clean, etc..

NOTE2: The DB schema changes as well to support the new livestream
       table to track existing streams.

Known Issues:

- audio and video get out of sync sometimes
- there is no automated cleanup process for old streams, it is up to
  the user to delete old streams via the API.
- occasional glitches in video, possibly due to keyframes not occurring
  in the right location at the start of a segment of video.
- audio sample rate argument to AddLiveStream is not honored, this will
  require resampling audio in some cases.  I have code to do this, but
  it needs to be tested more.
- no check is done to verify that --enablelibx264 and --enablelibmp3lame
  were used.

TODO:

- not going to list all TODO items, but the basic functionality is
  included in this patch.

Added:

   mythtv/html/js/fileutil.js
   mythtv/html/samples/livestream_rec.qsp
   mythtv/html/samples/livestream_sg.qsp
   mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfo.h
   mythtv/libs/libmythservicecontracts/datacontracts/liveStreamInfoList.h
   mythtv/libs/libmythtv/avformatwriter.cpp
   mythtv/libs/libmythtv/avformatwriter.h
   mythtv/libs/libmythtv/filewriterbase.cpp
   mythtv/libs/libmythtv/filewriterbase.h
   mythtv/libs/libmythtv/httplivestream.cpp
   mythtv/libs/libmythtv/httplivestream.h

Modified:

   mythtv/bindings/perl/MythTV.pm
   mythtv/bindings/python/MythTV/static.py
   mythtv/libs/libmythbase/mythversion.h
   mythtv/libs/libmythservicecontracts/libmythservicecontracts.pro
   mythtv/libs/libmythservicecontracts/services/contentServices.h
   mythtv/libs/libmythtv/dbcheck.cpp
   mythtv/libs/libmythtv/libmythtv.pro
   mythtv/libs/libmythupnp/httprequest.cpp
   mythtv/programs/mythbackend/services/content.cpp
   mythtv/programs/mythbackend/services/content.h
   mythtv/programs/mythtranscode/commandlineparser.cpp
   mythtv/programs/mythtranscode/main.cpp
   mythtv/programs/mythtranscode/transcode.cpp
   mythtv/programs/mythtranscode/transcode.h



More information about the mythtv-firehose mailing list