Posts

Showing posts from July, 2017

Create audio visualisations for Youtube

Image
Have you ever wanted to upload an audio track to Youtube, and have something visual for the listener to look at? Here's a quick and dirty way. Use GIMP to make a .png file that's 640x240, put a picture that has something to do with the audio, your channel art, whatever. Save it as test.png. Say your audio track is called test.m4a. Now run: ffmpeg -i test.png -i test.m4a -tune stillimage -filter_complex "[1:a]showfreqs=s=50x240:colors=blue[sw]; [0:v][sw]hstack[out]" -map "[out]" -map 1:a -c:v libx264 -preset fast -crf 18 -c:a copy output.mkv This will give you something like: Not exactly beautiful, but better than a blank screen.

Learn foreign languages with Python

This is a script that I wrote to help read foreign languages. I'm no programmer, so please don't make fun of me. It takes a regular text file as input, and creates a list of unique words for memory work. In fact, it creates three separate lists. The first is a list of unique words in each chapter (i.e. any block of text that starts with a number, but the criteria for identifying chapters can be easily changed). The second file is a list of unique words that occur at least twice. The third is a list of all vocabulary. import re import unicodedata def strip_accents(s):    return ''.join(c for c in unicodedata.normalize('NFD', s)                   if unicodedata.category(c) != 'Mn') source_file = open('source_.txt') out_file = open('vocab_per_chapter_sorted.txt', 'w') out_file2 = open('all_vocab_2_or_more_occurences.txt', 'w') out_file3 = open('all_vocab.txt', 'w') source_string = source_file.read(

Recording from more than once microphone in Linux

Would you like to record from two sources, for example a Skype call, to two different files? Make sure sox is installed, open a terminal: $ rec -r 44100 -c 1 file1.flac Open a new terminal tab: $ rec -r 44100 -c 1 file2.flac Using "PulseAudio Volume Control" ( pavucontrol package), choose Recording tab, select the source for each stream. To record local audio, choose Monitor…  You can open as many tabs as you like and record from as many sources as you like, if your computer can handle it.

Making screencasts in Linux

This post is just for future reference.  I figured I'd make this information available to people via Google searches. This is my current setup for screencasting. The best software I've found so far is simplescreenrecorder . Here are my settings for recording slide shows. (For recording anything fast, like video, you would need to adjust them.) This will give you LOSSLESS video and audio. Left: 0     Top: 100 Width: 854  Height: 480 Frame rate: 10 Audio input source: H5 Multichannel Separate file per segment Container: Matroska (MKV) Video Codec: H.264 Constant rate factor: 0 Preset: veryslow Allow frame skipping Audio Codec: flac Bit rate: 128 When you're finished recording, here's the editing magic: Concatenate: for f in ./*.mkv; do echo "file '$f'" >> list.txt; done ffmpeg -f concat -safe 0 -i list.txt -c copy original.mkv  Open original.mkv in Audacity: SetRMS : -22 Limiter : 0 0 -3.5 10 Noise Reduction: 12, 6,

Home recording with screaming kids

Image
Ever tried recording your voice with kids under the same roof? It's like trying to kill flies on a window pane with a hammer. But if you really must do it, it's (somewhat) possible. You need the right equipment. This is the Coles 4104 "lip" microphone. It's called a lip mic because you position it right against your upper lip. It's supposed to cut out most of the sound coming from other directions. This mic costs a bundle. If you pay full price (don't), it could set you back 1000 $. I got one from the UK for under 500$ new, with the pound sterling being pretty low thanks to Brexit. I didn't know what to expect. I knew the hype couldn't be true, that it wasn't going to be a sound booth in your pocket, as some have called it. And I was right. It will pick up background noise, albeit a lot less than a regular mic. It's actually pretty impressive when you talk into the side of the mic and it sounds like you're across the room, then

SUSE Tumbleweed is a disaster

I like the idea of a rolling distribution. I've tried LMDE in the past, but the packages were always outdated, there seems to be issues with maintenance. Then, I tried SUSE Tumbleweed, the KDE variant, and was pleasantly surprised at the improvements with KDE since the last time I tried it more than a decade ago. But then the issues started. First, the screen would sometimes go black and the computer would become unresponsive,  requiring a reboot. This is a deal-breaker in itself. I was hoping an update would fix that, so I gave it some time. I wasn't in a hurry, since this is a laptop I seldom use. Then, I tried playing an mp3 file, and found out that I had to install the packman repository. That's when dependency hell broke loose. When I updated, the default repos replaced packman's packages with newer packages that didn't work. So I had to manually update those packages by specifying that the update manager must use packman. Updating became a nightmare. 

Remove window title bars on Mint MATE

Do you like how Chrome removes the useless title bar to save space? Do you hate Google and wish you could do the same with Firefox? Would you like to get rid of it for ALL maximized windows?  Install packages mate-netbook and mate-tweak Run MATE Tweak -> Windows -> Check "Undecorate maximized windows" If you get stuck in a maximized window and would like to get out, press Alt-F5 .