Obtaining the vlc_media_player of the main loop

This forum is about all development around libVLC.
tuxx
New Cone
New Cone
Posts: 1
Joined: 23 Apr 2023 21:55

Obtaining the vlc_media_player of the main loop

Postby tuxx » 23 Apr 2023 22:14

Hi All,

I am trying to write a plugin which takes a separate audio or video file and plays one of them back headlessly ("--no-video"), while displaying the other. The purpose is to play a video in multiple languages simultaneously and direct the audio output to different endpoints (e.g. bluetooth and speakers). I start vlc as follows:

Code: Select all

vlc --intf dual_playback ~/media/my.mkv
This should start the video passed in argv[3] and play a hard coded audio file in a new

Code: Select all

audio_instance=libvlc_new(0, NULL);
Unfortunately however, I haven't been able to figure out how I can access the vlc_media_player_t from the main loop which is playing the media file given to it from argv[3]. I would like for user input events such as pause/play/skipping/seeking to be propagated from the main interface to the headlessly playing audio interface. Is that possible? Any help would be greatly appreciated.

chubinou
Developer
Developer
Posts: 521
Joined: 23 Jul 2015 15:19

Re: Obtaining the vlc_media_player of the main loop

Postby chubinou » 24 Apr 2023 11:20

Hi,

You can't control the vlc player instance that's started as "vlc" from libvlc

libvlc allows you to create new player instances (https://videolan.videolan.me/vlc/group_ ... 9c39ad06af) that you can control within a you program

If you need to control an instance VLC (as a standalone program) you may look at the HTTP interface https://wiki.videolan.org/VLC_HTTP_requests/


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests