Saturday, 27 April 2013

Terminal View of System Information


Terminal


sudo dmidecode -t baseboard

Tells motherboard information

sudo dmidecode -t memory

Tells memory information

free -m

Tells how much memory

Wednesday, 24 April 2013

youtube-dl

youtube-dl can download from media sites. Install from software centre

Terminal

To update;
youtube-dl -U

Use;
youtube-dl "http://www.**************.com/watch?v=foobar"

* Copy the website address and change foobar to name you want to call file. File will be saved a "flv" Flash Video format file.

use -f switch to check formats available to download.

youtube-dl "http://www.**************.com/watch?v=foobar" - f

shows formats

example (also downloading subtitles as mp4 to current folder with original name)

youtube-dl "http://www.**************.com/watch?v=BlAhBlahBlah" -f 18 --embed-subs

For help;

 youtube-dl --help


GYD is a frontend for youtube-dl

Strip languages from large (extremely long or with multiple language options) subtitle files using “Handbrake”


I have come across subtitle files that would not open in Gnome Subtitles or any other editor due to their size (multiple languages). I just wanted the one subtitle language burned into file not an option to choose all the languages available in the original.

As I said all the Linux subtitle editors I tried just could not cope with such large files with the scripts for many languages in them.

So I needed to find a way of removing the superfluous language scripts first before hard coding the single language subtitles on top of the video feed to stream from Plex media Server to my TV.

This is also a quick dirty way to "burn in" idx, SUB files for use on media players that do not support these forms of subtitles. My Plex Player for example.

Open MKVMerge

First we will add our SUB, IDX or stb to the film in one Matroska container / Wrapper.

Click "add" and add the video file to the place entitled input box then "add" again to place the subtitle file in there too.



The box below entitled  Tracks, chapters and tags now shows all the elements you have added. If you have multiple text / sub files in different languages and you only need your language just deselect the boxes with other languages named next to them. This will leave you with a Video stream, an audio stream and a text file in your language.

Hit  "start muxing" at the bottom.

Wait a few moments until it has finished. Have a look where it saved the file  by checking the "Output filename" box for the path and name (you could have changed this but you didn't).

Remember this path.

You now have new container combining all files needed.



Open Handbrake. (handbrake is not officially supported as of writing and is not in the repositories, you will need to add it's source and then install)

Open subtitles tab.

It should say TRACK and underneath {language} (VOBSUB)

4. Select “burned in” button. Re-encode file by pressing start.

5. Done.

Convert SUB files to SRT

Use sub2srt

NOTE; Does only "subrip" and "microDVD". It does not convert "vobsub" or DVD-Subtitles.

This is a perl-script. Place it in a directory in your $PATH

eg.

/usr/local/bin 
or
/usr/bin

sub2srt --help for switches and use of.

Download entire websites easily.

Use GNU Wget

Terminal

wget http://(website-name).org/

* exchange brackets and "website-name" for name of site downloading.

Wget can download all images and other data nested within the site and linked from top page. Use;

wget -r http://(website-name).org/

If a site refuses to allow you to do this and try to detect if you are using a browser or not. There is a -U option to identify Wget as one. Use;

wget  -r -p -U Mozilla http://www.stupidsite.com/restricedplace.html

To prevent being blacklisted for downloading the site use;

--wait=20     (example is 20 seconds wait between getting each retrieval)

--limit-rate=20K      (Limit the rate at which you download set in bits so add K to make it realise you want KB/s

EG.

wget --wait=20 --limit-rate=20K -r -p -U Mozilla http://www.stupidsite.com/restricedplace.html

To make sure you do not download contents of folders nested below that which you are downloading;

--no-parent

Install .rpm Packages in Linux Mint

Linux Mint Supports only deb package installation, If you have some software in rpm package you can install it in Linux Mint.

To install open Terminal (Press Ctrl+Alt+T) and copy the following command in the Terminal:
sudo apt-get install alien dpkg-dev debhelper build-essential

Then use this command to convert the RPM package to a DEB package;
sudo alien (packagename).rpm

* Remove quotes and replace here with package name.

To install;
sudo dpkg -i (packagename).deb




How to close a program that has frozen.

Options:

1. Close all programs related to that program (including multiple windows of the program)

Use the KillAll feature to kill a program.
Press Alt+F2 and type in gnome-terminal to open a terminal session.
Inside of the terminal type in sudo killall <application-name>.


2. Close a program with your mouse cursor.

Use the xkill feature to kill a program you click on

Press Alt+F2 and type in gnome-terminal to open a terminal session.
Inside of the terminal type in  xkill; then click on any window to kill it.

Convert Bin / Cue to ISO

How to convert Bin / Cue files to ISO

Use command line programme bchunk (BinChunker)

Terminal

sudo aptitude install bchunk


BinChunker syntax

bchunk [-v] [-p] [-r] [-w] [-s] {image.bin} {image.cue} {basename}

Available options:

-v – Makes binchunker print info messages
-w – Makes binchunker write audio tracks in WAV format.
-s – Makes binchunker swap byte order in the samples of audio tracks.
-p – Makes binchunker go into PSX mode and truncate MODE2/2352 tracks to 2336 bytes at offset 0 instead of normal 2048 bytes at offset 24.
-r – Makes binchunker output MODE2/2352 tracks in raw format, from offset 0 for 2352 bytes. Used for MPEG/VCD.
Example:
bchunk IMAGE.bin IMAGE.cue IMAGE.iso