ncradio - ncurses FM radio
Posted by subsynq@reddit | linux | View on Reddit | 40 comments
Probably very niche, but here is a small FM radio controller/player/recorder for Linux and V4L-supported tuners.
After playing around with the ADS RDX-155 USB FM tuner, I realized that there wasn't any radio application that would work well out of the box in Fedora 44. Some of them dropped FM support in favour of netradios, others would crash or fail to build without tweaks, xawtv-radio would stutter throwing ALSA buffer overrun errors and the fact that RDX-155 works at 96khz sample rate wouldn't help much. The only option was to run fmtools for tuning and an arecord/aplay pipe to get the sound.
ncradio features preset management, tuner capture device autodetection, out of the box PipeWire support (but with ALSA fallback) and MP3 recording if lame headers are found. All of it is configurable, for example if you wish to wire the audio devices yourself, you can compile it with the audio section disabled so that it works only as a tuning/scanning tool (e.g. fmtools replacement).
If you still have your old FM tuner and want to use it, feel free to grab the source and docs here:
https://github.com/ceetee91/ncradio
eldragonnegro2395@reddit
¿Cómo se instala eso?
Strict_Character_667@reddit
Groovy
duperfastjellyfish@reddit
FM was shut down 8 years ago where I live (Norway), and replaced with DAB+.
MATHIS111111@reddit
In Germany they want to do the same. Basically all stations already broadcast in DAB+ and in my experience, analog broadcast is a lot more reliable than its digital equivalent. I get that it might sound better, but if I wanted the best sound, I'd buy the CD. If my radio sounds a bit shitty, I don't really care as long as I get something.
When they switched from analog TV to digital, we started to get tons of artifacts and signal losses.
Upstairs-Comb1631@reddit
Audio CDs do not provide that high-quality sound. You would need to have a SuperAudio CD for that. Moreover, optical drives are a thing of the past. It has more disadvantages than advantages. And today you can have everything, for example, on a memory chip in much better quality. FLAC or Hi-AAC (only for Apple, on Android is BT stack crapped for AAC). And then it depends on how high-quality your audio setup is.
MATHIS111111@reddit
Yes, but CDs are still the only widely available physical format for music.
And that wasn't even the point of comment. Are you saying that DAB+ has better audio quality than CDs? Because that wouldn't be true at all, considering they stream AAC with like 128K or less.
And even sites like Qobuz who sell better than CD quality audio, they only do so for a select few since most publishers do not bother to put anything more than CD quality on the market.
Upstairs-Comb1631@reddit
No, I don't deal with DAB at all. I have no experience with it. I only have an old FM radio in my car.
I don't understand your definition of a physical format. On an optical disc, data is stored. Just like data is stored on a flash drive in some format. On a CD, it's WAV data. On a flash memory, any format compatible with the player. Both are physical media. The reflective layer deteriorates over time. It's similar with vinyl records. On a flash drive, the memory or controller can fail.
And further, we have the problem of music mastering, which is often worthless. And then people wonder why what someone mastered in the '80s or '90s isn't of higher quality than subsequent remasterings, which, for example, lack dynamics. The last time I listened to a new Abba record on a turntable. It was nice to reminisce.
MATHIS111111@reddit
What are you trying to say though? With physical format I mean something you can buy in a physical store, like CDs, cassettes, vinyl. There have been attempts to introduce pre loaded flash drives, but that didn't work out.
So CDs remain the best option in that regard. Sure, they'll deteriorates after decades, depending on environmental conditions, but so does everything else.
I seriously don't get what it is that you're trying to convey. I simply said that if I want high quality music, I'd buy a CD. That high quality audio isn't important for me when listening to the radio.
Upstairs-Comb1631@reddit
I don't know. I'm just talking with you. I just don't agree that CDs are useful after ten years. Back then, even optical drives had problems reading in HI-FI because dust gets on the lenses. It's no different with drives elsewhere. In cars, in PCs. Not to mention the jolts during travel, when it can skip. I abandoned CDs in 2009.
duperfastjellyfish@reddit
Off-topic, but I think the impracticality of physical media is what makes them great. I don't have a CD collection but I play PS2 almost daily, and the intention behind selecting and front-loading a disc, rifeling through the artwork, curating a collection. It's kind of like a hobby in itself that makes you more engaged than that you don't get with intangible media.
I use an iPod Classic for a similar reason. Having a limited selection, in carusell view, and occationally adding another 12$ album that I transfer by cable and intently play 20 times in a row, just hits differently than having the entire world's music library available with the click of a button and not really engaging with any of it.
Upstairs-Comb1631@reddit
edited just now
duperfastjellyfish@reddit
I haven't noticed any drawbacks except that DAB+ radios are much more expensive than a basic FM tuner.
fantomas_666@reddit
I have thrown out a DAB radio after it woke me up with wrong station about 3 times.
subsynq@reddit (OP)
Great, I heard Switzerland is switching them off this year too. Over here in Greece, only the state owned stations are streamed in DAB+ and with limited coverage right now...
markus_b@reddit
The public radio stations already have shut down FM. But they are reconsidering now, because they lost 40% of the listeners in some areas.
There are too many fringe situations where DAB cannot replace FM easily. One area is in older cars; also, there are still plenty of FM-only radios around.
Personally I think the switchover is too early.
Raphi_55@reddit
How is the reception quality? Over here radios constantly fallback to FM
duperfastjellyfish@reddit
We have mountanous terrain that reflect signals, and DAB handles that much, much better. I think that was a huge selling point to the shutdown of FM. Also it's inherently multiplexed (whereas FM uses one channel per station), so amplifying the signal through tunnels and valleys is much less expensive.
subsynq@reddit (OP)
Depends on your tuner, your antenna and your position I guess, here it's pretty good even inside the house with the small bundled antenna of rdx155 but I live in the capital hehe
Raphi_55@reddit
Oh right, I meant car radios. I bet stationary radio work as well as they do here
encouragingSN@reddit
In u.s there is HD radio, are there USB dongles for it?
ThecaTTony@reddit
Todderbert is from USA and use FM+AM all the time: https://www.youtube.com/channel/UCLmim0ytaVc98Ec-BH3S5TQ
undrwater@reddit
RTL-SDR dongles support HD radio.
encouragingSN@reddit
You need software to decode it tho right?
undrwater@reddit
I've listened via gqrx.
nicman24@reddit
Καλησπέρα
gegentan@reddit
What about sdr++?
subsynq@reddit (OP)
It won't work with ncradio as it isn't exposed by video4linux as /dev/radio#. I don't have an SDR, but I know that there are many currently maintained applications for them, even in the current distro main repos.
undrwater@reddit
There are, but I don't think any of them a purpose focused. Which project would get them identified as /dev/radio? Any clue?
subsynq@reddit (OP)
Video4Linux handles all of that, I suppose a v4l compatible driver for these realtek tuner chips would do the trick.
undrwater@reddit
Awesome. I'll post a bug report.
mkMoSs@reddit
Awesome project fellow citizen! If I was a bit paranoid I'd say you kinda doxed your location based on the station reception list, since you're using a real fm tuner. ;P
subsynq@reddit (OP)
Hey, don't really care as my name is up there too, thanks for the heads up though!
subsynq@reddit (OP)
Hey, don't really care as my name is up there too, thanks for the heads up though!
arf20__@reddit
Based as fuck. No AI no bullshit project in C with Makefile. It even decodes RDS. Kudos, and thank you for a refreshing project!
subsynq@reddit (OP)
Tbh AI helped make it in two days, but with as many to-the-point prompts as possible to make something lightweight and outright usable
realitythreek@reddit
Curious, why did you go with C? Familiarity? Better support for embedded hardware?
subsynq@reddit (OP)
Mainly for small output binary footprint (97kb compiled for libpipewire or 64kb targeting ALSA) with no worries about interpreter versions or dependency/package hell. I do want to test it on embedded hardware though, maybe the RPI!
realitythreek@reddit
Fun project
arf20__@reddit
Oh.
NursingHome773@reddit
That's actually pretty cool, thanks