Tag Archives: traveling

Brief observations on travel in Bulgaria

Chin Yi and I recently returned from a vacation to Bulgaria and Romania.  Here are my very brief thoughts and advice to others who plan a similar journey in Bulgaria.

Language: Between us, we have conversational ability in English, French, Japanese, and two dialects of Chinese.  Also some limited capacity in German.  We had no Bulgarian to speak of.  In practice, this meant that we had to try to communicate in English.  In Bulgarian hotels you can usually find somebody who speaks English (though we did end up using German a lot at one hotel, for lack of another common language), but elsewhere, talking to a taxi driver or a bus ticket agent, you may find that English doesn’t get the message across, particularly in the smaller cities.  I loaded the Google Translate app onto my cell phone and installed the Bulgarian language package for offline use, which helped immensely in these situations.  Learn to pronounce the Cyrillic letters used in Bulgaria, it will help you to read signs on buses and addresses.

Cell phone: Before we went, I did some research to find how to get phone and Internet service on our Android phones.  I decided to use the Globul carrier, based on what I could find on their English-language website.  This wasn’t very successful.  While the phone and text-messaging were cheap to set up, I never got Internet going because, as one representative later told me, “the English website is out of date, we no longer offer pre-paid Internet”.  Our phones started with about 3 Bulgarian Lev in air time credit, and we burned that quickly on a couple of phone calls and a dozen text messages.  If I were to plan a return trip to Bulgaria, I wouldn’t be using Globul, but I’d have to do more research to find out what my alternatives might be.

Hotels: As I noted, most hotels had some English-speaking staff, except in the smaller cities.  In those hotels where we stayed more than one night, housekeeping didn’t come.  You might have to request it, or put out a sign.  Breakfast was pretty standard, breads, cheese, meats, eggs and omelets, fruit juice, and tea or coffee.  Sometimes included in the room price, sometimes charged extra.

Laundry: This was a bit of a shock for us.  Coin laundries are rare in Bulgaria, there might be a few in some of the bigger cities, but don’t expect to be able to find one.  Some dry-cleaners will do laundry by the kilogram, we eventually found a place in Varna that would do it for us, 12 Bulgarian Lev for rush service of about 5 days of clothing for two people.  Hotels may have a next-day service to send out to a cleaner for by-the-kilogram laundry, but they may not, and this doesn’t help when you’re only staying one night.

Restaurants: The restaurants are officially non-smoking indoors, though sometimes that didn’t turn out to be the case.  Best to check, if smoke is a problem for you.  Also, while we were there, the restaurants seemed to have about a 50% failure rate on their credit-card equipment, so even if you see a credit card sign on the door, ask when you go in to make sure they can process your payment, or make sure you have enough cash on hand.  The cuisine in Bulgaria is reminiscent of Greece and Turkey.  You’ll find shawarma and shish houses, and lots of offerings of roasted and grilled meat and fish.  One staple of restaurants seems to be the “shopska salad”.  It’s what I would call a Greek salad.  Tomatoes, cucumbers, bell peppers, olives, onions, feta cheese, spices, and oil.  No lettuce.  If you have trouble communicating with your waiter, you can be pretty sure he’ll understand a request for “shopska”, and will be able to bring one to you.  Even in restaurants where we couldn’t communicate the concept of “water”, we were able to get a shopska salad.

Inter-city travel: The geography of Bulgaria is a bit unfriendly to trains.  There is a mountain range that runs West to East from Sofia, effectively preventing North-South rail infrastructure.  We went from city to city by bus.  Buses are non-smoking, may be air-conditioned, and will occasionally have on-board washroom facilities for the more heavily-traveled routes.  Bus travel is very inexpensive.  I would say there’s no reason to buy a Eurail pass for travel within Bulgaria, it’s unlikely to be helpful.  If I were doing the same trip again, I’d be tempted to get an international driver’s license and rent a car.

Things to see: Really, this depends on the traveler, you’ll have to choose those yourself.  We went to Sofia, to Rila Monastery, Plovdiv, the rose festival in Kazanluk, and Golden Sands near Varna.

Unreachable server

While I was away on vacation, the server hosting this blog become unresponsive, twice.

The first failure was a kernel oops shortly after mounting my backup disc

kernel BUG at mm/slab.c:3109!

invalid opcode: 0000 [#1] PREEMPT SMP

It was several days before somebody with a key could get to the computer and restart it.  A week later, shortly before I returned from vacation, the machine become unreachable again.  This time, when I came into the house, I could hear a continuous audible alarm from the UPS.  I reset that, and the machine came up and worked normally.

So, two apparently unrelated problems knocking the machine offline when I wasn’t around to handle it.  I checked my SMART logs for the backup disc, there’s no sign that it’s a hardware issue, and the UPS logs are entirely empty of anything incriminating.

If I figure out the causes of either of these failures, I’ll update this post.

Update #1: 2014-06-20

The UPS triggered its alarm again this morning, and the server lost power.  The UPS is an APC Back-UPS ES 750, and a continuous tone indicates that the battery is missing or has failed.  I’ve replaced the battery, and hope that the issue does not repeat.

Converting DVDs for viewing on a tablet, while inlining captions

Previously, I  described how to convert HDTV videos for my EEE Pad Transformer.  Now, I’ll go over something a bit more difficult.

My wife and I have some DVDs of Bollywood films that we enjoy watching.  Aaja Nachle, Om Shanti Om, 3 Idiots, Billu, among others.  These films are mostly in Hindi, but there are English subtitles available.  As we don’t understand Hindi, we watch the movies with the subtitles.  The Android media viewer that comes with the tablet doesn’t have a way to select subtitles from an alternate video stream.

Now, I wanted to make files of these movies that I could watch on the Android tablet.  As noted in the previous article, the resulting files have to be H.264 Baseline profile, and under 2GB in size.

Here’s how I did this.  Note that this procedure required no less than 70 GB of free disk space to hold a large intermediate file, as I wanted to avoid artefacts introduced by running through multiple codecs, so I used a lossless intermediate state.

First of all, I used the MythTV option to rip a perfect copy of the DVD.  That gave me a file, say 3IDIOTS.vob.

Next, I used mencoder to inline the captions directly into the video stream:

mencoder -ovc lavc -lavcopts vcodec=ljpeg:aspect=16/9 \
    -vobsubid 0 -oac lavc -lavcopts acodec=flac \
    -o 3idiots 3IDIOTS.vob

The output file, 3idiots, was, as noted, huge.  It consisted of a lossless jpeg video stream, with the subtitle 0 track overlaid on the video stream itself.

Next, the file had to be converted to H.264 Baseline.  In this case, I decided, rather than setting a qmax, that I would set a bitrate.  That way I could be certain ahead of time what the final size of the file would be, though at the cost of increased trancoding time.  To get a fixed bitrate, it is necessary to run ffmpeg in two passes, once to collect statistics, and the second time to generate the file itself.  Here’s how this is run:

ffmpeg -pass 1 -i 3idiots -vcodec libx264 -vpre fast \
    -vpre baseline -b 1400 -acodec libfaac -ab 64k \
    -ac 2 -ar 44100 -threads 3 \
    -deinterlace -y junkfile.mp4
ffmpeg -pass 2 -i 3idiots -vcodec libx264 -vpre fast \
    -vpre baseline -b 1400k -acodec libfaac -ab 64k \
    -ac 2 -ar 44100 -threads 3 \
    -deinterlace 3idiots.mp4 

The “junkfile.mp4” file can be deleted.  The H.264 file, 3idiots.mp4, came in at 1.8 GB, and was of quite acceptable quality to view on the tablet.

Converting HDTV videos for viewing on a tablet

I have an Android-based tablet computer, the EEE Pad Transformer.  My MythTV computer can record digital over-the-air broadcasts in high definition now that I have put an HDHomerun on my network.  So, it would be nice to be able to transfer some HDTV programs to the Android computer to watch them there while traveling.  The HDTV shows are 1080i, encoded as mpeg2 video, at a bitrate of close to 16000 kbits/sec.

So, what are our constraints?  The Android computer is not powerful enough to play videos without hardware assist, and that hardware assist is only available when viewing H.264 videos encoded with the baseline profile.  It doesn’t work on main profile H.264 videos.  Also, the Micro-SD card that I plug into the tablet must be formatted as VFAT, it isn’t recognized when I reformat it to any more modern Linux filesystems, so our files are going to have to be under 2GB in size.  Also, the Android screen is only 1280×800, so there’s no point copying a 2560×1080 file there, the machine will have to reduce the resolution, we might as well do it before we copy it to the card.

So, a 1 hour show, recorded on the MythTV box, is about 8 GB and in the wrong format.  We convert it in two steps.  First, cut out any commercials and transcode it at high quality.  For network broadcast television that chops off about 25% of the file size, and you probably didn’t want to watch the commercials while sitting on the train/airplane anyway.

Next, it has to be transcoded to H.264 Basline.  This can be done with ffmpeg:

ffmpeg -i PROGRAM.mpg -vcodec libx264 -vpre fast \
-vpre baseline -s hd720 -qmax 30 -acodec libfaac \
-ab 128k -ac 2 -threads 4 -ar 44100 -deinterlace \

This takes the HDTV .mpg file from mythtv, “PROGRAM.mpg”, and converts it.  We use the libx264 video codec, fast settings, baseline profile, formatted for a high definition 720 line screen.  “qmax” sets a limit on quality loss, I usually use a value between 25 and 30.  We use the FAAC audio codec at 128kbits/sec, deinterlace the result, and write it to “PROGRAM.mp4”.

The resulting file, about 45 minutes of air time, is about 600 MB in size.

When your on-the-road ISP blocks your outbound mail

Now, we talked about allowing your computer to relay mail through the home machine when the ISP through which you’re connecting has made it onto a block list. What do you do when the ISP simply blocks all outgoing connections on port 25? Now you can’t even connect to your home computer to relay the mail.

The ISP does this to force you to pass email through their servers. The hope is that infected Windows computers will just try to open connections directly, and not forward the mail through the ISP servers. As noted in this story, that is not necessarily true.

So, now you find yourself unable to open connections on port 25, but you still want to send email. You could set up your computer to relay mail through the ISP’s servers, as described in this earlier article, but that may not be convenient if, for instance, you’re accessing the Internet at a relative’s home, since they would have to give you their passwords for you to do that.

So, the first thing to do is to check that you can connect to your home computer on the ESMTP port number 587. Telnet onto that port number on your home computer, and if you get a response, then this technique will work for you.

First of all, you should already have set up relaying as described here. If you set it up a while ago, verify that your keys are still valid and haven’t expired.

As we’re discussing this in the spirit of a temporary work-around, we’ll be editing the sendmail.cf file directly. First, of course, make a backup copy of your current sendmail.cf file, because you’ll want to reset it to its former behaviour after you stop using this particular ISP.

Now, go into your sendmail.cf file and find the smart relay line. It will look something like this:

# "Smart" relay host (may be null)

Change that line to indicate that you’re sending ESMTP to your home machine. It will look a bit like this:

# "Smart" relay host (may be null)

Next, we have to tell sendmail that it is to use port 587 for outbound mail to esmtp smart relays. Locate the block in the sendmail.cf file that looks like this:

Mesmtp,         P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
                A=TCP $h

and change the last line to read:

                A=TCP $h 587

That’s it. Restart the sendmail program, and you should be able to relay all mail through your home machine using authenticated relaying on port 587.