Shrink the Puppy iso using Pmusic....
Posted: Fri 27 May 2011, 21:34
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
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