maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   MythTV Port (warning: teaser pics inside) (https://talk.maemo.org/showthread.php?t=18116)

yani 2008-03-20 06:46

MythTV Port
 
EDIT: Please see the new thread on the initial port

Hi everyone!

Inspired by the QT4 port and running the UI over SSH on the n810, I decided I was going to try to port MythTV to OS2008. Yes I'm aware of mobile mythtv, but it's not a substitute for a real frontend, and I don't see any reason why not to use the full frontend!

To make life "easy" I decided to try to port the mythtv-QT4 branch, which only needs QT4 (like the next version of mythtv 0.22 will). At the moment the branch works fine with mythtv 0.21 servers.

In the end it turns out the maemo QT4 libqt4-sql port doesn't include mysql support! So I had to recompile QT4 and add it in, in addition I have been working on porting QT3, and have it compiling, but have a minor bug in the packaging to fix before I can release that. So at this point I'll probably be going back and looking at MythTV 0.21 with QT3 done.

I've got a preliminary port of both the backend and frontend together in the past few days. I've only tested out the frontend so far and I have some teaser pics:

http://farm3.static.flickr.com/2317/...f14587f3f3.jpg

http://farm3.static.flickr.com/2047/...72f927349e.jpg

http://farm3.static.flickr.com/2221/...52f65c3806.jpg

http://farm3.static.flickr.com/2267/...13429d89ab.jpg

The UI seems to be working fine and is fast and responsive (sorry for the ugly theme, but it is the default for some reason - I much prefer mythcenter). However live previews aren't showing (although from the log it looks like they are trying to play).

Similarly playing video using XV isn't showing either. There also isn't any audible audio:

Quote:

-bash-3.2$ DISPLAY=:0 mythfrontend.real --verbose libav
2008-03-20 06:29:50.841 Using runtime prefix = /usr, libdir = /usr/lib
2008-03-20 06:29:55.029 DPMS is disabled.
2008-03-20 06:29:55.051 Empty LocalHostName.
2008-03-20 06:29:55.053 Using localhost value of Nokia-N810-50-2
2008-03-20 06:29:55.062 Testing network connectivity to 192.168.2.134
2008-03-20 06:29:55.139 New DB connection, total: 1
2008-03-20 06:29:55.173 Connected to database 'mythconverg' at host: 192.168.2.134
2008-03-20 06:29:55.196 Closing DB connection named 'DBManager0'
2008-03-20 06:29:55.215 Total desktop dim: 800x480, with 1 screen[s].
2008-03-20 06:29:55.240 Connected to database 'mythconverg' at host: 192.168.2.134
2008-03-20 06:29:55.261 Using screen 0, 800x480 at 0,0
2008-03-20 06:29:55.445 New DB connection, total: 2
2008-03-20 06:29:55.466 Connected to database 'mythconverg' at host: 192.168.2.134
2008-03-20 06:29:55.499 mythfrontend version: 0.22.20080313-2 www.mythtv.org
2008-03-20 06:29:55.505 Enabled verbose msgs: important general libav
2008-03-20 06:30:02.827 Total desktop dim: 800x480, with 1 screen[s].
2008-03-20 06:30:02.854 Using screen 0, 800x480 at 0,0
2008-03-20 06:30:02.894 Switching to square mode (G.A.N.T)
2008-03-20 06:30:03.005 Using the Qt painter
2008-03-20 06:30:03.012 JoystickMenuClient Error: Joystick disabled - Failed to read /home/user/.mythtv/joystickmenurc
2008-03-20 06:30:15.478 Loading from: /usr/share/mythtv/themes/G.A.N.T/base.xml
2008-03-20 06:30:15.883 Loading from: /usr/share/mythtv/themes/default/base.xml
2008-03-20 06:30:17.550 Registering Internal as a media playback plugin.
2008-03-20 06:33:06.624 XMLParse::LoadTheme using /usr/share/mythtv/themes/G.A.N.T/ui.xml
2008-03-20 06:33:07.614 Connecting to backend server: 192.168.2.134:6543 (try 1 of 5)
2008-03-20 06:33:07.631 Using protocol version 40
2008-03-20 06:33:14.762 AFD: Opened codec 0x2ad020, id(MPEG2VIDEO) type(Video)
2008-03-20 06:33:14.766 AFD: codec MP2 has 2 channels
2008-03-20 06:33:14.770 AFD: Opened codec 0x2b0000, id(MP2) type(Audio)
2008-03-20 06:33:14.780 Input #0, mpeg, from 'myth://192.168.2.134:6543/1006_20080320003500.mpg':
2008-03-20 06:33:14.783 Duration: 00:31:57.6, start: 0.289389, bitrate: 5187 kb/s
2008-03-20 06:33:14.788 Stream #0.0[0x1e0], 1/90000: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], 1001/30000, 6000 kb/s, 29.97 tb(r)
2008-03-20 06:33:14.791 Stream #0.1[0x1c0], 1/90000: Audio: mp2, 32000 Hz, stereo, 384 kb/s
2008-03-20 06:33:19.931 TV: Attempting to change from None to WatchingPreRecorded
QSocketNotifier: Can only be used with threads started with QThread
2008-03-20 06:33:23.039 AFD: Opened codec 0x33df20, id(MPEG2VIDEO) type(Video)
2008-03-20 06:33:23.042 AFD: codec MP2 has 2 channels
2008-03-20 06:33:23.046 AFD: Opened codec 0x3518c0, id(MP2) type(Audio)
2008-03-20 06:33:23.050 Input #0, mpeg, from 'myth://192.168.2.134:6543/1006_20080320003500.mpg':
2008-03-20 06:33:23.055 Duration: 00:31:57.6, start: 0.289389, bitrate: 5187 kb/s
2008-03-20 06:33:23.058 Stream #0.0[0x1e0], 1/90000: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], 1001/30000, 6000 kb/s, 29.97 tb(r)
2008-03-20 06:33:23.066 Stream #0.1[0x1c0], 1/90000: Audio: mp2, 32000 Hz, stereo, 384 kb/s
2008-03-20 06:33:24.290 AFD: Opened codec 0x2b2770, id(MPEG2VIDEO) type(Video)
2008-03-20 06:33:24.291 AFD: codec MP2 has 2 channels
2008-03-20 06:33:24.292 AFD: Opened codec 0x2a8e80, id(MP2) type(Audio)
2008-03-20 06:33:25.786 NVP: Prebuffer wait timed out 10 times.
2008-03-20 06:33:26.127 Opening audio device 'default'. ch 2(2) sr 32000
2008-03-20 06:33:26.135 Opening ALSA audio device 'default'.
2008-03-20 06:33:27.357 NVP: Prebuffer wait timed out 10 times.
2008-03-20 06:33:28.848 NVP: Prebuffer wait timed out 10 times.
2008-03-20 06:33:30.426 NVP: Prebuffer wait timed out 10 times.
2008-03-20 06:33:31.723 NVP: prebuffering pause
2008-03-20 06:33:33.575 NVP: prebuffering pause
2008-03-20 06:33:35.522 NVP: prebuffering pause
2008-03-20 06:33:37.012 NVP: Prebuffer wait timed out 10 times.
2008-03-20 06:33:37.637 NVP: prebuffering pause
2008-03-20 06:33:39.161 NVP: Prebuffer wait timed out 10 times.
2008-03-20 06:33:39.645 NVP: prebuffering pause
2008-03-20 06:33:40.645 TV Error: StartPlayer(): NVP is not playing after 20000 msec
2008-03-20 06:33:40.840 TV: Changing from None to WatchingPreRecorded
2008-03-20 06:33:41.145 NVP: Prebuffer wait timed out 10 times.
2008-03-20 06:33:41.418 TV: Attempting to change from WatchingPreRecorded to None
2008-03-20 06:33:41.629 NVP: prebuffering pause
2008-03-20 06:33:43.138 NVP: Prebuffer wait timed out 10 times.
2008-03-20 06:33:43.668 NVP: prebuffering pause
2008-03-20 06:33:45.178 NVP: Prebuffer wait timed out 10 times.
...
This particular recording is way too high a bitrate/res but I've tried a 320x240 1000kb/s recording with the same result. I have also tried a very small RTJpeg transcode which should have been the best bet and it didn't work either, so this is definitely not a question of the n810 being able to play the video.

This might actually just be a bug of the current svn version of mythtv-qt4 in fact, key is:

Quote:

QSocketNotifier: Can only be used with threads started with QThread
This is an error in the udp signal notifier, so it looks like it's hanging when waiting for the network stream.

Anyway I'm starting up a project on the garage for it, and as soon as that project is approved I'll probably start to post some code. I'd greatly appreciate it if anyone around here who knows more about the DSP and video on the n810 helped me look into things at that point.

gazza_d 2008-03-20 08:14

Re: MythTV Port (warning: teaser pics inside)
 
Yani

Just some words of encouragement rather than any real help. This is extremely good news. I currently just stream my recordings using mediaserv, but a full frontend would be wonderful. I also use VNC for a lot of control of the frontend including setting recordings and starting user jobs.

Any chance of a early release, just for control purposes.

Cheers

Gaz

yani 2008-03-20 08:56

Re: MythTV Port (warning: teaser pics inside)
 
Thanks Gaz! :)

I'll probably release something experimental when the project gets some hosting space on the maemo garage, I'll post the link here when I do.

pixelseventy2 2008-03-20 12:14

Re: MythTV Port (warning: teaser pics inside)
 
shiny! But not sure why you'd want to port the backend though, can't exactly record can you?

even without playback this would be cool for scheduling recordings, better than mythweb. and if video and music playback could be achieved then awesome.

And I was planning on doing an upgrade to .21 this weekend anyway :)

mredeker 2008-03-20 12:29

Re: MythTV Port (warning: teaser pics inside)
 
Yani,

this is great news. I would be happy already to have the frontend to schedule recordings and be able to delete recordings. I already use the N800 as a remote for my MythTV client using the "irreco" tool which supports the TCPIP interface of myth frontend.

Keep up the good work.

PS: I am using two S100 (zenega) boxes as mythfrontend

salomc 2008-03-20 12:40

Re: MythTV Port (warning: teaser pics inside)
 
Wow, seems really good news. But, as a newbie that I am, I should ask: how are we gonna be allowed to watch cable TV if we don’t have tuner cards for the tablets? Or: what could we do with MythTV on our tablets? :confused:

gazza_d 2008-03-20 13:13

Re: MythTV Port (warning: teaser pics inside)
 
Yani

About the lack of video playback. Is the problem not that the video has a bitrate of 5000kb/s+? I found that Mplayer will not play anything reliable more than about 1000Kb/s. I have several downloaded movies which are about 800kb/s which work great, but DVDs ripped down using myth to about 1500kb/s will not play reliably. They just miss loads of frames and skip all over the place on my N800 (os2008).

It may be worth transcoding some recordings down to a size known to be playable on the N8x0 and then try. It may work.

Gaz

darethehair 2008-03-20 13:14

Re: MythTV Port (warning: teaser pics inside)
 
Hey, this is really cool! I have been intimidated by other efforts to use MythTV on my N800, and this one looks like it will be a familiar interface for me to use.

ajf 2008-03-20 13:35

Re: MythTV Port (warning: teaser pics inside)
 
Great! i was waiting for this.

yani 2008-03-20 14:43

Re: MythTV Port (warning: teaser pics inside)
 
Quote:

Originally Posted by pixelseventy2 (Post 157717)
shiny! But not sure why you'd want to port the backend though, can't exactly record can you?

The n810 and n800 have USB host support, and there are a lot of USB ATSC/DVB digital tuners that would take no CPU power at all to record off, so I was thinking there is the possibility of using one as a light-weight backend. There are also some SD MPEG2 encoding TV tuners (like the PVRUSB2) that would work well.

Really I'm hoping I can port the backend to the n770 and use my old n770 as a lightweight slave backend, but I'd have to use a powered usb hub for sure with the 770.

yani 2008-03-20 14:45

Re: MythTV Port (warning: teaser pics inside)
 
Quote:

Originally Posted by gazza_d (Post 157747)
Yani

About the lack of video playback. Is the problem not that the video has a bitrate of 5000kb/s+? I found that Mplayer will not play anything reliable more than about 1000Kb/s. I have several downloaded movies which are about 800kb/s which work great, but DVDs ripped down using myth to about 1500kb/s will not play reliably. They just miss loads of frames and skip all over the place on my N800 (os2008).

lol.. yeah, I realized that I was expecting a bit much from the n810 with 5000kb/s, but I've been experimenting and even with a 1000kb/s 320x240 mpeg2 it's not playing. I also tried an extremely small RTJpeg which should have the least cpu requirements and it's not working either :-(.

I'm going to try mpeg4 anyway, but I don't see it working. I'm not surprised that I need to do some porting of the XV code, but it would have been a nice surprise if it had worked off the bat!

yani 2008-03-20 14:50

Re: MythTV Port (warning: teaser pics inside)
 
Quote:

Originally Posted by salomc (Post 157735)
Wow, seems really good news. But, as a newbie that I am, I should ask: how are we gonna be allowed to watch cable TV if we don’t have tuner cards for the tablets? Or: what could we do with MythTV on our tablets? :confused:

MythTV is by design a network application, even when you only have mythtv installed on one computer, it is using two separate processes, one the (master in this case) backend to record and another the frontend to view. This makes it extremely flexible. You could have the n810 as a mythfrontend and your desktop as a backend, or even the n810 as a backend and the desktop as a frontend!

salomc 2008-03-20 15:03

Re: MythTV Port (warning: teaser pics inside)
 
Thank you very much, yani. Certainly when available it will be one of my favourite apps. Gonna install MythTV on my CPU. It just gets tablets even better.

gazza_d 2008-03-20 15:17

Re: MythTV Port (warning: teaser pics inside)
 
Hmmm. regarding Yani's comments about using the backend and usb tuners, and hoping to compile for the 770. Before I got an 800, I had a usb hard disk working with my 770 for music storage.

If the backend does work with the 770, a fun experiment would be to modify a powered usb hub with the power injector fix, and hook up some usb tuners, and a large 3.5" disk in a usb enclosure.

If it worked, it would make a fantastic low powered backend solution.
Obviously we would need MySQL as well - don't know if that's been ported yet, or how easily it would compile. USB-DVB V4L drivers shouldn't take too much work though should they?

I have given serious consideration to seeing if I could get Samba and NFS working so I could use my 770 in the style above as a NAS for my network.

I am sooo looking forward to running mythfrontend on my tablet.
Gaz

pixelseventy2 2008-03-20 15:24

Re: MythTV Port (warning: teaser pics inside)
 
Quote:

Originally Posted by yani (Post 157786)
The n810 and n800 have USB host support, and there are a lot of USB ATSC/DVB digital tuners that would take no CPU power at all to record off, so I was thinking there is the possibility of using one as a light-weight backend. There are also some SD MPEG2 encoding TV tuners (like the PVRUSB2) that would work well.

Really I'm hoping I can port the backend to the n770 and use my old n770 as a lightweight slave backend, but I'd have to use a powered usb hub for sure with the 770.

Not thought of it in that way. But then I've got so many machines running 24/7 that I just plug another card in.

yani 2008-03-20 15:55

Re: MythTV Port (warning: teaser pics inside)
 
Quote:

Originally Posted by gazza_d (Post 157805)
If it worked, it would make a fantastic low powered backend solution.
Obviously we would need MySQL as well - don't know if that's been ported yet, or how easily it would compile.

There is a full version of mysql in the maemo extras repository, however the server has some rather shady requirements (bash which uninstalls most of the base system), and it is a much older version of mysql (4.0) than would work seamlessly with mythtv. Hence I'm working on porting mysql5 or at least 4.1 if only for the newer libmysql15 to build mythtv against instead of libmysql12.

yani 2008-03-21 20:37

Re: MythTV Port (warning: teaser pics inside)
 
Quick update - I've ported mysql 5, and the project has been created. I'm uploading the mysql port now, and I also have to figure out how to create a repository.

https://garage.maemo.org/projects/mythtv/

gazza_d 2008-03-22 09:50

Re: MythTV Port (warning: teaser pics inside)
 
Thanks Yani.

Will there be a mythtv package, or do we need to download and compile from source?

thanks Gaz

EDIT: just rechecked, and there is more packages iin the garage - ignore my impatience!

yani 2008-03-24 14:35

Re: MythTV Port (warning: teaser pics inside)
 
I've posted some binaries! See more in this follow-up post:

http://www.internettablettalk.com/fo...ad.php?t=18270


All times are GMT. The time now is 11:50.

vBulletin® Version 3.8.8