Friday, August 21, 2009

DVD authoring under Linux

The goal was to make a DVD from short videos captured on two digital cameras and some pictures. Although it's rather easy to do today, the tools available still do have some rough edges.

System used: Ubuntu 9.04 with the Ubuntu Studio extensions on x86_64 platform.

General steps to do were:
  1. Get videos from camera to computer
  2. Cut out the right parts, working losslessly
  3. Convert the parts into a MPEG2 DVD compatible files
  4. Create parts with titles, texts, image slideshows
  5. Create DVD menu and burn the whole thing.
Getting the source videos
One camera directly generated MPEG2 files on its internal SD card.
The second one had a Firewire DV output. This can be handled using Kino easily, it was only necessary to load raw1394 module and adapt permissions of /dev/raw1394. The output, saved as AVI was then already viewable in Totem.

Cutting out the right parts
I used Kino, otherwise Cinellera or kdenlive are very helpful.

Getting DVD-style MPEG2 files
Video DVD content is split into files - "Titles" and those can have bookmarks, called "chapters". To get one file per title it was necessary to deinterlace and convert the DV AVI files into MPEG2-PS, deinterlace the MPEG2 files from the other camera and join them. In this case I didn't care about transitions between the joined files.
I used tovid for deinterlacing and doing the conversion. Only problem is that the conversion is painfully slow (several hours on my hardware).

tovid -force -deinterlace -dvd -pal -wide -parallel -in $INFILE -noask -out $OUTFILE

The -force was to make tovid deinterlace the MPEG2 files from the SD-card camera.
Resulting .mpg files can be joined using mencoder easily:

mencoder -of mpeg -ovc copy -oac copy -mpegopts format=dvd:tsaf -o $OUTFILE $SOURCEDIR/*.mpg

Titles
There was need to get just some still slides with text. The most convenient way for me was to generate the stills in inkscape - 720x576 bitmaps with text,, graphics, whatever you need, and then convert them to the MPEG2 using dvd-slideshow.

DVD Menus
There are several programs available, DVDStyler seemed most versatile. Only bad thing for me was that the buttons it renders have aliased fonts and look very ugly. As a workaround I described the menu items as normal text and used a simple arrow image as cursor/selector.

Of course, once you compile the whole thing, you find that you are some 100 MB over limit :-) But that can be expected...

Monday, August 10, 2009

Travelling in Poland with a dog

This is a short summary of what I think might be useful if you plan to travel with a dog to Poland - we just got back after walking some days along the north coast.

All following bans have to be interpreted in context - it depends on the situation and the dog whether they will be enforced or just silently ignored.

General notes
The dog has to be kept on leash (na smyczi) everywhere unless specially permitted. Mostly respected, especially in cities. But if the dog is friendly, people usually don't say anything. Some breeds are considere aggressive (officially), those have stricter rules.

On the coast we've me mostly german shephard dogs, yorkshires and golden retrievers. From time to time there was a pit bull terrier - with a muzzle and on a short leash.

Transport
There are two main transport companies - PKP trains and PKS busses, then there are multiple local bus companies. We had no experience of dog not being accepted. Unless you travel in a crowded busses it is usually even ok without the muzzle/kaganiec. Often the dog is silently ignored by the driver (no need of ticket) in busses.

We've been told by Polish people that we can just travel without the dog ticket even in trains, but we haven't tried that. In trains the dog pay either 4 zloty or 15 zloty (EC/IC), in busses they travel free or pay like children.

If you plan to travel in a couchette or sleeping wagon, you have to (in theory) buy the whole coupe, that is six places for a couchette or three for a sleeping car.

Beaches/Coast
On guarded beaches the dogs are allowed only to pass through not to stay there and they should have a muzzle and be on a leash. On wild beaches it's ok just to keep them on the leash. In reality there are dogs everywhere, even on guarded beaches and it's just on a common sense to keep or not to keep them on the leash when outside the guarded beaches. As long as you keep it under control and it does not endanger somebodys children it's usually ok. People and children mostly interact well with the dogs, fairly often the children run to the dog to hug it.

In Slowinski National Park the dogs are strictly forbidden on the beaches. In reality you can argue that there a trail on the beach - so you can walk there. We discussed this with the guards and they just asked us to leave the beach on the first exit. Possible reason for this ban are foki/seals that sometimes come here - the dogs will disturb them.

Food
There are shops with things for animals in every small city and it's sometimes possible to buy raw meat. Fish is available everywhere along the coast. People generally do ask you before feeding your dog with something.

Shops/restaurants
Mostly no dogs allowed.