Multimedia :: using play on the command line



Quote
Is there any issue with just grabbing the play binary and including that in one of my Exts
Yes, there are multiple issues.
First, the only actual executables are "sox" and "soxmix". The play and rec commands are simply a shell script and a link that run the sox command using specific parameters. The actual command is much larger than 6k.
Second, the application was linked to libmp3lame, which is also not a part of DSL. This strengthens the need for the play script, as that script sets up LD_LIBRARY_PATH to include the libmp3lame directory.
Third, the application cannot legally be distributed without also including the license file(s).
So ultimately, your only options in reducing the size of the package are removing only the soxmix executable and help files, or recompiling the application without mp3 support. The minimum files required to use play in this case, in a new extension, are the play script, the non-mp3 sox executable, and the license files.

Quote
Also if the binary is so system specific then how can sox possibly work like that as its a precompiled tar.gz
You're looking at an old version of sox. The newer version is uci. In either case, though, as long as a binary was built with a compatible c library/compiler it can usually be made to work by including support files and/or setting up the runtime environment to accommodate the program.

Quote
Also why does play appear on a USB install and not on a CD boot.
I can't answer that question. The problem could have several sources, and no one can know unless we know specifically what differences there are between your personal USB and CD installations. A first guess would be that you have the sox mydsl package saved to your usb device.

Quote (^thehatsrule^ @ Oct. 03 2007,09:31)
afaik `play` is just a wrapper script that invokes sox.  You could try my first suggestion as well...

You probably have the extension saved on your USB so it gets automatically loaded.

Quote
Also if the binary is so system specific then how can sox possibly work like that as its a precompiled tar.gz ..
<snip>
Sorry cant buy some of the explanations as yet..
What do you mean?

Nope NO Extensions saved on the USB stick at all.. Try it .. Boot from a DSL CD and open a command line and type "play" .. Its not there anywhere ..

Now install to a USB stick and dont install any exts or anything extra .. Boot that USB stick up and open a console and type "play" again.. Hey now its there .. Ive done this with DSL v2 3 and 4 .. I thought a USB install was just a CD image across to a bootable USB stick but there is something else going on there.. I dont understand it as yet.. You will find play at /usr/bin/play on a USB install from memory.

I have not tried sox as yet but I am pretty sure it will make the command line play work if I load it on a CD booted system.
Looking at the actual extension it seems to be about 500k and contains something that looks like it belongs to the lame library. This lame stuff would appear to be the largest part of the ext with the play binary being about 6k ..

When I say I cant BUY some of the explanations as yet.
This comment from thehatsrule is what I cant get a grip on.
"You must realize that different distributions are tailored to their different ways... and what can be what you call a standard may not be one in another."

I mean that Ive found a sox mydsl app thats in the multimedia group and its just a tar.gz precompiled binary. Yes Ive since found one thats a UCI as well that appears to be a later version. That might be a bit different but the tar.gz can not be a system specific thing. Its just a binary that runs on DSL regardless of system one would think ..

I should go and find mpg123 as well I guess.. Will have to fiddle with some of this stuff.. Ive copied the play binary off a USB install and will try and run that raw on a CD bootup for laughs.. I suspect the sox.tar.gz may be safer but I suspect its got the dependancy on that libmp3lame.so.0 file which is some 315k in itself.

Maybee the problem is with having it on a live distro CD.. The lame mp3 encoder I mean.. Maybee your not allowed to redistribute that under GPL or whatever licence scheme ..

Thanks for the pointers.
Will post any further findings on here as an update..

I think mpg123 only plays mp1/2/3 files. How about some another console wav player?

With alsa I've used aplay, but there must be many small ones for OSS too. How about bplay? The source is only 18k...

Quote
This comment from thehatsrule is what I cant get a grip on.
He speaks truth. Any applications in a Linux distribution, beyond the GNU (or GNU-like) core utilities, are essentially extras. Most large distros include many of the common programs you might consider "standard", but they are included mainly because there's plenty of space on a 700mb disk to fit tons of small apps that most desktop users don't even use. DSL does not have that luxury due to a very tight size limit.

Quote
I should go and find mpg123 as well I guess
There's really no need. mpg321, which is already in DSL, is nearly identical to mpg123, with the difference being that mpg321 is 100% free software and adds a couple of features.

Quote
That [UCI] might be a bit different but the tar.gz can not be a system specific thing. Its just a binary that runs on DSL regardless of system one would think
It can easily be a system-specific thing. The fact that it's a gzipped tarball merely makes it easy to extract the contents on any system. The binary within might not work on all systems, though. It depends on whether the c library with which it was built is compatible with the target system, and on whether the target system has all the necessary support files for the application. MyDSL packages are targeted toward DSL only, and include only the files necessary to run that program on DSL. Most of the time the apps will also run on most larger distros, which often also have libs that are at least as recent as those in DSL, but it does not mean that one should assume it's a universal binary.

Quote
The lame mp3 encoder I mean.. Maybee your not allowed to redistribute that under GPL or whatever licence scheme
libmp3lame is distributed in the lame application, which is licensed under GPL. Whatever legal issues there may once have been with mp3 encoding is past history. The last of the mp3 patents, as far as I know, have recently expired.

I still do not believe the "play" executable is available in any DSL release, regardless of how it may appear to you. There must be some other explanation.

Quote (mikshaw @ Oct. 03 2007,15:12)
Quote
I should go and find mpg123 as well I guess
There's really no need. mpg321, which is already in DSL, is nearly identical to mpg123, with the difference being that mpg321 is 100% free software and adds a couple of features.

ah my bad... I always forget which one is which

The man page says it can write to .wav's but doesn't say about playing them...

Next Page...
original here.