Page 1 of 1

libVLC 2.1.x opens 2 windows on a stream with 2 video tracks inside

Posted: 11 Oct 2017 13:43
by Jo2003
Hi all,

I use libVLC in a Qt application, using an embedded widget to show content there. This works fine. Now I've got a video stream with 2 video tracks inside. libVLC opens one video embedded as needed, but opens an additional window for the second video stream. I found a command line option "--preferred-resolution=[lines]" and the description sounds promising, but also if I use this, the 2nd video window is opened. Is there another way to force the usage of only one video track?

Here is the media info of the stream:

Code: Select all

General ID : 46675 (0xB653) Complete name : K:\Videos\xxxxx Format : MPEG-TS File size : 17.4 MiB Duration : 25s 400ms Overall bit rate mode : Variable Overall bit rate : 5 659 Kbps Video #1 ID : 70 (0x46) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : Main@L3.1 Format settings, CABAC : Yes Format settings, ReFrames : 1 frame Format settings, GOP : M=1, N=50 Codec ID : 27 Duration : 26s 960ms Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate : 25.000 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Video #2 ID : 71 (0x47) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : Main@L4.0 Format settings, CABAC : Yes Format settings, ReFrames : 1 frame Format settings, GOP : M=1, N=50 Codec ID : 27 Duration : 23s 620ms Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 25.000 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Audio #1 ID : 68 (0x44) Menu ID : 1 (0x1) Format : AAC Format/Info : Advanced Audio Codec Format version : Version 4 Format profile : LC Muxing mode : ADTS Codec ID : 15 Duration : 26s 986ms Bit rate mode : Variable Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Delay relative to video : -18ms Language : Russian Audio #2 ID : 69 (0x45) Menu ID : 1 (0x1) Format : AAC Format/Info : Advanced Audio Codec Format version : Version 4 Format profile : LC Muxing mode : ADTS Codec ID : 15 Duration : 26s 986ms Bit rate mode : Variable Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Delay relative to video : -17ms Language : Hebrew
Thanks in advance,
Jörg

Re: libVLC 2.1.x opens 2 windows on a stream with 2 video tracks inside

Posted: 16 Oct 2017 06:08
by Jean-Baptiste Kempf
Use libvlc_video_set_track