Vlc is unable to open the MRL when specified using Qt resources

This forum is about all development around libVLC.
ChandruVlc
New Cone
New Cone
Posts: 3
Joined: 12 Jun 2018 07:30

Vlc is unable to open the MRL when specified using Qt resources

Postby ChandruVlc » 13 Jun 2018 11:26

Hello everyone,

I'm trying to play .mp4 video in Qt android application using libVlc.

**Working:** When i specified **mrl** path as **mrl:"file:///home/videos/video.mp4"** it is working fine.

**not working:** when i specified **mrl** path using Qt resources(i added that .mp4 file using Qt resources) as **mrl:"qrc:///video.mp4"**
i'm getting following errors.

**core input error: open of `qrc:///video.mp4' failed
core input error: Your input can't be opened
core input error: VLC is unable to open the MRL 'qrc:///video.mp4'. Check the log for details.**

**code:**

import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.0
import QmlVlc 0.1
import QtMultimedia 5.0
import QtQuick.Window 2.2

ApplicationWindow {
visible: true
width: Screen.width
height: Screen.height/1.1

VlcPlayer {
id: vlcPlayer;
mrl:"qrc:///video.mp4";
}

VideoOutput {
source: vlcPlayer;
anchors.centerIn: parent;

anchors.top: parent.top;
anchors.left: parent.left;
anchors.bottom: parent.bottom;
anchors.right: parent.right;
width: Screen.width-10 ;
height: Screen.height-10 ;
anchors.margins: 10
opacity: 0.9;
}
MouseArea
{
onClicked: vlcPlayer.pause();
onDoubleClicked: vlcPlayer.play(vlcPlayer.mrl);

}
}

Please help me ?
Thank you in advance.

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Vlc is unable to open the MRL when specified using Qt resources

Postby mfkl » 10 Jul 2018 05:13

Just use file:/// ?
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 38 guests