- Install the lm-sensors software package:
# apt-get install lm-sensors - Run the interactive hardware monitoring chip detection script:
Usually, it asks a lot of questions, and you can automatically answer 'yes' on them (but be careful: on some systems a full scan can cause some problems, e. g., a false chip detection or even a system hang):# sensors-detect
# yes | sensors-detect - After choosing to add the needed module names automatically to the
/etc/modulesconfig file, it's good to check it for duplicate entries (and possibly other garbage). - Reboot (or try to load the newly added kernel modules manually).
- Finally, just execute the following command to print the sensors information:
$ sensors
Software & hardware info, reviews, notes, tutorials, FAQs and HOWTOs...
Having fun is mandatory!
2013-05-09
HOWTO: get hardware sensors info (temperature, fan speed, voltage etc.) in Linux
(Tested in Debian Wheezy).
2013-04-14
HOWTO: radical lossless JPEG image optimization (in Linux)
(The sample commands are tested under Debian Wheezy).
First of all, don't forget to install the JPEG manipulating programs package:
And it's the optimization itself:
Notes:
First of all, don't forget to install the JPEG manipulating programs package:
# apt-get install libjpeg-progs
$ jpegtran -copy none -progressive input.jpg > output.jpg
- yes, it produces a progressive JPEG output image; if you don't like it (or it's unsupported in the target environment), use
-optimizeswitch instead of-progressive(but the output image size will be bigger); - there's also a non-recommended option (an
-arithmeticswitch) to enable arithmetic coding; it allows a more efficient compression than traditional Huffman coding does, but (unfortunately) it's not widely supported in JPEG decoders due to some historical patent restrictions; -copy noneoption removes all extra markers (comments, tags, thumbnails and other metadata) from the output; if you need to save them, use-copy comments(or even-copy all) option instead;- you can add a
-grayscaleoption, and it will omit color data from the output image without re-encoding (very useful for grayscale / black & white / monochrome images); - more reading:
jpegtran -helpandman jpegtran- JPEG - Wikipedia
- libjpeg - Wikipedia
2013-04-11
HOWTO: convert audio CD image (FLAC + CUE) to MP3 tracks in Linux
Imagine you've archived your favourite audio CD into FLAC/CUE pair format (or maybe you've purchased some album in that digital downloadable lossless audio format, who knows), and now you want to convert it to the standard MP3 files for playing that album in your good old digital music player.
Let the files be processed in Debian GNU/Linux environment (sample commands tested in Debian 7.0 "Wheezy", and should also work for all Debian-based distros, e. g. Ubuntu, Mint etc.; Bash shell is assumed to be installed & used by default).
First of all, you should install all the necessary tools: FLAC (for decoding FLAC to WAV), LAME (to convert WAV to MP3), cuetools (to parse the CUE sheet) and shntool (to cut the big WAV file into smaller tracks according to the CUE sheet breakpoints).
Then the conversion process itself begins.
The output files are by default MP3 VBR V0, 44.1 KHz, Joint Stereo; it should be decent for most situations.
After conversion, you can process
Enjoy.
Let the files be processed in Debian GNU/Linux environment (sample commands tested in Debian 7.0 "Wheezy", and should also work for all Debian-based distros, e. g. Ubuntu, Mint etc.; Bash shell is assumed to be installed & used by default).
First of all, you should install all the necessary tools: FLAC (for decoding FLAC to WAV), LAME (to convert WAV to MP3), cuetools (to parse the CUE sheet) and shntool (to cut the big WAV file into smaller tracks according to the CUE sheet breakpoints).
# apt-get install flac lame cuetools shntool
$ flac -d MyMusic.flac
$ cuebreakpoints MyMusic.cue | shnsplit MyMusic.wav
$ rm MyMusic.wav
$ for file in split-track*.wav; do lame -V0 $file; done
$ rm split-track*.wav
After conversion, you can process
split-track*.mp3 files with your favourite media tagger application.Enjoy.
Labels:
audio,
Debian,
Linux,
multimedia,
music
2013-04-07
Default Sudo lecture
Here is a standard Sudo lecture, which can be seen at the user's first
sudo run time (the following is an unmodified quote extracted from the sudo-$VERSION/plugins/sudoers/check.c source file found in the original sudo 1.8.6p7 source tarball):References:#define DEFAULT_LECTURE "\n" \ "We trust you have received the usual lecture from the local System\n" \ "Administrator. It usually boils down to these three things:\n\n" \ " #1) Respect the privacy of others.\n" \ " #2) Think before you type.\n" \ " #3) With great power comes great responsibility.\n\n"
2013-03-10
HOWTO: losslessly convert FLV video to MP4 in Linux (Debian)
Well, let's imagine we have a Flash Video (FLV/F4V) container file (possibly "unseekable" or with other minor problems) containing MPEG-4 AVC video & AAC (or MP3) audio.
We'll convert ("remux") it to MP4 without any transcoding (re-encoding), so it'll be very fast, and using only the free tools (available in the official Debian GNU/Linux repositories).
Note: unfortunately, old FLV videos containing VP6 and Sorenson video formats can't be remuxed into MP4 format; if you don't want re-encoding, you can try to remux them into MKV (Matroska); if you just want to fix the seek problems, you can just try FLV-to-FLV remuxing.
Source software packages availability for Debian releases:
And yes, it should work for Ubuntu too; any current FFmpeg version should also work in other GNU/Linux or *BSD distros, MS Windows, Apple Mac OS X etc.
References:
We'll convert ("remux") it to MP4 without any transcoding (re-encoding), so it'll be very fast, and using only the free tools (available in the official Debian GNU/Linux repositories).
Note: unfortunately, old FLV videos containing VP6 and Sorenson video formats can't be remuxed into MP4 format; if you don't want re-encoding, you can try to remux them into MKV (Matroska); if you just want to fix the seek problems, you can just try FLV-to-FLV remuxing.
- Method #1 (recommended): use
ffmpeg(it's the main utility from the FFmpeg project).
Install the "ffmpeg" package:
Convert a FLV file to MP4, preserving audio & video:# apt-get install ffmpeg
And even optimizing it for faster loading:$ ffmpeg -i input.flv -codec copy output.mp4
To extract audio only:$ ffmpeg -i input.flv -codec copy -movflags faststart output_optim.mp4
To extract video only:$ ffmpeg -i input.flv -codec copy -vn output_a.mp4
Note: you can also use M4A (audio) / M4V (video) file extensions for output, if you like those Apple formats.$ ffmpeg -i input.flv -codec copy -an output_v.mp4 - Method #2 (alternative): using
avconv(it's a part of Libav project, a fork of FFmpeg).
Install the "libav-tools" package:
Convert a FLV file to MP4, preserving audio & video:# apt-get install libav-tools
To extract audio only:$ avconv -i input.flv -codec copy output.mp4
To extract video only:$ avconv -i input.flv -codec copy -vn output_a.mp4
$ avconv -i input.flv -codec copy -an output_v.mp4 - Method #3 (a somewhat ugly one): using MEncoder (a part of the MPlayer project).
Install MEncoder:
Convert a FLV file to MP4:# apt-get install mencoder
Note: according to the warning from MEncoder itself, output file can be corrupt:$ mencoder input.flv -ovc copy -oac copy -of lavf -o output.mp4So probably it suggests that you should better try the MEncoder's favorite AVI format:** MUXER_LAVF ***************************************************************** REMEMBER: MEncoder's libavformat muxing is presently broken and can generate INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer will play these INCORRECT files as if nothing were wrong! *******************************************************************************
(But that's not what we want here, right?)$ mencoder input.flv -ovc copy -oac copy -o output.avi
Source software packages availability for Debian releases:
- ffmpeg: up to Debian 6 "Squeeze", and then again from 9 "Stretch" (also in 8 "Jessie" backports);
- libav: starting from 7 "Wheezy" (also in 6 "Squeeze" backports), up to 8 "Jessie";
- mplayer: up to 7 "Wheezy", and then from 9 "Stretch".
And yes, it should work for Ubuntu too; any current FFmpeg version should also work in other GNU/Linux or *BSD distros, MS Windows, Apple Mac OS X etc.
References:
- ffmpeg Documentation
- Libav documentation : avconv
- 6.1. Selecting codecs and container formats - Chapter 6. Basic usage of MEncoder (MPlayer - The Movie Player documentation)
- Wikipedia:
---
Last updated: 2017-12-28
Last updated: 2017-12-28
Subscribe to:
Posts (Atom)