Posts Tagged ‘subtitle editor’

Non-free packages to install to make Ubuntu Linux Multimedia ready / Post install packages for new Ubuntu installations

Monday, January 23rd, 2012

non-free-packages-to-install-make-ubuntu-linux-multimedia-ready

1. Add Medibuntu package repository

root@ubuntu:~# wget --output-document=/etc/apt/sources.list.d/medibuntu.list \
http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list \
&& apt-get --quiet update \
&& apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring \
&& apt-get --quiet update

2. Enable Ubuntu to play Restricted DVD
root@ubuntu:~# apt-get install --yes libdvdread4
...
root@ubuntu:~# /usr/share/doc/libdvdread4/install-css.sh

After that VLC will be ready to play DVDs for some programs which was compiled without DVD, source rebuilt is required.

If DVDs hang you might need to set a Region Code with regionset:

# regionset

3. Install non-free codecs

root@ubuntu:~# apt-get install non-free-codecs

4. Install Chromium ffmpeg nonfree codecs

root@ubuntu:~# apt-get install chromium
root@ubuntu:~# apt-get install chromium-codecs-ffmpeg-nonfree

5. Install w32codecs / w64codecs

Depending on the Ubuntu Linux installation architecture 32/64 bit install w32codecs or w64codecs

For 32 bit (x86) Ubuntu install w32codecs:

root@ubuntu:~# apt-get install w32codecs

For 64 bit arch Ubuntu:

root@ubuntu:~# apt-get install w64codecs

6. Install ubuntu-restricted-extras meta package

root@ubuntu:~# apt-get install ubuntu-restricted-extras

7. Install cheese for webcam picture/video snapshotting

root@ubuntu:~# apt-get install cheese

8. Install GIMP, Inkscape, xsane,sane, shotwell etc.

root@ubuntu:~# apt-get --yes install sane xsane gimp inkscape gimp-data-extras gimp-plugin-registry \
blender gcolor2 showtwell bluefish kompozer

9. Install multimedia Sound & Video utilities

Install Subtitle editor, video editiking , sound editing, mp3 player, iso mounters, DVD/CD Burners

root@ubuntu:~# apt-get install rhythmbox banshee smplayer mplayer \
realplayer audacity brasero jokosher istanbuk gtk-recordMyDesktop \acetoneisohexedit furiusisomount winff fala audacious dvdstyler lives hydrogen
subtitleeditor gnome-subtitles electricsheep k3b

10. Install CD / DVD RIP tools

root@ubuntu:~# apt-get install acidrip sound-juicer ogmrip thoggen
11. Install chat messanger programs, Browsers, mail pop3 clients, torrent, emulators, ftp clients etc.

apt-get install seamonkey thunderbird transmission transmission-gtk gbgoffice kbedic \
pidgin openoffice.org gxine mozilla-plugin-vlc wine dosbox samba filezilla amsn ntp \epiphany-browser ntpdate desktop-webmail alltray chmsee gftp xchat-gnome ghex \gnome-genius bleachbit arista

12. Install Non-Free Flash Player

Unfortunately Gnash is not yet production ready and crashes in many websites …

root@ubuntu:~# apt-get install flashplugin-nonfree flashplugin-nonfree-extrasound swfdec-gnome

13. Install Archive / Unarchive management programs

root@ubuntu:~# apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview \
mpack lha arj cabextract file-roller

15. Install VirtualBox and QEmu

root@ubuntu:~# apt-get install qemu-launcher qemu-kvm-extras virtualbox virtualbox-ose \
virtualbox-ose-guest-dkms virtualbox-ose-guest-dkms

This should be enough to use Ubuntu normally for multimedia Desktop just as MS Windows for most of the daily activities.
Am I missing some important program?

How to add (.srt , .sub) subtitles to .flv flash movie video on Linux

Friday, April 15th, 2011

how-to-add-srt-subtitles-to-flv-flash-movie-video-on-linux
If you're on Linux the questions like, how can I convert between video and audio formats, how to do photo editing etc. etc. have always been a taugh question as with it's diversity Linux often allows too many ways to do the same things.

In the spirit of questioning I have been recently curious, how can a subtitles be added to a flash video (.flv) video?

After some research online I've come up with the below suggested solution which uses mplayer to do the flash inclusion of the subtitles file.

mplayer your_flash_movie.flv -fs -subfont-text-scale 3

While including the subtitles to the .flv file, it's best to close up all the active browsers and if running something else on the desktop close it up.
Note that above's mplayer example for (.srt and .sub) subtitle files example is only appropriate for a .flv movie files which already has a third party published subtitle files.

What is interesting is that often if you want to make custom subtitles to let's say a video downloaded from Youtube on Linux the mplayer way pointed above will be useless. Why?

Well the Linux programs that allows a user to add custom subtitles to a movie does not support the flv (flash video) file format.

My idea on how to create custom subtitles and embed them into a flv movie file is very simple and it goes like this:

1. Convert the .flv file format to let's say .avi or .mpeg
2. Use gnome-subitles or subtitleeditor to create the subtitles for the .avi or .mpeg file
3. Convert back the .avi/.mpeg file with included subtitles to .flv (flash video format)

This methodology is really long and time consuming, but pitily as far as my understanding goes it's the only way to do that on your Linux until now.

To make the conversations between .flv and .avi format you will need to use the ffmpeg – (FFMpeg command line tool video converter), here is how:

– Convert .flv to .avi

debian:~# /usr/bin/ffmpeg -i input_flvfilename.flv output_avifilename.avi

– Convert .avi file to .flv

debian:~# /usr/bin/ffmpeg -y -i /path/to/your/avi/input_avifilename.avi -acodec mp3 -ar 22050 -f flv
/path/to/your/flv/output_flvfilename.flv

The required overall tools which you will have to have installed on your Debian or Ubuntu Linux are:

1. ffmpeg
2. gnome-subtitles
3. subtitleeditor
4. mplayer

You will also have to spend some time to get to know gnome-subtitles or subtitleeditor, but it won't be that long until you get the idea on how to use them.

How to edit, convert, join, split and re-time movie subtitle files on Linux (Fix Subtitles bad timing) / Install subtitle manipulation console tools for Linux

Tuesday, April 19th, 2011

As a Linux user I sometimes face difficulties with watching subtitled, movies. I mostly use Mplayer, Totem or VLC to watch the common video files.
The most common problems I face with subtitles are caused by bad timing, many times the solution to the bad timing issues is very simpleand comes up to changing the default movie player I use MPlayer to VLC or Totem.

However at many occasions trying to watch the movie with different kind of movie player does not help.
In this dark moments I get seriously irritated I am not a regular Windows user, where such kind of problems are almost none as many of the Windows movie player problems does fix bad timing issues automatically.

Luckily there is a work-around to this subtitles timing issues and other mishaps caused by guys who created a Movie subtitle files with a Windows subtitle editor program, subtitles timing, the Linux work-around takes a few more minutes to install a package called Subtitles

The Subtitles text utility is written in Perl and contains two executables subplay and subs .

Subtitles is the Linux subtitle Swiss Army Knife as it is capable of convert, join, split, and re-time of subtitles files

Installing Subtitles tools on Linux is a trivial job and it comes to download and installation of the 2 perl executables.
Here is how:

1. Download Subtitles.tar.gz toolsI have mirrored Linux Subtitles (Subtitles.tar.gz) here originally the binaries are to be found on URL address: http://karasik.eu.org/software/ , issue the commands:

linux:~# cd /usr/local/src
linux:/usr/local/src# wget https://www.pc-freak.net/files/Subtitles.tar.gz
...
2. Unarchive it

linux:/usr/local/src# tar -zxvvf tar -zxvvf Subtitles.tar.gz...
linux:/usr/local/src# cd Subtitles-1.0

3. Compile and install Subtitles system widePitily the Subtitles tools are not currently available as a packages in the repositories of Debian and Ubuntu Linux and thus easy installation without compilation via apt-get is unfortunately not available.

Here is the commands with which to compile and install Subtitles:

linux:/usr/local/src/Subtitles-1.0# perl Makefile.PL
...
linux:/usr/local/src/Subtitles-1.0# make
...
linux:/usr/local/src/Subtitles-1.0# make test
...

All tests successful.Files=1, Tests=17, 1 wallclock secs ( 0.05 usr 0.00 sys + 0.06 cusr 0.01 csys = 0.12 CPU)Result: PASS

linux:/usr/local/src/Subtitles-1.0# make install

Installing /usr/local/share/perl/5.10.1/Subtitles.pm
Installing /usr/local/man/man1/subplay.1p
Installing /usr/local/man/man1/subs.1p
Installing /usr/local/man/man3/Subtitles.3pm
Installing /usr/local/bin/subplay
Installing /usr/local/bin/subs
Appending installation info to /usr/local/lib/perl/5.10.1/perllocal.pod

Now as we have the subs executable installed, Let’s say your movie subtitles displays 5 seconds earlier before the movie scenes (bad timing), all you need to do to adjust your subtitles to show up in correct movie scenes is issue:

hipo@linux:/home/hipo/Movies$ subs -i -b 5 your_movie_subtitle_file_name.sub

now check out the subtitle files once again with your favourite player and the early subtitles display on your movie should be fixed.
Let’s have another scenario, say that your movie file is encoded to display 24 frames per seconds (fps) but the subtitle file is created to display the subtitles for a 25 fps, to solve this situation issue:

hipo@linux:~# subs -i -a 24/25 your_movie_subtitle_file.sub

Another possible scenario where subs command will be a precious asset is if you for example want to merge two subtitle files into one.Let’s say you have subtitles for a movie which are split over in 2 parts and the corresponding subtitles are in 2 different files, but eventually you find a better quality of the movie (DVD quality) in a single file and therefore you need the movie subtitles to be stored in one single file.
In that case to merge the subtitle files from let’s say the files movie_subtitle_file1.sub and movie_subtitle_file2.sub use the command:

subs -z movie_subtitle_file1.sub movie_subtitle_file2.sub

Some few other helpful things you can do with subs on Linux, are for example: splitting a file after a determined period of time, separating overlapped lines, and joining files into a single subtitle.

If you want to remove all the comments of gestures, facial expressions loud laughing etc. which displays usually the annoying (‘[Sneezing]’ or ‘[Music playing]) during the movie screen play, issue:

subs -e 's/[s-]*[.*]s*n*//gs' movie_subtitle_file.sub

Also other interesting Linux tool which is useful if you want to make conversions between subtitle in a (.sub) format to (.srt) format is called sub2srt perl script:

sub2srt’s home page is located on the URL address: http://www.robelix.com/sub2srt/, just to ensure it won’t just disappear with time I have created sub2srt mirror here

The most basic usage of sub2srt linux converting tool is by simply passing input sub and output srt file names like so:

linux:~# ./sub2srt 5rFF-pop.sub 5rFF-pop.srt

sub2srt supports changing of fps rate per second during conversion with the -f option as well as creationg of converted files in dos like end of file (CR+LF) with the –dos option.

Hope this article makes sense. If you find it useful, please drop me a thanks comment 😉