Playing multiple videos concurrently in one instance

About usage, announcement and development of skins for VLC
asaechao
New Cone
New Cone
Posts: 4
Joined: 06 May 2013 23:55

Playing multiple videos concurrently in one instance

Postby asaechao » 15 May 2013 20:35

Hello,

I am trying to create a skin where I have the ability to play two videos at the same time for video encoding visual comparison. Does the skins2 plugin have this ability? I have tried to add two videobox's into the interface, but I can only play one video in the first videobox, while the second one does not do anything. I then tried having two players pop up, but again only the first player will play the video. Below is an attempt using a modified BlueSteel skin.

Image

If it is not currently able to do this, where would I have to start to add this functionality into the plugin? I have looked at the source code, but am at a lost right now on where to start. I will have to modify both the skins editor, and the plugin I am assuming.

Any help or suggestions would be appreciated.

Thanks

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: Playing multiple videos concurrently in one instance

Postby erwan10 » 15 May 2013 23:05

If you want multiple videos for comparison, there are several ways to do that :
- just run them in different vlc instances (make sure the one-instance parameter is off)
- try to run them with the --input-slave parameter (they should display in two different video tags if the skin has got multiple video tags)
- write your own libvlc application

But, beware you may find it difficult to be frame accurate in any cases if this happens to be a requirement for you.

One last remark: the skins2 interface was designed to be tightly coupled with the legacy playlist. So, it is not a simple task to implement multiple inputs.

asaechao
New Cone
New Cone
Posts: 4
Joined: 06 May 2013 23:55

Re: Playing multiple videos concurrently in one instance

Postby asaechao » 16 May 2013 16:16

Thanks for the help. I am probably just going to extend the existing qt4 interface using the --input-slave parameter.

I need to be able to sync up two different mpeg transport streams, which may have the video starting at different frames or times during the streams.
I will then need to be able to do frame by frame comparison, forwards and backwards, and get stream data like bitrate, frame type, etc.

Looking through the forums it seems that going backwards by a frame may be very difficult to impossible to implement?

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: Playing multiple videos concurrently in one instance

Postby erwan10 » 16 May 2013 23:16

If you use --input-slave, this is one rare situation where the skins2 interface may come handier than the qt4 interface. There are not that many and therefore it is worth noting it ! Just extend a skin with two video tags and you'll see the two videos one next to the other in a nice User Interface. The qt4 interface doesn't offer multiple embedded videos whereas the skins2 interface does.

For frame accuracy, going forward frame-by-frame is working very fine. Going backward is not implemented, but implementing a mode where you could go backward just a few frames doesn't seem very difficult. vlc uses a pool of pictures and once a picture is displayed, it is released. If, for instance, release was delayed till the pool is exhausted with free pictures, these pictures would still be available for redisplay. The number of frames to go backward would then depend on the buffering size (a smaller buffer will mean more past pictures retained for a given pool size) and the actual pool size (which may vary depending on the type of display). In most cases, users just need to go backward a few pictures frame-by-frame, and seeking is still available if one needs to go further backward than what frame-by-frame would be able to provide.

Also, the next version of vlc will provide a timecode module, that can be run as an extra input-slave. That allows for timecode display (hh:mm::ss:ff) as a subtitle track and so far, it works fine in all my tests.

asaechao
New Cone
New Cone
Posts: 4
Joined: 06 May 2013 23:55

Re: Playing multiple videos concurrently in one instance

Postby asaechao » 17 May 2013 15:33

Thanks for the help, I appreciate it.

With the --input-slave, it doesn't seem like I can play a videos with different bitrates, they are the same video, but one stream is 7Mbps and the other is 8Mbps. I get spammed with:

[032f1c78] main input warning: clock gap, unexpected stream discontinuity
[032f1c78] main input warning: feeding synchro with a new reference point trying to recover from clock gap
[032f1c78] main input debug: Buffering 0%

Is there an already existing way to allow the videos to play asynchronously? Basically I need to be able to control both the videos separately if needed, which at this point I don't think you can.
I was thinking of creating to media_player instances or something, but I am not sure if that can work.

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: Playing multiple videos concurrently in one instance

Postby erwan10 » 19 May 2013 00:13

With the --input-slave, it doesn't seem like I can play a videos with different bitrates, they are the same video, but one stream is 7Mbps and the other is 8Mbps. I get spammed with:
Yes, for --input-slave to perform well, clocks must be compatible. With mpeg-ts files that bring their own PCR, chances are that it won't work.
Is there an already existing way to allow the videos to play asynchronously?
Yes, just run them in different instances of vlc. And rather opt for the qt interface, that offers a fair amount of information and statistics about the videos. I'm not sure the libvlc API exposes all that the qt interface offers.


Return to “Skins”

Who is online

Users browsing this forum: Google [Bot] and 2 guests