Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 23 Jul 2014, 12:17
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Shrink the Puppy iso using Pmusic....
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
zigbert


Joined: 29 Mar 2006
Posts: 5647
Location: Valåmoen, Norway

PostPosted: Fri 27 May 2011, 17:34    Post subject:  Shrink the Puppy iso using Pmusic....
Subject description: Puppy on a Stardust diet
 

The last 8 months Pmusic development has been targeting THIS cutting edge.

I have been looking at how Puppy is putting together audio-tools, and found that there is a lot of space to save - if Pmusic could do some more. Now it can, but maybe still in beta stage. Recent versions of Pmusic has been focused on podcast/tagging/CD-audio. Version 1.8.0 introduce a decent CD-audio player and ripper, without using new dependencies. Other Rippers/tools uses dependencies we now can get rid of. - and that is a lot.


Let's go. I am talking like this is the truth, but I might be wrong in my assumptions. Please correct me. All sizes is compressed and found in the Wary repo.
~ Pmusic now rip audio-CD, so we can skip Asunder (45kb) and Pcdripper (13kb). Pcdripper is not found in Wary, but still in Lupu and Spup.
~ Pcdripper and Asunder uses cdparanoia (69kb) for saving cd-tracks. Pmusic uses only cdda2wav for this. I can not find other programs using cdparanoia.
~ Asunder is the only app using libcddb (30kb). - Not completely true, since libcdio uses it optional. We'll get back to this later.
~ Asunder also uses vorbistools (47kb). Be aware that this is something different than libvorbis which ffmpeg and mplayer use.
~ Pmetatagger (12kb) also uses vorbistools, but I don't think we will miss pmetatagger, since Pmusic now tags much better (my very personal opinion). What Pmetatagger does (in contrast to Pmusic) is tagging flac files.
~ The last app using vorbistools is Precord, but I am sure there is a better solution in recoding ogg with 'arecord | ffmpeg -i pipe:0 -f au -o "/path/file.ogg"'. This would get support of many more formats.
~ Next pack is Flac (220kb), and it surprised me that Pmusic would play flac files without this. I was thinking that ffmpeg used it...... But obviously not. The Flac package is used by Asunder, vorbistools, pmetatagger and sdl_mixer. I will discuss sdl later.
~ vorbistools take advantage of libao (45kb). I can not see that others use this lib.
~ pCD (5kb) was once developed because I couldn't get a low-resource CD-playback inside the Pmusic structure. Now this is fixed, and the Pmusic 1.8.0 has a unique .desktop file for 'CD player/ripper'. This goes straight to a CD-gui. - A nice way to use the dynamic gui-system in Pmusic.
~ PPG (19kb) (puppy podcast grabber) is our podcast manager, but it lacks features as scheduling. - Auto-download new podcasts at a given time. You'll find this feature in Pmusic.
~ Madplay (30kb) is a commanline player for mpeg audio streams. The normalize-mp3 script uses madplay, but I can't find any apps using nomalize-mp3. In fact, it is not brilliant. All it does is decoding mp3/ogg - then normalize (only supports wav) - and encoding back. This require enormous amounts of free disc space, since ALL files need to be hold in raw format during normalize.
~ The Normalize package is used by 'audiofile' and Pburn, so it is valuable to keep, but the nomalize-mp3 script could be removed together with madplay. Madplay could be linked to 'pmusic -B' which will play mpeg audio as well. pmusic -B is a very lightweight solution for the commandline.
~ Wavplay (14kb) does mostly the same as aplay. aplay is a part of the alsa package and it handles piping from stdin which wavplay doesn't. There is one script using wavplay: /usr/sbin/video-wizard - line 150.
~ Puppy 5.2.5 got libmusicbrainz (117kb). Pmusic calls musicbrainz.org directly. musicbrainz.org offers a webxml format that is a nice resource for extended music information.


Ok, this was straight foward. What we loose is support of flac metatags and Precord needs to point ogg-recording to an alternative (maybe as told above). What we get is 538kb (compressed) less weight in the Wary iso. Lupu would save even more 130kb


now, let's look deeper.
~ libcdio (147kb) is used by mplayer and vcdimager (and cdparanoia). Mplayer uses this for CD-audio playback. If we let Pmusic handle this, mplayer can be compiled without libcdio.
~ Vcdimager (143kb) is the backend to burn (S)VCD - CD video dics. Because of usb-pendrives, burning has become more rare, and burning VCD even more rare. I suggest that vcdimager is removed from the iso, and I add a message in Pburn: 'To burn VCD, you need vcdimager. Please install from the package manager.'
~ When we are talking about Pburn, I will mention that Pburn uses very few dependencies. The cdrkit package contains much more than Pburn needs. Pburn does NOT use: cdda2mp3, cdda2ogg, dirsplit, pitchplay, readcd, readmult, readom. All together approximately 85kb.
~ As told above, the sdl_mixer package has 'Flac' as a dependency. I have suggested to remove Flac, so sdl_mixer (56kb) should go too, or be recomiled without flac support. The loss is minor. It is only the sdl-games that uses this. afternoonstalker (92kb), burgerspace (130kb), cosmosmash (70kb), batrachians (102kb) and maze-rays (15kb)
~ Now when the games had to go, we can remove their other unique dependencies. sdl_image (18kb), sdl_ttf (11kb), flatzebra (16kb). Barry has proved before that fun and addictive games can be added without including new dependencies.


That is another 902kb, and we have not mentioned the graphics like wallpapers and icons. I don't intend to do this here, since it is obvious (and a matter of taste). But as a reminder, it is good to know that written code is compressed to a third of its size in the iso. Png and jpg images are already compressed, so shrinking graphics will affect the iso size much more than codelines.


At last I have 2 notes.
~ Ptooltips (1kb) are still in Wary. Only 1 kb, but there is no use of it after potong told us about the tooltip-text attribute in gtkdialog.
~ The sdl (158kb) library is rather new in the Puppy iso (Puppy 4 did not include this lib). So, why is it here?. I guess the the main reason is because mplayer uses it for visualization. I wonder if this could be compiled without? (together with earlier mentioned libcdio). Else I find that libtheora uses it - WHAT - I video codec using sdl? - for what reason?. ffplay (part of ffmpeg) uses sdl for visualization. Earlier, ffplay was skipped, and I don't see any new use of ffplay. This might change in the future, if we get the ability to switch from from a bloated mediaplayer like mplayer/xine/vlc to a dedicated audio-player, DVD-video-player and ffplay for video-streams. At this stage it lacks a lot (web-streaming, embedded view...).


All in all, these changes (if doable) will shrink the Puppy iso by about 1,5 Mb.


Thanks for listening
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Fri 27 May 2011, 18:47    Post subject:  

Thanks Ziggy, good that you are at it.
_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 2231
Location: New Zealand

PostPosted: Fri 19 Aug 2011, 21:41    Post subject: Re: Shrink the Puppy iso using Pmusic....
Subject description: Puppy on a Stardust diet
 

zigbert wrote:

I have been looking at how Puppy is putting together audio-tools, and found that there is a lot of space to save
...
~ Asunder also uses vorbistools (47kb). Be aware that this is something different than libvorbis which ffmpeg and mplayer use.
...
~ The last app using vorbistools is Precord, but I am sure there is a better solution in recoding ogg with 'arecord | ffmpeg -i pipe:0 -f au -o "/path/file.ogg"'. This would get support of many more formats.
...
Thanks for listening
Sigmund


As ldd command indicates, oggenc relies on libvorbis and libogg as does the Wary 5xx compile of ffmpeg.

Your suggested encode line:

Code:
record | ffmpeg -i pipe:0 -f au -o "/path/file.ogg"


isn't correct I think. -f au tells it to record the .ogg file as Sun audio as far as my tests tell me and there shouldn't be a "-o" above.

However, if the Puppy install could do away with oggenc altogether, and just use ffmpeg, that would indeed save a few tens of kB so I tried, as a working example:

Code:
arecord -f cd | ffmpeg -i pipe:0 -acodec libvorbis -aq 60 "path/file.ogg"


But on my PIII 500MHz Puppy Wary 500 system the recording didn't start immediately. There was an unacceptable-to-me start recording delay of around eight seconds...

I compared the above ffmpeg result with (just as a quick example):

Code:


arecord -f cd | oggenc - -M 160 -o  "/path/file.ogg"

or

arecord -f cd | oggenc - -q 5 -o  "/path/file.ogg"


Using oggenc, there was negligible start up delay.

Perhaps there is a better way of using ffmpeg or perhaps it's just the overhead of using ffmpeg rather than the specialist oggenc that slows encoding down (maybe it is something to do with the use of pipe for stdin with ffmpeg - I don't know).

If, however, I find a suitable ffmpeg ogg encoding line (or someone else comes up with one) which works out as good as using oggenc (no start up delay) then of course I'll happily modify the relevant part of Precord accordingly. But until then I have no option but to stick with oggenc.

EDIT: I "could" use ffmpeg rather than oggenc even with the current limitation its exhibiting. It doesn't actually lose the eight seconds, just has a delay. The workaround would be an eight or ten seconds delay before allowing capture to end, but that is at the very least messy.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send private message Visit poster's website 
playdayz


Joined: 25 Apr 2008
Posts: 3788

PostPosted: Sun 02 Oct 2011, 14:12    Post subject:  

Quote:
I have suggested to remove Flac,

Hey zigbert, You are not suggesting to remove flac encoding and decoding capability are you? Most of my music collection is flac encoded. It has traditionally been the choice of audiophiles for non-lossy compression.
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5647
Location: Valåmoen, Norway

PostPosted: Sun 02 Oct 2011, 14:25    Post subject:  

playdayz wrote:
You are not suggesting to remove flac encoding and decoding capability are you?
You're right, I am not suggesting that. But as I stated above in the first post.
Quote:
Next pack is Flac (220kb), and it surprised me that Pmusic would play flac files without this. I was thinking that ffmpeg used it..... But obviously not.
I am not the one to tell what is what. I am just sharing my thoughts and targets.


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
greengeek

Joined: 20 Jul 2010
Posts: 2399
Location: New Zealand

PostPosted: Sat 30 Jun 2012, 04:51    Post subject:  

Zigbert - you mention "normalising" the audio. I cannot find a normalise function in the various Puppy ripping programs, and many of my mp3s are so loud that they are distorted at times. What method do you recommend for normalising during ripping please? (thanks in advance)
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1019
Location: the australian mallee

PostPosted: Thu 23 Aug 2012, 22:24    Post subject:  

Ziggy, if you really want to shrink the overall system, Find something smaller to replace Mplayer and all it's interlinking dependancies. I tried it in one of my Mage2 alphas and came up with nearly a wopping 10meg size reduction in the sfs, it's three main packages come to a total of 7.5meg.
_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0 is under development.
http://www.murga-linux.com/puppy/viewtopic.php?t=94575
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

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
[ Time: 0.0909s ][ Queries: 12 (0.0055s) ][ GZIP on ]