From owner-freebsd-questions Sat Apr 25 06:15:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA23752 for freebsd-questions-outgoing; Sat, 25 Apr 1998 06:15:59 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from zerium.newmedia.no (hanspbie@oslo-4-isdn-209.newmedia.no [194.234.251.209]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA23742 for ; Sat, 25 Apr 1998 06:15:51 -0700 (PDT) (envelope-from hanspb@persbraten.vgs.no) Received: from localhost (hanspbie@localhost) by zerium.newmedia.no (8.8.8/8.8.8) with SMTP id PAA24715; Sat, 25 Apr 1998 15:13:56 +0200 (CEST) (envelope-from hanspb@persbraten.vgs.no) X-Authentication-Warning: zerium.newmedia.no: hanspbie owned process doing -bs Date: Sat, 25 Apr 1998 15:13:54 +0200 (CEST) From: Hans Petter Bieker X-Sender: hanspbie@zerium.newmedia.no To: Sumit Gupta cc: freebsd-questions@FreeBSD.ORG Subject: Re: Is there a Networked MPEG Player for BSD? In-Reply-To: <3541499F.D7627D12@tamu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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