KnoppMyth downloads | documentation | HowTo | reporting bugs | links | Recent Changes  
search for in the  

What is a Wiki?

See WikiWikiWeb

If you don't know how to use a wiki see the WikiHowto

ErfurtWiki is maintained by a loosely knit group of developers.

Quick Links

Related sites

Contact

Please submit website bugs in the BugReports

Contribute!

Please file any wishes on UserSuggestions.

Hosted By

  • By Mark H
    (small updates by Khrusher)

Instructions compiled from the knoppmyth forum MythstreamTV theads and all the hard work by Khrusher and others.

This page will show you how to add LiveTV streaming. Make sure MythstreamTV (of recordings) is working first!

Prerequesites/warnings

This Requires a Hauppague 250/350 PVR Card
- assumes standard R5A16 knoppmyth box
(/myth/stream & /var/www/mythweb )
- working mythstream for recordings
- only works fo NTSC (PAL freq can be added)
- PHP created by PHP non-expert
- Code scrapes status.php to provide tuner status DDL for manual tuner selection
(This may be fragile)

For troubleshooting please see and post to this thread:
http://mysettopbox.tv/phpBB2/viewtopic.php?t=4778&highlight= (That way everyones questions will follow the same thread and path!)

1a) Assure vlc is built with --enable-pvr config option

Mythstream setup includes a list of config options that are required when VLC is built. The original list did not consider live PVR streams. Be sure you run the vlc config step with --enable-pvr and rebuild

1) assure the webserver process can read the device files

There are two was to do this, add the www-data user to the group that has access to the devices or let everyone have access to devices

Option 1

nano /etc/apache/httpd.conf
Go down to lines 253,254 and make sure that User www-data and below it Group www-data is uncommented (default install it should be)

Add www-data to the video linux group
Restart the apache server

Option 2

chmod a+rw /dev/video0 and /dev/video*

Note: the following two tar files have been added to the wiki as attachments, you can use link at bottom of page

2) Get the scripts

cd /myth/stream
wget http://www.chrismenard.com/mythstreamLive/myth_stream.tar
tar -xvf myth_stream.tar
nano /myth/stream/parseTunerStatus.sh
Change the ip in MYTH_WEB_STATUS? to correct information:
Note: If you have mythweb secured with username/password you can use this:
=http://user:pass@192.168.0.3/mythweb/status.php
(Substitute user, pass and ip with correct information)

3) get the PHP files

cd /var/www/mythweb
wget http://www.chrismenard.com/mythstreamLive/var_www_mythweb.tar
tar -xvf var_www_mythweb.tar
(puts files in /var/www/mythweb and /var/www/mythweb/themes/Default)

nano /var/www/mythweb/themes/Default/mythstreamtvLive_createfile.php and put YOUR server IP in 4 places (search for IP).

Similar to this:
Launch Stream...href="mms://www.mysite.com:8001?">mms://www.mysite.com:8001? and ...href="http://www.mysite.com:8001">http://www.mysite.com:8001
(You can substitute www.mysite.com for the IP of your router too)

4) add a function to the existing channels.php file to list current shows

(backup first)
cp /var/www/mythweb/includes/channels.php /var/www/mythweb/includes/channels.php.save

nano /var/www/mythweb/includes/channels.php

(Add this to the bottom of channels.php before last cury bracket "}"):

function display_current_program($start_time, $end_time) {
global $Page;
$timeslots_left = num_time_slots;
$program = &$this->programs[0];
// Get a modified start/end time for this program
$program_starts = $program->starttime;
$program_ends = $program->endtime;
if ($program->starttime < $start_time)
$program_starts = $start_time;
if ($program->endtime > $end_time)
$program_ends = $end_time;
// Calculate the number of time slots this program gets
$length = (($program_ends - $program_starts) / timeslot_size);
$timeslots_used = ceil($length);
// Increment $start_time so we avoid putting tiny shows into the own timeslot
$start_time += $timeslots_used * timeslot_size;
$timeslots_left -= $timeslots_used;
#if ($timeslots_left > 0)
$Page->print_program(&$program, $timeslots_used, $start_time, &$this->channum);
// Cleanup is good
unset($program);
}

(then the last curly bracket will be here)

5) modify mythweb theme to add LiveTV link

cp /var/www/mythweb/themes/Default/theme.php /var/www/mythweb/themes/Default/theme.php.save

Add a link for 'Stream Live TV' to theme.php around line 164 - you'll see similar lines of code

<a href="mythstreamtvLive.php"><?php echo 'Stream Live TV' ?></a> &nbsp; | &nbsp;

6) running

Connect to mythweb and click on "Stream Live TV".
Click on "stream channel" for the channel you want to watch
Set the options (first time use defaults)
Use protocol http (for me anyway)
Click "Start Live Stream" then click "Play"
Point your video player to the same address as recordings.

Additional Notes

1) The channel selection page will change the channel on the tuner card.

If you are on a cable/sate box you need to comment out the #map frequency stuff and add:
FREQ=61250
(This will keep all changes to channel 3)

If you are using an IRBlaster to change channels put this line just before it calls vlc:
change_channel ${CHANNEL}

Also consider that MythTv really doens't know that this is happening, its kind of 'under the covers'. So if you grab a tuner in the middle of a mythtv recording, its channel will change. Mythtv will blindly continue record from the tuner only now it will be recording what you are watching live. Likewise, if you are watching Live and a scheduled recording is trigged, the live stream will change when MythTV changes tuner channel.

2) if you want to stream fron the Internet (i.e. watch Live from Office) you will need to open a port on your firewall. Step 3 above shows that port 8001 is used (you can change if you like).

Please....consider implications of this or any other security change. It's well documenated that a standard knoppmyth box has NO default security



UpdatedPages

· WhatRemoteYouUse last changed on Sat Jul 31 10:46:47 2010
· WhatCardYouUse last changed on Sat Jul 31 10:45:00 2010
· TinnyAudioPVR150 last changed on Fri Jul 30 03:20:30 2010
· KnoppMythWiki last changed on Thu Jul 29 04:35:17 2010
· HowTo last changed on Wed Jul 28 09:27:02 2010
· HardwareAcceleratedVideo last changed on Tue Jul 27 09:15:10 2010
· MythVodkaHowTo last changed on Tue Jul 27 09:14:04 2010
· DisklessFrontend last changed on Tue Jul 27 09:13:29 2010
· CompileMythTVFromSVN last changed on Tue Jul 27 07:39:28 2010
· MythMusic last changed on Tue Jul 27 07:38:00 2010
· RRD Disk Partition Usage last changed on Sun Jul 25 21:34:12 2010
· UserSuggestions last changed on Sun Jul 25 16:25:51 2010
· Links last changed on Sun Jul 25 16:21:33 2010
· KnoppmythDownloads last changed on Sun Jul 25 14:02:11 2010
· KnoppMythInstall last changed on Sun Jul 25 14:00:46 2010
· TroubleShooting last changed on Wed Jul 21 07:03:13 2010
· webminhowto last changed on Mon Jul 19 07:34:28 2010
· PickingComponents last changed on Wed Jul 14 17:27:40 2010
· mplayerResume last changed on Mon Jul 12 22:54:24 2010
· R5A12DvdRipping last changed on Mon Jul 12 14:44:04 2010
· Additional Software last changed on Mon Jul 12 14:42:31 2010
· HowToUseMyth last changed on Mon Jul 12 14:41:09 2010
· x11vncHowTo last changed on Sun Jul 11 00:06:20 2010
· CountrySpecific last changed on Thu Jul 1 14:48:40 2010
· RepairingMythConvergDB last changed on Thu Jul 1 14:42:58 2010
· tv_grab_au last changed on Tue Jun 29 15:44:05 2010
sitemap |