Subbing Video Files
Not exactly something I'm used to doing, particularly in my line of work but still useful. Linux has several free tools that allow to embed subtitles either through hardcoding or softcoding to video files. I tried several of them before I was convinced that Aegisub was the most versatile and easy to use application of them. It allows to live watch the subtitles and the video as they appear, and add several styles to the subtitles to give them a more professional look.
Installation
First of all you need to install the Aegisub application, installation is a little clunky so I made use of the guide shown in [1]. Mainly that you require to open your Terminal and type the following commands:
$ wget -c http://ftp.aegisub.org/pub/releases/aegisub_3.0.4-1_amd64.deb
$ sudo dpkg -i aegisub_3.0.4-1_amd64.deb
$ sudo apt-get install -f
As you can see, once the package manager repairs the application and installs the missing packages, it becomes usable. After that, it's pretty intuitive.
$ wget -c http://ftp.aegisub.org/pub/releases/aegisub_3.0.4-1_amd64.deb
$ sudo dpkg -i aegisub_3.0.4-1_amd64.deb
$ sudo apt-get install -f
As you can see, once the package manager repairs the application and installs the missing packages, it becomes usable. After that, it's pretty intuitive.
* Installing mkvmerge for hardcoding
Additionally we must install the encoding tools to attach the subtitle files to the video once we're finished creating them. Subtitle files are separated by default and encoding tools ensure they become a part of the video. In this case we're making use of the hardcoding command line tool mkvmerge which is extremely fast and easy to use. To install we simply open terminal and type:
$ sudo apt-get install mkvtoolnix
$ sudo apt-get install mkvtoolnix
Adding subtitles
rezerosub5.ass | |
File Size: | 2 kb |
File Type: | ass |
Hardcoding subtitles into the video
Once the process of subbing is finished, its time to encode them into the video file. For this, there're 2 options:
* Hardcoding the subtitles into the video.
This is usually the preferred option as it allows to maintain them unchanged permanently and avoid configuration issues. The subs become an integral part of the video just like any frame. The disadvantage of course is that they're impossible(?) to modify later.
* Softcoding the subtitles.
Used by videos with several languages.
* Hardcoding the subtitles into the video.
This is usually the preferred option as it allows to maintain them unchanged permanently and avoid configuration issues. The subs become an integral part of the video just like any frame. The disadvantage of course is that they're impossible(?) to modify later.
* Softcoding the subtitles.
Used by videos with several languages.
A) Hardcoding subtitles using mkvmerge
mkvmerge is a command line application that allows to modify videos easily and quickly. For this 20 minutes video it took less than 2 seconds on my computer. It's simple, easy and only requires a simple command to operate [2].
$ mkvmerge -o output.mkv video.mp4 subtitles.srt
Replace video.mp4 with the title of the video you want to encode and subtitles.srt with the subtitle name and format you generated. In my case I used a .ass extension as it allows to keep the subtitle styles which give it a more professional look and are easier on the eye.
$ mkvmerge -o output.mkv video.mp4 subtitles.srt
Replace video.mp4 with the title of the video you want to encode and subtitles.srt with the subtitle name and format you generated. In my case I used a .ass extension as it allows to keep the subtitle styles which give it a more professional look and are easier on the eye.
Once the process is finished, you'll get a videofile with the subtitles encoded inside. I leave you with mine showing best girl Rem from Re:Zero.
References
[1] http://linuxg.net/how-to-install-aegisub-3-0-4-on-ubuntu-linux-mint-elementary-os-debian-and-derivates/
[2] https://askubuntu.com/questions/119325/how-can-i-embed-subtitles-into-a-movie-file
[3] http://sub.wordnerd.de/linux-subs.html
[2] https://askubuntu.com/questions/119325/how-can-i-embed-subtitles-into-a-movie-file
[3] http://sub.wordnerd.de/linux-subs.html