Featured Post

read more

Add .srt subtitles to .avi using bash.

Package needed: Mencoder

It is actually easier then I thought, I have been spending almost a whole day to figure out how to add subtitles to an .avi file using bash. (Terminal) So I hope I can help you out with this one!

user@server:$ mencoder -sub sub_name.srt -subcp iso-8857-9 -ovc xvid -xvidencopts bitrate=687 -oac copy -o Movie-IN.avi Movie-OUT.avi

If it’s not working for you or you know other cool ways to do it, please leave a comment!

Create DVD from .AVI using bash.

Step 1. We need the following tools installed :
mencoder: (MPlayer’s Movie Encoder) is a simple movie encoder.
ffmpeg: FFmpeg video converter.
dvdauthor: assembles multiple mpeg program streams into a suitable DVD file system.

If you already have them installed just ignore the following step.

Step 2. We can easily install the three packages using DAG Repo. We need to activate it though.

Edit /etc/yum.repos.d

user@server:$ nano -w /etc/yum.repos.d/dag.repo

And insert

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

When /etc/yum.repos.d is updated. Simply install the packages using yum.

user@server:$ yum install mencoder ffmpeg dvdauthor ffmpeg-devel

If you have any lib problems please read here more about it.

Step 3. If you are a pro command line user, type the following commands to convert file1.avi fille2.avi to DVD format (if you have only one .avi file, then just skip following command):

user@server:$ cat file1.avi file2.avi > ccmovie.avi

Step 4. Now run the movie encoder to create out.avi from yourname.avi (option -ovc and -oac sets no encoding, just stream copy.)

user@server:$ mencoder -o out.avi -noidx -oac copy -ovc copy yourname.avi

Step 5. Next run FFmpeg Video Converter to set aspect ratio, ntsc/pal dvd television standard etc:

For USA

user@server:$ ffmpeg -i out.avi -y -target ntsc-dvd -sameq -aspect 16:9 out.mpg

For Europe

user@server:$ ffmpeg -i out.avi -y -target pal-dvd -sameq -aspect 4:3 out.mpg

Step 6. At a high level, a DVD is a collection of menus and titles. Conceptually, a menu contains buttons which can be assigned actions and provides a list of choices to the end user, while a title contains the main content of the DVD. However, in reality many of the features available in menus (including buttons, pausing, and looping) are also available in titles. Use dvdauthor assembles multiple mpeg program streams into a suitable DVD file system. You should see DVD file system in DVD directory:

user@server:$ dvdauthor --title -o dvd -f out.mpg

Step 7. Create the table of contents file instead of a titleset:

user@server:$ dvdauthor -o dvd -T

Step 8. Now your all set, the DVD is done. But what you see is that the DVD files are all loose in the folder. So what we want to do is make a .ISO (Image) of the dvd. So it’s ready to burn. What we need for that is the RPM mkisofs. We can easily install that, because we have activated the DAG Repo. So install the mkisofs package using yum.

user@server:$ yum install mkisofs

Step 9. Now you have installed mkisofs, we can create .ISO files using this command.

user@server:$ mkisofs -dvd-video -o name-your-dvd.iso dvd/

Step 10. Now your DVD is done. I hope this tutorial has helped you and may help others. We finish with burning the DVD onto an empty DVD.

user@server:$ growisofs -dvd-compat -dvd-video -speed=4 -Z /dev/dvd dvd/*

If you have any questions or thoughts to share please leave it here in a comment. Thank you!

RE: problem sending email

How can I contact him? I’m trying to contact him through mail… I haven’t spoken to him in 2 years.. thats why I was happy to find his e-mail.

So this is kind of weird.

Thanks anyways,

Bob

—– Original Message —–
From: Support – Copper
To: Bob D.
Sent: Monday, October 05, 2009 12:13 AM
Subject: RE: problem sending email

Dear Mr. Droog,

That message says that the address you are sending to is setup to only allow senders from their “allowed senders”. You will need to contact the owner of the email account and have them add you to the Allowed Senders list. Make it a great day, and thank you for contacting Copper.net!

Customer Support Tier 2
Jason
Copper.net

——————————————————————————–
From: Bob D. [mailto:info@bobdroog.nl]
Sent: Saturday, October 03, 2009 11:23 AM
To: Support – Copper
Subject: problem sending email

Dear Copper.net

I’m trying to send my friend in Colorado an e-mail. But I get my e-mail back everytime. Looks like my server is not allowed. I get this message back everytime. “550 Permanent Failure: Sorry, this mailbox only accepts mail from known senders”

Can you please unblock/allow my server? So I can send my friend e-mails using my own e-mail address?

The IP is: 85.17.201.81
Outgoing mail (SMTP): mail.bobdroog.nl

Thank you.

Bob Droog

Installing DenyHosts on CentOS

1. Download & install the RPM.

user@server:$ wget http://centos.karan.org/el4/extras/stable/i386/RPMS/denyhosts-2.5-1.el4.kb.noarch.rpm
user@server:$ rpm -Uvh denyhosts-2.5-1.el4.kb.noarch.rpm
user@server:$ chkconfig denyhosts on

2. Modify /etc/denyhosts.conf to your requirements.

user@server:$ nano /etc/denyhosts.conf

3. Start service.

user@server:$ service denyhosts start

This is it you’re done however its not always that easy, some time you can get an error like this:

user@server:$ service denyhosts start
starting DenyHosts: /usr/bin/python /usr/bin/denyhosts.py –daemon –config=/etc/denyhosts.conf
Traceback (most recent call last):
File “/usr/bin/denyhosts.py”, line 5, in ?
import DenyHosts.python_version
ImportError: No module named DenyHosts.python_version

The first thing you want to check are the site packages.

user@server:$ cd /usr/lib/python2.4/site-packages/DenyHosts
user@server:$ ls
libpython2.4.so.1.0

Is there only one file like shown above? Then are all the files still stored in python2.3. Which causes the problem. What we are going to do is copy all of the files from python2.3 to python2.4.

user@server:$ cd /usr/lib/python2.3/site-packages/DenyHosts
user@server:$ cp * /usr/lib/python2.4/site-packages/DenyHosts

Now you have copied all the files to the python2.4 folder, try to start the service.

user@server:$ service denyhosts start
starting DenyHosts: /usr/bin/python2.4 /usr/bin/denyhosts.py –daemon –config=/etc/denyhosts.conf

It worked for me, so I hope it works for you too. If not.. Then you might have another problem. The only problem I can think of is that you have to change the /usr/bin/denyhosts to #!/usr/bin/env python2.4. You can read more about the bug HERE.

Time to go home.

Oh noooo, it’s time to go home!?! .. well I’m ehh kind of home right now.. But I had no time to write another post, cause I was enjoying Ireland too much! haha. Alright, so I stayed at this Hostel called “Browns Hostel” it was really cool. The staff was not really welcoming to the new guests though, they did not tell you what to do and how things work. That was really bad. Because this was my first time in a hostel. So then I went to my room to drop my bags off and saw that my bed was still dirty.. of course I went to the reception and complained about it. After a couple hours they still didn’t do anything about it, so I did it myself and complained again! But I kept smiling, that’s how you win the war! The first night was not that bad, but lots of people went to party. I’m glad I’m a good sleeper, because lots of people were as loud as they could be. Then in the morning, I figured I could get a shower. I don’t even want to talk about that. It was freaking disgusting, I’m serious. I didn’t shave for a week, just because I was scared to get infected with weird Irish diseases haha.

Further then that it was really cool. Ireland is a beautiful country and there’s lots to do! The only thing was that a lot of people were getting sick in that hostel and I thought I would not get it.. at least that was my goal. And I didn’t.. until the day I went home. I started couching and my throat started to hurt. The next day I felt not good at all. Haha. But now it’s all good. Feeling good and I have really good thoughts back about Ireland. See here some pictures! Leave Comments people!

Dublin, Ireland here I come!

OK – So yesterday I went to Kings Cross Station to get my tickets for my trip to Dublin, Ireland. I was trying to get it booked online. But it did not work. So I just went to the station.

Amazingly the trip has only cost me 30 pounds. Which is equal to 33.3652475 Euros and 49.13700 U.S. dollars. What I got for it; The Train, Boat and Bus tickets. So all the way from Euston, London to Dublin, Ireland. (Connolly Station) Which is like an 8 and half hour trip!

At this moment I’m sitting in the train from Euston, London to Hollyhead. That’s where I will get on the Fairy to Dublin.

It’s pretty cool they have Free T-Mobile WiFi available in the train. Most people will be sitting here for +/- 3 hours or something. Like me. So this way it makes it easier to just kill that time.

100_5108 100_5111

Wales? London? Dublin!

Alright, I know I have not updated my posts quite a lot.. since I left.. actually I did not at all.. haha. But to get you up-to-date. I went to Wales to meet my aunt. I stayed there for 15 days and helped her out. (Left August 27th) Now i’m in London, which is great! It’s pretty amazing out here. And it’s great to meet my second cousin! Today was my 4th day in London. I have seen lots of stuff. But my cousin and her boyfriend are really busy with work. So I have to keep myself entertained.. which is no problem of course! haha.

So now i’m thinking to head up to Ireland for a while. To visit Dublin. Should be pretty sweet. So yeah.. I don’t know yet when I’m leaving though. But I have been looking on the web for some hostels.. and I have found some pretty good ones for a nice price. Inclusive breakfast =] yum.

Here some random pictures I took in Wales!

And here some random pictures I took in London!

England here I come!

Hey Hey Hey Peoples!! This month did not start very successful for me, like you’ve read in my last post. But now, it’s actually getting better! I’m going to visit my aunt in England for a while. And I’m really excited about that. I’m going to stay there a month for sure. So I hope the college answers my letters before I leave to England. If not, I have to figure out something. But it will be OK.

Right now I’m looking at websites for fly tickets. I’ve called KLM – Dutch Airlines already. But it felt they were going to screw me over with the price. So I said I would book the ticket on their website. haha. lol. Later on I was looking at this Expedia.nl and they were expensive too! So I was going to see what some American Airlines had to offer, and I went to Expedia.com there I found out it was cheaper to buy at Expedia.com then Expedia.nl… Make sense? I think it’s weird.. But it saves me about 100 euros to buy it there..

I don’t know if I’ve mentioned, But I don’t have to work anymore. We figured out that I was making way to much overtime for my contract. So my boss said that I could stop earlier then expected. So now, I’m just chilling a little bit and still making money.. Love it! haha. I went to the beach with my brothers and that was really neat. I did got sunburned though.. but that was something I can live with!