How to batch-convert videos with ffmpeg including all audio and subtitles

Since I spend quite a bit of time tinkering with this I though it might be interesting to others.

The following can be executed on a folder with a bunch of videos which ffmpeg will convert including all audio and subtitle streams and put in a subfolder (not very) originally called „Done“ (not sure if you need to create that folder or if ffmpeg will do that*):

for i in *.*; do ffmpeg -hwaccel_output_format cuda -i "$i" -map 0:v:0 -map 0:a? -map 0:s? -c:v hevc_nvenc -b:v 2000k -preset slow -c:a aac -b:a 128k -c:s copy "Done/${i%.*}.mkv"; done

All the for i in for the batch-conversion is way above my tiny „I can’t learn programming“ brain and is taken from this StackExchange thread (among other things I can’t find now). You could do *.mp4 or *.mkv if you only want those types of videos to be converted.

-hwaccel_output_format cuda and -c:v hevc_nvenc? tells ffmpeg to use the GPU with Cuda (so will probably only work with NVIDIA) and use HEVC (x265) as the video-codec.

The interesting bits are -map 0:v:0 -map 0:a? -map 0:s? which selects all video(?), audio streams and subtitles. I was using -map 0 before but this sometimes created empty video or audio streams which caused all video players I tried to crash (except for good old VLC who did not care). Not ideal.

-c:v and -c:a select the audio and video codecs (c = codec) with slow preset in this case, whereas

-b:v and -b:a tells ffmpeg the bitrate (b = bitrate).

-c:s copy copies the subtitles.

* Edit: You do need to have a folder withe name you specify there in the folder where you run the script. If someone knows how to automate that I’d be happy to hear how ^__^

How to import PDFs as „images“ in Scribus

Since I had to figure this out multiple times now (because I always forget how to do it +___+), here’s a workflow that seems to be working for me to add white frames of different widths to different sized pages to vector illustrations – my local printer The Art of Print (which is amazing ^__^) here in Edinburgh wants it that way.

I need page sizes ranging from A5 to A2, including borders between 5 mm and 2 cm.

Screenshot of Scribus showing the same illustration on different sized pages.

Yesterday I figured out that it should be possible to do this in Inkscape with clones but there seems to be a bug that just exports nothing instead of clones on a new page (and cloning a whole illustration is no fun because you need to put it all in one top layer with sublayers).

After a lot of fiddling I remembered that in Scribus you can actually import PDFs (but not SVGs, apparently) as images into image frames (ctrl-i or rightclick > Content > Get Image) if you change the „Files of Type“(?) to „All supported formats“.

This imports the vector graphic as an image (not what we want at all!) but unlike File > Import > Get Vector file which imports (or rather appends, inserts) the PDF or SVG as editable objects this cuts the image at the original page border (yay).

You can then arrange the PDF / image just as you need on pages and when exporting it to a PDF for printing you can check the box on the PDF export dialogue in General > File Options > Embed PDF & EPS files (EXPERIMENTAL!) to export the PDF „image“ as vectors. This has always worked well for me so far.

Scribus PDF-export dialogue with the Embed PDF-Files option highlighted

Thanks to Raghavendra Kamath for pointing out this last trick out to me, otherwise this whole process would be useless ^__^

Now I just need to remember how to do this when I need it again in a few months …

Gemischtwarenladen

If the movie’s main characters visit Nazi-Germany only to nerd out about warplanes, you know you’re watching some fucked-up bullshit. Shame on you, Studio Ghibli (I also feel like it’s a new low when it comes to female characters). The best thing about The Wind Rises is that it’s a reminder that capitalism as a system hasn’t been working since the 1920s. I’ll take the world without pyramids, btw (yes, I know that probably means living in the stone age).

Oh look, another cartoon series about white boys! Because, you know, poor white boys, sooo underrepresented in mainstream media, gotta give’m some rolemodelz. Otherwise this looks like it might be fun. UPDATE: Nope, it’s boring and annoying.

Haha, geil, parallel zu Fix-Ubuntu (Ubuntu-Marketing-Gau in dem Zusammenhang) gibt’s jetzt Fix OSX. (Via)

Guter Artikel bei Drop the Thought über den Zwiespalt bei der Kritik am (weißen cis) Feminismus. Da liegen Welten zwischen solchen Gedanken und der Kotze, die die männliche, weiße, deutsche Netzelite á la fefe und Don Alfonso so täglich ins Netz kippt.

Well, who would have thought: looks like Shadow of Mordor is true to its roots insofar that its treatment of female characters is shit (fridging for the manpainz). Fuck you Tolkien, fuck you gamedevs.

Gemischtwarenladen

Chucklefish, die Starbound gemacht haben und Witchmarch rausbringen werden, machen ein weiteres 8Bit-Spiel, Wayward Tide, diesmal zum Thema Piraten. Yay! Mit PoC! Yay! Yay! Hoffentlich spielbaren. Cool, mit ca. 5 von 12 ist deren Frauenquote auch eher untypisch für ein Spielentwicklungsteam. UPDATE: Oder hier! Ja, ganz am Ende hamse noch zwei Damen versteckt. UPDATE 2: 1/7.

Der halbjährliche Spon-Besuch fördert dieses Juwel des Investigativ-Journalismus zutage: „Studienkredit als Schuldenfalle“. Lol, No Shit Sherlock, die Deutsche Bank (ausgerechnet!) will garnicht Samariter-mässig armen Student*innen helfen, wer konnte das ahnen! Aber hier, die taz auch nicht viel besser: Klickstrecke (es ist 2014! Wollt ihr mich verarschen!?) wie Männer in Schottland „Wahlkampf“ machen (leider ist das doppelt Quatsch, weil der Referendum-Trubel absolut nix mit dem normalen (= nicht vorhandenen) Walhkampf in Schottland zu tun hat).

Ich muss mit Freuden und Unglauben feststellen, das Chaosradio in letzter Zeit garnicht das übliche Sausagefest mehr immer eine 100%ige Altherrenrunde ist. Zur Zeit ist das noch nicht so oft passiert (CR205, CR204, CR203, …), dass man den Zufall ausschließen könnte aber die Hoffnung stirbt zuletzt und so.

Eine schöne Artikelreihe (zweiter Teil) (Via), die sich damit beschäftigt, wie unsere Vorteile – in diesem Fall zum Geschlecht – unsere Sicht auf Geschichte verfälschen und im Zirkelschluss wieder heutige Klischees festigen (Schwert im Grab = Mann (lol no), Männer sind „von Natur aus“ (wenn einem da keine Alarmglocken losgehen, weiß ich auch nicht) fitter, weil sie früher auf die Jagd gegangen sind und ähnlicher Quatsch). Dass die Vergangenheit immer von unserer Sicht auf sie geprägt ist, ist ja auch ein Thema, das MedievalPOC immer wieder behandelt.

Rant-Time: Obwohl ab Mavericks ja angeblich der Zweitmonitor-Support für OSX besser sein soll, isses trotzdem immer noch der absolute Alptraum, Macbook zu = nicht Ruhestand, Fenstergrößen und Positionen werden sich null gemerkt (was genau macht eigentlich das +-Symbol bei Finder-Fenstern? Ganzer Bildschirm ist was anderes), das Dock ist nur auf dem zweiten Monitor platzierbar, wenn der nicht über dem ersten angeordnet ist etc. Ich hätte fast Lust, nur deswegen mal wieder ‘ne Linux-Partition aufzusetzen um zu gucken, ob Gnome das tatsächlich besser kann. UPDATE: Das schlimmste ist eigentlich, dass OSX gerne mal beim Aufwachen, den externen Monitor nicht findet und dann alle Fenster in der Höhe wieder so sind wie auf dem Macbook Monitor. Da ist noch viel Platz für Verbesserungen.

Gemischtwarenladen

Lang ist’s her aber vielleicht sind die Links ja immer noch frisch:

Transgirlnexdoor ist ein schöner Webcomic über den Alltag einer Transfrau. (Via) Seufz, es gibt keinen deutschen Wikipedia-Eintrag für Transitioning!? Und ein ziemlich guter Comics über Suizidgedanken von Erika Moen (of Oh Joy Sextoy-Fame). (Via)

Ok, ich weiß wie ich ab jetzt meine Windows-Partition nennen werde: Windoge.

Damit ich mich bei Bedarf dran erinnere: Weil Linux ja keine benutzbare Application-Firewall hat, muss man die Spionage per Hand in /etc/hosts auf localhost umleiten: 127.0.0.1 google-analytics.com etc. Danke, Christoph!

ES WIRD 2023 BIG BROTHER AUF DEM MARS GEBEN??? (Via)

IOS hat ja auch so eine Meshnetzwerk-Funktion aus der man ein „alternatives Internet“ bauen könnte. Wär’ ein schöner Feldversuch, wenn die das aktvi ins System integrieren würden (wg. Fragen der Privatsphäre, Störerhaftung etc. … funktioniert Airdrop in die Richtung?). Entsprechende Apps (Via) gibt’s natürlich auch für Android, nur benutzt die natürlich niemand.

Gemischtwarenladen

(M)ein Traum wird wahr: eine riesige Liste mit japanischen Emoticons. (ノ・o・)ノ

Wenn du auch nach dem Einbau einer Western-Digital Platte ins Macbook (oder unter einem anderen Unix-System) mit einem gruseligen Klicken begrüßt wirst, solltest du dir mal hdapm angucken.

Indiegame Witchmarch wird ein sehr, sehr stylishes Jazz-Age-Pixelart-Sidescroller-RPG bei dem man sogar POC spielen kann. *Thumbs up* Oho, The Nightmare Cooperative können das auch.

Musik: Unmap ist ein sehr coole Elektroband aus dem Bodi Bill-Umfeld (= sind beide bei Sinnbus). Letztere machen grade ein Projekt mit dem Hipster-Namen The/Das (Wo Windoof dann weint, weil böses Schrift-Zeichen im Dateinamen, mimimi).

Das Fairphone sahnt bei einem Umweltfreundlichkeits-Test ab. (Via) Andere sehen das ja anders und ohne CustomROMs ist das weiterhin uninteressant.

Gemischtwarenladen

Mehr Kritik zu den nicht behandelten Kriegsverbrechen an denen die Hauptperson von Studio Ghiblis „The Wind Rises“ zumindest Teilschuld hat (und ich hab’ ihn immer noch net gesehen).

Krass, auch beim Gebrauch vom Farben im Alltag (Kleidung, Wohnung etc.) spielt Rasse und Kolonialismus eine Rolle. (Via) MedievalPOC weist in dem Zusammenhang nochmal darauf hin, dass die weißen Marmostatuen auf die sich viel der westlichen Ästhetik bezieht früher mal sehr farbenfroh waren.

Marvel’s new Thor is a woman! With boobplates! m (

Der ganze Plastiküll den wir so produzieren wird auch schon in Steinform gefunden. Damit man unsere Blödheit auch in 100.000 Jahren sehen kann. (Via)

Uuuhhhh, KDE wird langsam immer weniger hässlich. Wenn sie jetzt noch endlich diese schrecklichen Icons in den Müll schmeißen, kann man das ja fast benutzen. Hier sehe ich die nicht mehr, könnte man fast mal abchecken.

We Tried to Make a Game: „In Which You Are a Fox“

InWhichYouAreAFox-PreAlpha

InWhichYouAreAFox-Blender

InWhichYouAreAFox-Bug

tl;dr: My brother and I tried to make a game about a fox. We didn’t make it very far, but please download it anyway:

→ Windows
→ Mac OSX
→ Linux – untested : (
→ Web (needs Unity plugin)

In December 2013 my brother suggested that instead of going to 30C3 we could finally start making a game. It was going to be about a fox, you’d start as a cub, grow up and hunt birds and mice and mate and be hunted by hunters or bears or badgers or whatever …

Continue reading We Tried to Make a Game: „In Which You Are a Fox“

Howto: Invalid Encoding with Truecrypt volumes under Linux

I’m automounting my Truecrypt data partition on login under Linux Mint. Unfortunately, the standard to mounting Truecrypt volumes seems to be iso8859-1 (at least for FAT32 volumes) which leads to the dreaded „Invalid Encoding“ in certain filenames (I’ve seen this for European special characters like ä and ø as well as for Japanese and Chinese characters).

The solution is to put iocharset=utf8 in the Mount Options when mounting the volume (or putting it into the Truecrypt Preferences when you want it for every volume you mount).

Big thanks to this Ask Ubuntu-answer for this solution.

UPDATE: Looks like when automounting Truecrypt volume via Startup Applications the Mount Options don’t really work, but this does: truecrypt --auto-mount=favorites --fs-options=iocharset=utf8 (Via)

Music Player: Clementine

I can’t actually remember why I dumped iTunes/Songbird in favor of Enqueue in the first place (no monitored folders?) but I have now ditched that again for Clementine, which is unbelievable ugly (it’s based on Amarok, so I guess it’s KDE’s bad influence?) but has everything you could ever want, like global shortcuts via Mac Media Keys (if you free them from Itunes’ grip) Growl-support, good Gnome/Cinnamon integration, … And it’s open source, cross-plattform etc.!

Syncinc local files á la Dropbox with Synkron

I while ago I found Synkron, a nifty syncing tool which was almost perfect for my podcast listening setup: I’m downloading podcasts with the great open source player Miro (I’m using the 3.5 version, newer versions are strange and cluttered to a point where I find it almost unusable) and I’m then using Synkron to sync the Miro folder via USB to my phone (I tried to figure out doing this via wi-fi but that’s a mess).

The problem was that whenever I deleted a file on the computer or the phone but not on the other device by default Synkron would copy it back from the respectively other device, so it was more or less impossible to delete a file (in reality you’d of course know most of the times which podcasts you already listened too but stil …).

The solution is as follows:

Click the „Advanced“ button on the bottom left corner in Synkron and tick „Detect collusions“. Tadaa! Now, if you delete a file on the phone, next time Synkron will delete it on the computer and vice versa.

EDIT: For some reason Syncron skips all the files it is supposed to sync in the Linux/Ubuntu-Version, but Unison does the job, it seems.

Howto: Change color profile on wake/resume in Linux Mint/Ubuntu

I’m trying out Linix Mint 14 on my Macbook Pro at the moment and while it is a huge step from my previous visits to the Linux world a few years ago there a still some issues. One was that the color-profile was set to default every time resumed the computer from sleep. But I’ve found a way around that:

First, install xcalib, a nice little program that can load color-profiles via xcalib PATH or /usr/bin/xcalib PATH in the terminal (xcalib -c resets the profile) and do a lot of other stuff.

Now place a script in /etc/pm/sleep.d/ that runs this line on wake/resume (see here for details). The problem is that the skript doesn’t get executed as it is because you have to specify the display and sudo the whole thing.

So the script in /etc/pm/sleep.d/ should look like this:

#!/bin/bash
case "$1" in
    thaw|resume)
        export DISPLAY=:0
        su -c - YOUR_USERNAME
        /usr/bin/xcalib "PATH_TO_PROFILE"
        ;;
    *)
        ;;
esac
exit $?

Anyway, that’s working for me.

Songbird 1.0…

Hier noch ein alter Post, der irgendwie verloren gegangen ist beim Umzug:

… ist da! Krass! Sie haben ein niedliches neues Icon an Start gebracht, das das hässliche Ei ersetzt und insgesamt ist SB meines Empfindens nach tatsächlich viel schneller als vorher. Hab es bisher noch nicht bereut iTunes den Rücken gekehrt zu haben.

Ach, und wo wir schon bei OpenSource sind: mit dem letzten Ubuntu Studio-Release (8.10?) funktionierten plötzlich die Compiz-Desktop-Effects, die ich bisher immer vergeblich zum laufen zu bringen versucht hatte, von ganz allein auf meinem guten alten T40. Das ist natürlich nur Spielkram aber ich finde es schon echt beachtlich, daß sich das System mit neueren Releases auf alten Computern verbessert. Das wär ja so, als ob Vista auf meinem gammligen Laptop besser laufen würde als XP. Ich möchte aber eher vermuten, daß Vista bei mir überhaupt nicht laufen würde.

Jungs und Mädels, danke, ich mag euch, OpenSource, OpenSource, OpenSource!

So, jetzt geht hier auch wieder was

Neue Heimat, neue WP-Version und deswegen auch neues Theme, das ich hier irgendwie grad life zusammenbastel.

Ich hab mich dazu entschlossen, die Posts mit alten Arbeiten (und auch das Geschreibsel) nicht zu importieren. Ich werd’ die Sachen die ich zeigenswert finde irgendwann auf die Homepage packen und alles andere kann man sich ja im alten Blog anschauen.

Ach so, zum Thema Open Source mach Ubuntu halt immer mehr Fortschritte, meine Wireless-Card wird (zumindest wenn man bei und nach der Installation mit Kabel im Internet ist) problemlos. Songbird hat mir mit merkwürdigen Overloads in der 1.0-Version einiges am Kopzerbrechen und Verzweiflung gebracht, die Version 1.1 läuft besser, hat zwar immer noch Macken aber das Programm ist anscheinend so ein Ersatz zum Apple-Fandom, ich mag die irgendwie.

What Happened to my Hardy Heron?

I recently gave Ubuntu another try because I really like the OpenSource idea. But still it’s a real pain to install the wireless drivers (didn’t suceed yet) and it does not recognize my T40`s grapic card. I’ve been playing with xorg.conf but aside of totally damaging my system I didn’t achieve anything. Nice thing that Wine seems to be really able to run Windows-progs (as a soon-to-bedesigner I have to use Adobe’s CS) on Linux.

UPDATE 2013: Yeah, good luck trying to get the Creative Suite to work with Wine, former self! +_____+