MPlayer as streaming media client
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    After much experimenting, I've just about (!) managed to get mplayer running as a streaming client, with my WinXP laptop serving music via VLC.

    Having never streamed music before, it was a bit challenging starting off with two different packages, on two different OSes, over a wireless>wired network. Hey ho, life's never easy is it?

    Fundamentally I've now got to this stage:

    Server (wireless, WinXP, ip=192.168.0.106, VLC media player r1.0.1)

    Client (wired, mac-mini (MorphOS 2.7), ip=192.168.0.103, mplayer r1.0 (20/7/10))

    Server-side:
    Using the GUI, select media>streaming
    Add the files to be streamed into the resulting dialog box, press 'stream' (bottom of dialog box)
    'Source' tab appears (nothing to change here, just press next)
    'Destinations' tab appears. In 'New Destinations' change 'file' to 'http', press 'Add'. The 'address' should be the IP address of your server's network interface (in my case 192.168.0.106, the ip address of my server's wireless adapter)
    Press 'next'
    The next window is a summary page showing the generated stream output string.
    Press 'stream'

    Client-side:
    Now, on MorphOS open a cli.
    type in 'mplayer http://192.168.0.106:8080 -cachenetwork -cache 2048 -quiet -vo cgx_overlay::PLANAR -autosync 30'

    Note that the ip address specified is the same on both server and client side.
    Playback should begin shortly on the client side :-)


    Problems:

    - Server side: VLC only streams the files specified when setting up the stream. I want be able to add things to the playlist for streaming.

    - Client side: mplayer disconnects from the stream (end of file) once playback is completed. I would like mplayer to continue to listen until told otherwise.

    I've read through the documentation, but as my knowledge of streaming is limited it's not too clear what I need to set up to accomplish this.

    Basically, I want to be able to direct audio playback from my laptop to the mac-mini om demand, without going back to the mac-mini every 5 minutes to reconnect to a new stream.

    Is VLC a poor tool for the job - perhaps there is a better server-side interface?
    Am I missing some switch/option on mplayer which would allow it to sit and 'listen' without user intervention?

    Thanks
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »04.06.11 - 12:05
    Profile Visit Website
  • tom
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    tom
    Posts: 147 from 2003/7/22
    From: Heesch, The Ne...
    Well, I can't help you much, but my son (not at home at the moment) installed Linux on the computer next to the TV in the familyroom and that computer is now functioning as a webserver. With OWB and Mplayer on my PegII (in my studyroom) I can click on a movie or mp3 on the server and watch the movie or listen to the music. But I can't help you with te details now. My son is studying somewhere else and it will take some weeks before he is coming home.

    regards Tom
  • »05.06.11 - 21:02
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    @Tom,
    Thanks for that, but I think I've found what I've been looking for: MPD (Music Player Daemon). Just need to manage to install some linux distribution successfully to the external usb drive.

    As a bonus find, there's also a minimal mpd client ported for MorphOS (thanks Tokai!).
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »05.06.11 - 21:55
    Profile Visit Website
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    All i can say is that it must be the server (configuration) fault. If MPlayer is signaled end of stream or connection, it can't do much, really. Well, you could always loop on that server (-loop 0 or loop option in gui mode), but that's cheating. :)
  • »05.06.11 - 23:32
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    @Fab

    Thanks for pointing out the 'loop' option, I'll give that a try.

    I'd previously thought that this just allows repeating of a locally cached copy of the stream, or requested that the stream is repeated by the server.

    I think VLC is a bit of a crap server-side interface for this project to be honest. The configuration for streaming is confusing and not very logically presented in the gui. The integration of streams with the playlist is also pretty confusing.

    mplayer is doing what it is supposed to, it's just that I'm not familiar with the protocols and the limitations, so am fumbling around in the dark a bit.

    Cheers



    Rich
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »06.06.11 - 11:58
    Profile Visit Website