8-millimeter video tapes seem to slowly fade to oblivion. In order to save old family videos recorded in this format, I’ve decided to digitize them.
After a quick try with
vlc, I’ve understood that it wasn’t the right tool for the task. It crashed with a cryptic error message every time I’ve tried to encode H.264 video, and it seemed that it best suited for real time encoding. Doing real time encoding, is sub-optimal as I can’t reach high quality encoding is a reasonable bit rate.
So I looked for another tool and recalled ffmpeg. While ffmpeg provided everything I looked: high quality video encoding using H.264 and stability, it wasn’t an easy start. ffmpeg’s defaults are notoriously ill-chosen. After hours of going through man pages, I’ve managed to capture and convert video tapes into high quality (encoded) digital video.
Basically the process involved capturing the raw video into a temporary file and then preform a two-pass encoding using H.264.
Continue reading Capturing Video and Converting to H.264 using ffmpeg
Usually installing software in Gentoo is a piece of cake. Just
emerge what you want and (with the right USE flags) and everything will be ready for you. However, as today I’ve found out today, installing phpMyAdmin with Lighttpd isn’t trivial as it should be.
In this post I’ll try to walk you through the necessary steps to install phpMyAdmin with Lighttpd in Gentoo.
Continue reading phpMyAdmin + Lighttpd in Gentoo
The term “load average” is used in many Linux/UNIX utilities. Everybody knows that the numbers the term “load average” refers to, usually three numbers, somehow represent the load on the system’s CPU. In this post I’ll try making this three numbers clearer and understandable.
Continue reading Understanding load average – A Practitioner Guide
I use Vim as my main IDE for C/C++ related development (as well as for almost all other development). If you use (or thinking about using) vim as as an IDE, you better get some good autocompletion functionality. This kind of autocompletion is provided by the OmniComplete, which is available since Vim 7.0. Just having the OmniComplete is a nice thing, but it’s much more helpful if configured properly to work with the libraries you use, such as wxWidgets. In this post I will show you how to get working the OmniComplete for wxWidgets, however, the procedure I will show can be easily adapted to almost all libraries.
Continue reading Setting Up OmniComplete (Autocompletion) for wxWidgets in Vim
In this tutorial I will explain how to create a local Subversion (SVN) repository, intended for a single user. I assume that you already know the benefits of keeping track of old revision of projects or important documents such as a resume or a thesis you have been writing. Subversion offers you a very convenient yet strong method to do so, and the easiest way to do so with Subversion (SVN) is to create a local, home, repository intended for a single user – you.
Continue reading Creating Local SVN Repository (Home Repository)
In this post I will walk you through generating RSA and DSA keys using
ssh-keygen. Public key authentication for SSH sessions are far superior to any password authentication and provide much higher security.
ssh-keygen is the basic way for generating keys for such kind of authentication. I will also explain how to maintain those keys by changing their associated comments and more importantly by changing the passphrases using this handy utility.
ssh-keygen Tutorial – Generating RSA and DSA keys
After raising the issue of the low resolution problem of the timer provided by
clock() in Resolution Problems in
clock(), I’ve ended the post by mentioning to two more functions that should provide high-resolution timers suitable for profiling code. In this post I will discuss one of them,
Continue reading Profiling Code Using
In this post I will show you how to process HTML forms easily using CGIs in C++. I assume you have already basic knowledge of writing CGIs in C++, if you don’t go a head and read Introduction to C++ CGI.
Processing forms is the basic function of any CGI script and the main purpose of CGIs. As you probably know there are two common ways to send form data back to the web server: “post” and “get”. When form data is sent with the “get” method it is appended to the URL string of the form submission URL. The “post” method is much like the “get” except the data is transmitted via http headers and not via the URL itself. When a form uses “get” it allows the user to easily bookmark the query created by the form as the data is transmitted in URL itself, on the other hand the “post” method allows to send much more data and spares to user from seeing the data in the URL.
Getting the “post” and “get” data is relatively easy. To get the data sent by “get” you can just call
getenv("QUERY_STRING") and you will receive a pointer to null-terminated string containing the “get” data. Reading the “post” data is a bit more complicated. The data needs to be read from the standard input, but the program won’t receive an EOF when it reaches the end of the data but instead it should stop reading after reading a specified amount of bytes, which is defined in the environment variable “
CONTENT_LENGTH“. So you should read
getenv("CONTENT_LENGTH") bytes from the standard input to receive the “post” data.
Continue reading Introduction to C++ CGI – Processing Forms
In this post and its follow ups I intend to cover the basics of CGI programming in C++. There are great performance gain in writing CGIs in C++ compared to interpreted languages such as PHP and it’s usually it’s even faster than PHP scripts which are interpreted via mod_php. On the other hand PHP and other traditional web development languages are well suited for the task, by means of libraries and development time. However developing small highly efficient CGI scripts in C++ is easier than you think.
Continue reading Introduction to C++ CGI