Hacker Public Radio

HPR4294: Schedule audio recordings on the command line - A bit of fine tuning


Listen Later

This show has been flagged as Clean by the host.

TuxJam
co-host
Kevie
follows up on HPR4287 with a bit of a tweak to the Crontab, but still using the ffmpeg command to record.


In the previous episode, the example stream url that was given proved to be unpopular with ffmpeg due to the characters that it contained. A quick work around for this was to put it in a url shortener, for this example I'm using
TinyURL
.


Another issue arose when the stream recorded without first removing the audio file, I could see this being an issue when you want to record a show when you will be away over multiple weeks. To overcome this we simply edit the Crontab file (command
crontab -e
) and add the following to the end of the file, before the extension:
$(date +"%Y_%m_%d")


So the template chances from:

* * * * * ffmpeg -i https://streamurl -t HH:MM:SS /path/filename.ogg

to

* * * * * ffmpeg -i https://streamurl -t HH:MM:SS /path/filename$(date +"\%Y_\%m_\%d").ogg

I forgot to say in the show that you need to add \ before % in Cron or it will not behave as expected.

The example of recording Dan Lynch's Pic and Mix show on Arrow Radio every Thursday at 7pm would now be:

00 19 * * 4 ffmpeg -i https://tinyurl.com/msm6ya6f -t 02:00:00 ~/Recordings/DanLynchPickMix$(date +"\%Y_\%m_\%d").ogg


Provide feedback on this episode.

...more
View all episodesView all episodes
Download on the App Store

Hacker Public RadioBy Hacker Public Radio

  • 4.2
  • 4.2
  • 4.2
  • 4.2
  • 4.2

4.2

34 ratings


More shows like Hacker Public Radio

View all
Security Now (Audio) by TWiT

Security Now (Audio)

1,971 Listeners

Off The Hook by 2600 Enterprises

Off The Hook

117 Listeners

No Agenda Show by Adam Curry & John C. Dvorak

No Agenda Show

5,935 Listeners

The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

283 Listeners

LINUX Unplugged by Jupiter Broadcasting

LINUX Unplugged

265 Listeners

BSD Now by JT Pennington

BSD Now

89 Listeners

Open Source Security by Josh Bressers

Open Source Security

43 Listeners

Late Night Linux by The Late Night Linux Family

Late Night Linux

154 Listeners

The Linux Cast by The Linux Cast

The Linux Cast

35 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

7,864 Listeners

This Week in Linux by TuxDigital Network

This Week in Linux

36 Listeners

Linux Dev Time by The Late Night Linux Family

Linux Dev Time

21 Listeners

Hacking Humans by N2K Networks

Hacking Humans

314 Listeners

2.5 Admins by The Late Night Linux Family

2.5 Admins

92 Listeners

Linux Matters by Linux Matters

Linux Matters

20 Listeners