Site Map - skip to main content - dyslexic font - mobile - text - print

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.


hpr2651 :: HPR Community News for September 2018

HPR Volunteers talk about shows released and comments posted in September 2018

<< First, < Previous, Latest >>

Host Image
Hosted by HPR Volunteers on 2018-10-01 is flagged as Explicit and is released under a CC-BY-SA license.
Tags: Community News.
Listen in ogg, spx, or mp3 format. | Comments (13)

Part of the series: HPR Community News

A monthly look at what has been going on in the HPR community. This is a regular show scheduled for the first Monday of the month.

New hosts

Welcome to our new host:
Jeroen Baten.

Last Month's Shows

Id Day Date Title Host
2631 Mon 2018-09-03 HPR Community News for August 2018 HPR Volunteers
2632 Tue 2018-09-04 Liverpool Makefest 2018 - interviews with Robert and Carl Tony Hughes AKA TonyH1212
2633 Wed 2018-09-05 Elm - First Impressions tuturto
2634 Thu 2018-09-06 Git tag and metadata klaatu
2635 Fri 2018-09-07 Running your own mainframe on Linux (for fun and profit) Jeroen Baten
2636 Mon 2018-09-10 Liverpool Makefest 2018 - interviews with Noel from JMU FabLab Tony Hughes AKA TonyH1212
2637 Tue 2018-09-11 Convert it to Text b-yeezi
2638 Wed 2018-09-12 Dirt cheap Magic klaatu
2639 Thu 2018-09-13 Some ancillary Bash tips - 9 Dave Morriss
2640 Fri 2018-09-14 Another Rambling Drive Into Work MrX
2641 Mon 2018-09-17 Liverpool Makefest 2018 - interview with Rachel from the MicroBit Foundation Tony Hughes AKA TonyH1212
2642 Tue 2018-09-18 My swedish and german Podcasts Part 2 folky
2643 Wed 2018-09-19 The Payoff In Storytelling lostnbronx
2644 Thu 2018-09-20 Error on show 2642 folky
2645 Fri 2018-09-21 Blinking LED Ken Fallon
2646 Mon 2018-09-24 Liverpool Makefest 2018 - Interview with Steve and Gerrard from the Liverpool Astronomical society. Tony Hughes AKA TonyH1212
2647 Tue 2018-09-25 More Quick Tips operat0r
2648 Wed 2018-09-26 Explaining the controls on my Amateur HF Radio Part 1 MrX
2649 Thu 2018-09-27 More ancillary Bash tips - 10 Dave Morriss
2650 Fri 2018-09-28 My Pocket Knife Shane Shennan

Comments this month

These are comments which have been made during the past month, either to shows released during the month or to past shows.
There are 29 comments in total.

There are 9 comments on 8 previous shows:

  • hpr1512 (2014-05-20) "Adopting and Renovating a Public-Domain Counterpoint Textbook" by Jon Kulp.
    • Comment 2: Ken Fallon on 2018-09-30: "Ahhh so that's what counterpoint is."

  • hpr1919 (2015-12-10) "DerbyCon Interview with Paul Koblitz" by Xoke.
    • Comment 2: Carpet Muncher on 2018-09-09: ":)"

  • hpr2549 (2018-05-10) "DVD ripping using old hardware" by Archer72.
    • Comment 2: archer72 on 2018-09-04: "Change to code location"

  • hpr2557 (2018-05-22) "Styx -- The Purely Functional Static Site Generator" by clacke.
    • Comment 3: clacke on 2018-09-17: "Update re: TOML in Nix"

  • hpr2615 (2018-08-10) "Cancer" by Ahuka.
    • Comment 2: A person on 2018-09-09: "Thankyou"

  • hpr2624 (2018-08-23) "Cycling through Brussels" by knightwise.
    • Comment 2: baffled on 2018-09-03: "Very nice."

  • hpr2625 (2018-08-24) "My thoughts on language learning communication applications." by dodddummy.
    • Comment 1: clacke on 2018-09-19: "Accordion outro"
    • Comment 2: clacke on 2018-09-19: "Interesting idea"

  • hpr2627 (2018-08-28) "Home Phone Setup!!" by sigflup.
    • Comment 6: Brenda J. Butler on 2018-08-31: "stoop"

There are 20 comments on 9 of this month's shows:

Mailing List discussions

Policy decisions surrounding HPR are taken by the community as a whole. This discussion takes place on the Mail List which is open to all HPR listeners and contributors. The discussions are open and available on the HPR server under Mailman.

The threaded discussions this month can be found here:

http://hackerpublicradio.org/pipermail/hpr_hackerpublicradio.org/2018-September/thread.html

Any other business

Tags and Summaries

Thanks to windigo and Otto Localhorst for sending in updates in the past month.

Over the period tags and/or summaries have been added to 23 shows which were without them.

If you would like to contribute to the tag/summary project visit the summary page at https://hackerpublicradio.org/report_missing_tags.php and follow the instructions there.


Comments

Subscribe to the comments RSS feed.

Comment #1 posted on 2018-09-30T12:51:25Z by Ken Fallon

The loop issue

This fails

ls *.mp3|while read i;do ffmpeg -i "${i}" "${i}.wav" 2>&1;done


This works

for i in *.mp3;do ffmpeg -i "${i}" "${i}.wav" 2>&1;done
,/pre>

Comment #2 posted on 2018-09-30T14:00:47Z by Dave Morriss

Re: The loop issue

ls *.mp3|while read i;do ffmpeg -i "${i}" "${i}.wav" 2>&1;done

You don't say how this fails, but there are several reasons not to do things this way:

1. It's unwise to feed a 'while' loop thorough a pipe because the 'while' runs
in a separate shell which can lead to problems

2. Never use 'ls' to get a list of files for consumption in a script. Unless
you can be completely sure that the 'ls' you are using isn't adding suffixes
like '@' for links, and '/' for directories and isn't adding colour codes to
the names, don't do it. Much better to use 'find'.

My test with this pipeline returned colour codes which 'ffmpeg' didn't like,
and it failed that way.

for i in *.mp3;do ffmpeg -i "${i}" "${i}.wav" 2>&1;done

This doesn't use 'ls' it simply uses file expansion therefore no additional
filename garbage!

Did I mention: don't use 'ls' as a way of feeding filenames to a loop or
whatever?

The first example would have worked if you'd written:

while read i;do ffmpeg -i "${i}" "${i}.wav" 2>&1;done < <(find . -maxdepth 1 -name "*.mp3")

The '-maxdepth 1' option prevents 'find' from going into sub-directories. The
'find' is inside a process substitution which is redirected to the 'while' so
the 'read' inside it can obtain what is produced on its STDIN channel.

Also, if it had been me I'd have written:

ffmpeg -i "${i}" "${i}.wav"

as:

ffmpeg -i "${i}" "${i%mp3}wav"

to avoid the output files being called 'xxx.mp3.wav'. I spoke about this in my
"Bash Tips" show http://hackerpublicradio.org/eps.php?id=1648

Dave

Comment #3 posted on 2018-09-30T14:13:58Z by Ken Fallon

Clarify

I'm not sure you're cleare enough about using ls.

It fails as it only does one mp3, while while does them all.

Comment #4 posted on 2018-09-30T15:02:06Z by Dave Morriss

Re: Clarify

I think the thing to take away is: Don't use 'ls' for this purpose. I might have said that before ;-)

One way to debug your problem (should you feel that avoiding 'ls' is not enough) might be this:

1. Create a function to display the arguments:

_ffmpeg() { printf "ffmpeg %s %s %sn" "${@}"; }

2. Run your pipeline thus:

ls *.mp3|while read i;do _ffmpeg -i "${i}" "${i}.wav" 2>&1;done

I tested things like this:

$ cd /tmp
$ touch {a..f}.mp3
$ ls *.mp3|while read i;do _ffmpeg -i "${i}" "${i}.wav" 2>&1;done
ffmpeg -i a.mp3 a.mp3.wav
ffmpeg -i b.mp3 b.mp3.wav
ffmpeg -i c.mp3 c.mp3.wav
ffmpeg -i d.mp3 d.mp3.wav
ffmpeg -i e.mp3 e.mp3.wav
ffmpeg -i f.mp3 f.mp3.wav

The names like 'a.mp3' are all coloured blue.

If I use the real 'ffmpeg' I get (output heavily truncated with only one file shown):

ffmpeg version 4.0.2-2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8 (Debian 8.2.0-7)
configuration: --prefix=/usr --extra-version=2 --toolchain=hardened

[snip]

libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
?[0m?[00;36ma.mp3?[0m: No such file or directory

The codes before and after 'a.mp3' are colour on/off codes.

Your environment will certainly be different of course, so your failures may not be the same.

Clear?

Comment #5 posted on 2018-09-30T15:08:27Z by Dave Morriss

Does the comment system remove backslashes?

I actually wrote:

_ffmpeg() { printf "ffmpeg %s %s %s\n" "${@}"; }

but something removed the backslash.

Comment #6 posted on 2018-10-01T11:03:53Z by folky

Material for a show

@Ken and @Dave
Take your comments and make a collaborative show of the material ;-)

Comment #7 posted on 2018-10-01T12:16:59Z by Ken Fallon

touché Sir

touché

Comment #8 posted on 2018-10-01T14:59:05Z by clacke

subshell issues

As Dave points out, the while loop you describe would work if it weren't for ls issues. Here's what doesn't work:

items=()
produce_items | while read item; items+=( "$item" ); done
do_stuff_with "${items[@]}"

Oh, how many times I have made this mistake.

"items" gets updated just fine, in a subshell, and then after the pipe has finished executing, execution continues in the parent shell where the array is still empty.

Null-terminating and giving "read" the appropriate parameters is an HPR episode of its own, no doubt already made by Dave, or in his pipeline. ;-)

Comment #9 posted on 2018-10-01T15:00:26Z by clacke

Kvalificerat hemligt

Excellent pronuncation, Dave! You're spot on.

Compared to "kvalificerat hemligt", "skeptikerpodden" is trivial to say. :-)

Comment #10 posted on 2018-10-01T15:34:27Z by clacke

Re: Intro volume

While it is true that we hosts could do more to manage our sound levels, the facts on the ground are that the intro music is louder than the average show.

I have thought often that the intro volume should be a bit lower, but never said anything.

Comment #11 posted on 2018-10-01T15:36:05Z by Dave Morriss

She sells subshells...

I think I have to do a show on the whole issue of loops in pipelines. It's been in the "topics to cover" heap for a while but now it's being re-prioritised! I'll probably make it show 14 in the "Bash Tips" subset.

Comment #12 posted on 2018-10-01T15:39:43Z by clacke

Re: TTS over intro music

We could still allow people to add arbitrary intros, and just not do TTS-over-intro in those cases. But the idea to do TTS-over-intro on a list of prepared flexible-length intros is really cool.

As for me though, as you have noticed on my shows, I really like having a standardized intro as the unified HPR brand, while allowing some variation at the end.

Comment #13 posted on 2018-10-01T16:43:35Z by clacke

That brings back memories

I never listen to my own shows via the feed, so I never listen to my whistling outro either.

As I hear it now, man does that bring back memories. I remember exactly where I was walking on the way to my bus to work as I was recording it. That was three homes, one country, three offices, three kindergartens and three years ago.

I can feel the chill from the November morning fog around Järfälla Church on my cheeks as I'm typing this.

I know that I accidentally set the sample rate too low when I recorded it (11.25 kHz, I believe), but hearing it now that sound quality is worse than I remember it. :-)

<< First, < Previous, Latest >>

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the P in HPR stand for ?