# [SOLVED] KDE - Play media straight from network share

## Cyberwizzard

Hi,

I want to play media using mplayer for example straight from a network share, but for some reason KDE finds it necessary to copy each file to a local buffer before passing it to the associated program. I know mplayer is supposed to read network files fine - so why the heck does it make me buffer 700 megs of xvid before its starts playing?? I tried to find a way to turn this behavior off (if only for certain file types/programs) but I can't find it...

Anyone?Last edited by Cyberwizzard on Sat May 19, 2007 1:42 am; edited 1 time in total

----------

## infinite1der

What kind of network share? NFS? Samba/CFS? UPnP?

What makes you think that KDE is responsible for caching? Pass the `-nocache` flag to mplayer (or add to ~/.mplayer/config) to stop the caching.

----------

## Cyberwizzard

Samba sharing in this case  :Smile: 

How is mplayer supposed to stop the caching? Its not even running when KDE starts copying the file - only when the local copy is made, will mplayer be run. I'm sure this is a KDE thing, not mplayer. Besides, Xine has the same issue as well.

----------

## i92guboj

Yes, it is a kde thing and not related to mplayer in any way.

I don't know how to prevent the behaviour, though. Kde has the annoying habit of downloading any url before opening it. For things like mplayer that can handle urls just fine, that is quite annoying. I just use regular mplayer in a terminal. You can just use "mplayer url" or "mplayer -playlist url" and live happy.

----------

## 165177

How should KDE know, which applications are capable of handling remote URLs? mplayer does so, emacs does not... but from KDEs point of view, there is no difference between these applications; they don't have any kind of mark stating "Hey, I can read a samba share" or "D'oh! I'm stupid networkless application". So KDE has to take the safe way and copy remote files before starting applications.

You could try to edit the MPlayer menu entry and add "%U" to the command line. Iirc this makes KDE giving the URL directly to the program... but I'm not sure.

----------

## TheWolf

You could also try mounting the share, so that it would seem to be part of the local file system. 'man smbmount' should give you all the information.

If this useful depends on the situation. If you have a share on a home server it would be best to put it in /etc/fstab and mount in on each boot. But if you connect to several different machines on a network, it might not help at all.

----------

## Cyberwizzard

Thanks for all the replies  :Smile: 

Mounting it as a network share ain't feasable in my case - thats why I wanted a non-kde program to be able to run from the kde file browser (Dolphin in my case).

Lunar - you're brilliant! The %U did the trick: when supplied KDE will insert the url on the command line whereas otherwise it'll cache the file for a non-networked program. Now I can finally play video streams over a network  :Smile: 

Thanks guys  :Very Happy: 

----------

