Archive for April, 2011

Best software available today for Linux video Desktop capturing on Debian

Tuesday, April 19th, 2011

I’ve been experimenting since some time in order to understand better what is the current situation with Video Desktop Capturing Software available today for Linux and FreeBSD.

My previous investigations has led me to write an article about xvidcap called How to make Video from your Linux Desktop with xvidcap

Though xvidcap works pretty well, it is currently uncapable of capturing the audio stream of a Linux Desktop env and hence part of the interactivity of the videos is missing when used.

A bit of further investigation on the topic has pointed me to 3 free software programs which are capable to record Desktop environment on Linux with sound embedded

The interesting screen video capturing Desktop tools I’ve found are:

1. recordMyDesktop
2. Istanbul
and
3. vnc2swf

Installing them on a Debian based distribution is pleasable, as there are installable debian packages of each one which I installed easily with apt:

debian:~# apt-get install istanbul recordmydesktop gtk-recordmydesktop vnc2swf

RecordMyDesktop‘s package contains a command line little tool which when started directly starts capturing video and audio of the Linux Desktop. After a Ctrl+C is pressed the program quits, saves and encodes the video in ogg-encapsulated theora-vorbis file format.

Here is the output I got in saving a sample file by launching recordmydesktop without any arguments:

hipo@debian:~/Desktop$ recordmydesktop
Initial recording window is set to:
X:0 Y:0 Width:1024 Height:768
Adjusted recording window is set to:
X:0 Y:0 Width:1024 Height:768
Your window manager appears to be Metacity

Initializing…
Buffer size adjusted to 4096 from 4096 frames.
Opened PCM device hw:0,0
Recording on device hw:0,0 is set to:
2 channels at 22050Hz
Capturing!
Broken pipe: Overrun occurred.
Broken pipe: Overrun occurred.
Broken pipe: Overrun occurred.
^C
*********************************************

Cached 5 MB, from 207 MB that were received.
Average cache compression ratio: 97.3 %

*********************************************
Saved 69 frames in a total of 69 requests
Shutting down..Broken pipe: Overrun occurred.

STATE:ENCODING
Encoding started!
This may take several minutes.
Pressing Ctrl-C will cancel the procedure (resuming will not be possible, but
any portion of the video, which is already encoded won’t be deleted).
Please wait…
Output file: out.ogv
[100%]
Encoding finished!
Wait a moment please…

Done.
Written 692529 bytes
(635547 of which were video data and 56982 audio data)

Cleanning up cache…
Done!!!
Goodbye!

The captured file as I you see in the above output is saved in file out.ogv

RecordMyDesktop has also a GUI interface (written in Python) called gtk-recordmydesktop

Below you see a screenshot of the GUI gtk-recordmydesktop:

RecordMyDesktop GTK interface entry screen

gtk-recordmydesktop is a super-easy to use as you already see in the picture, you can either configure it with Advanced button or use Save As button to select where you want the Desktop captured video and audio to be stored.

In Debian Squeeze 6.0, the Advanced GUI button interface button is not working but that’s not such an issue, as the rest of the buttons works fine.
After the recordmydesktop‘s Record button is pressed it will start capturing from your Desktop and the window seen in the above screenshot will disappear/hide in the system tray:

recordmydesktop recording minimized in system tray
When you press over the white little square in the system tray the screen capturing will be interrupted and a window will pop-up informing you that the captured video and audio is being encoded, here is another screenshot of recordmydesktop encoding a saved Desktop video stream:

recordmydesktop saving captured desktop video

After the final .ogv file is encoded and saved to further transfer it into (.flv) I used ffmpeg;

debian:~# ffmpeg -i test.ogv test.flv
...

Now let’s evaluate a bit on the the final results, the produced test.ogv‘s synchronization between sound and video was not good as the sound was starting earlier than the video and therefore even though recordmydesktop used to be highly praised on the net, the proggie developers still needs to do some bug fixing
Further on, I continued and (gave the other Desktop screen capturer) Istanbul a try hoping that at least with it the video and audio of my Linux desktop will be properly captured. But guess what, the results with Istanbul was even more unsatisfactory as the produced videos and sounds, were slow and a lot of frames from the screens were missing completely.
Moreover the sound which was supposed to accompany the video was completely 🙁

Thus I will skip on talking about Istanbul as in my view, this piece of software is far away from being production ready.

I also tested vnc2swf , launched it by: pressing alt+f2 and typing in vnc2swf in GNOME’s run application prompt, just to be surprised by an error …:

vnc2swf error no 111 Connection refused

The reason for this error is caused by the xserver (Xorg) port 5900 is being closed by default on Debian

However this error is easily solvable, by making the Xserver to listen to a the port 5900, to make the Xorg server on Debian to listen on this port you need to edit the file:

/etc/X11/xinit/xserverrc

and change inside it:

exec /usr/bin/X -nolisten tcp "$@"

with:

exec /usr/bin/X "$@"

and either reboot your Linux or restart only the Xorg server by pressing Ctrl+Alt+BackSpace

Now let me conclude, the results from my desktop video screen capturing experiments prooved that vnc2swf is superior (as it is capable of properly saving a movie with sound and video from a Linux Desktop). It appears this soft is actually the best one you can use to make a video of your Linux desktop.

Sadly my testing has proven that Linux is still lacking behind Windows and Mac in even doing the most simple tasks …
Let’s hope that situation will get better soon and Gnome or KDE developers will soon provide us with better software capable to save properly a video and audio captured from the Linux Desktop.

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 😉

A few words on Pseudo Christian Spirituality. A false “Spiritual” Movies and Books which we as Christians should Fully Avoid

Monday, April 18th, 2011

Heresies and How to Avoid them

We live in the age of the boom of sects, false prophets and false “messiahs”. Today it’s common that the bookstores are filled in with all kind of occult literature and magic teaching literature, agnostic books, horoscopes and all kind of empty modern day philosophy books which teaches evil, the so called “Get rich for a day”, “The secrets of success”, “How to take advantage over the others”, “How to be succesful”, “NLP for your success”, “How to enter into business”, “How to become rich quickly” etc. are e very short list of all the non-sense literature one can meet on the books market.

Along with the books we are being offered all kind of movies and philosophies “teaching us” about the life meanings, trying to explain the meaning of life and the universe and the meaning of each self as a human being.

From Christian perspective, most of this movies and books which plead to contain “a deeper life meaning” are empty of any real pure spiritual contents but are simply a mixture of various religious beliefs belonging to different group of worldy faiths and mostly targets to make the authors of the story or screen play rich.

This movies are not being inspired by God – The All Holy Trinity and they reject Christ as a founding stone on which to stand over, it’s clear that they contain an anti-christian content and every truly devoted Christian should try to abstain from watching them.

To name just a few of asuch a movies which are ecumenical (preach for unification of world religions) and from Orthodox Christian perspective are anti-christian in essence:

  • What the Bleep Do we Know – Down The Rabbit Hole
  • The Great Secret of Water
  • The Secret
  • The Fountain

We as Christians should try not watch this movie or praise them as something which confirms our faith, as they don’t confirm our faith in Christ but they try to spread up a “sick spirituality” and insane ideas.
This is just a small list of movies I have encountered which has influenced my spiritual health in a really negative way, therefore I hope if you’re a Christian you will take my warning and CHOOSE NOT TO WATCH THESE MOVIES!.
The reason for choosing not to watch this movies would be purely to prevent yourself from experiencing a spiritual (soul) damages by exposing yourself to the heretical teachings and ideas of the aforementioned ones.

Also try to get astray from all the genres of boks which I have mentioned above which try to teach you how to become sucessful in life, I have personally read a book I’m not sure about the exact name but it was similar to:

  • “The subsconscious could do everything / (Psyche can achieve everything) / The power of Mind etc.”

The book teaches the false idea that with our subconscrious mind we built our own current realities and promotes “positive thinking” as a way to attract wealth, personal success and happiness to yourself.

You can see yourself that this is insane not only from a Christian perspective but even for any rational person.

The idea of this false teachings is to convince you that man is undeveloped god and that we are masters of our own reality.

Therefore it is in direct contrast with even basic Christian beliefs, we Christians do belief that our reality and existence is completely in God’s hands and nothing could happen without God to allow it to happen.
Therefore from a Christian perspective if you, “during the whole day think about how you will get rich and how you will have millions in a bank account” as many of the up-mentioned devilish movies and books teaches, nothing will happen if God does not allow it.

We’re clearly said and taught from the Holy Bible and the Livings of the saints that all our life and daily goods we attain through our life are given by mercy, the saints has taught us that our lives and all we’re and possess are from God for God and through God! To whom be glory now and forever and ever! Amen.

Watch out for this heretical false doctrines which might separate you from Christ and our mother the Orthodox Church. The appearance of all this kind heretical literature and movies is in accordance to the prophecies by our Lord Jesus Christ who said that in the last days there will be many wolves in sheeps clothes, who will deceive and be deceived.

Let we as an Orthodox Christians be careful about what kind of books we read and keep our selves away from these and the similar kind of poisonous teachings.

Let we be fully delivered by God’s grace from being exposed to this kind of faith tempting books by the Holy Prayers of The Theotokos and all the Saints. Amen

Palm Sunday day feast in Bulgareevo (Bylgareevo) – A Pilgrimage Journey to venerate a particle of the life giving cross

Sunday, April 17th, 2011

palm sunday cvetnica orthodox icon

I’m just coming back from the Bulgareevo (a small village cituated nearby Kavarna).
Bylgareevo is a middle size bulgarian village situated near the sea and is not famous with anything significant.
The village has two Orthodox Church temples and a serving Priest (an Archimandrite, father Metodii).
Father Metodii is one of this priests that is a person to remember as he is a truly devoted to Christ monk. Since about two years of time he has reconstructed his local village house and the yard nearby the house into something which hopefully in the short future will become a fully monk inhabited spiritual fortress (A Monastery).
Father Metodii lives and believes part of his service to God constitutes in rising this small monastery and gathering together Bulgarian believers in order to further rise up the Bulgarian faith in Christ and to become a center for spiritual pilgrimage.

The monastery already has a monastery bell, a monks cells and the small chapel (parakles/paraklis) prepared to be as a place for monks pilgrimage.

Father Metodii’s efforts to make the monastery an attractive place for future candidate novice Monks and Monks are truly genuine!
All he has done by so far is a good example for all us the Christians to follow. Most of the expenses related to the Monastery building are being paid by the Father himself as he has donated all his possession to the Church.
As part of this efforts to rise up the place as a place for spiritual pilgrimage by God grace Bylgareevo’s monastery has been granted the honour to contain a particle of the Holy Live giving Cross Tree on which our Lord Jesus Christ has been crucified.. By God’s mercy the Patriarch of Jerusalem and the local national museum has donated two particles of the Holy Cross on which our Lord Jesus Christ was Crucified and suffered for our sins.

Now the holy crucifixion cross remains particles are being kept in the Monastery’s small chapel for pilgrimage. Thus the opportunity for a pilgrimage journey to Bylgareevo on this day of great spiritual joy Palm Sunday was a huge blessing for me and the few more brothers and sisters with whom we traveled to Bulgareevo
Below I present you with a picture on which you can see Father Metodii (Methodius) holding in hands the small particle of the Crist’s Crucifixion cross tree (embedded in the center of the wood cross on the picture).Father Methodius holding a cross containing a particle of the cross on which the Lord Jesus's Christ was crucified

The name of the village Bulgareevo is also really interesting as it’s a direct direvative from the word Bylgariq (which translates as Bulgaria).
Along with the two particles of the Holy life giving Cross where the saviour Jesus Christ was crucified, father Metodii has collected some great saint relics, just to name a few of the relics which are in the newly built monastery in Bulgareevo; holy relics of saint Panteleimon, holy Relics of Saint John of Rila etc.

Now going back to Palm Sunday‘s feast essense, Palm Sunday is among the 12 Church feasts in the Orthodox Churches, we use to call (The Lord’s feasts [Gospodski Praznici]), and thus is one of the 12 feasts which are most spiritually richful for Bulgaria as an Orthodox Nation and for all other national Orthodox Churches around the world.

Palm Sunday is always celebrated on the Last Sunday before the beginning of “the passionate week”, the week in which we who believe in Christ’s name remember the great trials and suffering our Lord and Saviour Jesus Christ has carried for the salvation of all Christians.

Palm Sunday is the feast in which we as we read in the Gospel readings in the Church, commemorate Christ’s entrance in Jerusalem on a small donkey.
Here is a small chunk of the Gospel reading for the day:

They took palm branches and went out to meet him, shouting, "Hosanna!" "Blessed is he who comes in the name of the Lord!" "Blessed is the King of Israel!"

In this scripture text as we read above the people were glorifying God and Christ as the son of the God in accordance to the Old testament scriptures in which it was prophecised that the Saviour of Mankind (The Messiah) would walk in through the entrance doors of Jerusalem riding a donkey.
People who were present observing the Lord’s entrance were witnessing the fulfilment of the old testament psalms prophecies by glorifying the Lord.

This were the same people which just a week later were screaming “crucify” him …

On Palm Sunday it is a Church tradition in the Bulgarian Orthodox Church that willow branches are being blessed by the priest and then distributed among layman as a blessing and a remembrance of the Palms which were layed upon the Lord’s entrance in Jerusalem.

Later on we took the willow branches in our homes and place it in our home icon-stands (the place with the icons we use for a prayer to God).

The use of willow branches in our Church has been established through the years as a Palm Trees substitute as the Palm tree does not grow in the Bulgarian lands

In Bulgaria Palm Sunday is known as Tsvetnitsa. People with flower-related names, (for example Tzviatko, Margarita, Lilia, Violeta, Yavor, Zdravko, Zjumbjul, Nevena, Temenuzhka, etc.) has a name day on that date.
It’s a pity that many bulgarian people who are baptized in our Bulgarian Orthodox Church, fails to understand the symbolic meaning of the willow branches and doesn’t really understand the essence of the Church feast but just go to Church to light up a candle “to have a good fortune and health”., usually mostly missing the spiritual importance for us the Christians of this feast.. but I hope things would get better with time and more Bulgarians who lost their roots during communism will come back to their ancient faith the Orthodoxy.

I recommend to all Orthodox Christian believers from Bulgaria, Romania and Russia who has the oportunity to visit Bulgaria as a tourist destination or on any other occasion to visit Bylgareevo and do a pilgrimage journey to Bylgareevo newly constructed monastery containing the holy relicts.

You will receive the great spiritual blessing of venerating the particle of the cross on which our Lord Jesus Christ’s most holy body was hanging on!
The cross on which the redemption of mankind was achieved by God’s son 2010 years ago!
The cross on which we have received a forgiveness of our sins!
I thank the Lord for having this good blessed day and I pray that we all who believe in his name come to the understanding to know his as he knows us!

The Resurrection of Lazarus feast in the Bulgarian Orthodox Church (The day of Lazarus / Lazarus Saturday)

Saturday, April 16th, 2011

The Resurrection of Lazarus Orthodox Icon Sinai

It’s one day before the the great feast of Palm Sunday . On this day in the Bulgarian Orthodox Church we do have a reading of the glorious miracle with the raising (resurrecting) of Lazarus, that our Lord and Saviour Jesus Christ did in front of many Jewish people.

In the gospel readings, we hear that the Lord has went nearby the place where Lazarus has been buried.
The Jewish tradition of this time is that their dead be buried in a small cave, while the body is being wrapped up in a specific white clothe matter. This kind of burial ceremony is directly related to most of the ancient Jewish beliefs about the resurrection of the death which will take place.

In that time, Lazarus has been dead (or in grave) for already 4 days, even in the Gospel, we read that the rottening body has started to decay and hence the rotting flesh to smell badlhy …

The gospel also taught us, Lazarus has been a friend of our Lord Jesus Chirst, and Christ himself loved him. Very interesting fact concerning Lazarus earthly life is also that he has been a brother of the sisters Mary and Martha.
Mary is actually the same Mary which we read about in the Gospel of Luke, the same mary which bows and cries in front of Jesus’s feets, repenting and begging the saviour for a forgiveness of her sins.

Even though our Lord has been sent a word 4 days before he came, whether the overall journey to the place where Lazarus was at that point was only 2 days. The Lord has come on the 4th day to Bethany (a village near Jerusalem)

When the Lord came in Bethany he found that Lazarus is dead and has been in the tomb for 4 days. On his arrival he met Martha and Mary in turn.
Marta was loudly crying regretting that Christ haven’t arrived earlier otherwise he would have healed from the sickness and he would not die..

The Lord replied to Marta’s lamention with his majestic words: “I am the Resurrection and the Life. He who believes in Me shall live, even if he dies. And everyone who lives and believes in Me shall never die”.
As the gospel reading continues, we’re told that Christ has been sorrowful in himself and the Lord Jesus further said the famous phrase: “Jesus wept!
In the presence of a crowd of mourners (obviously many people has loved Lazarus), the Lord did his glorious miracle of Lazarus Resurrection.

After on the heavy stone which was sealing the cave with Lazarus dead body was moved away by the order of the Lord.
The Lord entered in the cave prayed and said to Lazarus: “Lazarus come forth!”
Hearing the order of the son of God and our saviour Lazarus has risen up with the funeral clothes still wrapping his body. Jesus instructed some people from the crowd to remove the grave-cloths from Lazarus and let him walk.
As many people in the grave has saw the indescribable miracle the people witnessing the miracle “believed in him”.

The meaning of the Lord’s “Come forth!” is crucial, as with the the glorious miracle of Lazarus Raising the Lord has shown his authority over death and live.
Even the death was submissive to the Lord’s order! Even the death couldn’t go against his mighty word and silently obeys!

This story was given by our God the Holy Trinity to clearly show us that he is the one in charge over death and over life on earth and hence he is the one in charge of every human being still breathing on this earth.
On the other hand the raising of Lazarus was done to show to us who still doubt in our hearts and minds and disbelief about the promised Resurrection of the Death in the glorious day of the Lord.

Our Lord has even wept, clearly showing to us that he is not indifferent to our suffering, but on the contrary is suffering with our pain himself.

After Christ’s Crucifixion, death, Resurrection and Ascension, Lazarus has become a vigilant Christ disciple. He has further compelled to seek refuge away from Jerusalem to avoid the anger of high priests and the pharisees, who wanted to kill him.
Lazarus has leaved Judea to seek refuge in another country. He found his refuge in Kittium (today called Larnaca) and situated in Cyprus.
According to Orthodox Church tradtion Lazarus has been ordained to become the first Church bishop of Kitium.

Little is known about Lazarus after Our Lord’s Resurrection and Ascension except that during his thirty year he never smiled or joked except for one occasion. One day, he saw someone stealing a clay pot and he laughed saying, “the clay steals the clay”.

Another famous tradition connected to Lazarus is the discovery of Mount Athos in 52AD.
Lazarus was very close to the Virgin Mary and he was very grieved that he could not return to Jerusalem to visit her (he was still in fear of the Jews).
The Theotokos learned of his sorrow and sent him a letter to comfort him.
She asked that he might send a ship to her that she might visit him in Cyprus.
With great joy, Lazarus sent a ship to the Holy Lands to bring the Virgin Mary and John, the beloved disciple to Cyprus for a visit.
On their journey, a great storm blew them off course and carried them to the shores of Ephesus and then the ship to the shores of Athos, Greece.
Unaware that divine providence had brought her to this area, the Virgin Mary completely taken by the beauty of the area, prayed to her son that this could be her garden devoted to prayer to “fight the good fight of faith”.
Having converted, blessed and established a new christian community from the local idolaters they set sail for Cyprus and met with Lazarus.
The day of Lazarus as we call it in Bulgaria is one of the great Christian feasts in our Orthodox Church, even though it’s not among the 12 greatest Christian feasts it’s one of the major feats throughout the Church year.
The first tomb of Lazarus in Bethany remains as a site for pilgrims to this very day. The second tomb, on the island of Cyprus, was found in Kittium sometime in A.D. 890, with his relics inside and bearing the inscription “Lazarus, the Friend of Christ.”
The commemoration of the day the Lord Jesus has risen Lazarus from the death is one of the few feasts during the great Lent which are considered days of spiritual joy in the Bulgarian Orthodox Church and all other national Orthodox Churches around the world.
The feast is also known under the name Lazarus Saturday is always commemorated in Orthodox Churches, one day before the Palm Sunday feast.
By the Holy prayers of Lazarus let our Lord Jesus be merciful to us the sinners! Amen.

How to extract Audio Sound and Music from Flash Videos (.flv) files and convert it to (.mp3) on Linux and BSD

Friday, April 15th, 2011

In my quest to know Linux better and use it capabilities to fulfill a multimedia tasks I came across the question:

How can I extract audio sound and music from Flash Videos .flv file format?

After a bit of investigation online I’ve found out in order to achieve this task the quickest way is via the handy ffmpeg conversion tool .

It’s rather easy actually, all necessery to do the conversion is to have the ffmpeg installed.
FFMpeg is part of Debian and Ubuntu repositories, so if you haven’t installed it yet, go straigh and install it with:

debian:~# apt-get install ffmpeg
...

Many modern day Linux distributions already have the ffmpeg pre-installed by default, ffmpeg even have a Windows version so this little tutorial should be directly applied on a Windows host with installed ffmpeg.

Convertion of a .flv file to .mp3 file for example is a real piece of cake to so do issue the command:

debian:~# ffmpeg -i input_file.flv -ab 128 -ar 44100 output_file.mp3

The few mmpeg options meaning is as follows:

-i (specifies input file)
-ab (Set the audio bitrate in bit/s 64k by default)
-ar (Set the audio sampling frequency (default = 44100 Hz).)

For more options checkout the ffmpeg help.

I found ffmpeg to be a bit slower than I expected. A 17 minutes .flv video file is converted to .mp3 for 38 seconds time.

Here is the textual output I got on my Debian Linux while extracting the flash video’s sound and converting it to mp3:

debian:~# time ffmpeg -i g7tvI6JCXD0.flv -ab 128 -ar 44100 output.mp3
FFmpeg version SVN-r25838, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 21 2011 08:21:58 with gcc 4.4.5
configuration: –enable-libdc1394 –prefix=/usr –extra-cflags=’-Wall -g ‘ –cc=’ccache cc’ –enable-shared –enable-libmp3lame –enable-gpl –enable-libvorbis –enable-pthreads –enable-libfaac –enable-libxvid –enable-postproc –enable-x11grab –enable-libgsm –enable-libtheora –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libx264 –enable-libspeex –enable-nonfree –disable-stripping –enable-avfilter –enable-libdirac –disable-decoder=libdirac –enable-libschroedinger –disable-encoder=libschroedinger –enable-version3 –enable-libopenjpeg –enable-libvpx –enable-librtmp –extra-libs=-lgcrypt –disable-altivec –disable-armv5te –disable-armv6 –disable-vis
libavutil 50.33. 0 / 50.39. 0
libavcore 0.14. 0 / 0.14. 0
libavcodec 52.97. 2 / 52.97. 2
libavformat 52.87. 1 / 52.87. 1
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.65. 0 / 1.65. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
[flv @ 0x1336760] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 29.92 (359/12)
Input #0, flv, from ‘g7tvI6JCXD0.flv’:
Metadata:
duration : 1060
starttime : 0
totalduration : 1060
width : 480
height : 360
videodatarate : 76
audiodatarate : 94
totaldatarate : 179
framerate : 30
bytelength : 23723246
canseekontime : true
sourcedata : B5F9E82C6HH1302704673918653
purl :
pmsg :
Duration: 00:17:40.35, start: 0.000000, bitrate: 174 kb/s
Stream #0.0: Video: h264, yuv420p, 480×360 [PAR 1:1 DAR 4:3], 77 kb/s, 29.92 tbr, 1k tbn, 2k tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16, 96 kb/s
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Output #0, mp3, to ‘output.mp3’:
Metadata:
duration : 1060
starttime : 0
totalduration : 1060
width : 480
height : 360
videodatarate : 76
audiodatarate : 94
totaldatarate : 179
framerate : 30
bytelength : 23723246
canseekontime : true
sourcedata : B5F9E82C6HH1302704673918653
purl :
pmsg :
TSSE : Lavf52.87.1
Stream #0.0: Audio: libmp3lame, 44100 Hz, stereo, s16, 0 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 16576kB time=1060.81 bitrate= 128.0kbits/s
video:0kB audio:16575kB global headers:0kB muxing overhead 0.002404%

real 0m38.489s
user 0m37.126s
sys 0m0.764s

When talking about conversions, another very useful application of ffmpeg is in case if you want to:

Extract Audio from online streams

Let’s say you have a favourite radio, you often listen and there are a podcast you want to capture for later listening, or just catch a few nice songs, using ffmpeg it’s a piece of cake by using the command like:

debian:~# ffmpeg -i http:///xxx.xxx.xxx.xxx/some -ab 128 -ar 44100 captured-radio-sound.mp3

The possible ways of use of ffmpeg is truly versatily, you can use it for instance if you have to convert some kind of audio or video format to another one I have given a very simple example of converting a .flv file to .avi and vice versa in my previous post

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 turn ordinary Linux to a game station / Best Games to install and play on Debian Linux

Thursday, April 14th, 2011

Linux install best Games logo
Hereby in this article I’ll in short give you a quick way to install a number of my favourite linux games. In my view the games I’m going to suggest for installation are actually among the best existent games you could install and play on a Linux Desktop today.

Many people say/believe Linux does not have games, or the games for Linux/BSD are not fully featured and are not comparable to the ones for Windows, most of this sayings and beliefs are actually a fairy tales.
I should admit of course that Linux is still lacking behind in its gaming capabilities, even quite behind any Windows platform (Don’t get me wrong, I’m trying to be as much realistic as possible here in my estimation).

However little by little year by year as time passes by with time the situation for the coming generation of Linux Gamers is gettings better and better!.
The amount of free and non-free games is rising day by day, wheter
many of the large game producing companies like Blizzard, ID Software etc. are producing ports of their proprietary games for Linux.

Along with that the amount of Linux Enthusiast gamers and hobbyist is constantly increasing.

At the present moment probably there are more than 5000 games for Linux!
Many of that games count still requires heavy testing or are not yet production ready and therefore they don’t make it as a packages in the general Linux distributions repositories. These games are instead published on a various websites across the internet and still needs our (the linux hobbyist and daily users) testing and support
Linux has a number of websites which aims at inform interested users into the Linux games development, the major ones as far as I have found are:

  • http://happypenguin.org
  • http://www.linux-gamers.net

In Debian (Squeeze) Linux currently there are an overall of 1815 free and non-free games packages to available for installation
I have a favourite number of games I do install on each and every computer I use as a desktop workstation.

These Linux games are truly a blessing especially in times I’m too tired of reading, scripting or being too overwhelmed of doing my daily system administration duties.

To install my selected games collection on your Debian, Ubuntu or any other debian based Linux with apt-get use the command:

debian:~# apt-get install open-invaders bsdgames-nonfree scummvm
briquolo abuse abuse-frabs dosbox pingus wesnoth brutalchess
dreamchess gnuchess kamefu frozen-bubble bomberclone
lbreakout2 armagetron defendguin dodgindiamond2
rocksndiamonds blobwars wing xgalaga
extremetuxracer planetpenguin-racer
powermanga sauerbraten supertux tecnoballz torus-trooper
trackballs tumiki-fighters zblast-x11 criticalmass xbill
viruskiller snowballz freedoom wormux bugsquish gtetrinet njam
starfighter prboom bb xsoldier xevil gnome-breakout xarchon
moon-lander trophy lincity-ng alienblaster scorched3d ltris
smc foobillard warsow tremulous glest warzone2100 matanza
ace-of-penguins

I have created a small script containing the same apt-get, so I would advice you if you’re keen on Linux gaming like me to use it for yourself and for all your friends who runs Linux.
Download my turn-linux-into-gamestations.sh script here

If you want to install the Linux games list with the turn-linux-into-gamestation.sh use cmds:


debian:~# wget https://www.pc-freak.net/bshscr/turn-linux-into-gamestation.sh
debian:~# chmod +x turn-linux-into-gamestation.sh
debian:~# ./turn-linux-into-gamestation.sh

If you want to take a look a quick look over the gaes description included in
my best linux games to install compilation

Please see my best games collection linux desciption file here

Along with the game desciptions in my recommended games to install description you are about to find also the size of each of the games and the repository filename of the package that installs a games or relates to the linux game.

To extract the games descriptions I have used apt-cache

Here is the exact apt-cache show comman in combination with a little shellscript loop I have used to generate the games desciption file of my favourite Linux games list:

for i in $(echo open-invaders bsdgames-nonfree scummvm briquolo abuse abuse-frabs dosbox pingus wesnoth brutalchess dreamchess gnuchess kamefu frozen-bubble bomberclone lbreakout2 armagetron defendguin dodgindiamond2 rocksndiamonds blobwars wing xgalaga extremetuxracer planetpenguin-racer powermanga sauerbraten supertux tecnoballz torus-trooper trackballs tumiki-fighters zblast-x11 criticalmass xbill viruskiller snowballz freedoom wormux bugsquish gtetrinet njam starfighter prboom bb xsoldier xevil gnome-breakout xarchon moon-lander trophy lincity-ng alienblaster scorched3d ltris smc foobillard warsow tremulous glest warzone2100); do apt-cache show $i |grep -v "Priority:" |grep -v "Section:" |grep -v "Maintainer:" |grep -v "Depends:" |grep -v "Architecture:"|grep -v "SHA1:" |grep -v "SHA256:"|grep -v "Recommends:"|grep -v "MD5sum:" >>games_description.txt;
done

Note that some of the games will require a properly configured opengl / glx configured and will require a bit more solid system hardware in order be able to play some of the games.

Also some of games from my linux favor game list are space demanding, some of the games will require (up to about 300mb of space).

Nevertheless as I presume nowdays most Linux desktops runs some no more than 3, 4 years old hardware I assume the minimal hardware requirements necessery to be able to run and play all the games from the above list won’t be a problem.

On my system all of my selected linux games collection runs without any performance issues, though some of the games has some minor sound problems (for some weird uknown to me reasons).

I’m using an ordinary Thinkpad R61 notebook with a Debian Squeeze 6.0 installation with Gnome on my desktop.
My basic hardware parameters which runs all the linux games smoothly are as follows:

Notebook Thinkpad R61 with

CPU: Intel Core 2 Duo 1.8Ghz
Memory: 2GB
HDD: 160GB

To start up and play the games in a Gnome desktop look up for the games in gnome menus:

Application -> Debian -> Games
or
Application -> Games

If you want to only install only the games which will surely run on lower computer hardware let’s say with: CPU Pentium 166~300 Mhz and some lower amount of memory like 128MB of memory or 128 mbytes of system memory, I would suggest you run the apt-get command:



debian:~# apt-get install bsdgames-nonfree
abuse abuse-frabs pingus brutalchess
gnuchess kamefu frozen-bubble bomberclone lbreakout2 armagetron defendguin dodgindiamond2
rocksndiamonds blobwars xgalaga matanza ace-of-penguins
powermanga supertux tecnoballz
zblast-x11 xbill
viruskiller freedoom wormux bugsquish njam
starfighter prboom bb xsoldier xevil gnome-breakout xarchon
moon-lander trophy lincity-ng

All left is to check out the newly installed linux games and to enjoy them.

Downloading your favourity flash video from Youtube with a simple command (youtube-dl)

Wednesday, April 13th, 2011

downloading-flash-videos-from-youtube-on-linux-and-bsd-youtube-downloader-logo
Watching videos in youtube today and already for about 2 years is the de-facto hype.
There is almost none a day passed without almost each one of us has watched a dozen videos in Youtube.

Watching videos in youtube has become even more addictive for many than the early days of Internet Relay Chats (IRC)

As youtube is very accessible for people and it’s a comparativily easy way people share more and more with the day.
There is no question that the business idea of youtube is great and youtube generates millions of dollars for Google day by day, however I have a serious objection here! All is good the only pitfall is that you don’t own the youtube videos you watch!

Youtube’s story is not that different from the story of the cloud computing threat to internet users Freedom

The good thing here is that we’re not still completely dependant on youtube and there is still way to retrieve your favourite youtube video and store it for later watching or distribution.

Probably the most famous browser plugin that allows files retrieval from youtube, as most people know is DownloadHelper .

However using download helper is browser dependant, you need to use the browser to save the plugin and I don’t find it to be the best way to download a youtube video.

Since the old days I have started using Linux, I’ve been quite addicted to as many things on my linux as possible from the command line (terminal / console) (CLI) .

In that manner of thoughts it was a real delight for me to find out that a group of free software developer guys has come up with a command line tool that allows downloads of youtube videos straight from terminal, the great software is called youtube-dl and at the moment of this post writting it’s to be found on the URL address:

http://rg3.github.com/youtube-dl/

Youtube-dl is written in python so, it requires the Python interpreter, version 2.5 in order to properly run on Unix, Mac OS X or even on Windows!

The fact that it’s written in python has made the little shiny tool quite a multi-platform one.
To start using immediately the tool on a Debian or Ubuntu Linux you will have to install python (even though in most cases you must have it already installed):

1. To make sure you have python interpreter installed issue the cmd:

debian:~# apt-get install python
Building dependency tree
Reading state information... Done
python is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

As you can see from above apt-get’s output I do have it installed so nothing gets installed.

2. As a next step I used links to download the youtube-dl python script, like so:

debian:~# links https://github.com/rg3/youtube-dl/raw/2011.03.29/youtube-dl >> youtube-dl
Use the links interface to save youtube-dl and use gzip to ungzip it
debian:~# gzip -d youtube-dl.gz
debian:~# chmod +x youtube-dl

Now to make it system wide accessible I have copied the youtube-dl to /usr/local/bin , whether I selected /usr/local/bin as a location as this location is predetermined to contain mostly files which does not belong to a regular deb package.

3. Move youtube-dl to /usr/local/bin

debian:~# mv youtube-dl /usr/local/bin

4. Test the newly installed youtube-dl command line youtube retrieval tool:

debian:~# ./youtube-dl https://www.youtube.com/watch?v=g7tvI6JCXD0
[youtube] Setting language
[youtube] g7tvI6JCXD0: Downloading video webpage
[youtube] g7tvI6JCXD0: Downloading video info webpage
[youtube] g7tvI6JCXD0: Extracting video information
[download] Destination: g7tvI6JCXD0.flv
[download] 53.3% of 22.62M at 33.23k/s ETA 05:25
[download] 100.0% of 22.62M at 31.91k/s ETA 00:00 [u

As you might have noticed from the above youtube-dl command output the newly retrieved youtube file will be saved under a name g7tvI6JCXD0.flv

The line I passed to youtube-dl is directly taken from my browser and pasted to console, the file downloading from youtube took me about 10 minutes but this is mostly because of some kind of youtube server speed restrictions …

In general at least I have this video for later, watching, so after a while I can watch it once again without loosing a lot of time trying to remember what was the video headline name

5. To use youtube-dl in a bit advanced way you can for instance invoke the command with options like:

debian:~# ./youtube-dl -l -w -c https://www.youtube.com/watch?v=g7tvI6JCXD0
[youtube] Setting language
[youtube] g7tvI6JCXD0: Downloading video webpage
[youtube] g7tvI6JCXD0: Downloading video info webpage
[youtube] g7tvI6JCXD0: Extracting video information
[download] Destination: BSD is Dying, Jason Dixon, NYCBSDCon 2007-g7tvI6JCXD0.flv
[download] 4.4% of 22.62M at 1.43M/s ETA 00:15

As you can see now youtube-dl was even able to detect the downloaded video file name and store it on the computer with a correct name 😉

I would recommend you also to check out the youtube-dl help page, to do use command: youtube-dl –help