Home Blog Tags HOWTO
Tags >> HOWTO
Feb 06
2010

HOWTO convert and shrink your DVD into a web-playable format

Posted by: Marko Tomic

Tagged in: HOWTO , HandBrake , DVD , command

HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder, available for MacOS X, Linux and Windows.

It is my tool of choice when it comes to backing up my DVDs. It allows me to shrink DVDs to a relatively small size and convert them to a web-playable format, such as mp4.

I use the Command Line version of HandBrake simply because it is more efficient and I love typing geeky commands in my terminal window.  So here it is, the simplest command to convert your DVD into an .mp4 file is this:

HandBrakeCLI -i VIDEO_TS -o myVideo.mp4 -e x264 -b2000 -B 192

That will encode a source video located at the path VIDEO_TS to an output file called myVideo.mp4. It will use x264 with a bitrate of 2000 to encode the video, and encode the audio as 128kb/s AAC.

Nov 12
2009

Generate Self-Signed SSL Certificate - HOWTO

Posted by: Marko Tomic

Tagged in: SSL , HOWTO

This is another one for my reference. I've had to generate a self-signed SSL certificate quite a few times and I'm sure I'll do it again in future. First of all, self-signed SSL certificates provide the same level of security as any other commercial ones, such as Verisign certs. The 2 main differences are:

1. Self-signed certificates are free
2. Self-signed certificates are not recognised by web browsers by default. They need to be installed in browsers manually in order to be accepted by them. This is a 10 second job.

So, if I am setting up a staging web server or a subversion server on a secure domain, a self-signed SSL would be an obvious choice for me. There are a few ways you can generate your SSL certificates, but this is how I like to do it because it works for me on Mac and Linux.

Step 1: cd into my working directory

cd ~/Desktop/KeyGen

Step 2: Generate my key - a Triple-DES encrypted, 1024 bit RSA key

openssl genrsa -des3 -out server.key 1024


You'll be asked to enter in a passphrase.

Step 3: Create a CSR (Certificate Signing Request)

openssl req -new -key server.key -out server.csr

You'll be asked to enter in some basic information about your organisation such as, country, name, state, email etc... Here's a sample output:

Country Name (2 letter code) [AU]: (enter your country code here)
State or Province Name (full name) [Some-State]: (Enter your state here)
Locality Name (eg, city) []: (enter your city here) Organization Name (eg, company) [Internet Widgits Pty Ltd]: (enter something here) Organizational Unit Name (eg, section) []: (enter something here)
Common Name (eg, YOUR name) []: (this is the important one)
Email Address []: (your e-mail address)

Step 4: Remove passphrase from my key. Note: I want to remove it because Apache web server will ask me to enter it in every time I restart the server. If you want to keep the passphrase, skip this step.

cp server.key server.key.org
openssl rsa -in server.key.org -out server.key

Step 5: Create a self-signed certificate using the key I just created. Note: "days -365" will make the certificate valid for 1 year. You can easily make it valid for 10 years if you like. I'm sure you can figure out how to do that!

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

That's it. Now all you need to do is make it work with Apache by enabling mod_ssl and adding the following in your virtual host:

SSLEngine On
SSLCertificateFile 'full_path'/server.crt
SSLCertificateKeyFile 'full_path'/server.key

Stalk Me

Facebook: marko.tomic Twitter: mtomic Twitter: SydneyScuba YouTube: migonyourtail Linked In: tomicmarko MySpace: markomedia Google Wave: marko2009 blip.fm: markotomic

Site Login

Tag Cloud

Browser Poll

What browser do you use?