Log in

View Full Version : Kplayer /Xine - Playing two vids at the same time


shevegen
26th May 2006, 21:45
Hi,
recently a friend came over for a short visit. Since he studied industrial design, and enjoys quality, we are chatting at lengths about various issues, one instance were computer animated movies. I was making some points, tried to compare some things - like the facial expressions between shrek 1 and shrek 2. He was asking if we could watch both movies at the same time (ie. the left part of the screen shows shrek 1, the right part shows shrek 2).

I didnt know if this is possible. Starting a new kplayer screen did kill the other kplayer (which confused me, and I'd love to change this behaviour).
I tried with xine, but for a reason I dont understand, xine is incredibly slow on that computer.

This becomes now a general question, and apologies for my lengthy explanation (he is a windows user, I am a die hard Linux user these days, and I try to solve problems when i have them):

- Is it possible to watch two videos at the same time on a Linux box?

I dont care much about the audio, for all I care the audio can be silent. I just want to have two video's and compare them.
Even just for the sake to demonstrate that this is possible :)

(PS: for some unknown reason, using mplayer on that PC starts a video always in fullscreen, thus using mplayer is
not an option. I dont use that computer much, it was a Sony Vaio thing, oversized, heavy, and these days its just a testing
machine for various automation scripts I write)

nm
26th May 2006, 22:37
I tried with xine, but for a reason I dont understand, xine is incredibly slow on that computer.
It is probably configured to use XShm or some other unaccelerated output. Try -V xv or change the configuration in the setup.

- Is it possible to watch two videos at the same time on a Linux box?
Sure. It should be possible with almost any video player as long as you use generic X11 output (for example mplayer -vo x11) without hardware overlay. However, that is too slow to be useful. For overlays (hardware-accelerated colorspace conversions and scaling), you'll probably need a video card that is capable of displaying multiple video windows. With XVideo these are called ports, and the capability can be checked by running xvinfo (see the fourth line).

Some cards also have multiple Xv adaptors, which may display the video differently. For example my Riva TNT 2 has bad scaling quality and is quite slow when the default Xv adaptor is used with NVIDIA's binary drivers. Changing the adaptor or using the open source drivers will fix these problems.

Anyway, if you have multiple Xv ports, most players should be able to find an unused one and work at the same time with other players. Riva TNT 2 has 32 ports, so I'd guess most NVIDIA's cards work fine. Matrox G450 only has one port, which makes it harder to play multiple videos at the same time. It could be done only unaccelerated or with a player that merges the video streams into one output window. (GSteamer could allow something like this easily, maybe)

I dont care much about the audio, for all I care the audio can be silent. I just want to have two video's and compare them.
Even just for the sake to demonstrate that this is possible :)
Audio output is also handled fine if you use some recent distro that has ALSA dmix software mixer enabled by default, and you have the players configured for ALSA output.

(PS: for some unknown reason, using mplayer on that PC starts a video always in fullscreen, thus using mplayer is
not an option.
Try parameter -nofs. It can also be set in the configuration files (~/.mplayer/config, /etc/mplayer/mplayer.conf). If that doesn't work, mplayer is set to use an output that can only be displayed in full screen, like -vo vesa. Try -vo xv, -vo xvidix, -vo sdl and -vo x11 (in about that order of preference). -vo help should display all available options. By the way, MPlayer is about the only player that allows specifying the Xv adaptor. That is helpful in situations like mine with the Riva TNT. MPlayer's manual also helps as always :)

shevegen
2nd June 2006, 21:01
Okay!
Gonna see if i have enough time this weekend to go at it again :)