Shrink mkv with ffmpeg -- keep all subtitles and foreign language audio tracks

Below is a simple command to shrink an mkv file using ffmpeg -- i.e., convert mkv to mkv -- and keep all existing subtitles and audio tracks (which is NOT ffmpeg's default). You can use this overnight to shrink 25 GB MKV files to around 5 GB or so -- i.e., 80% smaller.

Preview (to test the results):

ffmpeg -nostdin -y -ss 1400 -t 30 -i /some/path/INPUT.mkv -c:s copy -map 0 -crf 24 /some/path/OUTPUT.mkv

Full video:

ffmpeg -nostdin -y -i /some/path/INPUT.mkv -c:s copy -map 0 -crf 24 /some/path/OUTPUT.mkv


Commented working code: Internationalization, i18n, gettext, and bash / shell scripts on CentOS 7.4

The following shows a working script with explanatory comments and Wikipedia illustration below to internationalize / i18n bash shell scripts on CentOS 7.4:

Understanding Docker Volumes: Dockerfile [VOLUME], docker-compose Volumes:, and shared data with Named Volumes

The DockerFile instruction VOLUME [ "/data" ] creates an anonymous volume mounted as /data that allows just 1 container to use it (unless you issue a docker run --volumes-from or bind mount it with docker run -v /var/lib/docker/volumes/9283:/data) until you docker rm that container. After docker rm, the volume remains but it's inaccessible by containers without a bind mount.

How to configure Websphere for LDAP using Microsoft Active Directory (aka MSAD)

I just created a video explaining how to connect Websphere Application Server to Microsoft Active Directory 2012.

Video: Kerberos, Active Directory, and Delegation

I just created a YouTube video that does a "deep dive" into Single Sign On (SSO) using Active Directory, Kerberos, X.500, and delegation.

Here are some topics covered:

How to draw a combinations tree -- tree diagram for combinations

I've been working on basic Algebra II concepts recently, especially tree diagrams for combinations and permutations. Permutations are relatively straightforward, but not combinations. So, I asked a question on, and although I never received a response, I think that my sketch, shown below, is roughly accurate:

Simple, Fast Way to Enter/Type Unicode Characters in Windows (using UTF-8)

I often need to enter the International Phonetic Association's (IPA) or other math symbols into my computer, often during a lecture, when speed matters. Some great webpages, particularly this one, explain how, but they require you to know the Unicode code numbers. That is far too cumbersome for me. My approach is a little different, and much more intuitive.

Enter Unicode characters using AutoHotKey (AHK)

  1. Download AutoHotKey (free)

Convert IPA Symbols to Speech Sounds Online (MP3)

For a long time, I had been curious what an IPA to speech sounds / MP3 audio converter would sound like. Google doesn't list any free tools. So today, I wrote a free converter in Python. The code is extremely basic and not a good example of programming, but it does illustrate the point of why so few converters probably exist: the results are nearly worthless--at least, when using such simple logic (i.e., just play each IPA sound in order as transcribed).

Nitro PDF (the free version) fixes Acrobat Could Not Save error 18

As explained here (, NitroPDF can fix some broken PDF files. In my case, Acrobat Pro XI refused to save a PDF file, saying it had error 18. After reading that previous tip (which saved the file normally but didn't fix my problem), I opened the file in Nitro PDF, then clicked File -> Save as -> Flattened PDF instead, and voilà, the PDF worked normally again! Yay!

Simple, Easy, and Free: Black background for OneNote 2010, OneNote 2013, and OneNote 2016 (no junkware/spyware)

If you'd like a black background for OneNote, you can buy OneNote Gem (which is fantastic), or you can download a free OneNote 2010/2013 formatted section whose background is already black. You just double-click the file, OneNote will load, and open a new section whose only content is a new page with a black background. Yay!


Subscribe to Software Engineer, Linguist, Author RSS