Originally Posted by
andrew.46
Hi Shan!! Again it has been a while..
You could also consider using FFmpeg, which certainly looks a bit cleaner than your vlc example although perhaps not as cool as the wget usage:
which of course sleeps for 10 minutes and then uses FFmpeg to record 60 minutes of your favoured stream...
Hi Andrew yes nice route too
Thanx
PS: the game here for me is always gonna be the line that has the least digits in it resting those fingers
PS2: really cool tho and we all love a ffmpeg solution to a question
Code:
sleep 30s && \> ffmpeg -i http://www.radioking.com/play/radio-planeta-occitania \
> -t 00:00:30.00 -c copy \
> "$(date "+%a %F [%T]")radio-planeta-occitania.mp3"
ffmpeg version N-98601-g134a48a Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/home/shan/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/shan/ffmpeg_build/include --extra-ldflags=-L/home/shan/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/shan/bin --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 56. 57.100 / 56. 57.100
libavcodec 58. 98.100 / 58. 98.100
libavformat 58. 49.100 / 58. 49.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Input #0, mp3, from 'http://www.radioking.com/play/radio-planeta-occitania':
Metadata:
icy-br : 128
icy-description : La Radio de L'Occitania Granda 100 % ÒC
icy-genre : Europe
icy-name : RADIO PLANÈTA OCCITÀNIA
icy-pub : 1
icy-url : http://radio-planeta-occitania.blogspot.fr/
StreamTitle :
Duration: N/A, start: 0.000000, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
Output #0, mp3, to 'Thu 2021-07-29 [15:14:04]radio-planeta-occitania.mp3':
Metadata:
icy-br : 128
icy-description : La Radio de L'Occitania Granda 100 % ÒC
icy-genre : Europe
icy-name : RADIO PLANÈTA OCCITÀNIA
icy-pub : 1
icy-url : http://radio-planeta-occitania.blogspot.fr/
StreamTitle :
TSSE : Lavf58.49.100
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 470kB time=00:00:29.98 bitrate= 128.3kbits/s speed=1.38x
video:0kB audio:469kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.153258%
PS3: and you totally win on the tagging
Code:
WGET:
mediainfo "♪♪-Thu 2021-07-29 [15-35-27]Radio-Planeta-Occitania.mp3"
General
Complete name : ♪♪-Thu 2021-07-29 [15-35-27]Radio-Planeta-Occitania.mp3
Format : MPEG Audio
File size : 274 KiB
Duration : 17 s 554 ms
Overall bit rate mode : Constant
Overall bit rate : 128 kb/s
Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Format settings : Joint stereo
Duration : 17 s 554 ms
Bit rate mode : Constant
Bit rate : 128 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Frame rate : 38.281 FPS (1152 SPF)
Compression mode : Lossy
Stream size : 274 KiB (100%)
=============
FFMPEG:
mediainfo Thu\ 2021-07-29\ \[15\:27\:38\]radio-planeta-occitania.mp3
General
Complete name : Thu 2021-07-29 [15:27:38]radio-planeta-occitania.mp3
Format : MPEG Audio
File size : 157 KiB
Duration : 10 s 4 ms
Overall bit rate mode : Variable
Overall bit rate : 128 kb/s
Writing library : Lavf58.49.100
icy-br : 128
icy-description : La Radio de L'Occitania Granda 100 % ÒC
icy-genre : Europe
icy-name : RADIO PLANÈTA OCCITÀNIA
icy-pub : 1
icy-url : http://radio-planeta-occitania.blogspot.fr/
Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Format settings : Joint stereo / MS Stereo
Duration : 10 s 4 ms
Bit rate mode : Variable
Bit rate : 128 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Frame rate : 38.281 FPS (1152 SPF)
Compression mode : Lossy
Stream size : 156 KiB (100%)
Bookmarks