animals brewing
food and drink gardening
general health
history language
music multimedia
opinion photography
politics Stones Road house
Greg's diary
recent entries
Translate this page
Select day in February 2019:
Su Mo Tu We Th Fr Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28
Select month:
2018 May Jun Jul Aug
2018 Sep Oct Nov Dec
2019 Jan Feb Mar Apr
Today's diary entry
Diary index
About this diary
Greg's home page
Greg's photos
Network link stats
Greg's other links
Copyright information

Monday, 18 February 2019 Dereel
Top of page
next day
last day

My mother: cause of death
Topic: health, general Link here

Another call from the Coroners Court of Victoria today, this time Sharee, with the results of the investigations of my mother's body. Nothing unusual: she suffered from coronary heart disease, hypertension and hypercholesterolemia. Nothing unusual there in a 94-year-old, except the question as to whether she had been undergoing treatment. No specific cause of death, though a heart attack seems the most likely, but also nothing suspicious, so she can return to Bendigo as soon as Brendan has found a funeral company.

And when will the funeral be? Bev can't make it here until the beginning of next month, so it looks like it'll be nearly 2 weeks yet.

More BigPond pain?
Topic: technology, general, opinion Link here

Both Brendan and Robert Herbert have email accounts with BigPond. That's a real pain: I've had great trouble communicating with BigPond subscribers, and it seems not to have improved. The issue is their anti-spam measures, which seem to exclude security (digital signatures trigger their mechanism, which appears to simply move the message to /dev/null). I turned off all security today, but that doesn't seem to have been enough. What a pain these people are!

Tuesday, 19 February 2019 Dereel
Top of page
previous day

Ring tones again
Topic: multimedia, technology, opinion Link here

A few months ago I set a custom ring tone on my mobile phone. All well and good, except that it wasn't loud enough. I thought that mencoder might do it, but failed to find out how. Callum Gibson suggested that ffmpeg could do it.

Now that I have effectively a virgin phone again, time to try it out. Started with a search ffmpeg set volume, which gave me lots of good looking hits, notably this one, which also has the advantage of being nicely formatted. There I read:

If you want to normalize the (perceived) loudness of the file, use the loudnorm filter, which implements the EBU R128 algorithm:

        ffmpeg -i input.wav -filter:a loudnorm output.wav

This is recommended for most applications, as it will lead to a more uniform loudness level compared to simple peak-based normalization. However, it is recommended to run the normalization with two passes, extracting the measured values from the first run, then using the values in a second run with linear normalization enabled. See the loudnorm filter documentation for more.

To automate the normalization processes with ffmpeg without having to manually perform two passes, and run normalization on multiple files (including video), you can also use the ffmpeg-normalize Python program via pip install ffmpeg-normalize.

OK, what does that mean? How do I do a two-pass normalization? Followed the link, which gave me nothing useful, just a reference. About the only suggestion was the Python script, which seems a bit over the top.

OK, try the example:

=== grog@eureka (/dev/pts/28) ~/Downloads 2 -> ffmpeg -i Andante-ringtone.mp3 -filter:0 loudnorm Andante-loud.mp3
ffmpeg version 2.8.8 Copyright (c) 2000-2016 the FFmpeg developers
  built with FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 (native) -> ? (?))
Encoder (codec mp3) not found for output stream #0:0

Ugh. How I hate coloured output! And why can't it create MP3 output? Much searching around, during which I found various suggestions, none of which worked. OK, dammit, let's output in WAV format.

=== grog@eureka (/dev/pts/28) ~/Downloads 4 -> ffmpeg -i Andante-ringtone.mp3 -filter:0 loudnorm Andante-loud.wav
Input #0, mp3, from 'Andante-ringtone.mp3':
  Duration: 00:00:25.59, start: 0.000000, bitrate: 160 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 160 kb/s
[AVFilterGraph @ 0x80a83ac00] No such filter: 'loudnorm'
Error opening filters!

Dammit, what does work? Messed around for a while and found that I could set the volume with things like

=== grog@eureka (/dev/pts/28) ~/Downloads 5 -> ffmpeg -i Andante-ringtone.mp3 -filter:a "volume=3" Andante-loud.wav
File 'Andante-loud.wav' already exists. Overwrite ? [y/N] no
=== grog@eureka (/dev/pts/28) ~/Downloads 6 -> l Andante-loud.wav
-rw-r--r--  1 grog  lemis          0 19 Feb 13:19 Andante-loud.wav

OK, we can get rid of that. And finally I got some output!

Next, how do I convert it to MP3? Do I need to? Upload it to the phone and see what the phone things of a WAV file. And the next question: where do I put it? Android storage hierarchies completely confuse me, and I forgot to note such details last time. OK, /storage/emulated/0/Music seems an obvious place, at least for this phone. Upload there, select Sound/Phone ringtone, and sure enough, it found it and was able to set it. One point to Android, none to ffmpeg, though arguably this is an issue with the FreeBSD port.

This page contains (roughly) yesterday's and today's entries. I have a horror of reverse chronological documents, so all my diary entries are chronological. This page normally contains the last two days, but if I fall behind it may contain more. You can find older entries in the archive. Note that I often update a diary entry a day or two after I write it.     Do you have a comment about something I have written? This is a diary, not a “blog”, and there is deliberately no provision for directly adding comments. But I welcome feedback and try to reply to all messages I receive. See the diary overview for more details. If you do send me a message relating to something I have written, please indicate whether you'd prefer me not to mention your name. Otherwise I'll assume that it's OK to do so.

Greg's home page This month Greg's photos Greg's links

RSS 2.0 Valid XHTML 1.0!