phiola icon indicating copy to clipboard operation
phiola copied to clipboard

Feature request: Volume and recording with the remote command

Open Ducke1001 opened this issue 1 year ago • 17 comments

Is it possible to add volume control during playback with the romote command? I would like to control phiola a bit from my app. This also applies to the smooth change between playing and recording. Then I could replace the entire Mediactrl in my app with phiola.

Ducke1001 avatar Oct 27 '24 08:10 Ducke1001

Hi! In v2.2.8 you can change the currently played track's volume level, e.g. to set 50% volume:

phiola remote volume 50

stsaz avatar Nov 02 '24 07:11 stsaz

Thank you very much. Setting the volume works well.

Ducke1001 avatar Nov 02 '24 16:11 Ducke1001

Is there something else here to do?

This also applies to the smooth change between playing and recording.

I'm not sure I understand what you mean by that.

stsaz avatar Nov 23 '24 06:11 stsaz

In order to control phiola from another app, you would need to be able to call up certain functions remotely. This includes adjusting the volume (done), changing the playback position and switching from playing to playing and recording, as well as stopping the recording without interrupting playback. I could also possibly record via a second task.

Ducke1001 avatar Nov 23 '24 16:11 Ducke1001

changing the playback position

This can be done.

switching from playing to playing and recording

In this case it's just better to start a new process for recording and control it separately. Turning phiola's remote command into a complete client-server would require too much work for a low advantage. Instead, I can add a new option for setting a system pipe name (so that the remote commands for 2 processes don't overlap).

UPDATE: I've just realized that you were probably talking about recording from radio and not from mic :) In that case, your feature request is good indeed. So in other words you want to switch between two modes by some remote command without breaking the output sound? Something like this, only in the same process:

phiola play STREAM
and
phiola play STREAM -tee FILE

Is this correct?

stsaz avatar Nov 24 '24 06:11 stsaz

This can be done.

Thanks a lot.

So in other words you want to switch between two modes by some remote command without breaking the output sound? Something like this, only in the same process: phiola play STREAM and phiola play STREAM -tee FILE Is this correct?

Yes, that's exactly what I mean.

Ducke1001 avatar Nov 24 '24 09:11 Ducke1001

I'ts possible to also change the stream adress or file in the same process? Currently I kill phiola and start a new process. It works, but it is more cumbersome.

Ducke1001 avatar Nov 24 '24 16:11 Ducke1001

I'ts possible to also change the stream adress or file in the same process?

phiola remote start URL should work -- did you try it?

stsaz avatar Nov 25 '24 06:11 stsaz

Honestly, no. I just tried it and it works, thanks. Are the options -connect_timeout and -recv_timeout inherited the main process? I can't use it with the remote command.

Ducke1001 avatar Nov 25 '24 06:11 Ducke1001

changing the playback position

I added remote seek forward and remote seek back commands that will seek by 5 second interval. These commands could be expanded, e.g. seek 1:00 to seek to the exact time. Let me know what you think. Initially I thought it's a good idea to use +5 or -5 notation, but that won't work because I can't use minus sign - as it is reserved for command-line options.

Are the options -connect_timeout and -recv_timeout inherited the main process?

No, currently they are silently ignored because CLI and "remote" are two separate modules. I don't have a solution at the moment on how to pass all CLI options to "remote" so that they operate as a single unit.

stsaz avatar Nov 30 '24 06:11 stsaz

Thanks for adding seek.

remote seek forward

and

remote seek back

work well, but

remote seek 1:00

doesn't work for me. Nothing happens.

I don't have a solution at the moment on how to pass all CLI options to "remote" so that they operate as a single unit.

Okay, that's not quite so tragic. Usually, loading does not take that long or an error is detected. If I can completely replace the MediaCtrl with phiola in my program, then at least there is no longer any dependency between my timer for the MediaCtrl and phiola.

Perhaps pausing while playing via remote would be advantageous. But this could also be avoided with stop and play with seek.

Ducke1001 avatar Nov 30 '24 19:11 Ducke1001

I tested seek again on windows 10. Unfortunately, 'remote seek' doesn't work there at all. Seek is used to continue playing where you left off. The last position is always saved. And of course to change the position using a slider.

Ducke1001 avatar Dec 13 '24 13:12 Ducke1001

It works fine on my box -- both commands phiola remote seek forward and phiola remote seek back change playback position by 5 seconds. Are you sure you're using v2.3-beta2 and running the phiola playback instance with -remote switch? These commands worked for you before, so I guess now you're doing something wrong...

stsaz avatar Dec 14 '24 06:12 stsaz

That's the downside of working on different computers. I thought I had the latest version installed there too, but check again. It would be great if seek worked with a timing requirement.

Ducke1001 avatar Dec 14 '24 09:12 Ducke1001

Yes, you are right. I really still had the old version. Please excuse my false alarm.

Ducke1001 avatar Dec 22 '24 09:12 Ducke1001

Are you still planning to add “remote seek 1:00" ?

Ducke1001 avatar Jan 31 '25 08:01 Ducke1001

Are you still planning to add “remote seek 1:00" ?

Not in this release. But I added this feature to TODO list.

stsaz avatar Feb 01 '25 08:02 stsaz