Feature request: Volume and recording with the remote command
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.
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
Thank you very much. Setting the volume works well.
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.
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.
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?
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.
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.
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?
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.
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.
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.
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.
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...
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.
Yes, you are right. I really still had the old version. Please excuse my false alarm.
Are you still planning to add “remote seek 1:00" ?
Are you still planning to add “remote seek 1:00" ?
Not in this release. But I added this feature to TODO list.