All times are UTC+02:00




Post new topic  Reply to topic  [ 60 posts ]  Go to page Previous 1 2 3 4 5 6
Author Message
PostPosted: Fri May 20, 2022 9:22 pm 

Joined: Mon Apr 25, 2022 11:19 pm
Posts: 77
At least I have some idea of how to reconfigure the liquidsoap .liq file to change from the Alsa input used on the master to the jack input of the slave device. There is a specific way to do it in liquidsoap. I think it will be easier to find existing examples than to try and work out the below which doesn't make a lot of sense to me...!

One example I found simply has radio = mksafe(input.jack(id="liquidsoap"))


input.jack
Get stream from jack.

Type:

(?id : string?, ?buffer_size : int, ?clock_safe : bool,
?fallible : bool, ?on_start : (() -> unit),
?on_stop : (() -> unit), ?server : string,
?start : bool) -> source(audio=pcm('a), video='b,
midi='c)
Arguments:

id (of type string?, which defaults to null): Force the value of the source ID.
buffer_size (of type int, which defaults to 2): Set buffer size, in frames. Must be >= 1.
clock_safe (of type bool, which defaults to true): Force the use of a dedicated clock
fallible (of type bool, which defaults to false): Allow the source to fail. If set to false, start must be true and stop method raises an error.
on_start (of type () -> unit, which defaults to <fun>): Callback executed when input starts.
on_stop (of type () -> unit, which defaults to <fun>): Callback executed when input stops.
server (of type string, which defaults to ""): Jack server to connect to.
start (of type bool, which defaults to true): Start input as soon as it is available.
Methods:

duration (of type () -> float): Estimation of the duration of the current track.
elapsed (of type () -> float): Elapsed time in the current track.
fallible (of type bool): Indicate if a source may fail, i.e. may not be ready to stream.
id (of type () -> string): Identifier of the source.
is_active (of type () -> bool): true if the source is active, i.e. it is continuously animated by its own clock whenever it is ready. Typically, true for outputs and sources such as input.http.
is_ready (of type () -> bool): Indicate if a source is ready to stream. This does not mean that the source is currently streaming, just that its resources are all properly initialized.
is_started (of type () -> bool): true if the output or source is started.
is_up (of type () -> bool): Indicate that the source can be asked to produce some data at any time. This is true when the source is currently being used or if it could be used at any time, typically inside a switch or fallback.
last_metadata (of type () -> [string * string]?): Return the last metadata from the source.
log (of type {level : (() -> int?).{set : ((int) -> unit)}}): Get or set the source’s log level, from 1 to 5.
on_get_ready (of type ((() -> unit)) -> unit): Register a function to be called after the source is asked to get ready. This is when, for instance, the source’s final ID is set.
on_leave (of type ((() -> unit)) -> unit): Register a function to be called when source is not used anymore by another source.
on_metadata (of type ((([string * string]) -> unit)) -> unit): Call a given handler on metadata packets.
on_shutdown (of type ((() -> unit)) -> unit): Register a function to be called when source shuts down.
on_track (of type ((([string * string]) -> unit)) -> unit): Call a given handler on new tracks.
remaining (of type () -> float): Estimation of remaining time in the current track.
seek (of type (float) -> float): Seek forward, in seconds (returns the amount of time effectively seeked).
self_sync (of type () -> bool): Is the source currently controling its own real-time loop.
shutdown (of type () -> unit): Shutdown the output or source.
skip (of type () -> unit): Skip to the next track.
start (of type () -> unit): Ask the source or output to start.
stop (of type () -> unit): Ask the source or output to stop.
time (of type () -> float): Get a source’s time, based on its assigned clock.


Top
   
PostPosted: Tue May 24, 2022 2:58 pm 

Joined: Mon Apr 25, 2022 11:19 pm
Posts: 77
One tip - if you are using ST at a higher sample rate and also doing the same with encoding, make sure that the sampling rate is actually supported by pulseaudio! Resampling can ruin the quality of your output and also add extra load on to the CPU. And it also causes buffer underruns as reported by ST which also ruins the audio!

By typing this - pacmd list-sinks | grep sample

I found that pulseaudio was sampling at 44.1khz! I had 48khz on both ST and the encoder. No wonder things didn't work nor sound right!

So to fix this, I created a file ~/.pulse/daemon.conf

and added a single line to it - default-sample-rate = 48000

I then looked for the PID for Pulseaudio and killed it. I restarted it by typing pulseaudio -D (to start it again as a daemon)

To double check it worked, I typed this again - pacmd list-sinks | grep sample

You should now find that the sampling rate is 48000.

Now things sound better with less load on the CPU and less buffer underruns! :-)

I hope this helps someone out there!


Top
   
PostPosted: Wed Jun 01, 2022 6:04 pm 

Joined: Fri Oct 15, 2021 3:58 pm
Posts: 6
is there another way to get audio into the rpi4?
I have a hifiberry, but not the one with a adc


Top
   
PostPosted: Wed Jun 01, 2022 10:42 pm 

Joined: Mon Apr 25, 2022 11:19 pm
Posts: 77
Quote:
is there another way to get audio into the rpi4?
I have a hifiberry, but not the one with a adc
For analogue audio input, I don't think so. You definitely need an ADC of some description, or perhaps you could pipe something in using AoIP techniques from another device?

You might get away with a USB adapter which features line in, but I don't know what the quality is like for those.

Another way might be a USB connection to something which can serve audio that way? Maybe a DAC output?

Depends on what equipment you have in front of you I suppose.


Top
   
PostPosted: Thu Jun 16, 2022 10:41 am 

Joined: Mon Apr 25, 2022 11:19 pm
Posts: 77
Quote:
BTW, you seem to try to accomplish something similar to my setup.
I'm running a Moode-Player on a Pi-Zero with a HifiBerry-amp in my Kitchen and source my music archive through an Icecast stream.

I'm using a Windows desktop machine to feed the stream and do the processing, though.
I've installed OpenMediaVault on another Raspberry Pi 4 with miniDLNAserver. I now play from music I host rather than from a streaming service. Have you managed to figure out a way to display the song metadata on your receivers? This is my latest nice to have!

Perhaps Moode-Player already supports this - I will have a look and read up about it.

I am using Hiby Music Player on the android DAP which is DLNA compliant (and also able to play full resolution by bypassing the limitations of android), but I am happy to either change the player on android or maybe put something on Raspberry Pi if it's able to output the metadata of the currently playing song to Liquidsoap which I hope then feeds into Icecast.

If you or anyone reading this has managed to accomplish this, I'd be very interested to learn how you've done it!


Top
   
PostPosted: Thu Jun 16, 2022 8:53 pm 

Joined: Thu Jan 15, 2015 11:19 am
Posts: 146
Sorry, can't help here. My moode player currently only gets radio streams, and the icecast metadata displays just fine.


Top
   
PostPosted: Thu Jun 16, 2022 11:55 pm 

Joined: Mon Apr 25, 2022 11:19 pm
Posts: 77
Quote:
Sorry, can't help here. My moode player currently only gets radio streams, and the icecast metadata displays just fine.
No worries!

I will dig further, and if I find/make a solution, I will share it here.


Top
   
PostPosted: Fri Sep 16, 2022 11:40 am 

Joined: Mon Apr 25, 2022 11:19 pm
Posts: 77
Quote:
Sorry, can't help here. My moode player currently only gets radio streams, and the icecast metadata displays just fine.
Hi Minetti, long time no speak!

I've started using Moode - wow, it's brilliant and so reliable! I'm outputting via USB to a Topping DAC which then feeds into the ST box which does the processing/encoding/streaming.

I like that Moode has the ability to export metadata in JSON format. Trying to figure out a way to get this to display on my receivers whether via Liquidsoap or direct to Icecast. Would be great to be able to check what's playing.

This has replaced the portable DAP I was previously using as a sound source which rather cumbersome to control via VNC. It's much better using a web browser to control Moode wherever I am - even if I'm outdoors when I'm on VPN!

How are you getting on? Have you done anything new with your set up or made any interesting discoveries?


Top
   
PostPosted: Thu Sep 22, 2022 3:46 pm 

Joined: Thu Jan 15, 2015 11:19 am
Posts: 146
I'm still on the same setup software-wise. But changed the platform of my services, now running everything virtual in a Proxmox environment. I'll soon start to play with mAirList in Proxmox as a VM - or build myself a little playout tool that plays the mAirList generated playlists while there no instance of mAirList on air.
I also think about moving my processing to a Pi4 and make it kind of a hardware box by adding a rackmount blind plate with a 4" display.
Will keep the forum updated about the stereotool parts.

But first some real broadcasting to do, I'm joining a couple of guys that support a local broadcaster on the transformation to µMPX. I'm currently hosting a test receiver and we'll move on and put the stuff next to the transmitter soon.


Top
   
PostPosted: Sun Oct 02, 2022 11:27 pm 
Site Admin
User avatar

Joined: Mon Mar 17, 2008 1:40 am
Posts: 10670
For running Stereo Tool on a Pi 4 I recommend checking out our new Rasbperry Pi 3/4 image for several products including Stereo Tool:
viewtopic.php?f=14&t=32883&start=30

Still work in progress, I hope to be able to officially release this in a few days.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 60 posts ]  Go to page Previous 1 2 3 4 5 6

All times are UTC+02:00


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited