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

· WakeOnLANRouter last changed on Sun Feb 7 05:04:09 2010
· KnoppMythWiki last changed on Sat Feb 6 14:22:21 2010
· KnoppMythInstall last changed on Tue Feb 2 04:58:54 2010
· StaticIPConfig last changed on Sun Jan 24 11:02:40 2010
· LinuxTips last changed on Tue Jan 12 05:11:08 2010
· TroubleShooting last changed on Tue Jan 12 05:09:39 2010
· HowTo last changed on Tue Jan 12 05:05:53 2010
· RarFiles last changed on Sun Jan 10 06:13:35 2010
· TinnyAudioPVR150 last changed on Thu Jan 7 19:21:53 2010
· MediaMVP_LinuxHOWTO last changed on Mon Jan 4 07:23:41 2010
· StorageGroups last changed on Mon Dec 14 18:38:15 2009
· SandBox last changed on Mon Nov 30 10:04:30 2009
· NZMythConfig last changed on Fri Nov 27 01:32:05 2009
· webminhowto last changed on Wed Nov 25 16:02:59 2009
· UpgradeHowTo last changed on Tue Nov 24 00:09:52 2009
· MythVodkaHuluFixR6 last changed on Mon Nov 23 18:09:38 2009
· Change Channels with Serial Cable last changed on Sat Nov 21 06:22:23 2009
· x11vncHowTo last changed on Wed Nov 18 09:15:23 2009
· GeForce4 last changed on Sun Nov 15 06:13:50 2009
· WhatCardYouUse last changed on Thu Nov 12 22:54:17 2009
· tv_grab_au last changed on Wed Nov 11 16:58:37 2009
· kworld115HowTo last changed on Sat Nov 7 18:18:53 2009
· AutomatedBackup last changed on Mon Oct 12 11:01:34 2009
· MythBackupAndRestoreHowTo last changed on Mon Oct 12 09:59:40 2009
· HardwareAcceleratedVideo last changed on Mon Oct 5 23:03:26 2009
· RepairingMythConvergDB last changed on Thu Oct 1 18:51:12 2009
sitemap |