[FFmpeg-devel] [PATCH v2] avformat: add Software Defined Radio support

Michael Niedermayer michael at niedermayer.cc
Sun Jun 25 12:54:25 EEST 2023


On Sun, Jun 25, 2023 at 12:01:07AM +0200, Tomas Härdin wrote:
> lör 2023-06-24 klockan 23:01 +0200 skrev Michael Niedermayer:
> > On Sat, Jun 24, 2023 at 11:51:57AM +0200, Tomas Härdin wrote:
> > > fre 2023-06-23 klockan 23:18 +0200 skrev Michael Niedermayer:
> > > > 
> > > > Are you planing to add SDR support through some library like GNU
> > > > radio
> > > > to FFmpeg ?
> > > 
> > > This is begging the question. I don't care what you think is fun,
> > > this
> > > is outside the scope of the project. Not everything needs to be
> > > shoveled into FFmpeg master. The UNIX pipe was invented for a
> > > reason.
> > > Use radio tools to do radio stuff, then pipe the resulting
> > > bitstream or
> > > audio stream into FFmpeg if you need to say transcode DAB to Opus
> > > for
> > > streaming on the Web or something.
> > 
> > We will have to agree to disagree here.
> > all other sources of audio and video work conveniently in FFmpeg
> > I can also play a video and switch subtitle and audio streams with a
> > button not have to use a external demultiplxer and choose the streams
> > before starting the player.
> 
> If you want to listen to AM broadcasts then there are already plenty of
> programs to do that. If you want to skim the bands for interesting
> broadcasts there are tools for that as well. Have you even done basic
> research to see what is out there?

Ive looked a bit, i found CubicSDR and SDR++ i like these tools they
are cool. But they dont seem to do many demodulations, just analog
also they are very manual which is cool sure but what iam missing
is a "iphone" like experience. Something with 2 buttons

as in next station, previous station, hold one to record, hold both
to record everything, double click to switch between audio and viddeo
;)
not exacty like that of course but the idea of simple convenient and
99.99% working, no tool i saw or heared of does this.

you know, not i have to select the frequency i have to select the demodulation
i have to figure out what the song name is. Something when i hear a song i  like
i press record and it figures out what song this is (RDS has the info)
figures out when the song started and goes back in some cache and stores
that from the past
Thats one use case like i said. Theres surely a lot more. like dumping everything
from the whole DAB or FM band into a properly sorted "mp3/aac" library

or maybe record all the air traffic control stuff (not that i care) but
i suspect some people would care and for that i wouldnt be surpised if
software exists already


> 
> > > > I think GNU radio is a poor choice, even just the base package
> > > > has
> > > > "Installed-Size: 407 MB" that would be huge dependancy to avoid
> > > > ATM 2
> > > > pages
> > > > of modem code
> > > 
> > > Ridiculous justification for increasing technical debt in the
> > > project.
> > > Modern computers have more than enough disk. GNU Radio supports
> > > offloading processing to on-board FPGAs among other very useful
> > > features for radio work.
> > 
> > somehow you swing between extreems here
> > first its pipes or nothing now we need FPGAs
> 
> Yeah because different applications call for different tools. You
> cannot do RADAR or WiFi on the CPU.

we are drifting off topic. But "You cannot do" triggers me a bit
reminds be of "you cannot break videocrypt without FFTs on FPGAs"
I did that on the CPU of my average desktop in 1997
https://guru.multimedia.cx/index.php?s=videocrypt

so now we cannot do RADAR on the CPU ?
why exactly would that be so ?
RADAR is not one thing btw, theres alot of different RADAR systems
some i do belive worked with vaccuum tubes i do guess you dont
mean these

with wifi theres also different iterations. I guess as bandwidth
increases we need more processing


> Hence why there's a sophisticated
> set of tools for doing radio stuff already. Tools that could use more
> developer effort.
> 
> > where ATM its just 2 pages of modem related code
> 
> All the better reason to nip it in the bud.
> 
> > > There are more light-weight options if you
> > > just want AM/FM, that can then be piped to FFmpeg by various means
> > > (jack or named pipes). gqrx for example, which in Debian (gqrx-sdr)
> > > comes to 25 megs of downloads (152 megs on disk) including all
> > > dependencies, which includes gnuradio, gnuradio-dev, gr-osmosdr etc
> > 
> > I think we somehow are not talking on the same frequency ;)
> > if i want just AM/FM i need 10 pages of code max and writing these
> > pages is a fun thing to do for me.
> 
> Fun for you is technical debt for everyone else.

how is a self contained module affecting anyone excpet who works on it?

[...]
> > > > Not that i personally have anything against GPL, I like GPL
> > > > but thats not the preferred license in FFmpeg
> > > > 
> > > > do you suggest we should create a libavradio ?
> > > > or can you suggest an existing library that would fit the C +
> > > > clean
> > > > ASM
> > > > LGPL style that FFmpeg tends to prefer ?
> > > 
> > > I am suggesting you follow the UNIX philosophy of having programs
> > > that
> > > do one thing well.
> > 
> > Sure, but again it doesnt do it
> > 
> > The 3 cases iam thinking of ATM are
> > 
> > 1. A libavcodec / libavformat / libavfilter based player which allows
> > going
> > through the radio spectrum, vissually displaying what is there
> 
> This already exists. Ask your local radio amateurs and they will point
> out oodles of programs for you. or apt search amateur radio
> 

> > autodetecting modulations and demodulating the selected station.
> 
> lol

whats funny ?


> 
> > 2. FFmpeg being able to simply be given a piece of radio spectrum and
> > detect and
> > demodulate everything in that part independant of what modulations
> > are there and storing
> > that all in a multimedia file like matroska or nut.
> 
> You are suggesting writing a skimmer that somehow figures out what
> modulation is used. Meanwhile what people actually do is rely on the
> band plan, because shit is difficult enough as it is. Broadcast FM
> channels can be mono, or stereo, or forego stereo for subcarriers in
> different languages. Plus you have digital data in there, and
> mechanisms for emergency broadcast switchover.

yes, and ?
even my car radio (which is what the manufactor of the car put in)
has working detection for all this

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230625/099ce9b0/attachment.sig>


More information about the ffmpeg-devel mailing list