Hello everyone,
I'm getting a data from remote system with mpeg-4 format via RTP and i want to play that video on Android application. I'm using VLC library.
Working: When i specified mrl path as mrl: "file:///storage/emulated/0/rtp.mp4" it is working fine.
rtp.mp4 file content
v=0
m=video 5000 RTP/AVP 96 //port =5000
c=IN IP4 192.227.1.20 //ip-address of host only
a=rtpmap:96 MP4v-ES/90000 // mpeg4 decoder
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: "file:///storage/emulated/0/rtp.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);
}
}
Not Working: if i specified that mrl path as mrl: "rtp://@192.227.1.20:5000", it is not working and i'm getting following errors.
rtp demux: unspecified payload format (type 96)
rtp demux: a valid SDP is needed to parse this RTP stream.
core demux: SDP is required
core demux: A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (96).
Modified code part:
VlcPlayer {
id: vlcPlayer;
mrl: "rtp://@192.227.1.20:5000"
}
I can provide the rtp.mp4 file in mrl path but that is not a good choice for portable application.
Can any one suggest me is there any API available in VLC library to perform the operation same as that rtp.mp4 file ?
or suggest me something else ?
please help me ?
Thank you in advance.