The Great War video series

It’s crazy how long the series has been running, 50 years after World War 1, visiting events as they happened in a weekly format – shifted 50 years. I’ve been subscribed to it for a long time, and occasionally watch it.

This weeks episode shows various aspects of the war again, and some huge numbers. Russia losing 9 million people in just two days is unimaginable. When we think about todays problems, this is an important reference point to keep in the back of the head.

On Steam, the video game Verdun has been advertised to me at various times in the past. After watching this episode of The Great War, seeing the banner again got my focus, as I actually knew about Verdun now – a place that was fought over, rather small for the number of casualties and effort put into.

headerThere is not much point to this post. The mental link and aha effect simply inspired me to point at the video series again.

Downloading Music from YouTube

Beware of the YouTube video licensing, the terms you agreed to, and licensing laws where you live.

Programs used:

  • youtube-dl
    A command line tool to download a YouTube video in (one of) its various provided formats
    To download the Opus audio track of the video
  • ffmpeg
    A feature rich audio and video encoder and muxer
    To copy the audio (without reencoding) into the .opus format

Downloading the Audio

<URL> will be replaced by the full video URL by you.

First, you will list the available formats.

youtube-dl -F <URL>

for example

youtube-dl -F

The -F parameter will list the available video and audio formats of the video.

For the example, that is

[info] Available formats for DXNJUbjf8Ms:
format code  extension  resolution note
249          webm       audio only DASH audio   58k , opus @ 50k, 1.11MiB
250          webm       audio only DASH audio   80k , opus @ 70k, 1.49MiB
140          m4a        audio only DASH audio  127k , m4a_dash container, aac  @128k (44100Hz), 2.70MiB
171          webm       audio only DASH audio  132k , vorbis@128k (44100Hz), 2.67MiB
251          webm       audio only DASH audio  146k , opus @160k, 2.91MiB
141          m4a        audio only DASH audio  255k , m4a_dash container, aac  @256k (44100Hz), 5.41MiB
242          webm       426x240    DASH video   98k , vp9, 30fps, video only, 805.08KiB
160          mp4        256x144    DASH video  112k , avc1.4d400c, 30fps, video only, 2.27MiB

You will be able to identify the audio-only files, and amongst them the best quality Opus one

251          webm       audio only DASH audio  146k , opus @160k, 2.91MiB

That is the file (with ID 251) we will download with the command

youtube-dl -f 251

Re-Muxing the webm audio to .opus

The process of packaging audio and video in a container is called muxing. We will copy the audio data from the webm file we downloaded to an .opus file.

ffmpeg -i "<Downloaded File>" -c copy "<Out File>.opus"

Although playing the webm file will work in a lot of cases just as good, playing back the exact same audio data, the opus file format will specifically indicate its and opus audio (only) file, and audio players are more likely to recognize it as audio (they may filter out webm files expecting them to be videos).

Cutting the Audio

If the audio (video) has parts you do not want, you can simply drop those parts even without reencoding (which would lose data and as such quality – although probably unnoticable).

You can specify a start time and duration, or end time.

ffmpeg -ss <start time hh:mm:ss> -i in.webm -t <duration> -c copy out.opus
ffmpeg -ss <start time> -i in.webm -to <end time hh:mm:ss> -c copy out.opus
ffmpeg -ss 00:03:45 -i in.webm -t 40 -c copy out.mp4

„Keine wöchentliche Werbung“ am Briefkasten

Jede Woche landet unnötige, ungewollte Werbung im Briefkasten.

Um dies zu verhindern reicht es einen gut sichtbaren Hinweis am Briefkasten zu befestigen, der verdeutlicht dass keine Werbung gewünscht ist.

Werbung kann jedoch auch informativ sein; zu neuen Geschäften, Veranstaltungen und (sonstigen) Angeboten.Passend dazu habe ich mir einen „Sticker“ per HTML+CSS gebastelt, ihn dann ausgedruckt und mit Folie überzogen und am Briefkasten befestigt.

Keine wöchentliche Werbung StickerVielleicht findet ja noch jemand Verwendung dafür. 🙂

nginx configuration management and secure SSL

After having cleaned up my nginx configuration for Let’s Encrypt SSL, an A-grade on SSL-Labs test, HTTPS-only, and IPv6, I published a useful reference configuration as a git repository nginx-config on github.

I wrote multiple times about nginx configuration in the past, but this should provide a more concise and reusable documentation – with potential for “live” updates.

Keine Verbesserung der Internetanbindung in Sicht

Warum gibt es nach vier Jahren noch keinen besseren Internet Tarif von meinem Anbieter? Tatsächlich bekomme ich für den selben Preis nur noch 1/3 der Downloadgeschwindigkeit (selber Upload). Was ein Witz.

Davon abgesehen ist die Unitymedia Webseite total unübersichtlich bezüglich ihrer aktuellen, und vor allem alten (KabelBW) Produkte (nicht auffindbar – und im Kundencenter steht nur der Produktname, nicht dessen Konditionen).

Und dass man kein Kontaktformular als Kunde nutzen kann wo man nur die Anfrage schreiben muss ist ein Witz. Und was interessiert die Anschrift vom Antragsteller wenn dieser eine Frage zu einem Produkt hat die unspezifisch zu seinem Produkt ist?


Deutschland – Langsames Internet in der stärksten Volkswirtschaft Europas

Während in Asien Länder wie Südkorea und Japan inzwischen beim Glasfaserausbau bis zu 70 Prozent aller Haushalte erreichen, ist Deutschland in diesem Bereich in Europa Schlusslicht. Nach Zahlen … kommt die stärkste Volkswirtschaft in Europa gerade einmal auf ein Prozent aller Haushalte, die über einen Glasfaseranschluss verfügen.

heise news

Combining downloaded YouTube video formats with ffmpeg for full HD videos

youtube-dl makes downloading YouTube videos very easy. From a command prompt, simply run youtube-dl <video-url>

However, by default, this will download the best video file with video and audio; which is 720p. While youtube-dl itself has a ton of options, recombining a video and audio file is a great introduction to the powerful ffmpeg. Continue reading Combining downloaded YouTube video formats with ffmpeg for full HD videos

The WPF/Windows App Development experience – Part 2: WPF Touch

After a description of the problems of Microsoft libraries / choice of (MS) technology in part 1, this post is about using WPF for a touch applications.

When you create WPF application, you will be able to click-use it with a touch obviously, but using touch panning to scroll and other touch gestures does not work by default.

Fortunately, enabling panning is very easy; you can enable PanningMode on ScrollViewer, which in turn also enables manipulation events (IsManipulationEnabled). This seems to work just fine at first sight. Unfortunately, once you put it on a touch device and test it for yourself, you will notice touch clicks not to go through. Continue reading The WPF/Windows App Development experience – Part 2: WPF Touch