A plea to the Foundation re. MPEG-2


 
154 posts   Page 1 of 7   1, 2, 3, 4, 5 ... 7
by 0x31A92354 » Sat Mar 03, 2012 4:04 pm
Please negotiate with Broadcom/MPEG-LA/whoever to allow sale of an additional cost Pi model that includes an MPEG-2 decoding license and corresponding GPU firmware.

In media player terms, a Pi with H.264 but without MPEG-2 decoding is like a budget car that can only drive over 100mph - impressive but ultimately useless for most normal  places it's supposed to go to.

I'm fairly sure that the Broadcom SoC's VideoCore IV GPU can do it, with the apporpriate firmware/driver support.
Posts: 4
Joined: Sat Mar 03, 2012 2:54 pm
by jamesh » Sat Mar 03, 2012 5:01 pm
The GPU is quite capable. The reason it is not there is cost. I think its $2-3 just for MPEG-2, which considering H264 is so much better (and easy to convert to from MPEG-2) is a lot. Much of the user base doesn't need it so to spend an extra 10% for something most people don't need wasn't considered to be worthwhile.

There may be a Codec pack later on where you can pay extra for more codecs. That will include MPEG2.
Moderator
Moderator
Posts: 10536
Joined: Sat Jul 30, 2011 7:41 pm
by Jessie » Sat Mar 03, 2012 6:33 pm
I personally don't get all the complaints about MPEG-2.  Yes I have heard that much stuff is still transmitted over the air MPEG-2, but how do you intend on getting that content to the R-Pi last time I checked there is no television reciever on the product.  Next, if you are using something else to capture it and save it then why not just encode into MPEG-4?  I run anything MPEG-2 through Handbreak to save server space and bandwidth.

My final point, no one even knows if it will matter.  What I mean is MPEG-2 is not very CPU intensive the R-Pi may be able to software decode it.  So complaining about before you even know is a waste of time, at least wait until someone has checked it out.

Would I pay extra for an R-Pi that had more codec support?  Yes, I would pay up to $30 extra meaning $65 for the Model B, but I could care less about getting an antiquated codec support like MPEG-2.

Transcode people.
User avatar
Moderator
Moderator
Posts: 1164
Joined: Fri Nov 04, 2011 7:40 pm
by boarsblood » Sun Mar 04, 2012 4:17 am
Jessie, according to JamesH, and he should know, software decoding of MPEG2 isn't likely to be possible on the RPi without the GPU routines enabled.

I understand why it wasn't included, the license cost was too high, but it's like being sold a car with air-con when you haven't got a license to wind the windows down. All the windows can wind down but there a padlock on each handle and you're not allowed to buy a key.

If I wanted to use the RPi with a DVB-T USB dongle to record and/or view any  live terrestrial TV from the BBC (Other freeview channels are available, but all MPEG-2.) I can't decode on the RPi itself. There's no point having it stream the recordings to a big power hungry machine to transcode and get sent back to the RPi. I can transcode all my old recordings but to watch live TV I'll still need another option.

Having to run another machine to transcode MPEG-2 to h.264 would cost more in electricity each year than the £2.50 MPEG2 license would forever. It's just a shame that the hardware can do it easily, but we can't pay an additional fee to enable it.

The result of this is that to get MPEG-2 decoding on the Pi I'd need to build an add-on, with hardware MPEG transcoder chip (almost certainly ARM based), and stream the TV feed to that, back to the Pi and to the GPU as MPEG-4, and on to the TV. Buying another chip with the same decoding capability as the Pi's GPU but with the MPEG-LA fees paid with the chip purchase price.

As an aside, I think you'll find you should actually be directly paying MPEG-LA a licensing fee as you use Handbrake to transcode MPEG-2 to MPEG-4. Have you done? If not you could face (unlikely) court action from the patent holders.

Anyway, I understand that different people will be frustrated by different limitations of the design and the minimal number of compromises that had to be made in order to hit the incredible price point that the foundation did is nothing short of mind boggling.

Robot builders may wonder why only one camera interface was connected when they want stereo vision (PCB routing nightmares, no doubt), people building portable units may have preferred an LVDS interface for lcd screens. Those decisions have been made and can't be changed, but the frustrations felt by those wanting hardware accelerated decoding of MPEG-2 is different, the RPi can do it, the chip is capable, we're just locked out.

Geoff
Posts: 29
Joined: Mon Jan 30, 2012 8:13 pm
by nullstring » Sun Mar 04, 2012 6:27 am
A few things:

-A USB ATSC(or DVB-T) tuner for the RPI is a definate possibility. (Or would be if we could decode mpeg2)

-High Definition mpeg2 is very hard to decode. There is a 0% possibility the ARM processor will be able to do it. (My old 2.8Ghz dual amd can't do it)

-I agree that most people don't need it... but there is a small percentage that really could use it.

I would definitely pay $10+ for a codec pack. (mpeg2 + VC-1, at least)
Posts: 178
Joined: Sun Oct 02, 2011 3:05 pm
by 0x31A92354 » Sun Mar 04, 2012 7:06 am
JamesH said:


The GPU is quite capable. The reason it is not there is cost. I think its $2-3 just for MPEG-2, which considering H264 is so much better (and easy to convert to from MPEG-2) is a lot. Much of the user base doesn't need it so to spend an extra 10% for something most people don't need wasn't considered to be worthwhile.

There may be a Codec pack later on where you can pay extra for more codecs. That will include MPEG2.


I really, really hope that's the case, and that it's soon.

H.264 is great to have out of the tin, but there will be many people who have other media formats that they don't want to, or can't, transcode. Here in Australia, for example, all our digital TV streams are MPEG-2, and plugging a USB decoder into the Pi (to make a digital TV STB, that perhaps also plays static network media) is a natural thing to want to do. Same for playing your Xvid/Divx media from back when that format was king, without having to re-encode to H.264 and lose further quality. Or being able to play a physical DVD (eg. via attached USB DVD drive) without having to transcode on the fly.

Gut feel tells me it would be around US$10 per unit to license the most common codecs, and I'd happily pay thrice that to get them, and I imagine that many others would too. So it can also be looked on as a nice little revenue stream for the Foundation, even if just 10-20% of Pi purchasers take up the option.

I'm new here and don't yet know who's who – I take it that (as an 'admin') you speak for the Foundation?
Posts: 4
Joined: Sat Mar 03, 2012 2:54 pm
by 0x31A92354 » Sun Mar 04, 2012 7:20 am
Jessie said:


I personally don't get all the complaints about MPEG-2.  Yes I have heard that much stuff is still transmitted over the air MPEG-2, but how do you intend on getting that content to the R-Pi last time I checked there is no television reciever on the product.  Next, if you are using something else to capture it and save it then why not just encode into MPEG-4?  I run anything MPEG-2 through Handbreak to save server space and bandwidth.



A cheap USB DVB-T decoder, like one of the many on ebay?

Based on the way my last smartphone with a similar CPU spec struggled to decode even some internet streaming audio formats, I'd say there's very little chance that the Pi CPU could cope with MPEG-2 decoding (and the accompanying audio) in software.

And if you have older media archives (from before H.264 became common) you don't really want to transcode them just to play on the Pi, as you'll just lose more quality.

Or you might just want to play a physical DVD. People still do that!
Posts: 4
Joined: Sat Mar 03, 2012 2:54 pm
by robwriter » Sun Mar 04, 2012 10:07 am
Whilst I probably agree that it wasn't worth adding $2 to the cost of ever Pi to get it, I don't see how you can be happy about H.264 and not think MPEG-2 would be useful.

Transcoding is a pain, it won't be doable on the Pi in decent time scales, and the lack of MPEG-2 rules out the Pi as a media machine for many uses. If you start with MPEG-2 (which right now is live TV and DVDs, so mostly everything I watch) then encoding is time consuming, a waste of power and you end with exactly the same experience when you watch it.

It's cool that I could set up a system to transcode files, perhaps even on demand, but if I need to do that for live TV and DVDs then the Pi isn't what I'm connecting to my TV. Yes, I realise that its not the Pi's intended purpose, but surely the more people can do with the Pi the better.

So yes, a codec for a few $ would be welcome. But I wonder, is it technologically possible - how would you stop piracy?
Posts: 108
Joined: Sat Feb 25, 2012 6:26 pm
by dave_p » Sun Mar 04, 2012 2:36 pm
My use case for MPEG-2:

Some years ago Hauppauge sold a product called the MediaMVP, a small box about the size of an ADSL router containing a PowerPC-based SoC with hardware MPEG2 decoding and an ethernet interface, plus a remote control.

The firm provided software which allowed the device to connect to a Windows PC and play MPEG2 and MP3 files plus show JPEG images. However the client was based on Linux and Hauppauge made available the API for their hardware driver module. This allowed developers to create their own variants, in particular to use it as a remote client for the open-source VDR video recorder - the noisy server can be left in a cupboard and any number of clients networked to it.

The original MVP is now out of production and Hauppauge will not supply driver information on the later models. Hence the search is on for a replacement and the RPi appeared to be an ideal candidate.

http://forum.loggytronic.com/i.....opic=531.0
Posts: 19
Joined: Sun Mar 04, 2012 2:11 pm
by welshblob » Sun Mar 04, 2012 3:40 pm
Just to echo some of the comments on here, although I'm not a huge user of mpeg2 it would be useful to have for playing SD recordings from my foxsat hdr on all my Pi enabled tv's (that's the ultimate plan). I'd rather not transcode off or online as from my experience its a pita that is inefficient, prone to glitches and will generally require another box.

Whether the Pi will be able to decode mpeg2 on the cpu I guess we will have to wait and see unless JamesH has already tried this and failed. SamNazarko who will be building the raspbmc distro appears to be confident that it should be able to decode SD mpeg2 ok but I'm not sure what he is basing that assumption on as I don't believe he has a Pi.

I'd really like the foundation to license a codec pack but I struggle to see how they can do that without opening themselves to piracy as robwriter stated.

Also to boarsblood you do not need a mpeg2 license for handbrake as that uses a software codec for decode. Typically licenses are only needed for embedded devices such as the Pi.
Posts: 131
Joined: Sat Jan 21, 2012 9:31 am
by domesday » Sun Mar 04, 2012 5:30 pm
I'm surprised to see all the pleading for MPEG2, while a media player is a neat use for the Raspberry Pi it is far from it's primary purpose and those who do want to use it as a media player have the option of using H.264 that just requires re-encoding. If you really need MPEG2 for your application perhaps the Raspberry Pi is not the right platform for you, as much as you hope it would be. Adding MPEG2 simply would not add anything to the intended goal of getting kids programming.

The Raspberry Pi is after all about getting kids programming not watching videos. If people want a ready made media player there are plenty of devices like WDTV, AppleTV, Boxe etc that can do that.
Posts: 256
Joined: Fri Oct 21, 2011 5:53 pm
Location: UK
by Jessie » Sun Mar 04, 2012 6:21 pm
@boarsblood The license fee for MPEG-2 is $2 USD for encoding and $2 for decode and $2.50 for devices that can do both.  Do I pay that for Handbreak? No.  I don't feel sorry for them either I have many devices in my home and many software packages that I have paid good money for that I never use the MPEG-2 functionality, yet the MPEG-LA has gotten their license fee for.  I also doubt you care if that support is paid for either, I'm pretty sure your just upset that it isn't there.

Correct me if I'm wrong but I have never seen James state that there will be no software decode on a R-Pi.  I still have no reason to think that it won't work until I see otherwise.

I would be real supprised if any usb HD tuner card out there didn't also pay money to the MPEG-LA so in that case if you are real worried about some patetent owner not getting their money well you should be covered.

Finally we are talking about a feature that the minority wants, even if we were to use the old customer service statement:  "For every one complaint there are eight that said nothing."  Then we would still only have a handful of people wanting MPEG-2 codec support.  If this comes in an added cost download for people that want it then great, but there is no reason to tack $2.50 onto the cost of every single board out there so that 100 to 200 people can have it.

Now, I am done with this thread.  Make your peace so it can get burried, and someone can make another about the same thing in a couple weeks.
User avatar
Moderator
Moderator
Posts: 1164
Joined: Fri Nov 04, 2011 7:40 pm
by jamesh » Sun Mar 04, 2012 7:17 pm
re: Software decode. Yes, I am pretty sure you can install ffmpeg or similar and the right codecs for MPEG 2. I doubt you will get a decent frame rate though, even at SD resolution. But it hasn't been tried.

You could transcode using the Raspi in software only mode. But it will be very slow. But that would get round the H264/MPEG4p2 only issue, but not in real time.

Lots on buts in that sentence..
Moderator
Moderator
Posts: 10536
Joined: Sat Jul 30, 2011 7:41 pm
by boarsblood » Sun Mar 04, 2012 9:56 pm
Jessie, I have never wished for the additional MPEG-2 support to be added to every unit. I fully understand it's an unnecessary cost. Just would have liked the option to add it.

JamesH, No tests have been done on the Raspberry Pi AFAIK, but previously using a slightly different ARM1136JF-S running at 5-600MHz, it was found that ffmpeg2 was slower than libmpeg2, so using a hand optimised version of libmpeg2 with an improved algorithm, hand tweaking some routines (like IDCT) and focusing on removing duplication of buffers got better figures.

Average SD unoptimised frame rate from NTSC DVD, VOB, and TS - 18.5 fps.

After optimisation - 27.2fps.

One of the remaining remaining bottlenecks was memory speed so we'll have to see how things work out on the RPi. And it's always annoying if someone has to keep going back to hand optimise the compiled code.

However Jessie seems to know something I don't but doesn't seem to be letting on.
Posts: 29
Joined: Mon Jan 30, 2012 8:13 pm
by jamesh » Sun Mar 04, 2012 10:40 pm
Memory speed should be fine - the memory controller is pretty good.

I'm surprised optimisation made such a difference - code must have been quite inefficient to start with. I know an awful lot of effort goes in to the optimisation of the GPU encode/decode to get maximum performance, even with the help from HW acceleration.

Still, with 700Mhz, you might get 30 fps.
Moderator
Moderator
Posts: 10536
Joined: Sat Jul 30, 2011 7:41 pm
by zippy » Mon Mar 05, 2012 3:07 am
My old IBM Thinkpad 600e (Pentium II @ 366 Mhz) could decode SD MPEG2 in software and play DVD movies at full speed, so it seems likely that the RasPi hardware is capable of doing the same, though it may need an optimised decoder as mentioned above.
Posts: 21
Joined: Fri Dec 30, 2011 1:28 am
by 0x31A92354 » Mon Mar 05, 2012 4:23 am
Darren said:


I'm surprised to see all the pleading for MPEG2, while a media player is a neat use for the Raspberry Pi it is far from it's primary purpose and those who do want to use it as a media player have the option of using H.264 that just requires re-encoding. If you really need MPEG2 for your application perhaps the Raspberry Pi is not the right platform for you, as much as you hope it would be. Adding MPEG2 simply would not add anything to the intended goal of getting kids programming.

The Raspberry Pi is after all about getting kids programming not watching videos. If people want a ready made media player there are plenty of devices like WDTV, AppleTV, Boxe etc that can do that.



I understood that the Pi is *eventually* about getting kids programming. The Foundation has been very clear that the first step is targetting hobbyists and hackers, and therefore building community, and they've hilighted its applicability as a cheap but powerful media player many times. I guess there's a reason why they picked an SoC with powerful video decoding abilities.

I don't really understand why there's any fuss over this request. Nobody is asking for hardware changes, just access to readily available (I assume - I know that's the case for WebM) software from Broadcom to allow access to the functionality within the existing hardware that many people will want to use, at an extra, post-purchase cost only for those who want it.
Posts: 4
Joined: Sat Mar 03, 2012 2:54 pm
by amiga65 » Mon Mar 05, 2012 4:28 am
Well, sounds like request denied.
Posts: 70
Joined: Wed Jul 27, 2011 10:59 pm
by abishur » Mon Mar 05, 2012 5:08 am
amiga65 said:


Well, sounds like request denied.



Basically (money talks ya know ;-) ), but at least there's a possibility that one day we might be able to purchase a codec pack.  I'd be very interested in what various codecs might become available in such a situation (I also worry that this would create additional overhead for the foundation :-/)
Dear forum: Play nice ;-)
User avatar
Moderator
Moderator
Posts: 4221
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by jamesh » Mon Mar 05, 2012 7:41 am
The main issues are :

How to make the codec pack secure so it cannot be used by other boards (probably the only way to get the licencing from MPEGLA in the first place it to make things secure)

And the overheads of the Foundation to maintain such a codec scheme,
Moderator
Moderator
Posts: 10536
Joined: Sat Jul 30, 2011 7:41 pm
by boarsblood » Mon Mar 05, 2012 9:59 am
JamesH said:


The main issues are :

How to make the codec pack secure so it cannot be used by other boards (probably the only way to get the licencing from MPEGLA in the first place it to make things secure)

And the overheads of the Foundation to maintain such a codec scheme,



Yep, that's the issue. It seems to me that the board's stateless state (well, apart from the MAC, which can be spoofed) and unlicensed OS makes it nigh on impossible to tie an after market add-on license to the person who paid for it. That's why MPEGLA normally require licensing for a complete product line.

We'll have to hold out for the Raspberry Pi MCE :) (...rather, the Raspberry Pi Master Series).

Anyway keep and eye out on CH:R-Pi Hub, there may be some information about an optimised libmpeg2 there with any luck ;) Anyway, I'm off to reply to some emails from a developer in the Far East.
Posts: 29
Joined: Mon Jan 30, 2012 8:13 pm
by mole125 » Mon Mar 05, 2012 10:37 am
boarsblood said:





Yep, that's the issue. It seems to me that the board's stateless state (well, apart from the MAC, which can be spoofed) and unlicensed OS makes it nigh on impossible to tie an after market add-on license to the person who paid for it. That's why MPEGLA normally require licensing for a complete product line.


You've forgotten about the serial number which should be unique and in-volatile for every chip meaning it is something that can be keyed off - I'd assume that the GPU can access the value so the scheme I would do is:

1. User provides serial number to foundation server (and money)

2. Server creates hash of serial number using their private key.

3. User saves the key into their root partition - either as a separate file or into their config options.

4. GPU blob validates hash based upon serial number and public key and enables functions as necessary.

This approach should set the barrier of attack at the level of needing to modify the GPU blob which would be sufficiently difficult to allow the foundation to claim sufficiently robust protection. Any redistribution of hacked gpu blobs would fall foul of copyright and circumventing copy protection systems allowing the foundation to issue takedown notices and take legal action if they felt the need.

The biggest issue I imagine is working out what codecs they want to support, sorting out all the licensing deals, getting code sufficiently robust and merged into RPi gpu blob, getting broadcom approval and dealing with the lawyers. Oh and facing from criticism from the community for not including obscure codec XYZ.
Posts: 230
Joined: Tue Jan 10, 2012 2:01 pm
by st599 » Mon Mar 05, 2012 11:24 am
welshblob said:

Also to boarsblood you do not need a mpeg2 license for handbrake as that uses a software codec for decode. Typically licenses are only needed for embedded devices such as the Pi. 


Utter tosh.  Where on Earth did you get that idea from?
Posts: 26
Joined: Mon Sep 05, 2011 1:29 pm
by welshblob » Mon Mar 05, 2012 8:35 pm
st599 said:


welshblob said:


Also to boarsblood you do not need a mpeg2 license for handbrake as that uses a software codec for decode. Typically licenses are only needed for embedded devices such as the Pi.


Utter tosh.  Where on Earth did you get that idea from?


OK I hold my hands up as to being wrong here. What I understand is that anything that uses a codec, hardware or software, is required to pay a license fee to the patent holder. However whether the patent holder has decided to enforce their patent is a another matter. Typically any commercial product that uses a patented algorithm or standard will be targeted and expected to pay licensing fees by the patent holder. However it appears that in the open source world these licenses are not being purchased by the creator of the software and not necessarily pursued by the patent holder. So the question is why haven't these open source communities been shut down? In my opinion it could be due to the fact that that patent laws in different countries may not recognise software patents, open source communities do not necessarily have any money to offer the patent holder and the patent holder allows it as any party that does commercialise these open source implementations will then be targeted for patent licenses. That's my understanding and I'm open to corrections on that.

Here are some links from a couple of open source implementations with some interesting reading at the bottom of the first link ...

http://ffmpeg.org/legal.html

http://www.videolan.org/press/.....tents.html

Rob
Posts: 131
Joined: Sat Jan 21, 2012 9:31 am
by mole125 » Mon Mar 05, 2012 9:33 pm
You are right, the simple reason is economics. Open source projects aren't companies, don't have assets or even physical contact details.  Generally it is a pure patent issue rather than a copy right issue so standard copyright takedown processes can't be used. This means the only recourse (beyond polite emails) is lawyer letters and court actions - an expensive option when the potential returns are tiny - even with punative damanges the developer hasn't made any money and even 100% of sales is therefore nothing.

The most likely result of any form of aggressive action is the community getting up in arms and abandoning the format altogether - well used format is more attractive to device makers (like broadcom) to include in their chipsets/products.
Posts: 230
Joined: Tue Jan 10, 2012 2:01 pm