Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Volume and recording with the remote command #52

Open
Ducke1001 opened this issue Oct 27, 2024 · 15 comments
Open

Feature request: Volume and recording with the remote command #52

Ducke1001 opened this issue Oct 27, 2024 · 15 comments

Comments

@Ducke1001
Copy link

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.

@stsaz
Copy link
Owner

stsaz commented Nov 2, 2024

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

@Ducke1001
Copy link
Author

Thank you very much. Setting the volume works well.

@stsaz
Copy link
Owner

stsaz commented Nov 23, 2024

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.

@Ducke1001
Copy link
Author

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.

@stsaz
Copy link
Owner

stsaz commented Nov 24, 2024

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?

@Ducke1001
Copy link
Author

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
Copy link
Author

Ducke1001 commented Nov 24, 2024

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.

@stsaz
Copy link
Owner

stsaz commented Nov 25, 2024

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?

@Ducke1001
Copy link
Author

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.

@stsaz
Copy link
Owner

stsaz commented Nov 30, 2024

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.

@Ducke1001
Copy link
Author

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
Copy link
Author

Ducke1001 commented Dec 13, 2024

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.

@stsaz
Copy link
Owner

stsaz commented Dec 14, 2024

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...

@Ducke1001
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants