Christians Tagebuch: video

The latest posts in full-text for feed readers.


Indiana Jones easter egg

Kind #2 hat sich letztens das Lego-Set 77013 "Indiana Jones: Escape from the Lost Tomb" gekauft und aufgebaut. Bei näherer Inspektion war auf einer der Säulen ein Bild von C3-PO und R2-D2 zusehen.

Am Anfang tat ich das als lustige Referenz ab, aber dann kam mir der Gedanke, daß die Lego-Entwickler das bestimmt nicht einfach so selbst gemacht hatten. Beim Erneuten anschauen der Tempelszenen in "Jäger des verlorenen Schatzes" entdeckte ich die beiden Star Wars-Protagonisten auf einer Säule - im Film sind die allerdings nur für eine Sekunde deutlich zu sehen.

C3-PO und R2-D2 im Lego-Set Dieselbe Säule im Film

Published on 2024-08-22 in


Generating Matroska tag files from TMDb

I recently ripped my "James Bond" DVD collection with Handbrake to Matroska .mkv files. To complete the process, I wanted to have all possible meta data inside the video files: Title, summary, cover image, director and actors.

Matroska has extensive support for tags. They can be specified as XML file, which I already created from Kdenlive projects when cutting my own videos.

Unfortunately there were no tools that created such a mkvtags.xml file by just specifying the movie title. (Creating them myself for the 24 Bond movies was no feasible).

It turns out that the popular Amazon-owned IMDb has no open API; you have to request a license key by e-mail and pay for it. The Movie Database on the other hand has a usable API that one can get an API key for by just registering an account.

With the TMDb API in hand, I wrote a small script that takes a 2-letter language code and the movie title as parameter, and then generates the mkv tags XML file and downloads the cover and backdrop images. Those can then be used with mkvtoolnix-gui to generate a full-featured .mkv video file.

The code for tmdb2mkvtags is available at git.cweiske.de/tmdb2mkvtags.git, with a mirror at GitHub.

Example mkv tags XML file




 
 
  
   70
  
  
   TITLE
   James Bond Filmreihe
   de
  
 
 
 
  
   50
  
  
   TITLE
   James Bond 007 - Casino Royale
   de
  
  
   SUBTITLE
   Jeder hat eine Vergangenheit - Jede Legende einen Anfang.
   de
  
  
   SYNOPSIS
   Sein erster Auftrag, nachdem er die Lizenz zum Töten erhalten hat, führt den MI6-Agenten James Bond nach Madagaskar, wo er auf den Terroristen Mollaka angesetzt wird. Zwar verläuft nicht alles nach Plan, doch als Bond auf eigene Faust weiter ermittelt kommt er auf die Spur von Le Chiffre, dem Bankier einer weltweit operierenden Terror-Organisation. Dieser plant, das Vermögen seiner Organisation durch ein illegales Pokerspiel im „Casino Royale“ von Montenegro um ein vielfaches zu erhöhen, wofür natürlich auch ein hoher Einsatz nötig ist. Der MI6 sieht daher die Chance, die Terroristen in den finanziellen Ruin zu treiben und beauftragt James Bond, die Pläne von Le Chiffre zunichte zu machen.
   de
  
  
   DATE_RELEASED
   2006-11-14
  
  
   GENRE
   Abenteuer
   de
  
  
   GENRE
   Action
   de
  
  
   GENRE
   Thriller
   de
  
  
   RATING
   3.75
  
  
   TMDB
   movie/36557
  
  
   IMDB
   tt0381061
  
  
   ORIGINAL
   
    TITLE
    Casino Royale
    en
   
  
  
   ACTOR
   Daniel Craig
   
    CHARACTER
    James Bond
   
  
  
   ACTOR
   Eva Green
   
    CHARACTER
    Vesper Lynd
   
  
  
   ACTOR
   Mads Mikkelsen
   
    CHARACTER
    Le Chiffre
   
  
  
   ACTOR
   Judi Dench
   
    CHARACTER
    M
   
  
  
   ACTOR
   Jeffrey Wright
   
    CHARACTER
    Felix Leiter
   
  
  
   ACTOR
   Giancarlo Giannini
   
    CHARACTER
    René Mathis
   
  
  
   ACTOR
   Caterina Murino
   
    CHARACTER
    Solange Dimitrios
   
  
  
   ACTOR
   Simon Abkarian
   
    CHARACTER
    Alex Dimitrios
   
  
  
   ACTOR
   Isaach De Bankolé
   
    CHARACTER
    Steven Obanno
   
  
  
   ACTOR
   Jesper Christensen
   
    CHARACTER
    Mr. White
   
  
  
   ACTOR
   Ivana Miličević
   
    CHARACTER
    Valenka
   
  
  
   ACTOR
   Tobias Menzies
   
    CHARACTER
    Villiers
   
  
  
   ACTOR
   Claudio Santamaria
   
    CHARACTER
    Carlos
   
  
  
   ACTOR
   Sébastien Foucan
   
    CHARACTER
    Mollaka
   
  
  
   ACTOR
   Malcolm Sinclair
   
    CHARACTER
    Dryden
   
  
  
   ACTOR
   Richard Sammel
   
    CHARACTER
    Adolph Gettler
   
  
  
   ACTOR
   Ludger Pistor
   
    CHARACTER
    Mendel
   
  
  
   ACTOR
   Joseph Millson
   
    CHARACTER
    Carter
   
  
  
   ACTOR
   Darwin Shaw
   
    CHARACTER
    Fisher
   
  
  
   ACTOR
   Clemens Schick
   
    CHARACTER
    Kratt
   
  
  
   ACTOR
   Emmanuel Avena
   
    CHARACTER
    Leo
   
  
  
   ACTOR
   Tom Chadbon
   
    CHARACTER
    Stockbroker
   
  
  
   ACTOR
   Ade
   
    CHARACTER
    Infante
   
  
  
   ACTOR
   Urbano Barberini
   
    CHARACTER
    Tomelli
   
  
  
   ACTOR
   Tsai Chin
   
    CHARACTER
    Madame Wu
   
  
  
   ACTOR
   Lazar Ristovski
   
    CHARACTER
    Kaminofsky
   
  
  
   ACTOR
   Veruschka von Lehndorff
   
    CHARACTER
    Gräfin von Wallenstein
   
  
  
   ACTOR
   Charlie Levi Leroy
   
    CHARACTER
    Gallardo
   
  
  
   ACTOR
   Tom So
   
    CHARACTER
    Fukutu
   
  
  
   ACTOR
   Andreas Daniel
   
    CHARACTER
    Dealer
   
  
  
   ACTOR
   Carlos Leal
   
    CHARACTER
    Tournament Director
   
  
  
   ACTOR
   Christina Cole
   
    CHARACTER
    Ocean Club Receptionist
   
  
  
   ACTOR
   Jürgen Tarrach
   
    CHARACTER
    Schultz
   
  
  
   ACTOR
   John Gold
   
    CHARACTER
    Card Players
   
  
  
   ACTOR
   Diane Hartford
   
    CHARACTER
    Card Players
   
  
  
   ACTOR
   Leo Stransky
   
    CHARACTER
    Tall Man
   
  
  
   ACTOR
   Paul Bhattacharjee
   
    CHARACTER
    Hot Room Doctors
   
  
  
   ACTOR
   Crispin Bonham-Carter
   
    CHARACTER
    Hot Room Doctors
   
  
  
   ACTOR
   Rebecca Gethings
   
    CHARACTER
    Hot Room Technicians
   
  
  
   ACTOR
   Peter Brooke
   
    CHARACTER
    Airport Policemen
   
  
  
   ACTOR
   Robert G. Slade
   
    CHARACTER
    Pilot
   
  
  
   ACTOR
   Félicité Du Jeu
   
    CHARACTER
    French News Reporter
   
  
  
   ACTOR
   Michaela Ochotská
   
    CHARACTER
    Shop Assistant
   
  
  
   ACTOR
   Michael G. Wilson
   
    CHARACTER
    Chief of Police
   
  
  
   ACTOR
   Valentine Nonyela
   
    CHARACTER
    Nambutu Embassy Official
   
  
  
   ACTOR
   Phil Meheux
   
    CHARACTER
    Treasury Bureaucrat
   
  
  
   ACTOR
   Alessandra Ambrosio
   
    CHARACTER
    Tennis Girls
   
  
  
   ACTOR
   Vlastina Svátková
   
    CHARACTER
    Waitress
   
  
  
   ACTOR
   Ivan G'Vera
   
    CHARACTER
    Venice Hotel Concierge
   
  
  
   ACTOR
   Richard Branson
   
    CHARACTER
    Man at Airport Security (uncredited)
   
  
  
   ACTOR
   Martin Campbell
   
    CHARACTER
    Airport Worker (uncredited)
   
  
  
   ACTOR
   Tara Cardinal
   
    CHARACTER
    Woman in Casino (uncredited)
   
  
  
   ACTOR
   Ben Cooke
   
    CHARACTER
    MI6 Agent (uncredited)
   
  
  
   ACTOR
   Simona Roman
   
    CHARACTER
    Dossier Girl (uncredited)
   
  
  
   ACTOR
   Greg Bennett
   
    CHARACTER
    Airport Driver, Miami (uncredited)
   
  
  
   ART_DIRECTOR
   Michael Lamont
  
  
   WRITTEN_BY
   Paul Haggis
  
  
   EDITED_BY
   Stuart Baird
  
  
   WRITTEN_BY
   Ian Fleming
  
  
   ART_DIRECTOR
   Peter Francis
  
  
   COSTUME_DESIGNER
   Lindy Hemming
  
  
   ART_DIRECTOR
   Steven Lawrence
  
  
   PRODUCER
   Barbara Broccoli
  
  
   DIRECTOR
   Martin Campbell
  
  
   DIRECTOR_OF_PHOTOGRAPHY
   Phil Meheux
  
  
   WRITTEN_BY
   Robert Wade
  
  
   WRITTEN_BY
   Neal Purvis
  
  
   PRODUCER
   Michael G. Wilson
  
  
   LEAD_PERFORMER
   Chris Cornell
  
  
   ART_DIRECTOR
   James Hambidge
  
  
   ART_DIRECTOR
   Dominic Masters
  
 
]]>

Published on 2021-05-02 in ,


Play videos from Firefox on your Dreambox

Two years after its last release, I finally found the time - and a reason - to rewrite the playVideoOnDreambox browser extension, making it compatible with newer Firefox versions.

The extension adds a button to Firefox that sends the currently playing video to the Dreambox satellite receiver - useful for showing a Youtube video to the family on the large TV screen.

Screenshot

Dreambox' media player does not support playing websites, so the extension needs to extract the URL of the video embedded on the current page. I did not implement this myself, but rely on youtube-dl for this.

Mozilla dropped support for "classic" extensions in Firefox 57; you have to use the "web extension" format now that severely restricts the things you can do. The main problem for me is that extensions cannot execute other programs on the computer anymore (unless the are registered manually with the browser and speak a certain protocol). This broke the my old extension that called youtube-dl directly.

I could have written a youtube-dl proxy script that users would need to register in their browser and that speaks said protocol. But instead I made the Firefox extension rely on the playVideoOnDreambox proxy application, just as the Android app does.

So when your browser shows some video and you click "Play on Dreambox", the extension sends the page URL to the proxy server web app running on some machine in your network. This proxy calls youtube-dl to find the video URL, and then instructs the Dreambox to play the video.

Download

You can download the playVideoOnDreambox firefox extension version 0.6.0 from its homepage or the Mozilla Add-Ons page.

You migh be interested in the playVideoOnDreambox Android app that lets you "share" the video with your satellite receiver.

Published on 2019-03-14 in , , ,


Avoid OpenShot

I spent most evenings of the last two months creating a wedding movie from about 150 single videos recorded with our camcorder. The non-linear video editor I chose was OpenShot, version 1.4.0 with libmlt 0.7.6. I still regret it, even though we finally managed to finish the video.

I'll list allsome of the bugs that we came across in the 2 months, and a better tool.

Frequent crashes

We had more than 350 crashes in the two months. The last days were so bad that you could do about 1 action and save before OpenShot crashed - e.g. add clip, save, crash. Start OpenShot again, move clip, save, preview, crash.

Transition problem

The worst bug of all, even worse than the crashes: Fade in/out glitches

When adding a transition (e.g. fade) between two video clips, now and then the target clip is fully visible at the beginning of the transition.

If that happens, the track is "tainted" and all following clip transitions will have the same problem. All of them. Every single one.

The only workaround is to add a new track and move all remaining clips onto that. For our movie, with a length of not quite an hour, we ended up with 22 tracks. Together with the frequent crashes, this was the total disaster.

Audio problems

On some scenes we added some ambient music with 25% or 30% loudness. When playing the preview (and the final rendered video), the music was missing.

The bug for that is Decreasing audio volume of a clip doesn't work and has been fixed in 2009. Unfortunately, my clock shows 2011 and the bug is there - again.

The problem here is localization (and the OpenShot developers not being aware of it): The English decimal point is a dot ".", while the German one is a comma ",". OpenShot (or MLT) expresses the volume as floating point number from 0.0 (no sound) to 1.0 (100% volume) or higher. When OpenShot generates the MLT project file, a volume lower than 100% generates a number like "0,25" with a German locale. The MLT parser expects a dot as decimal point and throws away everything it does not understand/expects, and this is the comma and everything behind.

To make it work, we had to start OpenShot in english:

$ LC_ALL=C openshot

Update: Jonathan Thomas wrote that they are aware of locales, know about the problems and are sure that the problem does not exist:

OpenShot works fine in every culture we've localized it for, including many that use commas.

I still wonder why I clearly have the problems.

General slowness

The first problem we had when beginning our project was adding many files blocks interface.

That problem is not as bad as the following: Clip/Videos properties window is too slow. To change video and audio transition settings, or the loudness of a clip, you need that window. It takes three seconds(!) to close that window, which interrupts every workflow.

And that one is not as bad as: Video preview keeps going for some time after pausing. Imagine you were running the preview and want to continue working. Pressing the pause button to stop preview only reacts 15 seconds after you pressed it. Unbearable.

On my 4 CPU system, only one CPU was utilized. Yay. Did I already tell you that OpenShot uses 100% CPU when I do nothing?? The devs say "behavior is by design"...

For short movies only

The timeline view in OpenShot is your main work tool to arrange videos, music and transitions. It has a zoom setting which allows you to determine the resolution you want to see: Let 5 seconds of the timeline fill the screen? That's ideal for fine-tuning transitions and clip alignments. Let 30 minutes fill the screen? Good to get an overview and jump quickly to a specific place.

Timeline only shows 320 times the zoom slider setting breaks everything. It means that you have the full detail zoom only for the first 10 minutes, and need to use the 12 seconds setting to be able to access minutes 50-60. With that bug, only coarse clip alignment is possible after the first 10 minutes.

Craftsmanship

So now you have 30 images and want to arrange them on the timeline sequentially, and add a fade between each of them - a classic slideshow. Sounds simple? It is - but not in OpenShot.

You have to do it manually. Add each of them on the timeline. Set the length for each of them (remember the 3 seconds properties window problem). Add a a transition for each of them.

That's why Applying "Effects" to a "Group" of clips should be implemented, but isn't yet.

Update: Jonathan Thomas replied that OpenShot has this feature; I did not read the manual properly: In the file list, select many clips and right-click them. Select "Add to timeline" and a new window will pop up. Here you can add transitions that will be applied to all of them. Unfortunately, the length is fixed to 5 seconds each picture, which is not always what I need.

Binary blobs are in

Having no batch mode would not be that bad if I could modify the project files by hand through writing some XML. Unfortunately, the OpenShot developers decided to make it as hard as possible for the users to use additional tools and use a binary project file format.

I hope that Use a text-based project file format gets implemented some day.

Update: Jonathan Thomas wrote that OpenShot saves its files in a text-based format, but unfortunately the tools I used (less, gedit and file) told me it's binary. Maybe it's because I started the project with OpenShot 1.3 - anyway, I had the problem.

Various other issues

As if the bad bugs I listed up to here are not enough, did I encounter many small usability issues. Listed in no particular order:

It's the lib!

I got a mail from Jonathan Thomas (OpenShot developer) telling me my blog article is unconstructive and that most of the problems I experienced are not OpenShot's fault but that of MLT, the video library that is currently used.

While I can understand that technically, it is a reasoning that does not make OpenShot better or more usable. OpenShot crashes frequently, be it OpenShot itself or an underlying library - I do not care. It just doesn't work.

An alternative

Some days ago I got some feedback from Mark Emerson:

I'm running on Debian and having virtually all of the major problems you describe. I'm deep into a 1-hour, 60-file project now, and getting to the "1 edit, save, crash" stage. I must decide whether to abandon my editing and start over in another video editor. What editor do you recommend?

After finishing this one movie, I ditched OpenShot and have been using Kdenlive for the next two movies without any major problems. If you are looking for a tool that let's you finish your movie, try it.

Other people

The state of video editing on Linux tells you that, two years later, most of the bugs I experienced are still there and OpenShot is alpha-quality at best.

Tomasz Borek has a totally different experience; he had no problems whatsoever in mid 2013.

Another user, this time mid 2014:

Subject: Re: Avoid OpenShot
Date: Wed, 23 Jul 2014 20:55:16 -0700
Dear Sir: I just wanted to relate my problems with Openshot. I'm using v. 1.43 and didn't have any problems until I tried to open my project after saving it. Crashes the program every time. I'm using Ubuntu 14.04_64. I also tried to open my project with Mint 16-same result.

In the beginning of 2016, Louigi Verona made a video Video editing on Linux: Openshot in which he visually describes some of the problems with OpenShot.

Mentioned in Why it is ok to criticize FLOSS .

Published on 2011-12-01 in , ,


Dreambox MediaPortal: Chaos Computer Club 34C3 videos

Ich hab es noch nie auf einen Chaos Communication Congress geschafft, auch auf den letztjährigen 34C3 nicht. Trotzdem schaue ich mir sehr gern die Videos an, die auf media.ccc.de veröffentlicht werden. Letztes Jahr machte ich das mit der playVideoOnDreambox-Android-App, dafür muss man aber immer das Handy dabei haben und die Videos raussuchen.

Um das ganze angenehmer zu gestalten, habe ich einen Patch für die Dreambox-MediaPortal-Extension gebaut, welches die media.ccc.de-API integriert und alle Kongresse und deren Videos abspielbar macht.

Damit man den Überblick behält, werden bereits gesehene Videos auch als solche angezeigt. Die letzten 3 Konferenzen, in denen man Videos angeschaut hat, werden zur einfacheren Navigation ganz oben in der Konferenzliste anzeigt.

Screenshots

Konferenzliste Vortragsliste

Download

Aktuell ist der Patch nur im ccc-Branch meines mediaportal-Git-Repositories zu finden. Ich hoffe allerdings, daß der Patch in die offizielle Erweiterung aufgenommen wird.

Seit 2018-01-17 ist das ganze als "CCC Media" in der Kategorie "Fun" im offiziellen Mediaportal-Paket zu finden.

Published on 2018-01-03 in ,


Murmelachterbahn

Published on 2016-02-16 in ,


Deinterlacing 1080i videos

I bought our video camera, a Sony HDR-CX305E, in the faith that it can record "Full HD" video. The format has been dubbed "AVCHD" by Sony and the videos are stored in .MTS, acronym for "MPEG-2 Transport Stream".

What I, very unfortunately, did not know/see/recognize when buying the camera is that the "Full HD" that the camera promises is not real Full HD. Near the end of the "technical data" page is the following text:

Video Quality: HD; FX (1920 x 1080i, 24 Mb/s)/FH (1920 x 1080i, 16 Mb/s)/HQ (9 Mb/s)/LP (5 Mb/s), SD; HQ (9 Mb/s)

The table also says:

Video format: High Definition, AVCHD (1920 x 1080, 1440 x 1080)/Default resolution, MPEG2

The camcorder only has a horizontal resolution of 1440 pixels, not 1920. To overcome that limitation, the camera defines a pixel to be rectangular and not quadratic.

Now if we combine the information with what we know after trying out:

Type Quality Resolution Real resolution Fields per second Frames per second Bitrate
HDFX1920 x 1080i1440 x 540502524 Mb/s
HDFH1920 x 1080i1440 x 540502516 Mb/s
HDHQ1920 x 1080i1440 x 54050259 Mb/s
HDLP1920 x 1080i1440 x 54050255 Mb/s
SDHQ720 x 576i720 x 28850259 Mb/s

So, 1440 x 540 it is. That's supposed to be Full HD? It's less than half of the real Full HD resolution (1080p50)!

In the end I had to deinterlace all of the videos.

VLC

I tried all of VLC's deinterlacing filters and found Yadif (2x) to give the best results with quick camera movements (panning shots).

VLC offers a command line conversion mode that can be used to quickly transform (demux) all video files from the camera to nicely deinterlaced movie files. Or so I thought.

Very very unfortunately for me, VLC has a bug that results in missing video when converting .mts files, which makes VLC unusable for me.

ffmpeg

After VLC I tried mencoder, but failed to find a good deinterlacing mode.

HandBrake also sucked very much; their deinterlacing modes were equally bad (yep, I tried them all).

After I had given up and was putting up with HandBrake's bad deinterlacing, I finally used the correct search terms with $searchengine and found the solution, which gives me awesome smoooooooooth deinterlaced videos:

$ ffmpeg -i in.MTS -vf yadif=1 -acodec ac3 -ab 192k -vcodec mpeg4 -f mp4 -y -sameq out.mp4

The interesting option here is =1 after -vf yadif: It generates a full frame for each field, which means 50 fps in the resulting movie. A standard -vf yadif (which implies =0) gives you 25 fps only, which was laggy on some scenes here.

I know now that mencoder also supports yadif=1. Oh, and using -acodec copy resulted in broken/unsynced audio for me.

Broken record button

4 years after buying the camera, the Start/Stop button (which is used to start and stop recording) does not work anymore. So much for the quality of the Sony HDR - CX 305 E.

We can still use it by pressing the record button on the touch screen which is shown after 3 seconds if you enable General Set -> Sound/Disp Set -> Display Set: Auto1.

Published on 2011-11-29 in ,


Kdenlive: Fading a "lower third" text title

Videos can be overlaid with text; TV programs often do this to show the name of the speaker or give some context information. This text element is called lower third ("Bauchbinde" or "Insert" in German).

In Kdenlive, you can achieve this by adding a title on a video layer above the video and combining them with a Composite transition. It makes the title appear instantly, and removes it again instantly when the title ends.

To make the text actually fade in, you have to use an Affine transformation and animate the opacity with some keyframes.

  1. Add the video clip to the second video track
  2. Create a title clip with the text you want to show and add it to the first video track. The transition type is automatically set to "Affine".
  3. In the affine transition properties, add keyframes at 0, 1, 4 and 5 seconds (for a title clip with a length of 5 seconds).
  4. Set the opacity at 0 and 5 seconds to 0, keep it at 100 for seconds 1 and 4.
  5. Play it. The title text will fade in for 1 second, stay for 3 seconds and fade out for 1 second.

Screencast

Published on 2015-04-03 in


Lieder fürs Babyvideo

Wir haben für jedes unserer Kinder ein Video vom erste Lebensjahr gemacht. Hier ist die Liste der Lieder, die wir genutzt haben:

Babyvideolieder
Künstler Titel Album
Andreas Bourani Auf uns
Conny Froboess Pack die Badehose ein
Detlef Jöcker Die kleine Katze ist erwacht Wenn Pinguine watscheln gehen
Dirk Busch Enkelkinder
Dirk Reichardt Score Part 1 Soundtrack Keinohrhasen
Dirk Reichardt Score Part 3 Soundtrack Keinohrhasen
Ernie (Sesamstraße) Quietscheentchen
Frank Schöbel Weihnachten in Familie
Heinz Rühmann Wenn der Vater mit dem Sohne
Ich+Ich So Soll Es Bleiben
Max Raabe In meiner Badewanne bin ich Kapitän
mëdlz Ich find mich gut mëdlz
Phil Collins Mein Herz
Reinhard Lakomy & Monika Ehrhardt Liebkoselied Der Traumzauberbaum
Reinhard Mey Die erste Stunde Mein Apfelbäumchen
Reinhard Mey Mein Apfelbäumchen Mein Apfelbäumchen
Rolf Zuckowski & Anuschka Zuckowski Was Kinder machen Dein kleines Leben
Schlaf, Kindlein schlaf (instrumental)
Silbermond Ja Himmel auf
Sportfreunde Stiller Ein Kompliment Die gute Seite
Wenn Mutti früh zur Arbeit geht
Wolfgang Lippert Ach wie ist der Winter schön

youtube-dl ist dein Freund, genauso wie ffmpeg:

$ ffmpeg -i video.mp4 video.wav

Published on 2015-04-04 in ,