[mythtv-users] Mythtvosd

Phill Edwards philledwards at gmail.com
Fri Jul 1 04:52:02 EDT 2005


> trying to play around with mythtvosd but I can't really find much
> information on it.  I have tried running the following command but I don't
> get any output to the screen while watching a recording.
> 
> # mythtvosd
> --template=/src/mythtv/programs/mythtvosd/alert.xml
> --alert_text='hello' --bcastaddr=127.0.0.1
> Sent UDP/XML packet to IP 127.0.0.1 and port: 6948
> 
> Any hints or good links for more information on this?

I've got this cgi script so you can send a msg from a browser:


#!/usr/bin/perl

use CGI;

# Create the CGI object
my $query = new CGI;

# Output the HTTP header
print $query->header ( );

# Capture the form results
my $msg = $query->param("msg");
my $template = $query->param("template");
my $text_cmd = "";

if ($template eq "alert")
{
   $text_cmd="--alert_text=\"$msg\"";
}
else
{
   $text_cmd="--scroll_text=\"$msg\"";
}

#Send the message using mythvtosd
if( length ("$msg") > 0)
{
   system "/usr/bin/mythtvosd --template=$template $text_cmd";
}

# Print the html form
print <<END_HTML;
<HTML>
<HEAD>
<TITLE>Send a message using MythTV OSD</TITLE>
</HEAD>
<BODY>
<H1>Send a message to MythTV</H1><P>
If someone is watching a recording or Live TV your message will be shown on
their screen.<P>
Enter the text of your message here:
<FORM ACTION=/cgi-bin/mythtvosd.pl METHOD=POST>
<INPUT TYPE=TEXT SIZE=90 NAME=msg VALUE="$msg">
<P>
Choose whether you want an alert box or a scroller:<BR>
<INPUT TYPE="RADIO" name="template" value="scroller" CHECKED>Scrolling Text<BR>
<INPUT TYPE="RADIO" name="template" value="alert">Alert Box<BR>
<P>
<INPUT TYPE=SUBMIT VALUE="Send">
</FORM>
</BODY>
</HTML>
END_HTML


Regards,
Phill


More information about the mythtv-users mailing list