N
N
NibiruanChild2015-11-26 13:28:35
linux
NibiruanChild, 2015-11-26 13:28:35

How to record online radio on linux schedule?

You need to record only one transmission (an hour of time) on certain days at a certain time.
Unfortunately Moskva.FM no longer provides recordings, you will have to write yourself.
I am using Linux. How to start recording in VLC on a schedule does not quite come to mind, and if another media file is launched at that time, VLC can switch, stop writing, and start playing what I started, forgetting about the recording.
Tried streamripper:

date=`date +"%Y_%a_%b_%d_%H%M%P"`
url=http://radio.2kom.ru:8000/SportFm.m3u
output_filename=radio__.${date}
duration=3600 
output_dir=/home/pi/radio/recordings
cd $output_dir
streamripper $url -s --quiet -d $output_dir -l $duration -a $output_filename -o always

I put it in cron, it writes something, but the file remains in the incomplete directory and is not played, although there are 100+ meters of weight. I redirect the output to a file (with --quiet errors should still be thrown), the file is empty. Tested for several days - the situation is absolutely the same.
Does anyone have any idea how to fix streamripper, or how to run VLC or some other solution?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Perevoshchikov, 2015-11-26
@NibiruanChild

VLC can be run like this:
More about --sout

A
Aves, 2015-11-26
@Aves

Option with mpvand at:

$ echo 'mpv http://radio.2kom.ru:8000/SportFm.m3u --o=record.ogg --no-video --end=01:00:00' | at 17:00

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question