Earth’s magnetic field is acting up and geologists don’t know why

Weird. Look at the map… That sure is something.

In the meantime, scientists are working to understand why the magnetic field is changing so dramatically. Geomagnetic pulses, like the one that happened in 2016, might be traced back to ‘hydromagnetic’ waves arising from deep in the core1. And the fast motion of the north magnetic pole could be linked to a high-speed jet of liquid iron beneath Canada2.

https://www.nature.com/articles/d41586-019-00007-1

Youtube-Download Scripting (youtube-dl)

I just realized a wonderful feature in Youtube-dl: ytsearch:$SEARCHTERM. If you lack the context, scroll down.

I am using Nextcloud Notes and youtube-dl for automated downloads of Youtube-Videos that I want to watch later or for Music that I autoconvert to MP3s and put them in playlists (yeah I am old-fashioned, I still have tons of Vinyl). So if you enter youtube-dl ytsearch:Feilner, this gem will download the first video found – which is my presentation about Mythbusting documentation:

mfeilner@fibonacci:~> youtube-dl ytsearch:Feilner
[youtube:search] query “Feilner”: Downloading page 1
[download] Downloading playlist: Feilner
[youtube:search] playlist Feilner: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[youtube] Cpug8Iqw3f8: Downloading webpage
[youtube] Cpug8Iqw3f8: Downloading video info webpage
[youtube] Cpug8Iqw3f8: Downloading MPD manifest
[dashsegments] Total fragments: 376
[download] Destination: Mythbusting Documentation – Markus Feilner-Cpug8Iqw3f8.f137.mp4
[download]  10.6% of ~323.89MiB at  2.59MiB/s ETA 02:07

After a few minutes, you’ll find the mp4 in your working directory. Guess I have to experiment with that more thoroughly… Update: I just found the beautiful option to tell ytsearch: how many files it should retrieve from the search: youtube-dl ytsearch10:Feilner will download the top ten video files from the search result, ytsearch20 twenty.

But what I also do is: I am using Nextcloud Notes to add music, video, and other stuff that I want downloaded on a local machine. I can add links and stuff to this .txt file from my smartphone or all my machines and laptops. Have a look at Notes, it’s awesome. Only one caveat: First line is always the name of the file. Markup is supported, but I don’t need that. Here’s my download-script that omits the first line and does some path magic – you can see I am not a coder, but it works like a charm.


#!/bin/bash
# download Youtube videos from a list in a txt file and call scripts to convert them
IFS=”¬”
if [ -z $1 ]
then
INPUT=/home/mfeilner/Nextcloud/Notes/Youtube.txt
else
INPUT=$1
fi
echo $INPUT
INFILE=/tmp/infile
awk ‘NR>1’ $INPUT > $INFILE
TEMPDIR=~/Temp/ytd/`date +%Y-%m-%d-%H-%M`
mkdir -p $TEMPDIR
cd $TEMPDIR
while IFS= read -r line
do
youtube-dl “”$line””
done < “$INFILE”
/home/mfeilner/Nextcloud/config/bin/mp42mp3
mkdir MP3; mv *.mp3 MP3/; cd MP3
/home/mfeilner/Nextcloud/config/bin/mkplaylist $TEMPDIR

mp42mp3 converts lots of video formats (it will be improved, yes), and mkplaylist creates m3u files. I also have a mp3tidy script that cleans up filenames by normalizing them and does some basic id3tagging.

#!/bin/bash
# convert media formats
IFS=”¬”
for file in *mp4
do ffmpeg -i “$file” `basename -s mp4 $file`mp3;
done
for file in *webm
do ffmpeg -i “$file” `basename -s webm $file`mp3;
done
for file in *mkv
do ffmpeg -i “$file” `basename -s mkv $file`mp3;
done
for file in *m4a
do ffmpeg -i “$file” `basename -s m4a $file`mp3;
done

I have some more scripts running that tidy up filenames and tags and stuff, but they are too embarassing to publish (yet).

For those that lack the context: Youtube-dl is a wonderful Video downloader for youtube. It also supports direct encoding to mp3, but I prefer to have hands on myself if I need it, that’s why ffmeg comes in handy.  And because of the nasty first line in Youtube.txt, I decided to not use Youtube-dls read-from-file mechanism.

youtube-dl https://www.youtube.com/watch?v=Cpug8Iqw3f8

downloads the Feilner video from the example above. Ffmpeg could encode it to mp3 so that there’s only the audio, creating a podcast e.g. for the car. Rename would help stripping unwanted stuff from the filename and there’s some tools out there to change the tags properly.

To get rid of the Youtube-ID in the filename and for basic id3tagging I do this:


#!/bin/bash
# normalize Youtube-Downloaded MP3 files after conversion from Mkv or similar,
# ID3-Tag them by adding filename to Artist, Title and Album fields.
IFS=”¬”
INFILE=/tmp/infile
OUTFILE=/tmp/outfile
TEMPDIR=~/Temp/ytd/date +%Y-%m-%d-%H-%M
FILENAME=/tmp/filename
CHARCOUNT=17
ls *mp3 -1 > $INFILE
mkdir -p $TEMPDIR
while IFS=”²” read -r line
do
echo “”$line”” | rev |cut -c $CHARCOUNT- | rev > $FILENAME
mv “”$line”” $TEMPDIR/`cat $FILENAME`.mp3
id3tag -a=`cat $FILENAME` -A=`cat $FILENAME` -s=`cat $FILENAME`
done <$INFILE
mv $TEMPDIR ~/Downloads/New
rm $OUTFILE $INFILE $FILENAME

Bluetooth-Autoconnect to Speakers from Command Line

My Desktop in the home office is always connected to the stereo, via Bluetooth. It sucks to click the BT icon or run bluetoothctl manually. Thus some time ago I fixed that by a little research and testing. Here’s what made me happy: 

I added the command echo -e “connect 0C:A6:94:D1:88:5D\n quit” | bluetoothctl to my files. For easier cut and paste: 

echo -e “connect 0C:A6:94:D1:88:5D\n quit” | bluetoothctl

In my case, I added that to my KDE Autostart script and I created an alias that allows me fast switching back after e.g. a Videoconference with a headset. My alias went to ~/.profilerc:

alias büro=’echo -e “connect 0C:A6:94:D1:88:5D\n quit” | bluetoothctl’

Works for me. 

Remember you have to replace the ID with the one from your device (delivered to you by the command devices in the bluetoothctl subshell): 

mfeilner@fibonacci:~> bluetoothctl
Agent registered
[Büro]# devices
Device D4:A6:B7:88:F4:9A D4-A6-B7-88-F4-9A
Device 34:DF:2A:45:E4:C0 Headphones
Device 0C:A6:94:D1:88:5D Büro
[Büro]# list
Controller FC:F8:66:E8:64:A7 fibonacci [default]
[Büro]#



#ARM #Linux #BusinessCard: Elektronische BC mit Linux

Reality update: Elektronische Visitenkarte mit Linux | heise online … :

Wie George Hilliard erklärt, kostet die Hardware für seine elektronische Visitenkarte weniger als 3 US-Dollar. Um die Zahl der Bauelemente zu minimieren, suchte er vor allem ein System-on-Chip (SoC), das Linux ausführen kann sowie USB und eingebautes RAM mitbringt. Letzteres sei zwar bei zahlreichen Mikrocontroller-SoCs der Fall, doch die meisten davon eignen sich nur für Echtzeit-Betriebssysteme. Andere Chips wiederum waren zu teuer.

Old milk is dead, new milk is nuts. #Murica

Reality update: America’s Biggest Milk Producers Are Going Bankrupt | Food & Wine … :

Maybe this isn’t a bad time to start exploring plant-based milks, as Elmhurst Dairy did. The 80-year-old milk producer closed its Queens, New York facility in the summer of 2016, and then reopened less than a year later after switching its focus from cow’s milk to what it calls “milked” nuts. The company is now known as Elmhurst Milked, and it sells a variety of plant- and nut-based milks, including plain and flavored oat milk, hemp creamers, and almond, cashew, hazelnut, and walnut milks.

What if #Trump’s #waroniran only is meant to …

… divert our attention from Australia and the #climatecatastrophy? People waking up to the horror is the worst thing that could possibly happen to most of his sponsors… unless they really want to start the apocalypse now, full-featured and thus they are glad their president is attacking their Satan.

Big oil, evangelists and arms manufacturers. Well who of them would not benefit from war and climate horror?
This is the recent video that made me think about this from a different angle. It’s after the Iran attack from Jan 3, 2020 : 

 

 

#australiaburning as a role model to learn from

Reality update: Falling ash, skies of blood – and now Australia’s anger smoulders | Australia news | The Guardian … :

The past week has been marked by the refusal of public officials, including PM Scott Morrison, to recognise the scale of the crisis

Look at it, closely. The #pyrocene is coming to your home, too, soon. Come closer, look at what’s happening in Australia now, after the fire. It’s already starting. Remember Katrina? What happened after the hurricane? I hope we don’t see that in Australia, but we will eventually see such uproar and stuff more and more. Honestly, I don’t see any way of avoiding it, no politicalopportunity to stop it. Not anymore. Wired puts it like this:

“If you want to gaze into the hellish future of human existence on Earth, look to Australia. Huge bushfires have torched 14.5 million acres since September, killing at least 18. Vast plumes of smoke are pouring into major cities along the east coast, imposing a dire respiratory health hazard on millions of people. And Australia’s fire season is just getting started.

For Californians, the scenes are familiar. The same cabal of factors, including climate change and land management, is conspiring to produce bigger wildfires that consume more land and kill more people. We have entered the age of embers—think of it like an ice age, but with flames, what fire historian Stephen Pyne calls the Pyrocene.”

(https://www.wired.com/story/australia-is-blazing-into-the-pyrocene-the-age-of-fire/)

#Raspion: Raspberry Pi gegen “smart devices” spionage

Reality update: Gegenspionage im Heimnetz: So enttarnen Sie Datenschleudern mit dem Raspberry Pi | heise online … :

Der zum Schnüffler umgebaute Raspberry Pi alias c’t-Raspion klinkt sich dafür in den Datenstrom ein und visualisiert ihn. Er spannt ein separates WLAN auf, mit dem Sie die zu beobachtenden Geräte verbinden. Sie brauchen dafür nur einen Raspberry Pi 3 oder 4. Den schließen Sie per Kabel an Ihr bestehendes Netz an, über das er den Geräten dann Zugang zum Internet gewährt (“Uplink”). Somit kann der c’t-Raspion den gesamten Netzwerkverkehr zwischen den zu beobachteten Geräten und dem Internet sehen – er arbeitet letztlich wie ein Router.

In diesem Artikel führen wir durch die simple Installation der Raspion-Erweiterung und stellen die Fähigkeiten der vorinstallierten Werkzeuge vor. Dazu erläutern wir den Aufbau des Systems und wo Sie noch Hand anlegen können. Welche schmutzigen Details wir so gefunden haben und Beispiele zur Vorgehensweise finden Sie in einem weiteren Artikel zu Datenschleudern wie IP-Kameras, Smart-TVs und WLAN-Steckdosen.