Ubuntu - Transcode your video to MKV / AAC the simple way

dropcap-ubuntu-stabilize

If you sometimes end up grabbing some video files from internet, you may have encountered some playback troubles :

  • Video container may not be playable on some devices (AVI, MOV, ...)
  • Some copyrighted audio codecs like DTS, AC3, E-AC3, ... may give play back problem on some of your devices
  • On multi-channels audio tracks, general audio level may vary widely between talks and action scenes (you end up changing volume level at every scene change)

So, to be able to play your video on any type of device and in any type of environment, an elegant option is to :

  • use MKV container as it is open source and recognized by almost all modern players
  • convert all audio tracks to AAC as it is playable on almost any modern devices
  • add some midnight mode audio channels side to the multi-tracks channels to allow smooth listening even without a home cinema system

This article explains how to setup a post-processing environment for your Linux desktop to be able to :

  • generate MKV video file from any video file
  • convert all audio tracks to AAC format (stereo and multi-channels)
  • add some associated Midnight Mode audio tracks (if selected)
  • add an embedded video cover (if present)

It also explains how to use this tool straight from your desktop menu and from Nautilus file manager. A simple right click on a video file will show a menu to post-process it.

It has been designed and tested on an Ubuntu 14.04 LTS workstation, but it should be applicable to any Linux distribution, as long as the needed tools are available.

Read more: Ubuntu - Transcode your video to MKV / AAC the simple way

Debian 8 - Install & Monitor EATON UPS

dropcap debian eaton

Because of this sumer heat wave, I finally decided to install an Uninterrupted Power Supply for my debian server.

So I decided to buy a Eaton 3S550 UPS. This small UPS is designed like a big strip, it handles 550 VA and it provides a USB connection.

Thanks to Network UPS Tools, this UPS is very easy to manage when connected to a Debian server.

Installation procedure is quite simple, but it involves a certain number of steps that should be carefully followed.

So, this article explains a step-by-step installation procedure of a Eaton UPS connected to a Debian Jessie server. If followed carefully, you should get your UPS fully integrated to your server, with an automatic shutdown when your UPS battery is becoming too low during a power cut.

This procedure should be applicable to any Ubuntu or Debian-based server.

Read more: Debian 8 - Install & Monitor EATON UPS

Ubuntu - Graphviz Previewer & Thumbnailer for Nautilus

dropcap-ubuntu-graphviz

Graphviz (Graph Visualization Software) is a package of open-source tools initiated by AT&T Labs Research for drawing graphs specified in DOT language scripts.

DOT files are text files with .dot extension. They use a graph description language named DOT language. These files can be processed by some tools like dot  to generate a graphical view.

Under Ubuntu and Debian, you get a set of command line tools but no GUI (Graphical User Interface) for Gnome Shell.

If you want to have a complete desktop integration for your graphviz DOT files, you need to add a proper thumbnailer and a previewer.

This article explains how to setup a complete desktop integration for Graphviz .dot files with Gnome Shell. You'll then be able to :

  • see your graphviz .dot files thumbnails inside Nautilus
  • see your graphviz .dot file preview straight from Eye of Gnome

This has been tested on Ubuntu Gnome 14.04 LTS Amd64 and LUbuntu 14.04 LTS. It should work on many Linux distribution with little adjustment.

Read more: Ubuntu - Graphviz Previewer & Thumbnailer for Nautilus

Ubuntu - Take Screen capture of your Android device even from Recovery

dropcap ubuntu android

With ADB, a lot of possibilities are open to administrate and tweak your Android device. A tool like QtADB is a good example of what can be done.

Some time back, I discovered that you can take some screenshots of your Android device thru ADB with a inbuilt utility called screencap. But it only works when you are running a normal android session, not when you are in recovery mode.

After some searches, I found that many devices, depending on their hardware, can provide some screen capture thru a frame buffer.

Both these approaches open some nice possibilities to take screenshot of your device while running any type of application (tutorials, games, …) or even running a recent version of recovery like TWRP where ADB is activated by default.

This article explains how to take a screenshot of an android device in ADB mode thru some simple console commands by using both screencap or frame buffer methods.

It also provides a GUI tool to take sreenshot of your android device with a single click from the comfort of your linux desktop.

It has been written and tested on Ubuntu 14.04 LTS, but it should be applicable to any modern Linux flavor. Frame buffer capture under TWRP recovery has been tested on Nexus S, Nexus 7 2012 and Nexus 5.

Read more: Ubuntu - Take Screen capture of your Android device even from Recovery

Linux - How to Cancel a Zenity Progress Dialog the right way

dropcap linux

When you write shell scripts to run some long processing actions, Zenity and its --progress option might be a nice way to trace and follow the execution of your sequenced actions.

By default, Zenity offer a Cancel button to interrupt the process.

ubuntu zenity progress

Normal behavior of Zenity when you hit the Cancel button is to kill the progress dialog process & the function before the pipe. But it doesn't kill any child process of this function running in the background.

You can use the --auto-kill option to kill all the processes, but then you will kill your main script process and all its children. That means that it will kill your entire script, including any action after the zenity dialog.

This article explains how to write a bash script with Zenity progress dialog that will properly handle the Cancel action of a Zenity progress dialog where :

  • any action run by the function piped with zenity will be killed
  • you'll get back to your main script to run next steps

The procedure has been written and tested under Ubuntu 14.04 LTS, but it should be applicable to any modern Linux system as it uses only basic system tools.

Read more: Linux - How to Cancel a Zenity Progress Dialog the right way

Ubuntu - Install Telegram client

dropcap ubuntu telegram

Telegram is a new messaging app with a focus on security and speed. It is very similar to WhatsApp, but as it is not own by a Facebook like company, your private data are fully encripted and should be secured.

It provides clients on many platforms : Android, Windows, Mac OS, Linux, ...

Unlike WhatsApp, you can install more than one client synchronised with your Telegram account.

Another very interesting functionnality of desktop Telegram client is to allow to transfer files with a simple drag-and-drop. You can then transfer to any friend some :

  • uncompressed photos
  • uncompressed videos
  • mp3 files
  • APK packages
  • ...

Latest versions of Telegram integrate very well with Linux desktop. It handles desktop launcher and desktop notifications !

So, this short article explains how to easily install Telgram client on any ubuntu desktop with auto-update feature enable.
Client will be fully integrated with your desktop providing launcher and notifications.

It has been tested on Lubuntu 14.04 LTS and Ubuntu Gnome 16.04 LTS and . But I should work on any other distro.

Read more: Ubuntu - Install Telegram client

Ubuntu 14.04 - Rotate & Stabilize your video with MLT and Vid.stab

dropcap-ubuntu-stabilize

Since availability of Ubuntu Xenial 16.04, this procedure is obsolete and is not updated.
Please use Ubuntu 16.04 - Rotate & Stabilize your video with MLT and Vid.stab instead.

Nowadays, street video shooting is becoming a reality.  With any modern smartphone, point-and-shoot camera or even a GoPro camera, you can shoot any video anywhere.

These devices are affordable, light-weight, very compact and easy to use. Whatever happens around you, you are able to record it on the spot. But, on the other end, as these devices are compact and light, they are not very steady. Your recordings tend to be shaky !

Another problem you can encounter when shooting from a smartphone is that your video may be recorded upside-down or even rotated by 90°.

Till date, I did not find any very simple solution under Linux to simply stabilize (unshake) and/or rotate my day-to-day videos.

Hopefully, thanks to MLT framework, it is possible to use a command line tool melt and some specific plugins (vid.stab to stabilize and affine to rotate) to do the job.

This article explains how to easily post-process any group of video files to :

  • read important metadata
  • rotate video if needed
  • stabilize video if needed
  • transcode it to h264 & aac

It also explains how to integate this tool straight from your desktop menu and from Nautilus. A simple right click on a video file will show a menu to post-process it !

Read more: Ubuntu 14.04 - Rotate & Stabilize your video with MLT and Vid.stab

Ubuntu 14.04 - Install Android Tools (ADB, Fastboot, ... & QtADB)

dropcap-ubuntu-android

If you own an Android Smartphone, you will need sooner or later to use some specific Android tools like ADB or fastboot.

If you need these tools, two options are available under Ubuntu : either to install the whole Android SDK or to install some specific packages that bring only these tools.

Another very insteresting tool is QtADB. Based on ADB protocol, it allows under a graphical interface to have a complete access to your Android device filesystem, to manage your installed applications, to get some system informations, ...

As most of Android smartphone or tablet users are not needing the whole Android SDK, this article explains the simple steps needed to install Android specific tools like ADB, fastboot or QtADB on a Ubuntu computer.

It has been tested under Ubuntu Trusty 14.04 LTS and it has been used to flash and root a Google Nexus 7 under Lollipop and to root a OnePlus One running CM11s.

Read more: Ubuntu 14.04 - Install Android Tools (ADB, Fastboot,... & QtADB)

Ubuntu - Repair corrupted PDF

dropcap-ubuntu

If you are a day-to-day Linux user, you may have faced some web sites using some broken PDF generation software, where PDF files they generate can't be properly displayed with open-source viewers like Evince.

Latest site where I've faced this problem was Easyjet. I was supposed to print my e-ticket, but all important data were totally unreadable. Here is what Evince was displaying :

ubuntu-pdf-broken

While googling to find a reader able to handle these broken PDF files, I realised that this problem is quite common and more interesting, that gs tool provided by Ghostscript was able to repair these files.

This article explains how to prepare your Linux desktop to be able to repair corrupted PDF files (like Easyjet e-tickets). It also explains how to integrate this tool as a custom action available from your favorite file manager (Nautilus & PcManFM) with a simple right click on the PDF file.

It has been tested on Ubuntu Gnome 14.04 LTS and Lubuntu 14.04 LTS. But, it should be applicable to any distribution using a Nautilus or PCmanFM.

Read more: Ubuntu - Repair corrupted PDF

Nautilus - Columns and Property page Provider for APK files

dropcap-gnome-apk

On Android devices, all programs are installed thru some APK packages. Like well-known deb packages, these packages have some specific descriptive data : package name, version number, version code, requested permissions, ...

If you are an APK developper or if you are handling a large collection of APK packages on a Linux computer, you'll find that Nautilus is providing some very poor informations about these files. It is not even displaying the icon properly !

A previous article explained how to Display official APK icon as Nautilus thumbnail.

This article explains how to use Nautilus python extension capabilities to :

  • add some columns providing specific APK informations (package name, version, ...)
  • add one tab to APK file properties to provide a lot of extra informations

This procedure has been tested under Ubuntu Gnome 16.04 LTS and Ubuntu 16.04 LTS running gnome, but it should be applicable to many other modern Gnome Shell based distributions.

Read more: Nautilus - Columns and Property page Provider for APK files

Nautilus - Thumbnailer for Ms Office documents

dropcap-gnome-msoffice

When you use Gnome Shell under Ubuntu or Debian, all Ms Office files are displayed thru some generic icons in Nautilus.

With the help of LibreOffice unoconv conversion tool, it is possible to use the first page of a document as a Nautilus thumbnail.

To make it even more visual, the thumbnail can be outdrawn by the document type official icon. You will then get a display much more visual.

This article explains all the steps needed to configure Nautilus to display thumbnails of Ms Office documents including document type icon and first page content, providing a simple and efficient Ms Office documents preview. It is using LibreOffice conversion tools and some very basic tools.

This procedure has been tested under Ubuntu Gnome 14.04 LTS with Libre Office 4.2 & 5.0. It should be applicable to many Gnome based distributions. It has also been tested under Lubuntu 14.04 LTS with PCManFM.

Read more: Nautilus - Thumbnailer for Ms Office documents

Page 2 of 9