Difference between revisions of "MythStreamTV"

From MythTV Official Wiki
Jump to: navigation, search
(Installing Mythstreamtv on Fedora Core 6)
m (mark outdated)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
MythStreamTV is an 'unofficial' add-on to [[MythWeb]] which allows you to stream recordings over a network connection.  As opposed to MythTV itself, which does this as a matter of course, MythStreamTV transcodes material on the fly to make it more suitable for slower network connections, possibly over the web.
+
{{outdated}}
 +
 
 +
MythStreamTV is an 'unofficial' add-on to [[MythWeb]] which allows you to stream recordings over a network connection.  As opposed to MythTV itself, which does this as a matter of course, MythStreamTV transcodes material on the fly to make it more suitable for slower network connections, possibly over the Internet.
  
 
==Prerequisites==
 
==Prerequisites==
 
[[Image:Package.png]] The following software is required:
 
[[Image:Package.png]] The following software is required:
 
*MythTV [[Release_Notes_-_0.19|0.19]] or above (different mythtv versions may require different versions of mythstreamtv - this info is taken from the supplied README file in the mythstreamtv tarball)
 
*MythTV [[Release_Notes_-_0.19|0.19]] or above (different mythtv versions may require different versions of mythstreamtv - this info is taken from the supplied README file in the mythstreamtv tarball)
 +
Update 24.09.07: The Mythstreamtv tarball does not work for Mythtv 0.20.1 and above. But the rpm package the Mythdora guys have made works.
 
* vlc-0.8.1 or above  
 
* vlc-0.8.1 or above  
 
* ffmpeg-0.4.9-pre1 or above  
 
* ffmpeg-0.4.9-pre1 or above  
Line 36: Line 39:
 
             --enable-debug --enable-gpl --enable-pp
 
             --enable-debug --enable-gpl --enable-pp
 
</pre>
 
</pre>
 +
 
== Installation ==
 
== Installation ==
  
Grab a tarball of MythStreamTV from [http://jochensserver.dyndns.org/ here] (not a direct link - read the text in the table to help decide which version  is necessary).
+
Grab a tarball of MythStreamTV from [http://jfk-solutions.de/ here] (not a direct link - read the text in the table to help decide which version  is necessary).
  
 
Unpack the tarball with
 
Unpack the tarball with
Line 88: Line 92:
  
 
==Troubleshooting==
 
==Troubleshooting==
I had some problems getting this working with 0.20 under Ubuntu and it turns out that the it does work, but I had to modify the mythstreamtv.sh file (typically in /usr/share/mythstreamtv).
+
I had some problems getting this working with 0.20 under Ubuntu and it turns out that it does work, but I had to modify the mythstreamtv.sh file (typically in /usr/share/mythstreamtv).
  
 
I changed the area just after  
 
I changed the area just after  
Line 111: Line 115:
  
 
==Installing Mythstreamtv on Fedora Core 6==
 
==Installing Mythstreamtv on Fedora Core 6==
The MythStreamtv tarball from [http://jochensserver.dyndns.org/ here] are no longer maintained. I tried to use it under Mythtv 0.20.2 but Mythweb has changed a lot so I got errors about missing files when trying to install MythStreamtv with the install.sh script. But the MythDora guys has fixed these problems and made a rpm package accessible from [http://dl.atrpms.net/mythdora/4.0/i386/os/MythDora/mythstreamtv-1.3-8.noarch.rpm/ here].
+
The MythStreamtv tarball from [http://jochensserver.dyndns.org/ here] are no longer maintained. I tried to use it under Mythtv 0.20.2 but Mythweb has changed a lot so I got errors about missing files when trying to install MythStreamtv with the install.sh script. But the MythDora guys has fixed these problems and made a rpm package accessible from [http://dl.atrpms.net/mythdora/4.0/i386/os/MythDora/mythstreamtv-1.3-8.noarch.rpm/ here]. This rpm package has been tested with Mythtv 0.20.1 and 0.20.2. If you use the Mythtv Trunk version you got problem because Mythweb has changed again.
 
Install the rpm package like this:
 
Install the rpm package like this:
  [root@mythpc mythtv]# rpm -Uhv mythstreamtv-1.3-8.noarch.rpm
+
 
 +
  [root@mythpc mythtv]# rpm -ivh mythstreamtv-1.3-8.noarch.rpm
 
or the easy way with yum. Make a textfile called mythdora.repo and make sure the following lines are included in /etc/yum.conf/mythdora.repo:
 
or the easy way with yum. Make a textfile called mythdora.repo and make sure the following lines are included in /etc/yum.conf/mythdora.repo:
  
Line 185: Line 190:
 
  [root@mythpc mythstreamtv]#
 
  [root@mythpc mythstreamtv]#
  
 +
Change the file permission for the mythstreamtv webdirectory like so:
 +
[root@mythpc mythstreamtv]# cd /var/www/html/mythweb/modules
 +
[root@mythpc modules]# chown -R apache:apache streamtv/
 +
 +
You must restart Apache after the this:
 +
[root@mythpc modules]# /sbin/service httpd restart
 +
Stopping httpd:                                            [  OK  ]
 +
Starting httpd:                                            [  OK  ]
 +
[root@mythpc modules]#
 +
 +
Mythstreamtv should now be working.
  
 +
If you get problems use the Mythdora forum [http://g-ding.tv/ here] or the Mythtv forum for users [http://www.gossamer-threads.com/lists/mythtv/users/ here]. Mythstreamtv use VLC for doing the streaming and ffmpeg for doing the transcoding of recordings. The precompiled package should work, but not all options have been compiled into the package. Mythdora guys have made custom build package of VLC and ffmpeg which you can get [http://dl.atrpms.net/mythdora/4.0/i386/os/MythDora/ here].
  
 +
I found this howto very useful for explaining how VLC can be used for streaming [http://www.diyforgeeks.com/2006/11/01/streaming-mythtv-recordings-over-the-internet/]. The VLC documentation are also useful [http://www.videolan.org/doc/streaming-howto/en/streaming-howto-en.html].
 
   
 
   
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Latest revision as of 07:02, 6 August 2010

Time.png Outdated: The information on this page may no longer be relevant to the current release of MythTV, 0.27.3. Please consider helping to update it.

MythStreamTV is an 'unofficial' add-on to MythWeb which allows you to stream recordings over a network connection. As opposed to MythTV itself, which does this as a matter of course, MythStreamTV transcodes material on the fly to make it more suitable for slower network connections, possibly over the Internet.

Prerequisites

Package.png The following software is required:

  • MythTV 0.19 or above (different mythtv versions may require different versions of mythstreamtv - this info is taken from the supplied README file in the mythstreamtv tarball)

Update 24.09.07: The Mythstreamtv tarball does not work for Mythtv 0.20.1 and above. But the rpm package the Mythdora guys have made works.

  • vlc-0.8.1 or above
  • ffmpeg-0.4.9-pre1 or above

Note: the following options are a minimum for MythStreamTV to work (some binary packages may already have the necessary options enabled)

VideoLan-Client Version 0.8.1

./configure --disable-x11 --disable-xvideo --disable-gtk --disable-sdl --enable-ffmpeg \
            --with-ffmpeg-mp3lame --with-ffmpeg-zlib --enable-mad --enable-libdvbpsi \
            --enable-a52 --disable-dvdplay --enable-dvdnav --enable-vorbis --enable-ogg \
            --enable-theora --enable-mkv --enable-freetype --disable-cddax --disable-vcdx \
            --enable-speex --enable-flac --enable-goom --enable-livedotcom --enable-caca \
            --disable-skins2 --enable-modplug --enable-debug --enable-gpl --enable-mp3lame \
            --enable-pp --with-ffmpeg-tree=/video/extra/ffmpeg-cvs-2004-11-10

ffmpeg -- old version

./configure --disable-x11 --disable-xvideo --disable-gtk --disable-sdl --enable-ffmpeg \
            --with-ffmpeg-mp3lame --with-ffmpeg-faac --with-ffmpeg-zlib --enable-mad \
            --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav \
            --enable-vorbis --enable-ogg --enable-theora --enable-mkv --enable-freetype \
            --disable-cddax --disable-vcdx --enable-speex --enable-flac --enable-goom \
            --enable-livedotcom --enable-caca --disable-skins2 --enable-modplug \
            --enable-debug --enable-gpl --enable-mp3lame --enable-pp

ffmpeg -- latest svn version


./configure --enable-ffmpeg --enable-libmp3lame --enable-libfaac --enable-zlib \
            --enable-liba52 --enable-libvorbis --enable-libogg --enable-libtheora \
            --enable-debug --enable-gpl --enable-pp

Installation

Grab a tarball of MythStreamTV from here (not a direct link - read the text in the table to help decide which version is necessary).

Unpack the tarball with

tar xvf mythstreamtv.tar

(amend as applicable)

Move into the newly created mythstreamtv directory and as root, run

./install.sh

Enter the following information:

  • MythStreamTV Directory (The program directory where MythStreamTV will be stored)
  • MythWeb HTTP Directory (Location of MythWeb files.)
  • MythStreamTV Server Address (IP address or hostname you would like to stream from.)
  • MythStreamTV Server Port (Port number you would like to stream from.)
  • MythStreamTV Server Stream Admin Port (This is the port number VLC http admin runs.)
  • MythStreamTV User:Group? (User and group to be used for MythStreamTV Directory.)
  • Path to where vlc is installed (Location of the vlc binary on your system.)

The next step (with 0.19-fixes MythWeb) is to ensure that includes/init.php (within the mythweb dir.) has the line

'streamtv' => null,

(note the 'tv' part)

underneath the lines containing

'tv' => null,

'video' => null,

'music' => null,

Using MythStreamTV

At the top of MythWeb there should now be a link that says 'Stream Program'.

When the 'Stream Program' link is clicked, MythWeb should show a list of recorded/recording programs. Select the show/shows you would like to see and click the 'Select Recording and Continue' button.

Now select the Codec and Stream Speed to use and click 'Start Live Stream'. In the Log window a message should appear that the VLC session was able to start successfully.

Now click the MMS link. If your mimetype has been properly configured it should launch an MMS viewer ie: Mplayer or Window Media Player. If your mimetype for MMS is broken you may enter the MMS link directly into your MMS player.

The MythStreamTV admin port connects locally and does not need to be opened from an external firewall. MythWeb launches a script that sends the command to the vlc admin port locally and controls the stream.

  • If no video is selected, MythStreamTV will kill the current VLC session being streamed. The "Stop Streaming" button can also be used to kill the streaming.

Support

For installation help or bugs please visit the support forum on SourceForge http://sourceforge.net/projects/mythstreamtv/

Troubleshooting

I had some problems getting this working with 0.20 under Ubuntu and it turns out that it does work, but I had to modify the mythstreamtv.sh file (typically in /usr/share/mythstreamtv).

I changed the area just after

echo "Starting Stream of $1" to

      if [ $PROTOCOL = "mms" ]; then
        /usr/local/bin/vlc -I http --http-host=:8002  --sout-transcode-fps=$FPS --sout-transcode-deinterlace $1 :sout="#transcode{vcodec=$VCODEC,acodec=$ACODEC,vb=$VB,ab=$AB,scale=$SIZE}:std{access=mmsh,mux=ogg,url=:8001}"
      elif [ $PROTOCOL = "http" ]; then
        /usr/local/bin/vlc -I http --http-host=:8002  --sout-transcode-fps=$FPS --sout-transcode-deinterlace $1 :sout="#transcode{vcodec=$VCODEC,acodec=$ACODEC,vb=$VB,ab=$AB,scale=$SIZE}:std{access=http,mux=ogg,url=:8080}"
      fi

Notice the fact that I hard coded the use of the OGG packager, moved a " to after :sout= and removed some http settings.

I also added the mp4v option in the confirm.php file. This file is located in /var/www/mythweb/modules/streamtv/tmpl/default on my system. I added the line

<option <?php if ($videoformat_default==='mp4v') echo 'SELECTED' ?>>mp4v</option>

under video format. NOTE CASE DOES MATTER for the new VLC. You must also change the audio stream option to be lowercase -> mpga, not MPGA.

When these changes are completed, and assuming you have the right libraries, I started the stream via the web interface, then open it in VLC using something like "http://myaddress:8080". If someone knows how to make vlc auto play, please put that info here!!

Installing Mythstreamtv on Fedora Core 6

The MythStreamtv tarball from here are no longer maintained. I tried to use it under Mythtv 0.20.2 but Mythweb has changed a lot so I got errors about missing files when trying to install MythStreamtv with the install.sh script. But the MythDora guys has fixed these problems and made a rpm package accessible from here. This rpm package has been tested with Mythtv 0.20.1 and 0.20.2. If you use the Mythtv Trunk version you got problem because Mythweb has changed again. Install the rpm package like this:

[root@mythpc mythtv]# rpm -ivh mythstreamtv-1.3-8.noarch.rpm

or the easy way with yum. Make a textfile called mythdora.repo and make sure the following lines are included in /etc/yum.conf/mythdora.repo:

[mythdora]
name=MythDora 4.0 - $basearch
baseurl=http://dl.atrpms.net/mythdora/4.0/$basearch/os/
enabled=1
gpgcheck=0
[mythdora-updates]
name=MythDora 4.0 Updates - $basearch
baseurl=http://dl.atrpms.net/mythdora/updates/4.0/$basearch/
enabled=1
gpgcheck=0

After installing the mythstreamtv-1.3-8.noarch.rpm package you must edit the Mythstreamtv install.sh script because the path included into the script are Mythdora spesific.

[root@mythpc mythtv]# cd /usr/share/mythstreamtv/
[root@mythpc mythstreamtv]# nano install.sh

In the middle of the script you will find this. Change into the prefered paths:

######### Set our defaults ##########
STREAM_DIR=/usr/share/mythstreamtv
NEW_STREAM_DIR=/storage/mythstreamtv
HTTP_DIR=/var/www/html/mythweb
STREAM_ADDR="hostname.homelinux.org" --> Your ip-adresse or DNS name
# Stream address can be a domain such as "domain.homedns.org" with the quotes
STREAM_PORT=8001
STREAM_ADMIN=8002
USER_GROUP="mythtv:mythtv"
VLC_PATH=`which vlc`
#####################################

After you have done this you must run the script.

[root@mythpc mythstreamtv]# ./install.sh
Setting up MythStreamTV......
----------------------------------------------------------------------
   MythStreamTV Directory         : /storage/mythstreamtv
   MythWeb HTTP Directory         : /var/www/html/mythweb
   MythStreamTV Server Address    : hostname.homelinux.org
   MythStreamTV Server Port       : 8001
   MythStreamTV Stream Admin Port : 8002
   MythStreamTV User:Group        : mythtv:mythtv
   Path to where vlc is installed : /usr/bin/vlc
----------------------------------------------------------------------
Installing MythStreamTV.........
.... Checking MythWeb Compatablity: .... Installing /storage/mythstreamtv/mythstreamtv.sh: Success
.... Installing /storage/mythstreamtv/mythstreamtvactive.sh: Success
.... Installing /storage/mythstreamtv/mythstreamtvctrl.sh: Success
.... Installing /storage/mythstreamtv/mythstreamtvstop.sh: Success
Creating StreamTV Diretory's in MythWEB...
.... Installing /var/www/html/mythweb/modules/streamtv/handler.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/init.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/confirm.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/createfile.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/selectstream.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/default/createfile.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/default/menu.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/default/confirm.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/default/selectstream.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/default/welcome.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/compact/createfile.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/compact/menu.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/compact/confirm.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/compact/selectstream.php: Success
.... Installing /var/www/html/mythweb/modules/streamtv/tmpl/compact/welcome.php: Success
.... Checking MythWeb Installation: Not required, skipping
.... Fixing up file permissions: Done 
Installation Complete!  Good Luck.
[root@mythpc mythstreamtv]#

Change the file permission for the mythstreamtv webdirectory like so:

[root@mythpc mythstreamtv]# cd /var/www/html/mythweb/modules
[root@mythpc modules]# chown -R apache:apache streamtv/

You must restart Apache after the this:

[root@mythpc modules]# /sbin/service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@mythpc modules]#

Mythstreamtv should now be working.

If you get problems use the Mythdora forum here or the Mythtv forum for users here. Mythstreamtv use VLC for doing the streaming and ffmpeg for doing the transcoding of recordings. The precompiled package should work, but not all options have been compiled into the package. Mythdora guys have made custom build package of VLC and ffmpeg which you can get here.

I found this howto very useful for explaining how VLC can be used for streaming [1]. The VLC documentation are also useful [2].