0

I was wondering if anybody have clues or pointers as how to deal with playback of separated audio/video streams using LibVLC? I'm using the library via VLC-Qt wrapper, but I'm not sure it supports it out of the box.

I need to play back video with a separate audio file. I remember fiddling with gstreamer a while back, and it had the possibility of explicitly setting a audio and video sink. Does the VLC-Qt support anything similar?

Zumteufel
  • 165
  • 1
  • 3
  • 10

1 Answers1

0

As long as i know in vlc-qt 0.9 or higher you can create multiple instances and players. I think you are looking forward for something like this :

VlcInstance *audioInstance = new VlcInstance(VlcCommon::args());
VlcInstance *videoInstance = new VlcInstance(VlcCommon::args());

VlcMediaPlayer *audioPlayer = new VlcMediaPlayer(audioInstance);
VlcMediaPlayer *videoPlayer = new VlcMediaPlayer(videoInstance);

etc etc

Then just play both as you like.

  • Thanks for the response. What I'm after is playing back video that has audio in a separate stream. As I can see, the approach you're suggesting will not have audio and video synchronised? I remember fiddling with gstreamer a while back, and it had the possibility of explicitly setting a audio and video sink. Does the VLC-Qt support anything similar? – Zumteufel Oct 04 '14 at 06:17
  • Well I'm new to Vlc-Qt too, so i don't think i can tell it has or hasn't anything like that. If i understand you, you have 2 media types an audio and a video and you want them to be played in the same time? – s3l3ctr Oct 04 '14 at 16:12
  • Yes. Imagine a movie, where the video part is in one file, the audio in another. It's not enough to just load the two files and play() them at the same time. They need to be considered a "whole" by the media player in order to keep synchronization, as it's the case of a normal video, where the video and audio is actually two streams in the media container. As I wrote, gstreamer could do this rather easily. I'm thinking that that there's no easy/intuitive way to do this in VLC without using the rather cryptic argument system. – Zumteufel Oct 04 '14 at 19:46
  • I see now. I have the same problem and I didn't find any solutions yet. I'll look into the problem and reply if found anything. – s3l3ctr Oct 04 '14 at 23:31