LinHES Forums
http://forum.linhes.org/

Getting MythStreamTV Working on MythTV 0.20
http://forum.linhes.org/viewtopic.php?f=3&t=12644
Page 1 of 1

Author:  mrmunkey [ Sat Nov 18, 2006 10:58 pm ]
Post subject:  Getting MythStreamTV Working on MythTV 0.20

I recently upgraded Myth to 0.20 from the stock 0.19 from R5D1. Everything was pretty smooth with that, except that MythStreamTV was pretty much non-existent. I really liked that feature, so I whipped up something to fix that problem in under an hour. It's by no means pretty, or secure, so you can use this at your own risk. It is just a new front-end to the shell scripts that use LTC to broadcast your recordings.

Notes:
R5D1 already had MythStreamTV on it, and it was already configured for the server transmitting on port 8001. I haven't looked yet how to change that.

I only wrote a very small (ugly) front-end. All the real credit goes out to the guys to made MythStreamTV and MythWeb.

This information does assume you know how to uncompress a .tar.gz file and a few other basic Linux commands. I might update it later to be more complete though.

I made this hastily as I didn't want to stay up too late, so it's not very intuitive or complete. I take no responsibility for anything bad that might happen. It's working just fine on my computer though.

Make backups of your .htaccess file, as it's the only one that you'll be changing.

-= End Notes =-

Now that the formalities are out of the way, let's get onto the good stuff.

You'll need the dependencies of MythStreamTV. I think they are VLC and ffmpeg? I'm not sure on that, but if you had R5D1 you should be covered already, and the "/myth/stream" folder probably already exists, in which case you can skip downloading MythStreamTV and continue from there.

If you don't already have the MythStreamTV module installed, download it from http://sourceforge.net/projects/mythstreamtv/ The only files you really need to worry about in that tar.gz file are

Code:
mythstreamtvactive.sh
mythstreamtvctrl.sh
mythstreamtv.sh
mythstreamtvstop.sh


Really I only use the last two, but get the others just to make sure. Put them in your MythTV setup directories. The folder I put these files in was "/myth/stream"

You can download the source code of the file I wrote at:

http://pastebin.com/827853

Save it in a file named mythstreamtv.php, and put it in your root folder of mythweb. For me that was "/var/www/mythweb"

Now you need to edit your .htaccess file in that directory. You can use whatever editor you like. Go down to the line that reads

Code:
<Files mythweb.*>


and change it to (You made your backup right?):

Code:
<Files ~ "^(mythweb|mythstreamtv).*">


This change will allow the datbase access variables to be set for the script, so it is necessary.

Now go to the /tmp folder and run the following command:

Code:
touch streamName
chmod 666 streamName


That's going to create a file that is used to store what stream is currently playing, and it will stop an error from coming up the first time you run the program due to that file not being there.

Now you should be able to go to http://YourMythServer/mythweb/mythstreamtv.php

It will give you a list of all of your recordings, and on the right side you can select to start or stop a stream.

You can then access that stream at http://YourMythServer:8001/

That should get you up and running.

TIPS:
Make sure to stop the stream when you're done. It'll save you CPU resources.

There will probably be a problem if you try and start more than one stream at a time. The current file will let you attempt it, but I haven't tested that case.

If your MythStreamTV scripts are not in /myth/stream/ or your TV recordings are not in /myth/tv/ then you can change those paths at the top of the PHP file.

If you have performance issues, try changing the parameters in the line that starts with "exec". I tried to document the options that were available in the normal front-end for MythStreamTV. For Linux, I've found that Xine/GXine perform better than MPlayer.

Author:  khrusher [ Sun Nov 19, 2006 7:09 am ]
Post subject: 

Quote:
There will probably be a problem if you try and start more than one stream at a time. The current file will let you attempt it, but I haven't tested that case.

If you start a second stream, the first will be killed.

Author:  gizmobay [ Thu Nov 23, 2006 5:26 pm ]
Post subject: 

How do you install the sourceforge MythStreamTV? The install script looks for a file in var/html/mythweb/themes. This was a folder in previous versions of mythweb before 0.20. It is no longer in the mythweb plugin.

Author:  gizmobay [ Thu Nov 23, 2006 7:23 pm ]
Post subject: 

Looks like there's a new version but the link doesn't work.

http://jogibear9988.dyndns.org:2080/

Author:  mrmunkey [ Fri Nov 24, 2006 9:37 am ]
Post subject: 

When you download the MythStreamTV package, uncompress it. Then you should have several *.sh files in the new directory. Copy those files to /myth/stream You may have to make that directory.

You also need to make sure VLC and ffmpeg installed. Try apt-get install vlc and apt-get install ffmpeg

HTH

Author:  khrusher [ Fri Nov 24, 2006 10:49 am ]
Post subject: 

I dont think the apt-get versions of vlc and fmpeg will do. look on the mythstreamtv sourceforge page for a long list of compile options.

I install scripts also add install som php pages and add the Stream links to the main mythweb header. my understanding is htat the php stuff is the part that needs to adjusted with the latest mythtv versions.

Author:  mrmunkey [ Fri Nov 24, 2006 11:15 am ]
Post subject: 

I would agree that the backend part is still working, the MythWeb PHP stuff changed. I already had an appropriate version of VLC and ffmped from the install of R5D1, so installing those might not be necessary.

Author:  cgilbert [ Wed Nov 29, 2006 10:46 am ]
Post subject:  http://pastebin.com/827853 missing?

Can you check this link please - I cannot get anything?

Thanks, Chris

Author:  mrmunkey [ Wed Nov 29, 2006 11:54 am ]
Post subject: 

I'm not sure which link you're talking about, but pastebin seems to be a little slow at the moment. If it's still slow I can put it up on my server for people to download as well.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/