ryao
Posts: 24
Joined: Sun Sep 11, 2011 3:47 am

Re: MythTV Front-end

Mon Sep 12, 2011 2:14 am

Has the Raspberry Pi Foundation tried running a MythTV front-end on the the Raspberry Pi?

I imagine that a USB IR receiver could be attached so that it could be used like a set-top box.

fbparker
Posts: 5
Joined: Fri Sep 09, 2011 2:24 pm

Re: MythTV Front-end

Mon Sep 12, 2011 4:31 pm

I have a linux PC (Mythbuntu 10.10 with MythTV 0.24 backend and frontend, dual-core Athlon with 4 GB RAM). On boot, there's a couple hundred MB of RAM used, but if I start playing a show and then pause it, there's about 1.5 GB of RAM used.

If it would be possible to get the mythfrontend's RAM usage (way) down, then maybe.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6120
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: MythTV Front-end

Wed Sep 14, 2011 3:52 am

It may be that the frontend uses a certain percentage of the available RAM. "Unused RAM is wasted RAM", so you never know how much RAM would actually be used in a low RAM environment. For example, I can run Firefox on my 1GB laptop, and it will eat up most of the ram, but it will still be usable. Or I can run it on my 4GB desktop and it will eat up most of the ram and still be usable.

Anyway, I am not sure if the raspberry pi would be able to run it, but it would be awesome.

doobedoobedo
Posts: 36
Joined: Sun Aug 28, 2011 11:03 pm

Re: MythTV Front-end

Wed Sep 14, 2011 11:19 am

My main mythtv frontend uses about 90MB when first started (shown by top). But I'm sure it could be slimmed down by using a lighter weight theme and removing some of the extra menu items I never use. It could be compiled to be smaller (by using -O s) and by changing what is compiled in at the configure stage too. As mentioned above Linux will cache as much as it can in memory so you need to see how much memory a program uses before it does anything.

fbparker
Posts: 5
Joined: Fri Sep 09, 2011 2:24 pm

Re: MythTV Front-end

Wed Sep 14, 2011 5:59 pm

Well, if it turns out to be possible, then wow. Just wow. A 1080i-capable MythTV frontend for about half the price of just the NVidia GT 430 video card in my current frontend.

ryao
Posts: 24
Joined: Sun Sep 11, 2011 3:47 am

Re: MythTV Front-end

Thu Sep 15, 2011 3:38 am

I think that it should be possible to get this working with uclibc, -Os and a minimalist distribution. It might be necessary to make some changes to MythTV to build it with only code relevant to being a front-end, but it should be doable.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6120
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: MythTV Front-end

Thu Sep 15, 2011 3:49 am

uclibc and -Os is used to reduce the size of executables on embedded devices where the physical storage space is limited. That's not a problem for Raspberry Pi, since everything runs off the SD card. I am not sure that it does anything to help reduce memory usage when you compare it to the memory used to cache streams, theme graphics and so on.

But yeah, I think it's doable and I'll definitely be giving it a go.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6120
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: MythTV Front-end

Thu Sep 15, 2011 3:53 am

http://www.mythtv.org/wiki/Cho.....quirements

Keep in mind that a lot of the memory will be used up by the GPU, I don't remember how much exactly, but a significant chunk. It should still be usable on a Model B. We'll see how it goes when the devices are released.

ryao
Posts: 24
Joined: Sun Sep 11, 2011 3:47 am

Re: MythTV Front-end

Thu Sep 15, 2011 12:59 pm

Quote from ShiftPlusOne on September 15, 2011, 04:49
uclibc and -Os is used to reduce the size of executables on embedded devices where the physical storage space is limited. That's not a problem for Raspberry Pi, since everything runs off the SD card. I am not sure that it does anything to help reduce memory usage when you compare it to the memory used to cache streams, theme graphics and so on.

But yeah, I think it's doable and I'll definitely be giving it a go.

If the executables are smaller, then there is more room in RAM for actual data because the OS does not need to load as many bytes.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6120
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: MythTV Front-end

Thu Sep 15, 2011 6:02 pm

Quote from ryao on September 15, 2011, 13:59
Quote from ShiftPlusOne on September 15, 2011, 04:49
uclibc and -Os is used to reduce the size of executables on embedded devices where the physical storage space is limited. That's not a problem for Raspberry Pi, since everything runs off the SD card. I am not sure that it does anything to help reduce memory usage when you compare it to the memory used to cache streams, theme graphics and so on.

But yeah, I think it's doable and I'll definitely be giving it a go.

If the executables are smaller, then there is more room in RAM for actual data because the OS does not need to load as many bytes.

I've acknowledged what you said, I am just saying that that's not where the memory optimization needs to come from. We're not trying to shave off a few bytes here.

Mr.What
Posts: 4
Joined: Thu Sep 22, 2011 9:28 pm

Re: MythTV Front-end

Fri Sep 23, 2011 5:03 pm

If we can do this, I'd like to try to keep the price REALLY low and use some sort of IP service for the remote control. Write an app (WWW, Java, Android) for the remote control that converts GUI button presses into keystrokes on a virtual MythTV keyboard on the RasPi.

ryao
Posts: 24
Joined: Sun Sep 11, 2011 3:47 am

Re: MythTV Front-end

Fri Oct 07, 2011 9:47 am

Quote from ShiftPlusOne on September 15, 2011, 19:02
Quote from ryao on September 15, 2011, 13:59
Quote from ShiftPlusOne on September 15, 2011, 04:49
uclibc and -Os is used to reduce the size of executables on embedded devices where the physical storage space is limited. That's not a problem for Raspberry Pi, since everything runs off the SD card. I am not sure that it does anything to help reduce memory usage when you compare it to the memory used to cache streams, theme graphics and so on.

But yeah, I think it's doable and I'll definitely be giving it a go.

If the executables are smaller, then there is more room in RAM for actual data because the OS does not need to load as many bytes.

I've acknowledged what you said, I am just saying that that's not where the memory optimization needs to come from. We're not trying to shave off a few bytes here.

Then people can use compcache to work around the low memory:

http://code.google.com/p/compcache/

Doubling the effective memory to 512MB through compression should be possible. Depending on how compressible it is, tripling it to 768MB might even be possible.

Note that for anyone reading this, you do not get extra memory from compcache. It just uses your existing memory more efficiently by sacrificing CPU cycles to do it. To avoid running into problems, compcache requires a swap file, so there is no magic memory expander here.

Anyway, on the topic of the swap file, you could increase the memory as much as you want by using a RAM disk on a more powerful system on your network as swap. This would of course incur a performance hit and also link the Raspberry Pi's stability to your network stability, but it would work.

HuskyDog
Posts: 1
Joined: Fri Jan 06, 2012 10:19 pm

Re: MythTV Front-end

Fri Jan 06, 2012 11:03 pm

I would just like to say that my MythTV frontend is an 800 MHz PIII with 256 MB RAM and an old GeForce FX 5200 video card.  It runs Gentoo and is a diskless system using PXE boot so there is no swap.  I haven't particularly optimised for size and compile with -O2 rather than -Os.

It does video playback at Freeview resolution just fine but I suspect it wouldn't manage HD.  Not a problem for me as I have no HD sources.  Scrolling through list of recordings is a bit slow but useable.

It seem to me that this specification isn't too far from a Raspberry Pi so perhaps we will have a fighting chance of getting MythTV to work, although do I understand that some of the RAM will be used for the screen buffer?

It would be good to consider if one of the GPIO pins can be used for a simple IR receiver.  It also occurred to me that my TV has a USB port which I rarely use.  Perhaps that could provide the Raspberry Pi with power so I don't need another wall wart!

nickr
Posts: 27
Joined: Fri Jan 13, 2012 6:35 pm

Re: MythTV Front-end

Fri Jan 13, 2012 6:48 pm

Remote is easy, either:

1. the usual IR dongle which plugs in via USB; or

2. USB bluetooth dongle with a PS3 Bluray remote; or

3. Android phone with one of the many myth remote software on offer in the market.

Bigger problem might be accessing the video acceleration, although if this is done in opengl it will (I think) be fine.

But again, the devs say it will work at 1080p30, but will it also work at 25Hz and 24Hz, and what deinterlacing is available?

sylvan
Posts: 118
Joined: Sun Nov 27, 2011 8:39 pm

Re: MythTV Front-end

Sat Jan 14, 2012 5:26 am

It should be easy to attach an IR receiver (ca. $2) to a GPIO.  See how they do it with any microcontroller such as an Arduino.

XBMC might be a better choice for a front-end.

lukegarratt
Posts: 5
Joined: Thu Jan 19, 2012 9:09 am

Re: MythTV Front-end

Thu Jan 19, 2012 4:25 pm

Also, XBMC is converging to incorporate live TV/recordings. That is however in the long term.

In the short term TV Headend might be an option? https://www.lonelycoder.com/redmine/projects/tvheadend

MINKIN2
Posts: 49
Joined: Fri Jan 13, 2012 10:39 pm

Re: MythTV Front-end

Fri Jan 20, 2012 12:19 am

If it helps, here is an example of a MythTV player and front end for the Nokia N800 which ran on 128 MB RAM and <400mhz Arm11 CPU from 2008

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

Ok the upscaling may still have to be tinkered with? But it could be a running start.

That said… I am a maemo user and many of the older apps that I use were ported straight over to my N900. I may have to go for a dig in the garages to see what else may be an "easy port" candidate?

Digital-Wangateur
Posts: 5
Joined: Fri Dec 30, 2011 6:37 pm

Re: MythTV Front-end

Sat Jan 21, 2012 4:13 pm

One of the things I am going to do is make an automatic self aligning antenna using Lego Mindstorms or cheap steppers and a magnetic sensor to the G board.  So for less than $100 (RPi $35 USBTuner $55 Antenna Stuff $10 or $200 with USB disk storage)I can teach an up to date complete Digital Television course from A Antennas for over the air reception  to Z ZFS for large storage and the student can walk away with an mythTV PVR with OTA antenna. Giving the ability to reliably record (so as to be able to time shift and study) and watch PBS in HD without cable… priceless!!!!!

wbrunskill
Posts: 1
Joined: Thu Feb 23, 2012 12:33 am

Re: MythTV Front-end

Thu Feb 23, 2012 12:41 am

Not sure if this has been discussed already, there is already a small linux distro created for mythtv frontends.  Have a look at http://www.minimyth.org.  This at least is an starting point.

nickr
Posts: 27
Joined: Fri Jan 13, 2012 6:35 pm

Re: MythTV Front-end

Thu Feb 23, 2012 1:10 am

minimyth is not compiled for arm.

drgeoff
Posts: 10096
Joined: Wed Jan 25, 2012 6:39 pm

Re: MythTV Front-end

Thu Feb 23, 2012 10:40 am

Although the RP GPU is licensed to decode H.264/MPEG-4 Part 10, the same does not apply for H.262/MPEG-2 Part2.  It is not yet clear if the ARM CPU on its own is man enough to real time decode SD MPEG-2.  It is almost certain that the ARM CPU cannot real time decode HD MPEG-2.

stormy1
Posts: 60
Joined: Fri Jan 06, 2012 3:44 am

Re: MythTV Front-end

Thu Feb 23, 2012 4:20 pm

drgeoff said:


Although the RP GPU is licensed to decode H.264/MPEG-4 Part 10, the same does not apply for H.262/MPEG-2 Part2.  It is not yet clear if the ARM CPU on its own is man enough to real time decode SD MPEG-2.  It is almost certain that the ARM CPU cannot real time decode HD MPEG-2.



yea that is a problem.

To make hd work you would have to re-encode to h264 on the server side because of the lack of mpeg2 hardware decode.

Which means the back-end would have to be pretty hefty to do it real time.

Unless someone gets the hardware 264 encoder on the i series Intel chips working, then a low cost/power i3 would be enough if it was compatible with the broadcom decoder.

nickr
Posts: 27
Joined: Fri Jan 13, 2012 6:35 pm

Re: MythTV Front-end

Thu Feb 23, 2012 6:37 pm

You are assuming HD TV is always broadcast as mpeg2. It isn't. There are many markets in which HD is broadcast as h264.

drgeoff
Posts: 10096
Joined: Wed Jan 25, 2012 6:39 pm

Re: MythTV Front-end

Thu Feb 23, 2012 6:57 pm

nickr said:


You are assuming HD TV is always broadcast as mpeg2. It isn't. There are many markets in which HD is broadcast as h264.


No, I wasn't assuming always.  But for example HD was, and possibly still is on occasions, broadcast with MPEG-2 in the USA.

And even where H.264 is used for HD, SD often uses MPEG-2.  I have not seen confirmation that 704 by 576 by 25 MPEG-2 is real time decodable by the unaided CPU on the RP.

nullstring
Posts: 178
Joined: Sun Oct 02, 2011 3:05 pm

Re: MythTV Front-end

Thu Feb 23, 2012 7:06 pm

ATSC is 100% mpeg2 in the United States.

The only place you will see mpeg4 in use is on cable and satellite televison.

In which case, unless you plan on viewing FTA satellite broadcasts, you're going to need a cablecard device, etc. It just makes things much more complicated and you're still going to see a ton of MPEG-2 everywhere.

(Again, this is USA)

Return to “General discussion”