[mythtvnz] Frontend over slow wifi link

Nick Rout nick.rout at gmail.com
Mon Feb 22 00:45:40 GMT 2010


On Mon, Feb 22, 2010 at 1:09 PM, Graeme Woollett <g.woollett at irl.cri.nz> wrote:
> I'm wanting to watch tv recorded on my sisters mythbox via a wifi link.
> It records from a PVR150. The link doesn't quite have enough speed to
> play the stream without pausing.  I've been playing around with mencoder
> and netcat to compress the video into MPEG4 before sending over the link.
>
> Script on backend box
>
>  #!/bin/bash
> # 500 is acceptable for bitrate, 1000 gives very nice quality
> BITRATE=1500
> MAX_XRES=768
> MAX_YRES=576
> LISTEN_PORT=1234
>
> # oac copy should work fine most of the time
> #AUDIO="-oac mp3lame -lameopts preset=192"
> AUDIO="-oac copy"
>
> mkfifo "/tmp/maemo_stream-$$"
> { nc -q 0 -l -p $LISTEN_PORT < "/tmp/maemo_stream-$$"; killall -9
> mencoder; rm -f "/tmp/maemo_stream-$$"; } &
> mencoder -o "/tmp/maemo_stream-$$" $AUDIO -ovc lavc \
>    -lavcopts
> vcodec=mpeg4:vbitrate=${BITRATE}:aspect=${MAX_XRES}/${MAX_YRES}:mbd=2:trell
> \
>    -idx -zoom -vf-add dsize=${MAX_XRES}:${MAX_YRES}:2,scale \
>    -vf-add expand=${MAX_XRES}:${MAX_YRES}::::${MAX_XRES}/${MAX_YRES}
> -vf-add crop=${MAX_XRES}:${MAX_YRES} \
>    -ffourcc FMP4 "$1"
> rm -f "/tmp/maemo_stream-$$"
>
>
> command on "frontend" box
>
>  nc.traditional -q 0 192.168.2.230 1234 | mplayer -vf pp=lb -cache 8192
> -cache-min 80 -
>
> this works OK, no pausing.
>
> Now for the Problems -
> 1. no index skipping, if I lose my place in the stream I have to start
> from the beginning.
> 2. It would be nice to "chase the tail" of the file that mythbackend is
> writing to, but I don't know how to get mencoder to read piped output
> from  the tail -f command.
> 3. It would be nice to not have to search for the cryptically named file
> that mythbackend generates.  I have tried used mythtvfs, this seems not
> to support the version of the backend I have i.e mythtvfs has a version
> of 40 while the backend is version 50.  Only some of the recordings show up.

Why not mythrename.pl, although see here for imminent changes:

http://www.gossamer-threads.com/lists/mythtv/users/424112

>
> What would be even nicer than this hack is for mythtv (from a frontend
> point of view) to manage the encoding and bitrate for me.  I can't cut
> the bitrate on recording on the backend as this would annoy my sister!

myth does not presently support on the fly re-encoding. Nor does it
support multiple files for the same programme (ie files with different
bitrates etc).

>
> I've also tried the asx stream from mythweb, seems to work but any
> attempt to skip crashes vlc.
>
> Any ideas??  Am I going about this the wrong way?
>

There are third party upnp servers that recode on the fly.



More information about the mythtvnz mailing list