Author Topic: Media Sharing  (Read 9330 times)

gollywog

  • Newbie
  • *
  • Posts: 13
    • View Profile
Media Sharing
« on: March 08, 2009, 04:39:26 pm »
Is there a way we can do some sort of media sharing accross cores? Ie have 2 or more cores connected over the internet via VPN or similar, then allow them to select media they like and copy to there local core? Also at the same time being able to restrict what media they can see to copy?

Gollywog

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Media Sharing
« Reply #1 on: March 08, 2009, 11:07:17 pm »
There are plenty of options out there for sychronising or replicating that can easily be done entirely outside LMCE. Any media remote from the LMCE core or MDs (the best place for it) say on a PC or MAC can be sync'd to a remote location using something like sync.live.com. NAS's often have replication tools, there are standalone, generic replication tools, or you could even build a batch script based on a command line tool like robocopy! Any media kept on a LMCE core or MD (not the ideal location) is shared out as a SAMBA share that you can see on your network - you can then have one of the above tools connect to/map that share and replicate in the same way. It would be nice if this functionality was built in, but like so many other nice-to-have functions, it isn't core to LMCE's function and can easily be achieved outside LMCE, so probably wouldn't be a priority ... horses for courses :)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Media Sharing
« Reply #2 on: March 09, 2009, 03:34:38 am »
we're accepting patches, as always. :)

-Thom

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: Media Sharing
« Reply #3 on: March 09, 2009, 05:50:41 am »
Use samba to share the media between cores. Use the private user file structure to control permissions. If you are familiar with Linux, you could easily make this happen with the native Linux and LinuxMCE tools - all are already configured.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Media Sharing
« Reply #4 on: March 09, 2009, 06:17:41 am »
donpaul - certainly possible to export a SAMBA share over a VPN encapsulated link to a remote system, however I see two problems with this approach. First, the VPN would be on the "external" side of the core and so require additional configuration to get this to work (and these types of changes are generally not recommended); and secondly, not everybody has a "dark fibre" Internet connection like you :) most people's bandwidth would be nowhere near sufficient to do anything practical with video...

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Media Sharing
« Reply #5 on: March 09, 2009, 05:41:56 pm »
rsync is nice, but not two way. Unison or sth like that could help.
rock your home - http://www.agocontrol.com home automation

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: Media Sharing
« Reply #6 on: March 09, 2009, 06:12:16 pm »
Colin. I see where you are coming from, but VPN can put you on the internal network. It really depends on the setup. Toss openvpn on the core and you're all set. Also, gollywog didn't ask about streaming media over the WAN, but rather how to browse, select, and copy the media from one core to another. That can be done easily since samba and perms are already set up; there is no need to export anything. Just don't over complicate it.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Media Sharing
« Reply #7 on: March 09, 2009, 06:21:34 pm »
Why don't you guys talk about actually how to integrate it into the system, instead of duct taping it on?

Come on guys, stop thinking like typical Linux users.

-Thom

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Media Sharing
« Reply #8 on: March 09, 2009, 06:31:22 pm »
tschak, you could finish the bt integration and we'd have global media :-p

wait.. there is the copyright problem..

we could invent a system, where we don't copy but move data around. Very quick. Or spread the frames. I mean, you can only watch a single frame of a movie at one time :-) I shut up now before something starts to take this serious..

br, Hari
rock your home - http://www.agocontrol.com home automation

gollywog

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Media Sharing
« Reply #9 on: March 09, 2009, 08:16:30 pm »
Yeah I was thinking something along the lines of OpenVPN on the core, as stated above, and something like rysnc/ssh etc to do a file copy. As this is a media copy/move the internet connection can be any size but the time to move/copy will change of course. Only thing i would need to work out is which protocol supports resume in case connection drops out. Does the core do QOS? Probably silly quesion as I have only just started looking. If so then we could set whatever protocol as lowest priority???

I'm sure I coud make it work from command prompt but unsure as to how to develope it as a "feature" any pointers on where to start looking and i'll be on my surfing way..

Gollywog

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Media Sharing
« Reply #10 on: March 09, 2009, 09:05:24 pm »
rsync supports deltas and has a switch for a bandwith limit.

br, Hari
rock your home - http://www.agocontrol.com home automation

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Media Sharing
« Reply #11 on: March 09, 2009, 10:19:51 pm »
Colin. I see where you are coming from, but VPN can put you on the internal network. It really depends on the setup. Toss openvpn on the core and you're all set. Also, gollywog didn't ask about streaming media over the WAN, but rather how to browse, select, and copy the media from one core to another. That can be done easily since samba and perms are already set up; there is no need to export anything. Just don't over complicate it.

Yes, it is possible .... just not sure how the pnp would play with it... however you need to read gollywog's post more carefully, he clearly states that he wants to connect the cores over the Internet


Is there a way we can do some sort of media sharing accross cores? Ie have 2 or more cores connected over the internet via VPN or similar, then allow them to select media they like and copy to there local core? Also at the same time being able to restrict what media they can see to copy?

Gollywog

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Media Sharing
« Reply #12 on: March 10, 2009, 12:37:24 am »
Since the vast majority of us do not have net connections large enough to handle such traffic, we need to make some abstractions.

The _ONLY_ way this would work (and I'm NOT talking technically), is if this were rolled in as house to house communication.

DCE has a concept of sending messages to multiple installations, provided those installations are in the database.

So what would need to happen:

(1) a method of synchronizing installation information. sqlcvs could be adapted for this purpose, and in point of fact, in earlier versions of pluto, user databases were synchronized here. However, for this to be feasible, we would need...
(2) A method of providing access control to an installation. This would be an access control list pattern internally, but it would be represented much cleaner up top (who do you want in your circle to be able to expose media, do house commands, etc.)
(3) DCE already provides a Request File command in the General Info Plugin, this can be used to do the actual file transfer. We just need to...
(4) provide the plumbing. SSH might be beneficial for this., just need to work out key exchange.

Now, this presents a problem,

I know not all of you follow the rules when it comes to setting up the system, and you've got your core behind a firewall.

We get around this with Remote Assistance by providing a core-initiated SSH connection to a known server, and the technician then attaches to the provided tunnel on the server. This is not feasible however, for shoving huge amounts of datta down the pipe, as it would then clog the proxy.

But if done right, we can provide a series of screens where:

Connect to a House:
* Provide Installation ID
* Provide your user name
* Provide password

This would prompt a screen on the other end, authorizing the request.

The installation data would be sent to your core, and the system would then be able to send messages.

When a message needs to be sent to another installation, the system will refer to its keys and IP data, to build an ssh tunnel to the other system, if not active, and will automatically shut it off after a timeout.

Now, this is just the plumbing.

Orbiter needs to be extended to handle installation data. and to present the UI for more than one installation. This would also mean, that any changes between the schema of the installed devices, or generated orbiter pieces would also need to be propagated as well. This would happen automatically if all the data attached to an installation were brought into the transfer.

So, it would mean adding at the very least, a screen to switch installations, as well as synchronizing pluto_media data.

As well as doing some screen handling to determine if a file is local or remote, and to trigger download action, etc.

Just thinking out loud.

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: Media Sharing
« Reply #13 on: March 10, 2009, 03:46:14 am »
Yes, it is possible .... just not sure how the pnp would play with it... however you need to read gollywog's post more carefully, he clearly states that he wants to connect the cores over the Internet

Is there a way we can do some sort of media sharing accross cores? Ie have 2 or more cores connected over the internet via VPN or similar, then allow them to select media they like and copy to there local core? Also at the same time being able to restrict what media they can see to copy?

Gollywog
Dude, I know it is over the internet - why else would he need VPN? My point is he isn't streaming - he wants to select and copy. Who cares about the bandwidth at that point. Let it copy all day - he never said he needed it to copy quickly, lol ;-) I always like the most simple approach, but Thom's way is better I'm sure!

donpaul

  • Guru
  • ****
  • Posts: 300
    • View Profile
Re: Media Sharing
« Reply #14 on: March 10, 2009, 04:02:50 am »
Why don't you guys talk about actually how to integrate it into the system, instead of duct taping it on?

Come on guys, stop thinking like typical Linux users.

-Thom


Wouldn't one core detect and add the samba share from another core if they are on the same network? Then add a Copy file to other directory in the media files sync web page (instead of only a move file to other directory). We could browse the remote share and copy media to local disk. That may be the easiest way to integrate it into the system.