PDA

View Full Version : Latest SVN - ogg needs sox



Joshua Uziel
2005-03-27, 12:56
I was having problems with 6.0b3 indexing my ogg files... all of my
music is in ogg, all ripped from CDs I own, etc. On some files, it
would fail to read the headers, just some fields, or claim the file
didn't have a header. At any rate, I decided to give the latest and
greatest in the subversion tree a shot to see if the issue was fixed.

Sadly, I hit another issue... with any file I'd try to play, it would
display "Problem: can't open file for" and the track name and quickly
jump to the last song in the list. There was no message in the log, and
after some digging, I found that it was looking for sox... an "apt-get
install sox" later and things are working again.

The indexing bug of before is now fixed... I just wanted to save another
ogg user the effort of tracking this issue down. The svn commit is at

http://svn.slimdevices.com/trunk/server/convert.conf?rev=2665&view=rev

so we all know to blame vidur. :)

Joshua Uziel
2005-03-27, 13:09
* Joshua Uziel <uzi (AT) uzix (DOT) org> [050327 11:56]:
> Sadly, I hit another issue... with any file I'd try to play, it would
> display "Problem: can't open file for" and the track name and quickly
> jump to the last song in the list. There was no message in the log, and
> after some digging, I found that it was looking for sox... an "apt-get
> install sox" later and things are working again.

And replying to myself, I see that in Slim/Player/Source.pm, there is
the code snippet around line 1429 of:

while ($command && $command =~ /\[([^]]+)\]/g) {

if (!Slim::Utils::Misc::findbin($1)) {
$command = undef;
$::d_source && msg(" drat, missing binary $1\n");
}
}

I removed sox from my system, enabled d_source and sure enough saw

2005-03-27 12:01:31.4366 drat, missing binary sox

So this seems like something more fundamental than should be hidden
behind a debug variable. Should the "$::d_source &&" be removed and the
message made more general like

msg("Error: missing binary \"$1\", please see convert.conf\n");

as I can see this easily happening frequently.

vidurapparao
2005-03-27, 13:12
Joshua Uziel wrote:

>...
>
>so we all know to blame vidur. :)
>
>
In my defense, I provided sox binaries for Windows, OS X and x86 linux.
I presume you're running on something other than one of those. Maybe you
should blame yourself then. ;-)

--Vidur

Joshua Uziel
2005-03-27, 13:21
* Vidur Apparao <vidur (AT) slimdevices (DOT) com> [050327 12:13]:
> In my defense, I provided sox binaries for Windows, OS X and x86 linux.
> I presume you're running on something other than one of those. Maybe you
> should blame yourself then. ;-)

Actually, I'm running Debian Linux on an x86... but I'm guessing my
installation isn't in the proper search path for
Slim::Utils::Misc::findbin() ... lucky me. :)

vidurapparao
2005-03-27, 13:29
Joshua Uziel wrote:

>* Vidur Apparao <vidur (AT) slimdevices (DOT) com> [050327 12:13]:
>
>
>>In my defense, I provided sox binaries for Windows, OS X and x86 linux.
>>I presume you're running on something other than one of those. Maybe you
>>should blame yourself then. ;-)
>>
>>
>
>Actually, I'm running Debian Linux on an x86... but I'm guessing my
>installation isn't in the proper search path for
>Slim::Utils::Misc::findbin() ... lucky me. :)
>

Joshua Uziel
2005-03-27, 13:33
* Vidur Apparao <vidur (AT) slimdevices (DOT) com> [050327 12:30]:
> Hmm...that doesn't sound right. Dan checked in code a while ago that
> should make all x86 Linux distributions use the same path. What is the
> output of:
>
> perl -V
>
> for you?

I was referring to the output see when you enable d_paths -- at least
that's how I think I tracked down my problem. Out to perl -V is:


Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
Platform:
osname=linux, osvers=2.4.27-ti1211, archname=i386-linux-thread-multi
uname='linux kosh 2.4.27-ti1211 #1 sun sep 19 18:17:45 est 2004 i686 gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.4 -Dsitearch=/usr/local/lib/perl/5.8.4 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.4 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='3.3.5 (Debian 1:3.3.5-9)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so.5.8.4
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Mar 8 2005 19:51:48
@INC:
/etc/perl
/usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
.

Joshua Uziel
2005-03-27, 13:36
* Vidur Apparao <vidur (AT) slimdevices (DOT) com> [050327 12:30]:
> Hmm...that doesn't sound right. Dan checked in code a while ago that
> should make all x86 Linux distributions use the same path. What is the
> output of:

I should probably further describe my setup... the latest subversion
trunk is downloaded in /usr/local/SlimServer-svn ... I have a
/usr/local/slimserver -> SlimServer-svn/server symlink, and I run
/usr/local/slimserver/slimserver.pl to kick things off.

vidurapparao
2005-03-27, 15:38
Joshua,

You've found a legitimate bug. Dan just checked in a fix to make sure
that the path for linux got canonicalized correctly.

--Vidur

Joshua Uziel wrote:

>* Vidur Apparao <vidur (AT) slimdevices (DOT) com> [050327 12:30]:
>
>
>>Hmm...that doesn't sound right. Dan checked in code a while ago that
>>should make all x86 Linux distributions use the same path. What is the
>>output of:
>>
>>
>
>I should probably further describe my setup... the latest subversion
>trunk is downloaded in /usr/local/SlimServer-svn ... I have a
>/usr/local/slimserver -> SlimServer-svn/server symlink, and I run
>/usr/local/slimserver/slimserver.pl to kick things off.
>
>

Joshua Uziel
2005-03-27, 17:13
* Vidur Apparao <vidur (AT) slimdevices (DOT) com> [050327 14:39]:
> You've found a legitimate bug. Dan just checked in a fix to make sure
> that the path for linux got canonicalized correctly.

Yay me. :) I updated my local copy of the tree and sure enough, things
still work if I "dpkg -P sox". Any comment on my suggestion for
removing the d_source on that one debug message? I'm all for reducing
the amount that is spewed to the log, but that one seems pretty
fundamental. Thanks!

Steven Spies
2005-03-31, 13:13
Vidur, I just noticed that I was not able to play Ogg Vorbis files
with 6.0 on OSX. Since sox is now used for Ogg Vorbis playback I
thought that might be the culprit. I dug through the preference pane
and found the sox executable that was included with slim server. When
I ran sox in the terminal it complained about some missing library
files. On version tracker I found a program called SoX Wrap that
included an installer for the needed library files. Ogg Vorbis now
seems to work correctly. Can the missing library files be fixed? A
different sox executable or a new slim server installer perhaps? I
hope this will help others using Ogg Vorbis on OSX, Steven


On Sun, 27 Mar 2005 12:12:34 -0800, Vidur Apparao <vidur (AT) slimdevices (DOT) com> wrote:
> Joshua Uziel wrote:
>
> >...
> >
> >so we all know to blame vidur. :)
> >
> >
> In my defense, I provided sox binaries for Windows, OS X and x86 linux.
> I presume you're running on something other than one of those. Maybe you
> should blame yourself then. ;-)
>
> --Vidur
>

Steven Spies
2005-03-31, 13:18
I'm curious, why did you switch from oggdec to sox anyway? Thanks, Steven


On Thu, 31 Mar 2005 12:13:29 -0800, Steven Spies <sspies (AT) gmail (DOT) com> wrote:
> Vidur, I just noticed that I was not able to play Ogg Vorbis files
> with 6.0 on OSX. Since sox is now used for Ogg Vorbis playback I
> thought that might be the culprit. I dug through the preference pane
> and found the sox executable that was included with slim server. When
> I ran sox in the terminal it complained about some missing library
> files. On version tracker I found a program called SoX Wrap that
> included an installer for the needed library files. Ogg Vorbis now
> seems to work correctly. Can the missing library files be fixed? A
> different sox executable or a new slim server installer perhaps? I
> hope this will help others using Ogg Vorbis on OSX, Steven
>
>
> On Sun, 27 Mar 2005 12:12:34 -0800, Vidur Apparao <vidur (AT) slimdevices (DOT) com> wrote:
> > Joshua Uziel wrote:
> >
> > >...
> > >
> > >so we all know to blame vidur. :)
> > >
> > >
> > In my defense, I provided sox binaries for Windows, OS X and x86 linux.
> > I presume you're running on something other than one of those. Maybe you
> > should blame yourself then. ;-)
> >
> > --Vidur
> >

Dan Sully
2005-03-31, 13:19
* Steven Spies shaped the electrons to say...

>I'm curious, why did you switch from oggdec to sox anyway? Thanks, Steven

There are a number of Ogg radio streams out there at 22 & 32 - which sox can
resample to 44.1, but oggdec can't.

-D
--
<weezyl> $6.66: The Value Meal of the Beast.

vidurapparao
2005-03-31, 13:21
Steven Spies wrote:

>Vidur, I just noticed that I was not able to play Ogg Vorbis files
>with 6.0 on OSX. Since sox is now used for Ogg Vorbis playback I
>thought that might be the culprit. I dug through the preference pane
>and found the sox executable that was included with slim server. When
>I ran sox in the terminal it complained about some missing library
>files. On version tracker I found a program called SoX Wrap that
>included an installer for the needed library files. Ogg Vorbis now
>seems to work correctly. Can the missing library files be fixed? A
>different sox executable or a new slim server installer perhaps? I
>hope this will help others using Ogg Vorbis on OSX, Steven
>
>

Steven,

Thanks for the find. This will be fixed shortly in the nightlies.

--Vidur

Steven Spies
2005-03-31, 13:24
OK, that makes sense. Thanks for the info, Steven


On Thu, 31 Mar 2005 12:19:54 -0800, Dan Sully <dan (AT) slimdevices (DOT) com> wrote:
> * Steven Spies shaped the electrons to say...
>
> >I'm curious, why did you switch from oggdec to sox anyway? Thanks, Steven
>
> There are a number of Ogg radio streams out there at 22 & 32 - which sox can
> resample to 44.1, but oggdec can't.
>
> -D
> --
> <weezyl> $6.66: The Value Meal of the Beast.
>

Steven Spies
2005-03-31, 13:25
I'm glad I could be of help, Steven


On Thu, 31 Mar 2005 12:21:09 -0800, Vidur Apparao <vidur (AT) slimdevices (DOT) com> wrote:
> Steven Spies wrote:
>
> >Vidur, I just noticed that I was not able to play Ogg Vorbis files
> >with 6.0 on OSX. Since sox is now used for Ogg Vorbis playback I
> >thought that might be the culprit. I dug through the preference pane
> >and found the sox executable that was included with slim server. When
> >I ran sox in the terminal it complained about some missing library
> >files. On version tracker I found a program called SoX Wrap that
> >included an installer for the needed library files. Ogg Vorbis now
> >seems to work correctly. Can the missing library files be fixed? A
> >different sox executable or a new slim server installer perhaps? I
> >hope this will help others using Ogg Vorbis on OSX, Steven
> >
> >
>
> Steven,
>
> Thanks for the find. This will be fixed shortly in the nightlies.
>
> --Vidur
>

vidurapparao
2005-03-31, 14:15
Vidur Apparao wrote:

> Steven Spies wrote:
>
>> Vidur, I just noticed that I was not able to play Ogg Vorbis files
>> with 6.0 on OSX. Since sox is now used for Ogg Vorbis playback I
>> thought that might be the culprit. I dug through the preference pane
>> and found the sox executable that was included with slim server. When
>> I ran sox in the terminal it complained about some missing library
>> files. On version tracker I found a program called SoX Wrap that
>> included an installer for the needed library files. Ogg Vorbis now
>> seems to work correctly. Can the missing library files be fixed? A
>> different sox executable or a new slim server installer perhaps? I
>> hope this will help others using Ogg Vorbis on OSX, Steven
>>
>>
>
> Steven,
>
> Thanks for the find. This will be fixed shortly in the nightlies.
>

Dan just checked in a statically compiled version of sox with ogg
support (the version I had originally included depended on libogg and
libvorbis shared libraries). The new version will be available in
tomorrow's nightlies or can be immediately downloaded from
https://svn.slimdevices.com/*checkout*/trunk/server/Bin/darwin/sox?rev=2821.
Please check it out when you get a chance (though it sounds like you've
already installed the necessary shared libraries for the original version).

Thanks,
--Vidur

Steven Spies
2005-03-31, 17:49
Yup, that seemed to do the trick. I tested the new executable on my
iBook that does not have the required library installed and it worked
fine. The old one complained the library is missing. This is slightly
off topic but how do you compile a program like sox so it does not
need an external library? I have been wanting to do the same thing for
a great program called wavegain that can calculate replaygain values
for wave and aiff files and optionally apply the changes to the file
but I was never able to figure it out. Do you have any ideas? Besides
my knowledge of compiling is very limited. If ./configure, make, sudo
make install does not work I am completely lost ;^)


On Thu, 31 Mar 2005 13:15:05 -0800, Vidur Apparao <vidur (AT) slimdevices (DOT) com> wrote:
> Vidur Apparao wrote:
>
> > Steven Spies wrote:
> >
> >> Vidur, I just noticed that I was not able to play Ogg Vorbis files
> >> with 6.0 on OSX. Since sox is now used for Ogg Vorbis playback I
> >> thought that might be the culprit. I dug through the preference pane
> >> and found the sox executable that was included with slim server. When
> >> I ran sox in the terminal it complained about some missing library
> >> files. On version tracker I found a program called SoX Wrap that
> >> included an installer for the needed library files. Ogg Vorbis now
> >> seems to work correctly. Can the missing library files be fixed? A
> >> different sox executable or a new slim server installer perhaps? I
> >> hope this will help others using Ogg Vorbis on OSX, Steven
> >>
> >>
> >
> > Steven,
> >
> > Thanks for the find. This will be fixed shortly in the nightlies.
> >
>
> Dan just checked in a statically compiled version of sox with ogg
> support (the version I had originally included depended on libogg and
> libvorbis shared libraries). The new version will be available in
> tomorrow's nightlies or can be immediately downloaded from
> https://svn.slimdevices.com/*checkout*/trunk/server/Bin/darwin/sox?rev=2821.
> Please check it out when you get a chance (though it sounds like you've
> already installed the necessary shared libraries for the original version).
>
> Thanks,
> --Vidur
>

vidurapparao
2005-03-31, 18:50
Steven Spies wrote:

>Yup, that seemed to do the trick. I tested the new executable on my
>iBook that does not have the required library installed and it worked
>fine. The old one complained the library is missing. This is slightly
>off topic but how do you compile a program like sox so it does not
>need an external library? I have been wanting to do the same thing for
>a great program called wavegain that can calculate replaygain values
>for wave and aiff files and optionally apply the changes to the file
>but I was never able to figure it out. Do you have any ideas? Besides
>my knowledge of compiling is very limited. If ./configure, make, sudo
>make install does not work I am completely lost ;^)
>
>

Obviously, I'm no expert either. :-) To statically link in the ogg and
vorbis libraries for sox, you need to make sure that the .a versions of
the libraries and not the .so versions are in the library path (both the
LD_LIBRARY_PATH environment variable and any -L inclusions on the
command line). For me, this generally involves finding out where the
libraries were installed (e.g. /usr/local/lib) and temporarily mv'ing
them. Some configure scripts support the --enable-static and
--disable-shared options.

--Vidur