Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

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



User(s) browsing this thread: 1 Guest(s)
Post Reply 
TV Jukebox
12-07-2010, 01:31 PM
Post: #121
RE: TV Jukebox
(12-06-2010 11:45 PM)bdb Wrote:  Not much to go on ... this looks to be Siano specific.
drivers/media/dvb/siano/smsusb.c:358
drivers/media/dvb/siano/smscoreapi.c:365

800K = USB2_BUFFER_SIZExMAX_BUFFERS = 0x4000x50

- you could try reducing either/both of these; they are probably both very generous.

bdb

I was luckey enough to find this bug. This driver cannot make this call with these parameters on mips. It either a bug in the mips kernel or in this driver. Depending on your point of view.

ANyway, I am now trying to figure out how to use the tv_scan to create this nice xml with all channels.

I tried 'tv_scan -s -c channels.xml' and 'tv_scan -s -e 514000000'. THe print outs says it found something but it never stops and no xml is created. Maybe you help me out here.

Thanks.

Zofer
Find all posts by this user
Add Thank You Quote this message in a reply
12-07-2010, 11:54 PM
Post: #122
RE: TV Jukebox
(12-07-2010 01:31 PM)zofer Wrote:  I tried 'tv_scan -s -c channels.xml' and 'tv_scan -s -e 514000000'. THe print outs says it found something but it never stops and no xml is created
I think this can be caused when there channels defined in the stream that are not being broadcast - the code needs some timeouts. The .xml file is not written until the scan completes.
Stating with a partial 'channels.xml' may help - otherwise you will need to update the code.
e.g. move the file writer up a few lines.
Code:
tv_scan.c:331
                t++;
                export_transponder(filename);  //add this
            }  while (t<num_transponders);

bdb
Find all posts by this user
Add Thank You Quote this message in a reply
12-08-2010, 10:58 AM
Post: #123
RE: TV Jukebox
(12-07-2010 11:54 PM)bdb Wrote:  I think this can be caused when there channels defined in the stream that are not being broadcast - the code needs some timeouts. The .xml file is not written until the scan completes.
Stating with a partial 'channels.xml' may help - otherwise you will need to update the code.
e.g. move the file writer up a few lines.
Code:
tv_scan.c:331
                t++;
                export_transponder(filename);  //add this
            }  while (t<num_transponders);

bdb

Thanks!
Saved me some time understanding the code. I will try this tonight and let you know if this works.

Zofer
Find all posts by this user
Add Thank You Quote this message in a reply
12-09-2010, 01:20 PM
Post: #124
RE: TV Jukebox
(12-08-2010 10:58 AM)zofer Wrote:  Thanks!
Saved me some time understanding the code. I will try this tonight and let you know if this works.

Zofer

It made some progress. I now have an xml with the transponders details, but I get to an endless loop scanning for channels, and thus no channels are added to the xml. I get the channels in WinXP but the antena is in a slightly different position. I will try to disable this. I will also try to run this from another Linux, but I guess this is not the problem.

Cheers.
Find all posts by this user
Add Thank You Quote this message in a reply
12-12-2010, 11:07 AM
Post: #125
RE: TV Jukebox
I have run the tv_scan with a debugger on Linux, and found out that the stream describing the DVB contains more than one transponder and the code to parse it fails to correctly handle it. To test it a little, I have manually copied some values from the debugger and manually wrote the channels.xml to have one transponder and one channel (service). I was able to tune to that service with tv_scan, but I don't know how to view this stream in Linux. I did not understand the instructions about tzap or whatever it is.

If you can give me some directions and/or command line syntax for the correct tools that will be great.

I have verified that channels can be correctly scanned and viewed by kaffeine.

Thanks for the help.

Zofer
Find all posts by this user
Add Thank You Quote this message in a reply
12-15-2010, 01:21 PM
Post: #126
RE: TV Jukebox
It Works!

I am able to relax on my sofa, turn on the A200 and watch the public Israel channels by Idan+ using DVB-T.

Like the author says, in ideal world it would be plug in and push the butten. n the real world, like with most Linux tasks you need to pull your sleaves and to work. The bright side is that you can do it.

Here is what I did, and some of the troubles I had.

I have Popcorn A-200, so it is a little different than the A-100 steps described earlier.

Step 1: Prepare development work
Using CSI, install telnet and i-pkg.
Using i-pkg UI, install gcc, autoconf, automake. Do not install make.

Step 2: Downloads
Download A200 kernel code using the link from the NMT site http://www.networkedmediatank.com/downlo...pl/gpl.htm
Depending on your DVB-T USB hardware you will know what kernel you need. I needed 2.6.30
Download the kernel you need from http://www.kernel.org/pub/linux/kernel/v2.6/
The kernel code for 2.6.22.19 does not compile with make 3.82. We need make 3.81.
Download make 3.81 from http://ftp.gnu.org/gnu/make/
We need ncurses for menuconfig when compiling the kernel.
Download ncurses from http://ftp.gnu.org/pub/gnu/ncurses/

Step 3: Prepare for kernel build
Connect to A200 using telnet
Set the env vars for gcc following the guidelines in the i-pkg site. I had to play a little with the settings because gcc fails to correctly detect the architecture and endianess.
Configure and build and install 'make' with --prefix=/usr/local
Configure and build and install 'ncurses' with --prefix=/usr/local

Step 4: Kernel build
Unpack NMT kernel and the stock kernel.
Copy the needed drivers from the stock kernel to the NMT kernel.
Update the KConfig files to correctly include your drivers in the build.
Configure the kernel with 'make menuconfig' I gad to add the HOSTCCFLAGS and HOSTLDFLAGS because the build scripts and gcc fails to agree that this is a native build and thinks this is a cross platform build.
Mark for build the drivers you need for your hardware, and turn on suggested settings. See the A100 instructions for additional settings.
Change the version of the kernel to match the one that is given by the command" 'uname -a'. This will resolve possible failure to load modules of different version with insmod.
Build the kernel modules using 'make modules' while setting the same HOSTCCFLAGS and HOSTLDFLAGS flags.
It may not compile at first, so we need to hack the kernel.
I had to remove the support for device number, and add a typedef because they do not exist in the NMT kernel.
I also had to change the call to dma_alloc_coherent calls in my driver because in the NMT kernel there is a bug and this call is not supported with the first parameter being NULL.

Step 5: Putting it to work
Now we should have the needed modules correctly build and can follow the rest of the instructions like the A100. Several changes though:
a. The compiled tv_scan for A100 did not work for me on A200. I had to rebuild it. You will need to download and build libxml2 to be linked with tv_scan. Note that the latest firmware with NMJ has this library, so we need to make sure there is no overlap.
b. Fix the dvb_init start shell script to load your modules.

For me, the tv_scan did not work well scanning for channels. I think this is because we have in Israel more than one transponder for DVB-T and the data coming from the driver is a little differently organized. Anyway, I had to use 'scan', mentioned here: http://linuxtv.org/wiki/index.php/Scan on my Ubuntu, and manually write the channels.xml. One comment about this: the lcn parameter is a local identifier used only by tv_scan and is not read from the DVB-T.

I will post my implementation for Israel channels later on. I also have a minor improvement.

One comment about the A200: It takes about a minute to start watching TV when switching a channel. I don't know why, but it sucks.

Cheers.

Zofer
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to zofer for this post
12-15-2010, 07:21 PM
Post: #127
RE: TV Jukebox
(12-15-2010 01:21 PM)zofer Wrote:  It Works!
Good to hear the sounds of success - even if you had to jump through some hoops.
One day I may get round to improving tv_scan a bit more; I do have a version that supports the Tevii S660 DVB-S2, and has some other improvements - but it is not really finished.

- the lcn is a uk specific field; but you can manually add it to help sorting.
- does the a200 still use mono/gaya?
- with the a110, the long pause when switching channels is due to mono shutting down, restarting, reconfiguring all the hdmi stuff, and reloading its buffers. I got much better results by rebuilding mono, and getting it to switch channels without needing the restart.

bdb
Find all posts by this user
Add Thank You Quote this message in a reply
12-15-2010, 08:47 PM
Post: #128
RE: TV Jukebox
(12-15-2010 07:21 PM)bdb Wrote:  - the lcn is a uk specific field; but you can manually add it to help sorting.
- does the a200 still use mono/gaya?
- with the a110, the long pause when switching channels is due to mono shutting down, restarting, reconfiguring all the hdmi stuff, and reloading its buffers. I got much better results by rebuilding mono, and getting it to switch channels without needing the restart.
bdb

Thanks for the insperation.

I have little knowledge about NMT. I don't actually know what is mono nor gaya. By looking at the GPL page, I think it is built differently.

Send instructions how to check and I will tell you what is inside the A200.

The little improvement I mentioned is to make a symbolic link /tmp/<channel name> that points /dev/dvb/adapter0/dvr0 and use this as the file. This way when you hit 'i' in the remote control you will have the channel name.

Zofer

P.S. How do I put attachments here?
Find all posts by this user
Add Thank You Quote this message in a reply
12-15-2010, 09:42 PM (This post was last modified: 12-15-2010 09:42 PM by dc11ab.)
Post: #129
RE: TV Jukebox
zofer, no attachments here, but the NMT Wiki can host smaller files.

Longer code examples/snippets are best put on places like pastebin.com etc.
Shorter code goes within [ code ] #code here [ / code ] bb-style tags (press the #-sign)


The 200-series does not have the same mono as the 100-series, or at least it's not implemented in the same way (some kind of wrapper?) behind `syb_framework' at /opt/syb/sigma/bdj/jvm/bin/syb_framework
It cannot be piped commands in the same way as mono. Sorry, this is as far as I know.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
12-19-2010, 04:55 AM
Post: #130
RE: TV Jukebox
(12-15-2010 01:21 PM)zofer Wrote:  I gad to add the HOSTCCFLAGS and HOSTLDFLAGS because the build scripts and gcc fails to agree that this is a native build and thinks this is a cross platform build.

Maybe is a silly question but...how do I set these flags?
I'm stucked on this step.

Thanks !!!
Find all posts by this user
Add Thank You Quote this message in a reply
12-19-2010, 05:40 AM
Post: #131
RE: TV Jukebox
I tried to install this app but coundn't go on compiling stage...given up

If it's stable enough, can you please provide a install package via CSI?
Find all posts by this user
Add Thank You Quote this message in a reply
12-22-2010, 07:59 AM (This post was last modified: 12-22-2010 08:05 AM by zofer.)
Post: #132
RE: TV Jukebox
(12-19-2010 04:55 AM)black_dragon Wrote:  Maybe is a silly question but...how do I set these flags?
I'm stucked on this step.

Thanks !!!

You pass it in the command line, like this:

Code:
make modules HOSTCCFLAGS=' -EL -fPIC -march=74kc ' HOSTLDFLAGS=' -EL -fPIC -march=74kc '

I don't recall the exact combination of flags, because it failed to compile several times before I could make it right, but this is the direction. You may also need to play a little with the CFLAGS and LDFLAGS in conjunction with this, because this is a kernel build.

Good luck,

Zofer
(12-15-2010 09:42 PM)dc11ab Wrote:  The 200-series does not have the same mono as the 100-series, or at least it's not implemented in the same way (some kind of wrapper?) behind `syb_framework' at /opt/syb/sigma/bdj/jvm/bin/syb_framework
It cannot be piped commands in the same way as mono. Sorry, this is as far as I know.

Thanks for the tip. This means that all forum posts about this in the A100 series are of little relevance. I am also concerned with the path you gave:

/opt/syb/sigma/bdj/jvm/bin/syb_framework

For two reasons:
1. It has a jvm in it. Is content played using a jvm? Wrapped commands?
2. Why is it outside /bin?

But maybe this is an advantage and we could push overridden java classes into the jvm and alter this faulty behavior.

Zofer
Find all posts by this user
Add Thank You Quote this message in a reply
12-22-2010, 11:04 AM
Post: #133
RE: TV Jukebox
(12-22-2010 07:59 AM)zofer Wrote:  Thanks for the tip. This means that all forum posts about this in the A100 series are of little relevance. I am also concerned with the path you gave:

/opt/syb/sigma/bdj/jvm/bin/syb_framework

For two reasons:
1. It has a jvm in it. Is content played using a jvm? Wrapped commands?
2. Why is it outside /bin?

But maybe this is an advantage and we could push overridden java classes into the jvm and alter this faulty behavior.
I'm not so sure there is java involved other than for Bluray media menu/applications, I believe it calls other programs/libraries for different kind of media, but acts as some kind of wrapper. Isn't there mono and amp_test (or whatever it is called?) on the 100-series, for instance?
I don't know why it's outside of /bin, assuming it has to do with proprietary stuff from the chipmaker Sigma Designs. Well, just me wildly speculating.

On a sidenote, on the 200 series I think html URL anchor tags with VOD attribute can be echoed/piped to /tmp/gaya_bc (the screen/GUI), at least that's what the PLoNK andriod remote controller does via it's custom `peach´ daemon:
http://www.wieslander.eu/wiki/index.php?title=Peach
I have read and understood very little of the "David Box" SDK, but it's supposed to be possible to control playback via xml rpc on port 8008 (briefly discussed here), such as for playback:
Code:
http://<hostname>:<port>/playback? arg0=start_vod&arg1=MyVideoTitle&arg2=http://...&arg3=show&arg4=0
http://<hostname>:<port>/playback? arg0=start_vod&arg1=MyVideoTitle&arg4=file:///opt/...&arg3=&arg4=
If you are interested you can register to get the SDK/API documentation:
https://developer.popbox.com/c/devuser/home
This documentation does not appear to be completely implemented or fully documented, from my first glance, but it could be useful in some scenarios.


Sorry for ranting about the 200-series internals in this TV Jukebox thread, bdb. This part of the discussion should continue in a separate thread.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
12-22-2010, 12:27 PM
Post: #134
RE: TV Jukebox
(12-22-2010 11:04 AM)dc11ab Wrote:  Sorry for ranting about the 200-series internals in this TV Jukebox thread, bdb. This part of the discussion should continue in a separate thread.

Thanks for the pointers, I will check it out. The relevance I see to this thread is to find the correct way to change channels in a reasonable time. For me, currently it takes 1-2 minutes. Just to switch channels.

I will dig in and hopefully find a solution.

Zofer
Find all posts by this user
Add Thank You Quote this message in a reply
12-27-2010, 03:38 PM
Post: #135
RE: TV Jukebox
I had a good look at this resources. Amazing stuff, but all concerns how to control video playing (and other things) using URL.

The 1-2 minutes delay, from what I understand from other posts in this thread, are about connecting to stream, restarting HDMI connection, buffering, synchronizing and than play. We do that every time we click the channel link from the html. When we like to switch channel, we click 'stop' in the remote and shutdown the play process.

If there is a way to just pause it, change the channel and let do the buffering and synch again, than we can save some time.

One option that I could think of is to try write an application that is similar to the youtube application in the aspect of video playing.

Do you think this will work?

Regards,
Zofer
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Any music jukebox that syncs with itunes? superflysocal 0 1,401 07-04-2012 02:57 PM
Last Post: superflysocal
  jukebox to work with sickbeard artwork phenz 4 1,939 12-07-2011 12:26 AM
Last Post: phenz
Brick Building Freenas box to work with PCH and My Lil Movie Jukebox Casuall 10 6,866 07-17-2011 04:23 AM
Last Post: Casuall
  Jukebox automator tiwas 58 29,131 02-14-2011 02:39 PM
Last Post: tiwas
  NFO Manager v1.0.4 Beta Released Nov 11th - With Dynamic JukeBox vaidyasr 76 36,476 01-12-2011 02:12 PM
Last Post: mfsav2
  MyLil Movie Jukebox no index html file? whyioughta 2 2,327 12-07-2010 03:08 AM
Last Post: whyioughta
  Controlling Jukebox from PC harrykausl 0 1,391 11-02-2010 12:49 PM
Last Post: harrykausl
  taimador - standalone dynamic jukebox rony 11 5,872 02-28-2010 07:00 PM
Last Post: rony
Information [Solution] Autoload Jukebox with availability to use normal menu Lufa 0 1,589 09-25-2009 11:19 PM
Last Post: Lufa
  Video Jukebox, Thumbnails for Home Video? oatnog 3 2,884 08-23-2009 12:02 AM
Last Post: eummagic

Forum Jump: