I haven't posted anything since October 23rd and I kind of feel uncomfortable with myself, because it's the first time I'm not typical with my obligations; well, what do you know, people change indeed.
Anyhow, I will continue with the series and hopefully in the near future I will be more reliable with time scheduling.
How to convert a flash video file to an MP3
For converting a flash video you can do so with various tools under GNU / Linux; one of them is with FFmpeg or libav tools. The latter is a fork of the former for political reasons that are way beyond this blog's concept or content.
In our case I will use libav tools as it comes with GNU / Linux testing (currently jessie) and it's available in place of ffmpeg.
Here's the command:
That was the simplest example to show. In the past I faced a serious issue with sound and I had to explicitly use an MP3 codec with my command:
How to extract an audio file from a video
In my humble opinion, extracting the original (raw) audio file from a video is the best thing you can do if you are passionate about quality. In order to do so, you need to have MediaInfo installed.
You can use it from terminal to get all the information you need or you can use its GUI which is convenient for inexperienced users. Doing so, it helps immensely knowing the audio codec, thus making it easier for you to give the appropriate file extension.
Here is the command to extract your raw audio file from a video:
How to convert MusePack (MPC) music files to MP3 files
A few years ago I remember I found this new "cool" audio codec and I wanted to rip a CD just for the sake of curiosity; I wasn't disappointed. After the conversion, the original CD disappeared from my room, and frankly I can't remember where I put it LOL! So, now I had to convert it to MP3 this time to sync it with my MP3 player and enjoy my music. The quality was exactly the same, unbelievably awesome results!
Below is the command I run to convert all my MPC files all at once:
To explain it a bit, "for every .mpc file you find, recode it as MP3 file of quality 4, keep the original name but ignore suffix file extension; we are adding our own, that of .mp3".
How to delete multiple Debian packages
I remember once, I faced a problem with PHP5 packages. Something broke in the background while upgrading my packages, somewhere that I could not detect to fix it, that corrupted all PHP5 config files that I had to completely purge the problematic set and reinstall it.
The command goes as follows:
How to remove orphaned packages
It's good to keep your system clean from orphaned packages that stuck on your system as remainders of already removed packages. In order to do so, you need to have deborphan package installed. Install it and do the following to clean up your system:
Please note that you have to re-run deborphan a few more times to make sure all packages have been purged; some packages do not get purged recursively for some reason.
How to search for music files and play them on the fly with mplayer
One afternoon I was at home experimenting with shell scripting and it hit me; is there a way to search for a song at a location of my choice and as soon as I find the desired song to send to mplayer and play it on the fly? I started laughing with myself for "imagining silly things"; I guess that silly thought was not *that silly* after all. I have had figured out a way to make it happen!
Here's the "funny" command I'm talking about:
If you want to sort the songs first and then play them, do the following:
OK, logically now you are asking yourself; what about searching for various forms of a file extension of a song? I'm sure you have songs that look something like .Mp3, .MP3, and so forth. Well, if you can search for different forms, why not for other file types as well? Yes, you can!
How to determine multiple file types at once
A main characteristic of mine is my congenital curiosity about everything. I seek for answers vigorously, how things work, not *WHY* they work the way they do. Imagine now my anxiety to find answers to questions like "how the experts are implementing their programs, with what tools (language that is)" and so forth.
That's the case of file command. Unfortunately, for some reason it does not work properly, as it guesses the file type and that is something I wasn't willing to accept as an excuse. Fortunately for me, I have found mimetype command; just install libfile-mimeinfo-perl package and will make your life easier! You can thank me later.
Here is the command you could run to find file types of important programs located in /usr/bin/ and in /usr/sbin/:
You can grep specific file types you are looking for and even sort them, like we did with other commands above.
That's it for now. I hope you enjoyed this new series. Any new set of commands I may find interesting, I will surely going to share it with you, have no worries about it. Until that time, cheers.