SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   Hardware Support (http://forums.sagetv.com/forums/forumdisplay.php?f=9)
-   -   SageTV on PS3 via BD-J, possible? (http://forums.sagetv.com/forums/showthread.php?t=39654)

devinteske 02-15-2009 11:17 AM

SageTV on PS3 via BD-J, possible?
 
I've been doing some research on the BluRay BD-ROM architecture and discovered that BD-R/E discs have the BD-J specification which allows the execution of custom Java code via a BluRay disc.

Does anybody else think that it might be possible to get SageTV Client (a Java app) to run on the PS3 via the BD-J spec?

I think that this would be an amazing expansion of SageTV, to be able to load a BluRay disc (BD-R/E) into my PS3 and be able to connect to my SageTV server (running on another PC connected via LAN) to watch all my media.

I believe that this could work as long as the following are true:

a. The Sony PS3 provides a full and complete Java runtime environment to BD-J native code or at least a mechanism for providing your own JRE.

b. PS3 allows BD-J code to access system resources to create either a temporary swap space or RAM disk for buffering media content.

c. BD-J runtime environment handles all the normal system calls inherent to desktop use (for example, what will happen when SageTV under BD-J requests to create a new window? maximize or minimize? or handle window movement when there may be no toolkit API for such things (since the PS3 is not really a Desktop environment let-alone that there are no such things as windows when running under the BD-J environment).

d. What will navigation be like without a mouse? Can we integrate with the PS3 Bluetooth-based remote? Can we integrate other USB remote re/transcievers?

I for one believe that if Frey Technologies created a BD-R ISO that allowed you to turn your PS3 into a media extender simply by inserting a disc and loading it up like a game... a great many would pay upwards of $80 to gain such functionality. Sure, it may bite into sales of the HD200 a little (since you could get full 1080p output) but not everybody would go this route since the PS3 would need to have the disc in to use Sage (whereas the HD200 is a dedicated extender).

Of course, the next step would be to see if we could get Sage to install a local copy to the hard disk in the PS3 so you could run it whenever you like without the disc.

Cool idea, no?

Here's a link to a discussion about BD-J that I found that seems interesting. Hopefully Sony opens up BD-J for desktop development without licensing fees (like that would stop us... we could just reverse engineer the whole thing... BUT, one thing I can't do is de-compile SageTV for modification if it won't work out-of-the-box on a straight migration effort... APIs will likely need to be changed for the BD-J environment).

http://www.blueboard.com/bluray/article_blu.htm

Edit:

According to additional research:

Quote:

Authenticated applications can use a (signed) permission request file to acquire permissions that go beyond the BD-J sandbox. Permissions can be acquired for:
Reading and writing to local and system storage
Using the network connection (to connect to defined servers)
Access of the file system on the BD-ROM disc
Title selection of other titles on the BD-ROM disc
Control of other running BD-J applications
So it looks like all our concerns can be met. SageTV will have to be a signed app to gain access to local storage and network services (like connecting to a SageTV Server on the network). The only thing that looks daunting is that a special UI framework is used (Havi6). I wonder if Sage's own UI could just by-pass this or if it will have to be re-written to use Havi

Edit 2:

As per other frameworks that Sage might use, I found on Wikipedia:

Quote:

In addition to the standard BD-J APIs, developers may make use of existing Java libraries and application frameworks, assuming they do not use features outside the constraints of the BD-J platform, include that Java ME only supports Java version 1.3 class files.
That's reassuring to know that Sage can rely on standard libraries, but will likely have to be modified to support accessing of PS3 resources (like Local drive access for media buffers), signing of the app to allow BD Live features (network access), and remove some features that may violate the Jave ME environment rules.

paulbeers 02-15-2009 07:32 PM

It's entirely possible, infact the first HD "extender" that Sage ever showed off was a blu-Ray player running the Sage interface. This was done at CES about 2-3 years ago (if I remember correctly); however, Sage did not end up going down this path for its extenders (unknown as to why). My point is that Blu-Ray players running Sage is very possible.

stanger89 02-15-2009 08:55 PM

Actually they showed that at last year's CES (Sage something running on a Pioneer BD player, streaming video from a Dish STB), which was after the MVP and HD100 were released.

Frankly though I doubt it was running as a BD-J app.

stuckless 02-16-2009 07:38 AM

I think that BD-J could easily provide a SageTV client or placeshifter. According to the Blu-Ray page on wikipedia, it's subset of MHP, which is already used in set top boxes.

If you have a blu ray burner, check out the HD Cookbuok project, it's contains all you need to get started.

You used to be able to run bd-j apps on you PS3 using a thumbdrive, but sony closed that hole... I guess they didn't want to flood the market with bd-j developers... but before the hole was closed, some people did write some stuff. Most notable was the PS3 Filer with NES emulation... So you could play your NES roms on the ps3....

I don't have a bluray recorder, but i do have a ps3. For a while I was toying with trying to write up something... but without a recorder, it's not worth learning it... So instead, I installed, ps3 media server, which is basically a upnp server. You'll want a direct network connection and a fairly beefy server to run the ps3 media server, since it will be doing transcoding on the fly for most files, especially mkv files.

I think the main reason why sage doesn't do something like build a ps3 placeshifter client boils down to $$... I'm not sure how many sage users there are... but the the overlapp of ps3 users that are also sage users, is probably pretty small.

What would be interesting, and this is off tangent from the OP, so my apologies.... would be if Sage did a working prototype of a ps3 placeshifter... then they could open-source (gpl) it and open their placeshifter network streaming protocol. This way, people could still write native clients (ps3, xbox, applettv, iphone, etc), but you'd still need a client/placeshifter license for those clients to function. I doubt they'd do it... but it would be interesting.... Today, people like myself, run upnp servers with ps3 and xbox clients, but sage doesn't get a license cut from those clients.... if the the network streaming protocol was opened, then at least there is the potential to get license revenues from other native clients, without having to invest money into writing and maintaining the 3rd party clients.

devinteske 02-16-2009 08:20 PM

BD-J Possible?
 
I already downloaded a few BD-J resources already and am simply deciding whether to buy the burner first or an SD200 :) lol

If I buy the burner and get the PS3 working as a client/shifter then I won't need to buy the HD200 since I assume that a PS3/Sage combo would be able to play about any format up to and including 1080p MKV.

I'm thinking about starting off with a BD-RE (rewritable) so that I don't waste discs (and money).

I think that it all should go smoothly except for this one hitch in my gallop. I believe that I'm going to hit a brick wall at program instantiation.

Of course, I can copy the necessary files over to a BD and satiate the [assumedly] numerous library needs. However, what happens if/when Jave ME shuts down the app for making an illegal request? In addition, if the apps are not digitally signed, then they will be unable to request disk access or, more importantly, network access (BD Live). Those features are reserved for trusted applications. Either of these problems would likely require access to the source code to make the necessary changes.

Unfortunately, it looks like the PS3 provides a custom toolkit for requesting and managing resources such as BD Live and local disk access. We won't know until we crack open the PS3 BD-J ISO that I found yesterday which demos how to get this stuff working. If it's a custom API then we MAY need the Sage source to plug in the necessary calls.

On the other hand, something which I don't have much experience with, it may be possible to modify the built-in behaviour of Sage via STVi or other plugin mechanism. I'll need independent validation of such a claim but my initial thought is to say that it should be possible with some (arduous?) work.

stanger89 02-16-2009 08:37 PM

Quote:

Originally Posted by devinteske (Post 338859)
I already downloaded a few BD-J resources already and am simply deciding whether to buy the burner first or an SD200 :) lol

If I buy the burner and get the PS3 working as a client/shifter then I won't need to buy the HD200 since I assume that a PS3/Sage combo would be able to play about any format up to and including 1080p MKV.

The big issue with doing a "roll your own" Placeshifter BD-J thing, is that Placeshifter doesn't know anything about the "hardware" Blu-ray audio/video decoding interfaces. That means it would have to do everything in software, which may or may-not be possible.

But beyond that it's even more problematic. BD-J is (as noted) a quite limited in it's capabilities, most likely far more limited than the code for Placeshifter uses. And then there's the question of rendering Audio/Video, which is probably very different in a BD-J VM vs a PC, especially considering the security requirements for accessing hardware directly.

Placeshifter uses an (AFAIK) x86 build of Mplayer to decode/render video, you'd also need a PS3/BD-J version of that for a PS3 "build".

panteragstk 02-17-2009 12:05 AM

I think this is a great idea, but I think the route of bd-j working with sage and the ps3 might be the wrong way to go about it. There is a version of linux (yellow dog) that does work on the ps3 and can use it's hardware correctly (from what i've read). That being said, it looks like the linux version of sage may be the best way to get sage to work with the ps3. It would probobly have to be modified in some way, but it would be a starting point. I wish I knew something about programming so I could give it a try. The only downside is that sage linux is oem and there is no trial so whoever tried to undertake this project might be out $80. This would be great if somebody could get this to work.

gplasky 02-17-2009 06:09 AM

The version of SageTV for Linux is the server portion. Unless you want your PS3 to be your Sage server all you should want to do is get Placeshifter working on the PS3. There is no Linus "client" per se.

Gerry

stuckless 02-17-2009 06:43 AM

There are a few linux distros for the ps3.... Someone has even has freevo working on the ps3/linux as well. From what i can tell, sony does not allow linux to have access to the hardware accelerated gpu.... or hdmi out. (so basically useless)

As for sage under linux on the ps3... you'd need to recompile the native libraries for sage in order for that to work, so a placeshifter for ps3 won't run unless sage provides a build.

Brent 02-17-2009 07:55 AM

Quote:

Originally Posted by gplasky (Post 338917)
The version of SageTV for Linux is the server portion. Unless you want your PS3 to be your Sage server all you should want to do is get Placeshifter working on the PS3. There is no Linus "client" per se.

Gerry


Hmm, I guess I just now realized why SageTV isn't selling a linux variation of the client software. They want to control how Sage is embedded into devices I'm guessing...

stanger89 02-17-2009 08:02 AM

They don't sell a Mac version of client either, they use Placeshifter as their Linux/Mac client. It's probably got more to do with architecture than anything. Most of the big differences between Placeshifter/Client are Windows specific (eg Directshow).

And FWIW, extenders have a lot more incommon with Placeshifter than they do with Client.

Brent 02-17-2009 08:15 AM

Quote:

Originally Posted by stanger89 (Post 338929)
They don't sell a Mac version of client either, they use Placeshifter as their Linux/Mac client. It's probably got more to do with architecture than anything. Most of the big differences between Placeshifter/Client are Windows specific (eg Directshow).

And FWIW, extenders have a lot more incommon with Placeshifter than they do with Client.

I have so much to learn. Some day I need someone to give me a primer on how the extenders work behind the scenes and how the embedded linux on the extenders is used.

FWIW, I would love to see a Blu-ray player with SageTV extender capability. PS3 support would be nice, but a wider audience would be reached with a Blu-ray/SageTV extender. Either way, I read these sort of threads with great interest to learn and to ponder what if.

devinteske 02-17-2009 09:38 AM

Quote:

Originally Posted by stanger89 (Post 338929)
They don't sell a Mac version of client...

Where have you been? I've been using the Mac client for years on an iMac DV (300MHz, LoL... can't play video via Sage but it accesses music and everything else) and a MacBook (Core2Duo; White).

That's a little off-topic though and for another discussion.

Does anybody know if it is possible to run a live-OS off a CD/DVD/BD on the PS3? I can't imagine that Sony would allow the PS3 to be booted off optical media into a 3rd-party OS like Mac/Win/Linux/Unix BUT if it was possible then we could have a myriad of options like simply booting into a Linux environment to run the placeshifter.

I have thought about the possibility of simply installing YD Linux onto my PS3, the JRE and a placeshifter. The odds of that working are almost 100%.

Now, I know that it used to be the case that you can't access the accelerated GPU under Linux, but I remember seeing news that this is no longer the case (either by way of Sony unlocking the cell processor fully on Linux or by hackers writing their own driver, can't remember which it was).

I'd rather keep my PS3 the way that it came, however. Finding a way to run Sage on the PS3 via a disc or as a program would be preferable, though much more difficult.

Now, here's a thought... I wonder if the HD200 firmware could be rewritten for the PS3? No, I'm not a raving lunatic that has lost his mind... what would need to be done is that we'd have to write a BD-J wrapper to invoke the HD200 firmware. The BD-J wrapper could tie into the specific hardware interrupts and translate APIs in realtime (I have little doubt that the PS3 is powerful enough to handle such a daunting task). Sure, such an approach may be daunting and require rather low-level knowledge of the PS3, but if it could be done, then Sage would not need to maintain a code-base for the PS3. With each new revision of HD200 firmware, we could simply burn a new BD that has the necessary emulation code in the BD-J spec on the disc.

stanger89 02-17-2009 09:56 AM

Quote:

Originally Posted by devinteske (Post 338948)
Where have you been? I've been using the Mac client for years on an iMac DV (300MHz, LoL... can't play video via Sage but it accesses music and everything else) and a MacBook (Core2Duo; White).

Not using a Mac ;), I thought Mac was just stuck with Placeshifter.

Quote:

I have thought about the possibility of simply installing YD Linux onto my PS3, the JRE and a placeshifter. The odds of that working are almost 100%.
I rate it closer to 0%. Placeshifter uses native libraries (at least MPlayer/SageTVPlayer), you'd need Cell-compiled versions of those to run placeshifter on the PS3.

Quote:

Now, here's a thought... I wonder if the HD200 firmware could be rewritten for the PS3?
By us? I doubt it, very different processors/architectures.

Quote:

No, I'm not a raving lunatic that has lost his mind... what would need to be done is that we'd have to write a BD-J wrapper to invoke the HD200 firmware. The BD-J wrapper could tie into the specific hardware interrupts and translate APIs in realtime (I have little doubt that the PS3 is powerful enough to handle such a daunting task).
But I don't think the BD-J VM is robust enough to support that sort of thing. Even if you were to somehow get your app signed to allow it access to the hardware.

devinteske 02-17-2009 10:14 AM

I've been reading up on Linux for PS3 and it appears that the Cell processor understands the PowerPC instruction set. That being understood, the only version of Sage that is compiled for PPC is the Mac version.

I'm not a Java developer (by choice despite knowing the language), but somehow I highly doubt that the Mac client will work on Linux simply because they are both PowerPC.

Now, there may be some emulators out there (anybody remember Bassilisk?; a 68k mac emulator for Linux).

Those are lofty aspirations, but one solution I think might just work is if we can install VMware onto the PS3 Linux distro (beit YDL, Ubuntu, RH FC, or other distro that's successfully been ported to PS3). Running a PPC version of VMware on the PS3 under Linux could mean that we could virtualize an x86 OS on the PS3. However, I think that one problem we'll run into is the performance of the virtualized hardware within the Guest OS (virtual machine). I doubt that VMware would give us a video card that is powerful enough to display 1920x1080 resolution (we might be able to achieve 1280x720 though).

stuckless 02-17-2009 10:52 AM

Quote:

Does anybody know if it is possible to run a live-OS off a CD/DVD/BD on the PS3?
Petriboot is a bootloader for the ps3.... it will allow you to run a live cd or boot from external storaget (usb).

Given that BD-J provides a MediaPlayer (JMF) and Network access... I would think that a fairly feature rich Sage Client could be written using nothing but BD-J. I was curious about the jar signing, and it does appear that you can access the network, etc, as long as you sign the jars...and it appears the jars can be self signed....

There was post here of an example that accesses the network, confirmed to work on the ps3 and a pansonic player.

devinteske 02-17-2009 12:03 PM

I believe we're on the same page when it comes to whether BD-J will work or not. I don't think there's any contention against it being possible, rather that it's "not possible without adding/changing code."

Personally, I think that implementing a BD-J Placeshifter would be the cleanest and most effective implementation for accessing Sage via your PS3. Unfortunately, unless we can convince the SageTV developers of this (who in turn may convince the high-ups at Frey Technologies), their is little to no chance that we will have such an option.

I will hold out hope that we can maybe start discussions with some of the developers and get their opinion, but I'd also like to look into the following two (2) ideas which may allow us to get Sage working on the PS3 *without* any help from the developers:

a. We may be able to get the x86 Linux Placeshifter running in an emulator on Ubuntu 8.10 Intrepid Ibex (psubuntu.com)

b. We may be able to boot the PS3 onto removable media that provides a Live OS, designed to satisfy the needs of Placeshifter

devinteske 02-17-2009 02:06 PM

Research has yet to dash my hopes of getting this up and running. Rather contrary, more research is looking like this is definitely possible.

My biggest concern right now is definitely the amount of memory made available to Linux via the Hypervisor (a scant 196MB of usable RAM in your Linux environment). I found this article that shows how we can gain up to 100MB of usable RAM that might allow Sage to play without skipping:

http://www.ibm.com/developerworks/li...AGX59&S_CMP=GR

I'm thinking about starting out with the following setup:

1. Using OtherOs kboot to boot off thumb drive
2. Thumb-drive will likely be YD Linux (I've heard that it has access to more SPEs than Ubuntu and can see more RAM than other distros due to integration development with Sony).
3. YD Linux on the thumb-drive will be stripped down to provide the smallest memory foot-print possible

Things that I haven't solved yet are how we're going to run the Java code. I'm unsure if a PPC JRE can execute an x86 JRE app. Also, I'm not sure if there is special mac-specific code in the PPC Placeshifter that make it unusable on the YD Linux PPC JRE.

sandor 02-17-2009 03:49 PM

nobody has said it is impossible. but it does seem quite futile.

stanger89 02-17-2009 06:07 PM

Yeah, I'm sure SageTV could write a "Blu-ray" BD-J client, everything needed is there, UI, Mediaplayer, Network, though I've got some questions as to how well a standalone might run it.

The issue is I have serious doubts about being able to take a PC/Mac placeshifter and get it to do anything useful on a Blu-ray player. I think you're more likely to get it to run directly on a PS3, but even that I would expect to be problematic.


All times are GMT -6. The time now is 08:18 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.