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

Streaming recorded show over wireless
http://forum.linhes.org/viewtopic.php?f=11&t=5465
Page 1 of 1

Author:  marc.aronson [ Sat Jul 23, 2005 8:47 am ]
Post subject:  Streaming recorded show over wireless

The most common use of MythTv in my household is to watch recorded TV shows from a laptop running windows streaming across the wireless network -- works on 802.11b and 802.11g. I thought others might find the approach I am using useful, so here it is...

In setting this up the goal was to solve the following problems:

1. I record analog, interlaced video. To look reasonable on the laptop, the video needed to be de-interlaced on-the-fly. This way the same recording can be played nicely on my TV set, which does best with interlaced video, and on my laptop, which looks best de-interlaced.

2. Bitrate needs to be low enough to stream reliably over 802.11b wireless network.

3. The normal behavior of ie (Internet Explorer) when you click on the show in "mythweb" is to download the mpeg2 file before playing it. I wanted to stream the file instead of waiting for it to download.

Here is how I set up to make this work:

1. I use a bitrate of 2,400bps and resolution of 352x240. Probably seems to many like a low bit rate, but it looks good to me.

2. Install VLC on the laptop that you will be playing the show on. http://www.videolan.org/vlc/download-windows.html

3. Go the the site http://s95184944.onlinehome.us/ReplayTV.html, download the zip file that is on the "PlayWithVLC v1.0" link and following the instructions in the "readme" file.

4. Replace the file "PlayWithVLC.html" that was in the zip file with the following content:

Code:
<SCRIPT>
   var shell = new ActiveXObject("WScript.Shell");
   var url = external.menuArguments.event.srcElement.parentElement.href;
   if (url == null)
      url = external.menuArguments.event.srcElement.href;
      shell.run("\"C:\\Program Files\\VideoLAN\\VLC\\vlc.exe\" \"" + url + "\" --filter=deinterlace --deinterlace-mode=blend --volume=9999 --fullscreen");
</SCRIPT>


5. Close all ie windows.

6. Open a fresh ie window, browse to mythtv recorded shows. When you right-click on a recorded program you will see the menu entry "Play with VLC" towards the bottom of the window. When you select this, your program will play full screen, de-interlaced on the fly.

Finally, another benefit of using VLC for playback is that VLC provides 15-second/60-second/5-minute skip-forward and skip-backward functions so that you can quickly skip commercials.

    [ctrl]-> Skip forward 60 seconds
    [ctrl]<- Skip backwards 60 seconds

    [alt]-> Skip forward 15 seconds
    [alt]<- Skip backwards 15 seconds

    [ctrl][alt] -> Skip forward 5 minutes
    [ctrl][alt] <- Skip forward 5 minutes

In the listing above "->" represents the right-arrow button; "<-" represents the left-arrow button.

Hope this helps someone!


Marc

Author:  greywire [ Sat Jul 23, 2005 9:23 pm ]
Post subject:  Firefox/mozilla

Is there a way to make this work in firefox / mozilla?

Author:  mjl [ Sat Jul 23, 2005 10:45 pm ]
Post subject:  What flavor of Windows?

Hi,

If samba is setup & running, XP & Win2K will play the stream as it is being copied. Using explorer, \\ip-to-myth-box\myth (asks for passwd) will allow you go to the /myth/pretty folder and select a .mpg. If using wireless, hit pause for a few moments to let the stream get a head start.

End of my 2 cents :)
Mike

Author:  marc.aronson [ Sat Jul 23, 2005 11:40 pm ]
Post subject: 

mlj, you are correct about this but I much prefer using the mythweb interface, which allows me to select-by-series and view a synopsis of each episode. If I understand the method you are describing, you are essentially \browsing the shows as files in a folder, which does not provide the full richness of the mythweb interface.

greywire, I believe there is. What you need to do is create a custom context menu entry for firefox. I haven't done this myself, but the following article describes how to create custom context menus in firefox: http://blog.monstuff.com/archives/000033.html

I have not yet tried to do this myself, but may give it a shot at some point. If you get it to work, it would be great if you posted the "receipe".

Marc

Author:  mjl [ Sun Jul 24, 2005 12:22 am ]
Post subject:  Work

Hi Marc,
Sounds like work :) We will see...
Mike

Author:  Mephi [ Sun Jul 24, 2005 4:28 am ]
Post subject: 

When connect to the shared directories on my myth box, I don't see a 'pretty' folder anywhere. How do I get this?

Mephi

Author:  marc.aronson [ Sun Jul 24, 2005 7:41 am ]
Post subject: 

Mephi, "pretty" is the directory "/myth/pretty". If you are running V4R5 you need to read the knoppmyth wiki article on how to enable it -- http://www.knoppmythwiki.org/index.php? ... hPrettyFix

You can also do a forum search on "mythlink" for several postings that may help.

If you are running R5A16 I believe it should be working without any tweaks after a standard install, but I'm not certain of this.

Marc

Author:  marc.aronson [ Sun Jul 24, 2005 8:35 am ]
Post subject: 

mjl, you are correct that this takes a bit more work on the installation side. The advantage is that once installed, it also solves the "on the fly de-interlacing" issue without any extra steps or specialized knowledge on the part of the user. This is useful for my wife and daughter, neither of whom have the interest in "tinkering" with this stuff that I do.

BTW, if you're not already using VLC, you may want to download a copy and give it a try. Obvously, it can be used with the access method you've described. VLC has 15-second/60-second/5-minute skip-forward and skip-backward functions so that you can quickly skip commercials.

    [ctrl]-> Skip forward 60 seconds
    [ctrl]<- Skip backwards 60 seconds

    [alt]-> Skip forward 15 seconds
    [alt]<- Skip backwards 15 seconds

    [ctrl][alt] -> Skip forward 5 minutes
    [ctrl][alt] <- Skip forward 5 minutes

In the listing above "->" represents the right-arrow button; "<-" represents the left-arrow button.

Author:  Mephi [ Sun Jul 24, 2005 9:16 am ]
Post subject: 

marc.aronson wrote:
If you are running R5A16 I believe it should be working without any tweaks after a standard install, but I'm not certain of this.


Marc,
Nope, I'm running R5A16, and I've not got a /myth/pretty directory.
I'll try that wiki article when my g/f has stopped watching charlie's angels.

Cheers.

Mephi

Author:  Mephi [ Sun Jul 24, 2005 11:16 am ]
Post subject: 

Thanks Marc, I didn't need to edit the mythlink.sh file, just run it.
:D

Mephi

Author:  marc.aronson [ Sun Jul 24, 2005 12:31 pm ]
Post subject: 

Glad that worked -- you might want to add a cron job to run it automatically. I have mine script run every 30 minutes -- at 5 minutes past the hour and 35 minutes past the hour...

Author:  mjl [ Sun Jul 24, 2005 9:47 pm ]
Post subject:  crontab

Hi,
At least I got you pointed in a different direction, whether it be good or bad?

To put the mythlink.sh into the auto cycle you need to edit the crontab. I do this at install time and another twenty or more things.

as root
# crontab -e #this will open a nano sesion and show most likely a blank file
#copy and paste the following and you will an exact copy of mine.
#You need to edit crontab do crontab -e and add the following lines

crontab -e

#<code>
#clock talk schedule
#min 0-59 * hr 0-23 * day 1-31 * month 1-12 * day of week 0-6(Su-Sa) * /cmd"
0,30 * * * * /usr/bin/saytime & #apt-get install saytime and this works also :)
#run mythlink.sh to make the pretty tv links
5,35 * * * * /usr/local/bin/mythlink.sh
#<end code>
do control x then answer y and press enter.

There are a couple of different flavors of the mythlink.sh scripts and if I recall correctly, the one in R5A15.1 works best with windows. There was a fix on how the file names were cleared which would stop the stream to windows prematurely.

I change one line in the script to make "more pretty" however that is in the eye of the beholder.
#edit this file to experiment /usr/local/bin/mythlink.sh
was #my $nfn = "${title}-${subtitle}";
is my $nfn = $title."-".$subtitle;
the pretty directory should be at /myth/pretty and will be empty until you record something.
if it is missing do:
mkdir /myth/pretty
chown mythtv:mythtv /myth/*

Good luck and have fun with this fantastic system!
Mike

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