[9 June 2010] C-200/A-200 NMJ UI PREVIEW (under development) | 18. Jan 2010 Popcornhour C-200 Manual

Firmware Updates C-200 [26 Aug 2010] | A-200 [14 May 2010] | A-100 [13 Aug. 2010] | A-110 [18 Aug. 2010] | B-110 [23 Apr. 2010]

Just got your NMT | WIKI has the answers | Search the forum BETTER | Forum Rules/Policy | Firmware & Official NMT News


1 user browsing this thread: (0 members, and 1 guest).

Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LLink and LiveTV - mini HOWTO
02-25-2008, 10:57 AM
Post: #1
LLink and LiveTV - mini HOWTO
I spend several days trying to get LiveTV to work with my PCH. I wrote this mini-howto to share my knowlegde gained. My current setup is a kubuntu server with a dvb-c card and a PCH so that's what I will be using in this example.

You need the following:
    Popcorn hour (ofcourse)
    Linux or Windows machine with a DVB/TV card (I am using DVB-C as example)
    DVBStream or Mencoder
1: Download and install LLink
Download, unzip, untar, configure and make

2: Edit the llink.conf file so that can handle the ltf extension
Add the following line to llink.conf
Code:
# Live TV
TYPE|name=Live|ext=*.ltv|filename=line_movie.html|cmd=external|args=/usr/local/bin/dvbtv.sh
This tells LLink that when it encounters a file with the ltf extension that it should execute the script /usr/local/bin/dvbtv.sh

3: Make a ltv file
Somewhere in the directory structure shared by LLink you should put a file with a ltv extension. In my case I use the name of the channel I would like to view as naming convention. Under linux you can use the command touch to generate the file: touch "Film 1.1.ltf"

4: Get the name of the fifo
We specified the script /usr/local/bin/dvbtv.sh as being the external command for LLink that has to be executed when it encounters a ltv file. This is the first time we are going to run into some trouble. LLink uses a fifo to communicate with the external programm. This fifo is created before the script is executed but is not provided as a parameter (it does not work correctly for me at least, in code LLink provides the as first parameter the name of the file and as second parameter the name of the fifo). We can take two separate routes here.

4a: Search for newest fifo
The following code searches for the newest fifo in the current directory. This approach has as drawback that we have no way of knowing which file is selected. We want to know that when we want the script to be able to handle multiple channels.
Code:
#!/bin/sh
outputfifo=`find llink-external-fifo.* -maxdepth 1 -type p -printf '%T@\t%p\n' |
sort -k1,1n | tail -n1 | cut -f2-`
echo "Using fifo: " $outputfifo

4b: Provide name of fifo as parameter to dvbtv.sh
In this case we have to alter the file external.c so that it provides the filename and fifo as parameters to the script. We have to find the routine external_launch and change the following lines:
Code:
size = strlen(skin->args) + 2 + strlen(node->disk_path) + 3 + strlen(tmpname) + 1 + 1;

....

snprintf(args, size, "%s \"%s\" \"%s\"", skin->args, node->disk_path, tmpname);
Make sure to build LLink after the changes! In this example I am taking this route because it makes the dvbtv.sh script easier

5: Make dvbtv.sh
The following dvbtv.sh uses dvbstream to stream files to the PCH. You could also you mencoder but that leads to an other problem because mencoder uses some environment variables which are not standard provided by LLink (not without changing code, change in the file fifo.c in de lion/src directory the call to execvp to execv and remove the argv parameter. This calls the external process with the environment of the calling process).
The script looks at the file selected and starts the according stream. I made a ltv for each channel I would like to stream to the PCH.

Code:
#!/bin/sh
echo "File: " $1
echo "Using fifo: " $2
#exec mencoder dvb://2@"Film 1.1" -oac copy -ovc copy -really-quiet -o /dev/stdout > $2

filename=`echo $1|rev|awk -F \/ '{print $1}'|rev`
echo "Filename: " $filename
case $filename in
  "Film1 HD.ltv")
     echo "Streaming Film1 HD"
     exec dvbstream -c 1 -f 235000 -s 6875 -qam 64 -v 0 -a 160 -o > $2
     ;;
  "Film 1+1.ltv")
     echo "Streaming Film 1+1"
     exec dvbstream -c 1 -f 305000 -s 6875 -qam 64 -v 251 -a 260 -ps -o > $2
     ;;
  "Film 1.1.ltv")
     echo "Streaming Film 1.1"
     exec dvbstream -c 1 -f 305000 -s 6875 -qam 64 -v 101 -a 110 -ps -o > $2
     ;;
  "Film 1.2.ltv")
     echo "Streaming Film 1.2"
     exec dvbstream -c 1 -f 305000 -s 6875 -qam 64 -v 151 -a 160 -ps -o > $2
     ;;
  "Film 1.3.ltv")
     echo "Streaming Film 1.3"
     exec dvbstream -c 1 -f 305000 -s 6875 -qam 64 -v 201 -a 210 -ps -o > $2
     ;;
  *)
     echo "Unknown channel: " $1
esac

6: Enjoy watching TV
On the PCH select the ltv file and hopefully enjow watching streaming LiveTV. When it does not work make sure that LLink is started in debugmode so that you can look at what is happening (LLink -v 125 -d)

Have fun!
Find all posts by this user
02-25-2008, 01:10 PM
Post: #2
 
Nice work, Have you tried VDR by any chance?

Its a sweet setup, but the popcorn hour refuses to play the files. Smile
Find all posts by this user
02-25-2008, 01:18 PM
Post: #3
 
hyppe Wrote:Nice work, Have you tried VDR by any chance?

Its a sweet setup, but the popcorn hour refuses to play the files. Smile

No I have not tried VDR yet. For debuging I used a normal webbrowser which made a connection to LLink (http://mediaserver:8000). This setup works okay when the browser starts receiving a file after an ltv file has been selected. I had a lot of crash/hang problems with LLink when my shell script was incorrect.
Find all posts by this user
02-25-2008, 04:36 PM
Post: #4
 
Nice, think ill redo it to use vlc streaming from my vdr server. Since the popcorn cant play stright from vdr Smile

Game me some idea thats for use Smile
Find all posts by this user
02-25-2008, 04:46 PM
Post: #5
 
hyppe Wrote:Nice, think ill redo it to use vlc streaming from my vdr server. Since the popcorn cant play stright from vdr Smile

Game me some idea thats for use Smile

why you dont take MTPCenter Smile beta4 works with pch Smile and vdr records starts playing native on last beta right now only basic vdr support but will be improved Smile you must know was an wish from me and an huge community is waiting for it hahahaha

werner

-----------------------------------------------------------------------------------------------------
Syabas Technology Inc. DBA Popcornhour
Find all posts by this user
02-25-2008, 06:44 PM
Post: #6
 
The thin client that I am working on will hopefully support VDR more directly.

http://www.rst38.org.uk/mediamvp/mvpvdr.html

Martin
Find all posts by this user
02-25-2008, 06:45 PM
Post: #7
 
Quote:why you dont take MTPCenter Smile beta4 works with pch Smile and vdr records starts playing native on last beta right now only basic vdr support but will be improved Smile you must know was an wish from me and an huge community is waiting for it hahahaha

Im using VDR 1.5.x with streamdevserv.
So i just want to watch the streams that it delivers.

Are we talking about the same thing? Smile
Find all posts by this user
02-25-2008, 06:48 PM
Post: #8
 
hyppe Wrote:
Quote:why you dont take MTPCenter Smile beta4 works with pch Smile and vdr records starts playing native on last beta right now only basic vdr support but will be improved Smile you must know was an wish from me and an huge community is waiting for it hahahaha

Im using VDR 1.5.x with streamdevserv.
So i just want to watch the streams that it delivers.

Are we talking about the same thing? Smile

then take an look on the MTP Center then you can watch your VDR Records and you can take the popi as client to watch live tv you can change channels and everything else Smile
vdr records are playing already on last beta but only basic so the index.vdr .... has no function now but we can watch 001.vdr, 002.vdr..... but was only the first step

werner

-----------------------------------------------------------------------------------------------------
Syabas Technology Inc. DBA Popcornhour
Find all posts by this user
02-25-2008, 06:49 PM
Post: #9
 
emveepee Wrote:The thin client that I am working on will hopefully support VDR more directly.

http://www.rst38.org.uk/mediamvp/mvpvdr.html

Martin

really nice i look forward to your working if you need any help let me know Smile

-----------------------------------------------------------------------------------------------------
Syabas Technology Inc. DBA Popcornhour
Find all posts by this user
02-25-2008, 06:59 PM
Post: #10
 
emveepee Wrote:The thin client that I am working on will hopefully support VDR more directly.

http://www.rst38.org.uk/mediamvp/mvpvdr.html

Martin

Emveepee you busy man :-)
I thought you were building an MythTV/GBPVR frontend. This is for me only a temp solution because I am really waiting for a frontend for my MythTV installation. If you need any help just let me know.... maybe I can help!
Find all posts by this user
02-25-2008, 11:08 PM
Post: #11
 
Lasoul Wrote:Emveepee you busy man :-)
I thought you were building an MythTV/GBPVR frontend. This is for me only a temp solution because I am really waiting for a frontend for my MythTV installation. If you need any help just let me know.... maybe I can help!

Supporting mvpvdr is zero work, that's the beauty of the emulation mode thin client, the author of the server does all the work. mvpmc as a fat client Myth frontend is much tougher and the paradigm doesn't work well as a gui to mono. In fact mono is the problem.

If you want to help cross-compile and test MySQL and ncurses and pass my whatever scripts you did to do this. This will save me one weekend.

Martin
Find all posts by this user
02-25-2008, 11:32 PM
Post: #12
 
emveepee Wrote:If you want to help cross-compile and test MySQL and ncurses and pass my whatever scripts you did to do this. This will save me one weekend.

Martin

I did compile ncurses-5.6 without any problem using these configure options
Code:
./configure --target=mipsel-linux-uclibc --host=mipsel-linux-uclibc --with-shared --prefix=/usr/local/mips

If it can help...
Find all posts by this user
02-26-2008, 12:02 AM
Post: #13
 
Thanks groll, every thing helps. I'm not sure it is even used but it seems to be a requirement for MySQL. I am surprised that it doesn't complain about not having a build type.

Martin
Find all posts by this user
02-26-2008, 12:08 AM
Post: #14
 
emveepee Wrote:Thanks groll, every thing helps. I'm not sure it is even used but it seems to be a requirement for MySQL. I am surprised that it doesn't complain about not having a build type.

Martin
It did complain
Code:
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
but I didn't find another combination of --build --host --target which detect the right gcc (mipsel-linux-uclibc-gcc)
What should I use ?
Find all posts by this user
02-26-2008, 12:48 AM
Post: #15
 
I usually am lazy and type --build=i386 but it depends on your pc. If you type gcc -v you probably will see what your target was.

What did you do to get c++ compiled?

Martin
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
Music MPD installation howto (updated 4 May 2009) gwillem 480 135,836 06-30-2010 07:21 AM
Last Post: avanegmond
  Howto customize mono parameters? lcars 5 668 01-02-2010 08:29 PM
Last Post: garp99
  Llink rar archive not showing content imtcb 15 1,914 12-01-2009 01:29 PM
Last Post: bengt
  mythtv - LiveTV and Recording using llink-mod mwahal 2 1,059 11-23-2009 05:39 AM
Last Post: tivo1
  Llink rar files mypaq 6 610 08-30-2009 06:26 PM
Last Post: mypaq
  howto access PCH from outside my home? nappy 3 1,564 05-11-2009 04:23 PM
Last Post: nappy
  llink related problem wsoderberg 5 793 04-06-2009 12:51 AM
Last Post: wsoderberg
  howto add permentally an entry to crontab? rabside 3 1,474 04-04-2009 02:37 PM
Last Post: rabside
Biggrin PLoNK , Android remote controll of Popcorn Hour and llink - Update PoPEye 12 5,753 03-30-2009 10:21 PM
Last Post: PoPEye
  YAMJ & LLink index.htm auto-load ndoggac 11 2,914 03-10-2009 12:15 AM
Last Post: Little Simon

Forum Jump: