Date: Sat, 25 Apr 1998 15:13:54 +0200 (CEST) From: Hans Petter Bieker <hanspb@persbraten.vgs.no> To: Sumit Gupta <sumit@tamu.edu> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Is there a Networked MPEG Player for BSD? Message-ID: <Pine.BSF.3.96.980425150721.5336G-100000@zerium.newmedia.no> In-Reply-To: <3541499F.D7627D12@tamu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 24 Apr 1998, Sumit Gupta wrote: > Is there any application for FreeBSD available that can display > an MPEG stream over a network ie have a server part playing it > out and a receiver receiving it from the n/w and playing it out? > I need to use/develop such an application. Any pointers, comments, > suggestions etc would be extremely appreciated. Try this: (the player runs on the remote machine, you'll have to hack it if you want the player to run on the local machine. On the other hand you don't want to run it on the local machine if you have a slow 10 Mbps ethernet.) rplaymp3: #!/bin/sh # # Copyright 1998 Hans Petter Bieker # All rights reserved. # # set some defaults host=localhost port=7654 set -- `getopt h:p: $*` if [ $# -le 1 ] then echo "usage: `basename $0` [ -h hostname ] [ -p port] filename..." exit 1 fi for i do case "$i" in -h) host=$2; shift; shift;; -p) port=$2; shift; shift;; --) shift; break;; esac done exec cat $* | perl /usr/share/examples/printing/netprint "$host" "$port" || echo rplaymp3d: #!/bin/sh # # Copyright 1998 Hans Petter Bieker # All rights reserved. # port=7654 buffer=1024 volume=100 set -- `getopt b:p: $*` #if [ $# != 0 ]; then # echo "usage: `basename $0` [ -b buffer ] [ -p port ]" # exit 1 #fi for i do case "$i" in -b) buffer=$2; shift; shift;; -p) port=$2; shift; shift;; --) shift; break;; esac done # forking into background ( # the daemon itself while true; do nc -lp "$port" | amp -qb "$buffer" --volume "$volume" -; done # this loop should never exit exit 1 ) > /dev/null 2>&1 & exit 0 -bieker- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980425150721.5336G-100000>