Problems with rc commands from another app.

*nix specific usage questions
Dinosaur1946
Blank Cone
Blank Cone
Posts: 30
Joined: 02 Jul 2022 23:00
VLC version: 3.0.8
Operating System: Linux

Problems with rc commands from another app.

Postby Dinosaur1946 » 23 Nov 2024 04:49

Hi All

The Target:
Rpi Zero W has push buttons to select Video's in a Museum.
Buttons can be pressed in the middle of another video to change to another.

The app is written in FreeBasic and uses the Pipe command:
ie:

Code: Select all

PipeCmnd = "vlc -I rc Video1.mov fullscreen" Open Pipe PipeCmnd for Output as #1 StartTime = Timer do Here I wait for a button press and decide what action to take. loop
Now this is where the issues come in.If I close the Pipe and re-open it with different
video information, the vlc screen closes and reverts to the cli.
It then has to re-open the vlc screen to play the next selection.
The idea is to stop the playing video and tell vlc to play another.
Reading and Googling until I was googly eyed, I cannot resolve how to use the rc commands to achieve this.
Yes, I can see all the different commands and dream about using , stop , play etc.
Whatever I have tried results in vlc not recognising the command.

In FreeBasic, once the Pipe is opened, you then send the next commands by using a print statement.
ie: Print #1, "stop"
Which works, But
Print #1,"play Video2.mov"
or
Print #1,"play 'Video2.mov'"
don't, I get the following screen print.

Code: Select all

dinosaur@debian:~/projects/SimpleVLC$ ./Test VLC media player 3.0.21 Vetinari (revision 3.0.21-0-gdd8bfdbabe8) VLC media player 3.0.21 Vetinari Command Line Interface initialized. Type `help' for help. > VLC media player 3.0.21 Vetinari Command Line Interface initialized. Type `help' for help. > libva info: VA-API version 1.17.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so libva info: Found init function __vaDriverInit_1_17 libva info: va_openDriver() returns 0 Shutting down. > Shutting down. dinosaur@debian:~/projects/SimpleVLC$
Any suggestions greatly appreciated.

Regards

Rémi Denis-Courmont
Developer
Developer
Posts: 15279
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Problems with rc commands from another app.

Postby Rémi Denis-Courmont » 23 Nov 2024 15:27

VLC exits when its standard input ends just like every other programme reading from the standard input.

Don't do that if you don't want it to exit, obviously.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Dinosaur1946
Blank Cone
Blank Cone
Posts: 30
Joined: 02 Jul 2022 23:00
VLC version: 3.0.8
Operating System: Linux

Re: Problems with rc commands from another app.

Postby Dinosaur1946 » 23 Nov 2024 20:31

Hi All

Appreciate that.
Is there anyway to allow me to Interrupt the video, and nominate a new one ? (without vlc exiting)

Regards


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 28 guests