This is really cool. I have a little node.js script I wrote that generates a funky little beat I call "egypt.js"[0] and outputs the PCM data to stdout, just for weird things like this.<p>My local WSL1 install of ffmpeg has an issue with the LAME encoder so using a few extra pipes I was able to get this working! Confirmed with a friend they were able to listen across the planet.<p><pre><code> node /tmp/egypt.js | ffmpeg -f f64le -ar 176400 -i pipe: -f wav - | lame - - | curl -s -k -H "Transfer-Encoding: chunked" -X POST -T - "https://broadcast.schollz.com/egypt.mp3?stream=true&advertise=true"
</code></pre>
Neat stuff! I love things like this.<p>[0] <a href="https://gist.github.com/Qix-/7c131c6eb83bef7c44ef6faaf1eab106" rel="nofollow">https://gist.github.com/Qix-/7c131c6eb83bef7c44ef6faaf1eab10...</a>
Coincidentally today is the anniversary of the first public radio broadcast in 1910.<p><a href="https://www.edn.com/1st-public-radio-broadcast-january-13-1910/" rel="nofollow">https://www.edn.com/1st-public-radio-broadcast-january-13-19...</a>
Fascinating. I recall two other interesting uses of ffmpeg: to stream to twitch[1], and to record video[2].<p>[1] <a href="https://stackoverflow.com/questions/54273291/streaming-a-stream-from-website-to-twitch-with-ffmpeg" rel="nofollow">https://stackoverflow.com/questions/54273291/streaming-a-str...</a><p>[2] <a href="https://www.youtube.com/watch?v=HO6oU5oT6uU" rel="nofollow">https://www.youtube.com/watch?v=HO6oU5oT6uU</a>
I think the dissenting / mocking comments here are missing the spirit of the post.<p>Since bash can evoke any Turing complete program, feasibly anything could be done with one line of bash.<p>The authors intent as I saw was to show what that line was. Would you have known without this article?<p>Whether or not people are just being sarcastic, I feel we should definitely not mock but rather encourage any open and free attempts at teaching us cool things that are more novel than the “how to get started on Linux” type bs the market is inundated with.<p>Bravo to author.
If the network is down...Carry on. The music can't stop.<p>"System Bus Radio"
<a href="https://github.com/fulldecent/system-bus-radio" rel="nofollow">https://github.com/fulldecent/system-bus-radio</a>
This article isn't very useful for a "one liner radio", but I use icecast2 in a couple of ways<p>1. I host a VGM radio [1]
2. I use a combination of icecast2 and darkice to have a full home audio networking.<p>With the home audio network, there's a lot to optimize, but I haven't implemented it much more to experiment with it further.<p>Basically I have a Ubuntu Desktop VM on my home server.
A long range bluetooth receiver [2] is feed from Proxmox host into the VM.
The audio from the Bluetooth source (say your phone or your computer) is pulled from Darkice and renders an MP3 file/stream into Icecast2, which then broadcasts it on 10.0.0.10:8000/home
I can use devices like Raspberry Pis to continuously listen on that URL for playback and play if it's available. There's CLI audio players like mpg123.<p>This could be used for whole home audio playback, but there's weird quirks to deal with like the delay between the audio in and when you hear it, as well as it becoming desynced over time.<p>It can also be setup in reverse where a RPi ingests audio from it's audio jack and sends it to the audio hub VM and the audio hub sends it out to the network.<p>[1] <a href="https://vidya.fm" rel="nofollow">https://vidya.fm</a>
[2] <a href="https://www.amazon.com/gp/product/B07KTK8YP3/" rel="nofollow">https://www.amazon.com/gp/product/B07KTK8YP3/</a>
Does anyone have experience with <a href="https://www.liquidsoap.info/" rel="nofollow">https://www.liquidsoap.info/</a> for simple radio stations? Is it any good?
I did something similar so I could listen to my vinyl records over an in home ip radio station on my Sonos without buying their $500 box that lets you add arbitrary audio input.
Nobody has problems with dropped TCP connections when streaming?<p>Tried icecast2 on several servers at distinct hosters and audio tag on various browsers and platforms, in maybe tens of minutes it always seized up. I had to add script to client page had to detect it and reconnect, the pauses were annoying, gave up.<p>Did not dig deeper seems as if routers drop the connection when there are no data transmitted in one direction.
Browse the Internet with one line of Bash:<p><pre><code> firefox https://news.ycombinator.com
</code></pre>
But seriously, the commands in the article are not Bash commands (they don't even use Bashisms) and are valid in any POSIX-compliant shell.
If I write a complex piece of software that does something even marginally interesting, I'm going to post it to HN with a similar title. After all, I'm sure I can execute it with one line of bash, so the title is appropriate, right?