LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-26-2010, 11:38 AM   #1
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 99

Rep: Reputation: 17
Linux Mint 9 Media Server Mp3 Streaming using Gnump3d


Dear LQ members,
I have install gnump3d for mp3 streaming on my linux mint box but it is unable to work due to some errors as below.Installation instruction is from the link attach http://www.unixmen.com/linux-tutoria...r-with-gnump3d

Error message as below:
oem-desktop ~ # gnump3d --fast
Couldn't create the listening socket for receiving incoming
requests upon

Perhaps the port 8888 is already in use?

This is the error message the system returned:

Address already in use

oem-desktop ~ #

Appreciate all kind help render
 
Old 11-27-2010, 06:19 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
If a gnump3d process is already running you may want to terminate that properly before starting a new one. Check by running 'lsof -Pwnli tcp:8888; pgrep gnump3d' as root.
 
Old 11-27-2010, 06:36 AM   #3
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 99

Original Poster
Rep: Reputation: 17
Hi unSpawn,
Here is the result after running the command.

oem-desktop ~ # lsof -Pwnli tcp:8888; pgrep gnump3d
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
gnump3d 1489 65534 3u IPv4 11573 0t0 TCP *:8888 (LISTEN)
1489
oem-desktop ~ #

How do I terminate the services and restarting the services?

Thanks for replying
 
Old 11-27-2010, 07:01 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
If it hasn't got an init script then 'pkill -15 gnump3d; sleep 5s; pkill -9 gnump3d' would be the polite thing to do. If you don't care for the process closing connections and files just 'pkill -9 gnump3d' or 'kill -9 [pid_of_process]'.
 
Old 11-27-2010, 11:53 AM   #5
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 99

Original Poster
Rep: Reputation: 17
Dear unSpawn,
Below is information in gedit /etc/rc.local

#!/bin/sh -e
#gnump3d --fast --background
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.



exit 0


I have added 'gnump3d --fast --background' into rc.local so that gnump3d run at start up. Please check to see if I have put it correctly and is there any other things I need to do so that gnump3d start each time after boot.

Thank you for your help
 
Old 11-27-2010, 12:41 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
IMO /etc/init.d/rc.local (or /etc/init.d/local.autostart ?) is best for one-offs and things that run without any interaction at any time. /etc/init.d should hold SysV init scripts you could use as example. Here's one that should be usable not only as init script but you could use it from say /root/bin (or wherever you save it) as well provided 0) it's run using sudo (or root) and 1) the file is executable (or prefix "sh " when calling the script):

Code:
#!/bin/sh
# Where gnump3d resides:
BINPATH=/usr/local/bin

case "$1" in
  start)  ${BINPATH}/gnump3d --background >/dev/null 2>&1 &
          ;;
  stop)   /usr/bin/pkill -9 -f '/gnump3d -';;
  status) /usr/bin/pgrep -f '/gnump3d -';;
  restart) $0 stop; $0 start;;
  *)       echo "Usage: gnump3d {start|stop|status|restart}"; exit 1;;
esac
exit 0
 
Old 11-27-2010, 03:58 PM   #7
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Rep: Reputation: 36
hi,the best streaming media software i found were

http://ampache.org/

http://www.mhive.org/
 
Old 11-28-2010, 12:46 AM   #8
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 99

Original Poster
Rep: Reputation: 17
Dear unSpawn,
I got gnump3d running by using the code 'gnump3d --fast' in terminal and the below message show up.

oem-desktop ~ # gnump3d --fast
GNUMP3d v3.0 by Steve Kemp
http://www.gnump3d.org/

GNUMP3d is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions.

For full details please visit the COPYING URL given below:

Copying details:
http://180.73.12.12:8888/COPYING

GNUMP3d now serving upon:
http://180.73.12.12:8888/

GNUMP3d website:
http://www.gnump3d.org/

But I cannot access it using the IP address as shown from another pc(remote) in Lan cos the external ip address shown is the same(host pc running gnump3d) as the other pc from I use to access it.How I access it in Lan and how do I access it from the internet?Do I need to do port forwarding in my network to accept the connection?

Thank you.
 
Old 11-28-2010, 06:20 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Quote:
Originally Posted by GJQ View Post
Do I need to do port forwarding in my network to accept the connection?
Yes. Ensure you do not run the daemon as root user (gnump3d.conf: 'user = nobody'), check your logs regularly (HTTP return codes in gnump3d/access.log) and take precautions against excessive network traffic and security risks due to unauthorized / unwanted network traffic.
 
Old 11-28-2010, 09:31 AM   #10
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 99

Original Poster
Rep: Reputation: 17
Dear unSpawn,
Please see attachment for my port forwarding config and gnump3d config as below. Is there anything wrong as I still cannot access the server from outside(internet)

###
# $Id: gnump3d.conf,v 1.25 2007/10/16 18:45:13 skx Exp $
###
#
# This is the configuration file for GNUMP3d, the streaming MP3/OGG server.
#
# All lines beginning with '#' are comments and may be ignored.
#
###
#
# user = nobody # Some comment
#
# # The port to listen upon.
# port=3333
#
###
#
# If you believe the documentation here is incomplete or misleading
# please consider contributing an update - or reporting it as a bug.
#
# Comments on sensible defaults to ship this file with, or new options
# should be sent to the author.
#
###
#
# Steve
# ---
# http://www.gnump3d.org/ - Website for this software, including
# documentation and mailing lists.
#
# http://www.steve.org.uk/ - My homepage. Visit. Enjoy.
#
####




###
# Basic Server Settings
####

#
# The port upon which we are going to serve. This may be any
# port which is not already in use upon your machine.
#
# You may use a low port, for example 80, if you are running
# as root - but that is only recommended if you make use of
# the `user' option, which occurs later in this file.
#
port = 8000


#
# The following is the interface address that we wish to
# bind upon.
#
# You'll only need set this if you are running this server upon
# a machine which has multiple IP addresses and you wish to force
# it to bind to a particular address.
#
# If you're not running this server on a machine with multiple
# IP addresses, then please ignore this setting.
#
#
# NOTE
######
#
# If you just want to specify the name used in all the generated
# links then you should be setting `hostname' instead.
#
# binding_host = 192.168.2.2
#


#
# Set the hostname that is used in all the generated links.
#
# (This defaults to the name of the server machine, with no
# domain suffix).
#
# You won't need this unless the machine which is serving on
# MUST be accessed via its fully qualified domain name - for
# example if you're running it on a machine which is accessible
# to the world.
#
# NOTE
######
#
# See `binding_host' if you have a machine which has multiple
# IP addresses and you're trying to bind to one in particular.
#
hostname = 180.73.12.12
#


#
# The root directory where we serve content from, this should be
# the directory containing the MP3, OGG, or other media files that
# you wish to share.
#
# Obviously the files which you wish to serve should be accessible
# to the user who this server is running as - which is set via the
# 'user' setting below.
#
# If you're on a multi-user system its probably a good idea to
# make the audio files readable to other users anyway, share the
# musical goodness!
#
root = /home/oem/Music


#
# This is the file which logs all MP3's / OGG's / directories
# which clients access.
#
# If you start the server as root it's recommended that you use
# a canonical location such as '/var/log' or '/var/adm', (because
# your system will, probably, rotate files held there).
#
# If you're starting this server as a non-root user you should
# change these locations to be a directory upon which you have write
# permissions.
#
####
#
# IMPORTANT NOTE:
#
# If you want the song statistics to be displayed correctly
# you MUST give the logfile as an absolute path - you must also
# ensure that the logfile is readable to the user whom you are
# running the server as.
#
####
#
# NOTE:
#
# This logfile is 100% apache logfile compatible so you may run any
# Apache logfile processor upon it if you so wish.
#
# Simplistic statistics such as the most popular directories, songs,
# and clients are available via the installed script 'gnump3d-top'
# Run 'gnump3d-top --help' for details.
#
#
####
#
logfile = /var/log/gnump3d/access.log


#
# Specify the format of the logfile, this may use any valid variables
# which are defined in package "main".
#
#
log_format = $connected_address - $user [$date] "GET $REQUEST" $HTTP_CODE $SERVED_SIZE "-" "$USER_AGENT"



#
# In the case of problems all output from the server will be sent
# to an error log.
#
# This next option configures where that is
#
errorlog = /var/log/gnump3d/error.log



#
# This option allows you to specify additional arguments to the
# statistics generating program 'gnump3d-top', and it's complete
# path if you don't have it installed upon the $PATH of the user
# who starts the server:
#
# stats_program = /usr/bin/gnump3d-top
#
#
# For example you may change the default number of lines which are
# reported from the default of 20 to 10 with this:
#
# stats_arguments = --count=10
#
# To hide the directories which are handled by the various plugins
# you may use the '--hide' option.
#
# stats_arguments = --hide
#
# To read multiple logfiles, (eg to cope with files which have been
# processed by logrotate), you could use:
#
# stats_arguments = --logfiles = /var/log/gnump3d/access.log*
#
# Combine the options if you wish, and see the gnump3d-top man-page
# for details of more arguments
#
# stats_arguments = --count=40 --hide --logfiles=/var/log/gnump3d/access.log*
#




##
# SECURITY OPTIONS.
####

#
# If there is a user value setup below then the server will become that
# user, after creating the listening socket and after opening the logfiles
# for writing.
#
# If you want to run this server via init.d, (which has the effect of
# starting the daemon as root), you should make sure you have this set
# to an appropriate value.
# Otherwise you will have the server running as root, which is clearly
# not a good idea - even in the unlikely event that this application is
# 100% bug free.
#
# You may comment the line out if you are running the daemon from your home
# directory, and you are the only user with read access to the server root.
# Although this is not recommended way of running the server.
#
# For the benefit of fellow computer users is recommended that you run the
# server as a user such as 'nobody', and allow people read-only access to
# your audio files.
#
user = nobody




##
# AUTHORISATION OPTIONS.
####

#
# The following section allows you to specify which clients
# are allowed to connect to your server.
#
# If you are leaving this server out on an Internet-accessible
# machine then you will probably want to setup something here,
# such as a firewall.
#
# The following entries are commented out, so they have no effect,
# but they should serve as good examples of the things which
# are possible.
#
#
# NOTE
# ----
#
# Multiple settings are allowed - just separated them with ';'
#
# Only people on the same subnet, (class C):
# allowed_clients = 192.168.2.0/8
#
# People on the same class B:
# allowed_clients = 10.0.0.0/16
#
# Only one person:
# allowed_clients = 192.168.2.12
#
# Everybody
# allowed_clients = all
#
# Nobody (!)
# allowed_clients = none
#
# Everybody local, and one remote address:
# allowed_clients = 192.168.2.0/8; 194.247.82.33
#
# Everybody local, and one remote range:
# allowed_clients = 192.168.2.0/8; 194.237.82.0/8
#
#
allowed_clients = all


#
# 'denied_clients' is the counterpart to allowed_clients - here
# you can specify particular clients who are unable to browse your
# music archive.
#
# Usage is identical to the allowed clients above; eg:
#
# denied_clients = 192.168.2.12; 192.168.2.25; 192.168.6.0/8
#
# denied_clients = none
#



##
#
# Referrer check
#
##
#
# The last security option is the ability to block clients that don't
# contain a specific 'Referrer:' header.
#
# Note that referrer protection isn't terribly reliable, as many clients
# will not send a referrer header when making a connection. This is
# especially likely when clients are connecting via a 'privacy enhancing'
# proxy server; such as Internet Junkbuster, etc.
#
# Similarly malicious clients may deliberately stop sending referrers
# if they realise what is going on.
#
#
#
###
# If you wish to only allow a particular referring URL then specify it
# here.
# valid_referrers = http://somesite.com/


##
# SERVER FEATURES.
####

#
# This next option controls what happens when you click upon a
# single MP3 file.
#
# If always_stream is set to '1', and you click upon it you'll
# actually get a .m3u (playlist) file containing a link to it -
# the advantage of doing this is that you don't have to download
# the file in its entirety to listen to it - it should start playing
# immediately.
#
# If set to '0' the playlists will work via streaming, but selecting
# an individual MP3 file will cause it to be downloaded to your local
# machine prior to playing - one drawback of this is that playback
# will probably not start until the entire file has downloaded.
#
always_stream = 1


#
# There is a link placed at the top of every directory, which allows you
# to play the songs within that directory recursively.
#
# By default the recursive option plays all the tracks in a
# sorted order - by uncommenting the following option you can
# have the recursive playlists default to being in a random order.
#
# recursive_randomize = 1
#

#
# This next setting controls the format of the playslist files.
#
# There are two formats this server supports, simple playlists which
# are just plain listings of tracks, and advanced playlists which contain
# copies of the song tags in comments.
#
# The advanced playlists will allow you to view song tag information
# inside the playlist windows of both XMMS and WinAMP
#
#
advanced_playlists = 1
#



##
# Server Appearance Settings.
####


##
#
# All the output the server produces is generated with the help of
# some HTML template files, these are referred to throughout the
# program and each collection of templates is referred to collectively
# as a 'theme'.
#
# This next option allows you to specify which theme should be used
# by default. (Any client can select one of the available themes by
# the use of cookies).
#
# For each theme there are a collection of HTML files which are read
# and used for the server output. There are several basic files which
# must be supplied to be considered a theme:
#
# index.html -> Used for displaying individual directories.
# search.html -> Used for displaying the search form.
# results.html -> Used for displaying the results of a search.
# stats.html -> Used for customising the server statistics page.
#
# In addition to those each plugin reads in it's own template file
# and uses that. For example the statistics plugin is accessed via
# the URL http://server.host.nameort/stats/, and reads in a template
# called 'stats.html'
#
# The theme directory defaults to /usr/share/gnump3d - but may be
# changed via the 'theme_directory' setting given below.
#
# When the server is running you may set the theme from your browser
# via the preferences page, simply visit the link:
#
# http://server.host.nameort/prefs
#
#
# NOTE
# ----
#
# If you create a theme I'd be happy to include it in future releases
# if you wish - see the online theme creation docs at:
#
# http://www.gnump3d.org/theme.html
#
theme = Tabular



##
#
# Set the base theme directory if you wish to place them in a non-standard
# location.
#
##
theme_directory = /usr/share/gnump3d/
##



##
#
# This next option controls how directories are displayed on the index
# pages.
#
# There are several defined variables which you can choose to use:
#
# $LINK = The actual URL of the directory.
#
# $DIR_NAME = The name of the directory.
#
# $SONG_COUNT = The number of songs contained in the directory.
#
# $DIR_COUNT = The number of subdirectories in the directory.
#
# $RECURSE = A link to play the contents of the directory recursively.
#
# $NEW = Will insert the text specified by 'new_format' if the
# directory is recently modified.
#
# NOTE: you can also specify "directory_format2" as an alternative display
# format. Directories are then listed with alternating display formats.
# This is useful if you want to have alternating background colors for
# each entry in a table, for example.
#
directory_format = <tr><td width="10%">&nbsp;</td><td><a href="$LINK">$DIR_NAME</a> $NEW</td><td>$SONG_COUNT</td><td>$DIR_COUNT</td><td>[$RECURSE]</td></tr></a>

#
# directory_format = <tr><td><a href="$LINK">$DIR_NAME</a></td></tr>
#
# directory_format = <tr><td><a href="$LINK">$DIR_NAME</a></td></tr>
#
# directory_format = <tr><td><a href="$LINK">$DIR_NAME</a></td><td>[$RECURSE]</td></tr>
#


##
# Text to insert if the directory is recently modified.
##
new_format = <font color="red"><b>New</b></font>

##
# If a directory hasn't been modifed in more than 'x' days then
# it isn't considered 'new'.
##
new_days = 7


##
# File format
##
#
# This option is analogous to the 'directory_format' option above.
#
# It specifies how the files should be listed.
#
# $LINK Is the link to the track itself
#
# $SONG_FORMAT Is a template string which is described below.
#
# NOTE: you can also specify "file_format2" as an alternative display
# format. Files are then listed with alternating display formats.
# This is useful if you want to have alternating background colors for
# each entry in a table, for example.
#
file_format = <tr><td width="10%">&nbsp;</td><td><a href="$LINK">$SONG_FORMAT</a></td><td align="right">[<a href="/info$PLAINLINK">Info</a>] [<a href="$PLAINLINK">Download</a>]</td></tr>



##
#
# This next setting, `song_format', allows you to configure how the
# MP3 and OGG Vorbis files are displayed.
#
# If the file which has been found contains any tag information then
# the following values will be available to you:
#
# $ARTIST -> The artist of the song.
#
# $ALBUM -> The album the song came from.
#
# $COMMENT -> The comment string attached to the song, if any.
# NOT AVAILABLE FOR OGG FILES.
#
# $SONGNAME -> The name of the song.
#
# $YEAR -> The year the song was recorded.
# NOT AVAILABLE FOR OGG FILES.
#
# $GENRE -> The genre of the track.
# NOT AVAILABLE FOR OGG FILES.
#
# $BPS -> The sample rate of the song - if non-variable.
# NOT AVAILABLE FOR OGG FILES.
#
# $LENGTH -> The length of the track in MM:SS
# NOT AVAILABLE FOR OGG FILES, OR VBR MP3's.
#
# $SECONDS -> The length of the track in seconds
# NOT AVAILABLE FOR OGG FILES, OR VBR MP3's.
#
# $SIZE -> The size of the audio stream.
# NOT AVAILABLE FOR OGG FILES, OR VBR MP3's.
#
# $TRACK -> The number of the track
#
# $FILENAME will always be available. (This is the name of the file
# without any suffix or directory information).
#
song_format = $TRACK - $ARTIST - $ALBUM - $SONGNAME [ $GENRE - $LENGTH / $SIZE ] $NEW



##
#
# If you wish to change the text displayed on the 'Play'
# link you should uncomment the following option, and change the
# text appropriately.
#
##
#
# play_recursively_text = Play
##


##
#
# This next option controls how songs are sorted prior to display,
# and used in the playlists.
#
# You may use any of the $ values which are listed above in
# the 'song_format' setting, eg:
#
# Sort by the song name.
# sort_order = $SONGNAME
#
# Sort by artist if present.
# sort_order = $ARTIST
##
# Default to sorting by the track number, due to popular.
sort_order = $TRACK





##
# DOWNSAMPLING / BIT RATE CHANGE
##
#
# This support allows the music to be down-sampled before it is streamed
# to clients. This will slow down the serving, and may be a little
# processor intensive - I guess it will depend upon the speed of your
# server, and the number of users you have.
#
##
#
# Is downsampling support enabled?
#
# If this is disabled then none of the further downsampling options will
# apply, even if they are set.
#
# Also note that if the downsampling support is disabled the preferences
# page will not allow the clients to select their own bitrate.
#
# (I think this makes sense, if it's disabled it's misleading to present
# configuration options to the clients).
#
# downsample_enabled = 1
#

##
#
# YOU MUST UNCOMMENT THESE LINES
#
# Downsampling is based upon IP address, rather than enabled globally
# this allows you to control things a little more tightly than user
# preferences.
#
# For example on a gateway machine you'd want all people on the internal
# LAN to have full quality files, and people remote to have the lower
# quality sounds.
#
# The next two settings specify the downsampling ranges:
#
# downsample_clients = ALL
# no_downsample_clients = 192.168.0.0/24
#
# NOTE: 'no_downsample_clients' takes precedence over 'downsample_clients'.
#
# Here are some examples, notice that you can use either single IP
# addresses, ranges, 'NONE' or 'ALL'
#
#
# Downsample Everybody:
# downsample_clients = ALL
# no_downsample_clients = NONE
#
# Downsample remote, allow local to have full quality
# downsample_clients = ALL
# no_downsample_clients = 192.168.0.0/24
#
# Downsample all except two addresses
# downsample_clients = ALL
# no_downsample_clients = 192.168.0.162; 192.168.0.33
#
# Full quality for all local, except one address
# downsample_clients = 192.168.0.99
# no_downsample_clients = 192.168.0.0/24
#
##

##
#
# YOU MUST UNCOMMENT THESE LINES
#
#
# For each of the downsampling levels the user has chosen the selected
# file will be processed by a command.
#
# This command is assumed to write it's output directly to STDOUT.
#
# The following options specify the command line to run, note that
# the string '$FILENAME' will be replaced by the file the user is
# requesting.
#
# Note:
#
# If you wish to downsample or convert any other file types you
# need to add entries to this file to specify what is done to them
# simply create an entry which looks like:
#
# downsample_"level"_"file suffix" = command args
#
#downsample_high_mp3 = /usr/bin/lame --mp3input -b 56 $FILENAME -
#downsample_medium_mp3 = /usr/bin/lame --mp3input -b 32 $FILENAME -
#downsample_low_mp3 = /usr/bin/lame --mp3input -b 16 $FILENAME -
#
#downsample_high_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
#downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
#downsample_low_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
#

#
# If you always want to force a particular bitrate upon clients who've
# not chosen something different then specify it here:
#
# default_quality = medium

#
#
##





####
# Plugin control
##

#
# Several of the servers features are controlled via external plugins,
# these are simple Perl scripts which are called by the server in response
# to requests.
#
# This next setting allows you to change the location from which the
# plugins are loaded.
#
# plugin_directory = /usr/lib/perl5/gnump3d/plugins
#
#
# NOTE: the following directory should be correctly filled in by
# the installation script - if this doesn't happen report this as
# a bug.
#

plugin_directory = /usr/share/perl5/gnump3d/plugins


#
# Plugin-Specific settings here.
#


#
# Directories to exclude when choosing a random directory. Seperate
# multiple directories with a '|' character.
#
# plugin_random_exclude = Talk|Midi|Video

#
##
# End Plugin Control
####



##
# HACKING - atypical configuration follows, this will not be of
# interest to casual users.
#
# Dragons lie yonder ... ->
#
#####

#
# When files are served there needs to be an appropriate mime type
# sent along with them, this allows the browser to pass the response
# back to an MP3 player, etc.
#
# Most Unix systems will have the file '/etc/mime.types' which is
# used by default. If not point this next file to wherever your mime
# types file is located:
#
mime_file = /etc/gnump3d/mime.types
#
#

#
# This next setting controls where the file types are looked up.
# we support many audio, visual, and playlist files and to do this
# we need to be able to lookup a file to determine what kind of
# file it is.
#
# Here is the lookup file.
file_types = /etc/gnump3d/file.types

#
#
# In order to record which songs are currently being played the server
# will create a temporary file containing that path of each file that
# it is serving.
#
# The path under which these files are created in may be set here.
#
now_playing_path = /var/cache/gnump3d/serving


#
# As a speedup and optimisation song tag is read via a companion script
# which is called 'gnump3d-index'. This will be run automatically when
# the server starts if possible.
#
# This next setting controls where that script will write its tag database
# to.
#
tag_cache = /var/cache/gnump3d/song.tags

#
# This next setting allows you to control the path to the gnump3d-index
# script which is used, as explained above.
#
# Normally you shouldn't need to touch this.
#
# index_program = /usr/bin/gnump3d-index


#
# This setting controls whether we should stream song title
# information in shoutcast format.
#
# If your client supports it then you should enable it, otherwise
# not.
#
# (This works correctly on WinAmp, and XMMS.)
#
shoutcast_streaming = 1


#
# By default the server logfile is appended to when we start.
#
# If you set the following value to '1' the logfile will be truncated
# instead.
#
# You might want to truncate the file to save space, but doing this
# renders the server statistics less useful.
#
# truncate_log_file = 0


#
# By default the server will close a connection it receives if it
# hasn't received a valid request after 10 seconds.
#
# Here you may change this timeout value.
#
# read_time = 10



#
# This next section controls whether we present a HTML interface
# to the server.
#
# In most situations you will want to do this - but some people have
# approached me and suggested that it should be tweakable, so here's
# the option to disable the browsing of the music
#
# If you set this to '0' the best you can probably do is call
# 'http://serverort/recurse.m3u' - or similar.
#
# enable_browsing = 1


#
# This next value controls whether we should believe, and use, the
# client supplied 'Host:' header.
#
# This header is sent by HTTP/1.1 clients only, and could be spoofed.
# You'll only NEED to use it if tunnelling over SSH or performing similar
# magic.
#
# It's enabled here because I don't believe it should cause any real harm
# YMMV.
#
use_client_host = 1


##
#
# Set this option to rewrite the hostnameort combination in the URLs in
# your playlist. Most people won't need this unless they are proxying
# their connection or running multiple streaming servers through a load
# balancer or DNS rotor.
#
# Note: If you set this you will almost certainly need to set
# "use_client_host=0"
##
# host_rewrite = ""


##
#
# This is an experimental feature - ignore it.
#
# It does not work.
#
# Ignore it: You are not expected to understand this (I've always wanted
# to leave that as a comment somewhere
#
##
#
# jukebox_mode = 1
# jukebox_player = /usr/bin/mpg123 $FILENAME
#
##


##
#
# Make it possible to hide song tags, and just display filenames.
#
##
# hide_song_tags = 0

##
#
# Make it possible to disable the tag cache altogether, to save memory.
#
##
# disable_tag_cache = 0


##
#
# This option allows you to insert a custom META-tag inside the header of
# each page which is output.
#
# You can add whatever you like here, perhaps the most useful thing to
# add is an encoding type.
#
# add_meta_tag = <meta name="author" value="Steve Kemp" />
# add_meta_tag = <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
##


##
# End Of Hacking Section
####



##
# End of gnump3d.conf
####
Attached Thumbnails
Click image for larger version

Name:	Port Forward Config.png
Views:	17
Size:	146.7 KB
ID:	5356  
 
Old 11-28-2010, 09:44 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Please edit your post and replace your gnump3d.conf with the output from running 'grep -v ^# gnump3d.conf|grep .' and please use BB code tags.
 
Old 11-28-2010, 10:02 AM   #12
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 99

Original Poster
Rep: Reputation: 17
Dear unSpawn,
I put this code 'grep -v ^# gnump3d.conf|grep .' in terminal but nothing come out.Please see below:

oem@oem-desktop ~ $ grep -v ^# gnump3d.conf|grep .
grep: gnump3d.conf: No such file or directory
oem@oem-desktop ~ $ sudo -s
[sudo] password for oem:
oem-desktop ~ # grep -v ^# gnump3d.conf|grep .
grep: gnump3d.conf: No such file or directory

I am sorry but I do not know how to use BB code.Can please advise


Update:
This is what I put in my modem for Port Forwarding

Protocol:TCP/UDP
Wan Port Begin:8000
Wan Port End:8000
Lan Port Begin:8000
Lan Port End:8000
Server Ip:180.73.12.12(External IP address)

I use Open Port Tool http://www.yougetsignal.com/tools/open-ports/ to check if Port has been configure correctly but it say Port 8000 is closed on remote address 180.73.12.12

Please advise

Last edited by GJQ; 11-28-2010 at 10:49 AM. Reason: Updated with modem Port Forwarding Config
 
Old 11-28-2010, 10:48 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Run 'locate gnump3d.conf' (usually it's in /etc): either be in that directory or prefixing the path: 'grep -v ^# /etc/gnump3d.conf|grep .' should work.
 
Old 11-28-2010, 11:17 AM   #14
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 99

Original Poster
Rep: Reputation: 17
Dear unSpawn,
Below is the output.

oem@oem-desktop ~ $ locate gnump3d.conf
/etc/gnump3d/gnump3d.conf
/home/oem/gnump3d-3.0/etc/gnump3d.conf
/home/oem/gnump3d-3.0/etc/gnump3d.conf.win
/home/oem/gnump3d-3.0/etc/gnump3d.conf.win.in
/home/oem/gnump3d-3.0/man/gnump3d.conf.1
/usr/lib/linuxmint/mintInstall/tmp/gnump3d-3.0/etc/gnump3d.conf
/usr/lib/linuxmint/mintInstall/tmp/gnump3d-3.0/etc/gnump3d.conf.win
/usr/lib/linuxmint/mintInstall/tmp/gnump3d-3.0/etc/gnump3d.conf.win.in
/usr/lib/linuxmint/mintInstall/tmp/gnump3d-3.0/man/gnump3d.conf.1
/usr/local/share/man/man1/gnump3d.conf.1
oem@oem-desktop ~ $ grep -v ^# /etc/gnump3d.conf|grep .
grep: /etc/gnump3d.conf: No such file or directory
oem@oem-desktop ~ $ grep -v ^# /etc/gnump3d/gnump3d.conf|grep .
port = 8888
hostname = 180.73.12.12
root = /home/oem/Music
logfile = /var/log/gnump3d/access.log
log_format = $connected_address - $user [$date] "GET $REQUEST" $HTTP_CODE $SERVED_SIZE "-" "$USER_AGENT"
errorlog = /var/log/gnump3d/error.log
user = nobody
allowed_clients = all
always_stream = 1
advanced_playlists = 1
theme = Tabular
theme_directory = /usr/share/gnump3d/
directory_format = <tr><td width="10%">&nbsp;</td><td><a href="$LINK">$DIR_NAME</a> $NEW</td><td>$SONG_COUNT</td><td>$DIR_COUNT</td><td>[$RECURSE]</td></tr></a>
new_format = <font color="red"><b>New</b></font>
new_days = 7
file_format = <tr><td width="10%">&nbsp;</td><td><a href="$LINK">$SONG_FORMAT</a></td><td align="right">[<a href="/info$PLAINLINK">Info</a>] [<a href="$PLAINLINK">Download</a>]</td></tr>
song_format = $TRACK - $ARTIST - $ALBUM - $SONGNAME [ $GENRE - $LENGTH / $SIZE ] $NEW
sort_order = $TRACK
plugin_directory = /usr/share/perl5/gnump3d/plugins
mime_file = /etc/gnump3d/mime.types
file_types = /etc/gnump3d/file.types
now_playing_path = /var/cache/gnump3d/serving
tag_cache = /var/cache/gnump3d/song.tags
shoutcast_streaming = 1
use_client_host = 1
oem@oem-desktop ~ $

Thank you
 
Old 11-28-2010, 03:04 PM   #15
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Quote:
Originally Posted by GJQ View Post
Code:
port = 8888
hostname = 180.73.12.12
Your router is at IP address 10.1.1.254 meaning the machine providing GNUMP3d resides in your 10.1.1.0/24 LAN. So it should have a "hostname = 10.1.1.n" address in gnump3d.conf and router port doesn't match your gnump3d.conf: outside can be TCP/8000 but inside must be TCP/8888.

Last edited by unSpawn; 11-28-2010 at 08:43 PM. Reason: //BB code tags
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Create your own MP3/media streaming server with GNUMP3d LXer Syndicated Linux News 0 10-07-2009 11:50 AM
VLC, GNUMP3d, streaming from remote cli server properganda Linux - Newbie 1 02-07-2008 10:38 AM
Problems with media server using GNUMP3d! lipuki Linux - Software 0 12-19-2007 10:39 AM
LXer: GNUMP3d: A small, portable, MP3/OGG streaming server LXer Syndicated Linux News 0 04-06-2007 02:31 PM
trying to host streaming mp3 using gnump3d and apache2 bernied Linux - Software 0 03-30-2006 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration