The time now is Sun 19 May 2013, 22:15
All times are UTC - 4 |
|
Page 3 of 3 [36 Posts] |
Goto page: Previous 1, 2, 3 |
| Author |
Message |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Tue 17 Apr 2012, 13:50 Post subject:
|
|
| goingnuts wrote: |
While surfing I found this page with some nice instructions for streaming mp3 and a poor mans skype...
Might be that the minimp3 could also be hacked to play URL playlists? The mpg123 can play internet radio by issuing the following command:
| Code: | | mpg123 -@ http://players.creacast.com/creacast/classique/playlist.pls |
| I looked into doing poor mans voip this way but hit a brick wall when looking for a way to get the non.local IP address ... needed some external server like dyndns but I never solved it ... only tested locally with local IPs using ffmpeg... still I like the Unix philosophy of tools doing 1thing well and using them together liberally rather than reinvent existing code every time you need to combine 2+ functions. ... for instance you can use netcat, SSH, telnet, dropbear... instead of bolting their capabilities into a program so it can work over the net.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
Ibidem
Joined: 25 May 2010 Posts: 243
|
Posted: Mon 23 Apr 2012, 00:10 Post subject:
|
|
| goingnuts wrote: |
The mpg123 seems to compile easy with diet (a small diff and build script attached). It gives a 212K static bin. Wonder at what size musl will do that?
Tried to use the latest mpg123 ("mpg123-1.13.8") - it compiled but did have issues playing mp3. Then went for mpg123-1.13.4 which also compiles and on top of that actually plays mp3.
Also did a quick test with mpg321 but that seems harder to patch for diet libc.
While surfing I found this page with some nice instructions for streaming mp3 and a poor mans skype...
Might be that the minimp3 could also be hacked to play URL playlists? The mpg123 can play internet radio by issuing the following command:
| Code: | | mpg123 -@ http://players.creacast.com/creacast/classique/playlist.pls |
|
I've done the mpg123 internet radio thing a bit. It's nice and simple.
But I'd advise not trying to add netwirking--mpg123 is the undisputed King of the Hill there, you'll add a good bit of bloat, and you can probably do it via curl <url>|minimp3 - or such anyhow... (I assume that minimp3 supports stdin as a file?)
And FWIW-pls is not an mp3, so you'd have to implement a pls parser...best done in shell script.
Don't bother with mpg321-it was relevant several years ago, but IIRC current mpg123 has improved decoding on sub-pentium machines (which was the only reason to use mpg321).
|
|
Back to top
|
|
 |
Ibidem
Joined: 25 May 2010 Posts: 243
|
Posted: Thu 03 May 2012, 15:00 Post subject:
|
|
| goingnuts wrote: | Ibidem: Thats a small difference in size - I think I will start looking more close on the musl!
The mpg123 seems to compile easy with diet (a small diff and build script attached). It gives a 212K static bin. Wonder at what size musl will do that?
Tried to use the latest mpg123 ("mpg123-1.13.8") - it compiled but did have issues playing mp3. Then went for mpg123-1.13.4 which also compiles and on top of that actually plays mp3.
|
mpg123, 1.13.4:
274612 bytes stripped, statically linked, stripped, compiled with -Os, using OSS audio only.
No other tricks involved except getting the Linux headers included, and building with -D_GNU_SOURCE.
This is upstream source, unpatched. Plays streaming mp3 fine.
In the FWIW department:
All these numbers are with a stock musl, including full UTF8 and everything else...Rich Felker says
| Quote: | I would believe that it's possible to get smaller binaries with a
uClibc that's had lots of features turned off when the library was
built, meaning that those features are completely unavailable to
applications. On the other hand, I suspect musl will easily beat
uClibc in static linking size when uClibc is full-featured (UTF-8,
pthread, full malloc, stdio, hex floats in printf, ...) because musl
takes a lot more care not to have unnecessary cross-dependency between .o files in the static lib. Still, some things are impossible to
optimize out with the linker - for example, printf always pulls in a
minimum amount of UTF-8 conversion code for %ls and %c. |
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Thu 03 May 2012, 16:10 Post subject:
|
|
Ibidem: With my uclibc (uClibc-0.9.27) I can get it down to 304K static/striped/oss only.
Tried to use musl-0.8.10 (compiled by "make" and installed by "new2dir make install")
Compiling mpg123 with musl was not 100 % successful:
Had to comment out #undef HAVE_MMAP in mpg123´s config.h.in to get mpg123 compiled and ended up with approx. 346K static/stripped bin. But it would not play...D...!
I will keep practice the musl though...
Any chance you could provide a musl-pet/sfs? Or maybe some examples of howto build simple things?
|
|
Back to top
|
|
 |
Ibidem
Joined: 25 May 2010 Posts: 243
|
Posted: Sat 05 May 2012, 20:57 Post subject:
|
|
1. Compile and install musl, preferably from git head (a release is a tag, not a branch, so all fixes are in git).
Copy config.mak from dist/ and adjust as you want.
PREFIX defaults to /usr/local/musl, and should not be set to /, /usr, or /usr/local (or you will kill your OS)
2. Get the linux kernel headers (linux-libc-dev, not the ones for building modules) and put them somewhere (I use /opt/musl/lin)
There should be a linux/ directory in there.
3. export CC=musl-gcc; export CFLAGS="-Os -static -fno-stack-protector -I/opt/musl/lin -D_GNU_SOURCE"
Don't forget the -D_GNU_SOURCE - most stuff won't build without that, though some will. -I/... should point to the linux headers.
(Note-the linux headers are needed for OSS and a lot besides)
4. Now run configure and make.
That's all that I know is needed.
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Mon 07 May 2012, 14:56 Post subject:
|
|
Ibidem: Thanks a lot - I will try that
|
|
Back to top
|
|
 |
|
|
Page 3 of 3 [36 Posts] |
Goto page: Previous 1, 2, 3 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|