Comments (4)
The easiest way to basicly play anything you want to, is by using audio loopdevices.
Simply load snd-aloop via modprobe (or just add it to /etc/modules), and you are ready to go.
use a terminal to start PiFm:
sudo arecord -fS16_LE -r 44100 -D hw:Loopback,1,0 -c 2 - | sudo ./pi_fm_rds -audio -
then you are free to play whatever you want with whatever program you want, as long as it allows you to specify the audio device you want to use to output to.
for example:
sudo aplay -D hw:Loopback,0,0 "FILE"
if you want to, you can even define the loopdevice as your standard output device, by changing the .asoundrc in your home directory to
# .asoundrc pcm.!default { type plug slave.pcm "hw:Loopback,0,0" }
That way you can even use VLC within X to transmit your audio.
from pifmrds.
Hi dehy, thanks for the tip, the issue I have is the program cleanly stops working after 2-3 hours, if I re-run the command (without rebooting) it works fine for around the same length of time.
I am using sox like so:
sox -t mp3 http://[stream.url]:8000 -t wav - | sudo ./pi_fm_rds -freq 96.0 -pi FFFF -ps PIRDS -rt 'PI RDS DEMO' -ctl pifm -audio -
What could I be doing wrong? Something is causing it to stop but obviously I would like to fix it so it keeps running until I press stop myself. The above code works for me but quits, is this the stream or the software? Either or, could you maybe help me to fix this please?
Thanks in advance.
from pifmrds.
I'm piping like this to keep audio quality as high as possible:
avconv -i $1 -f ogg - | sox -t ogg - -t wav - | sudo pi_fm_rds -audio - -freq $2 -pi $3 -ps $4 -rt $5
I did try modifying the source code of fm_mpx.c to handle the source differently, but the use of sf_read_float makes that refactoring more complicated.
from pifmrds.
The easiest way to basicly play anything you want to, is by using audio loopdevices. Simply load snd-aloop via modprobe (or just add it to /etc/modules), and you are ready to go. use a terminal to start PiFm:
sudo arecord -fS16_LE -r 44100 -D hw:Loopback,1,0 -c 2 - | sudo ./pi_fm_rds -audio -
then you are free to play whatever you want with whatever program you want, as long as it allows you to specify the audio device you want to use to output to. for example:
sudo aplay -D hw:Loopback,0,0 "FILE"
if you want to, you can even define the loopdevice as your standard output device, by changing the .asoundrc in your home directory to
# .asoundrc pcm.!default { type plug slave.pcm "hw:Loopback,0,0" }
That way you can even use VLC within X to transmit your audio.
I tried this method, but after i started arecord and wanted to use aplay, aplay says "aplay: set_params:1349: Channels count non available".
I don't know how to solve this, can yoou help me?
from pifmrds.
Related Issues (20)
- What Antenna do i get for a raspberry 3 B+. Please Help HOT 1
- Can I stream RDS to external FM+RDS transmitter? HOT 1
- Make file is making error HOT 1
- just blocking HOT 2
- Make doesn't make a nothing HOT 9
- Doesn't compile! HOT 3
- cant pipe audio on pi4 using pulseaudio HOT 1
- Gives error when i use the make command HOT 4
- While compiling I get this soxr.h missing HOT 1
- Support for non-ASCII characters (RDS codes > 0x80) HOT 3
- Hardware related issue with additional FM transmitter HOT 7
- compile issue HOT 2
- Audio too slow HOT 2
- Instant crash on launch on Pi 4 HOT 5
- Mp3 to Wav converter HOT 1
- lack fpu HOT 4
- hi! Could you also make it pi5 compatible too? HOT 5
- Audio signal loss during mouse inactivity with pifmrds on Raspberry Pi 4 HOT 1
- Make Raspberry Pi 5 (GPIO23) Compatible HOT 2
- 19k Signal and Increasing RDS Power HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pifmrds.