我想用vlcj从rtsp流中获取元数据。rtsp流没有视频和音频数据。只有元数据具有分析信息。当我启动时,它会崩溃并关闭。日志文件“设置rtsp会话失败”中出错。如何使用vlcj获取元数据文件?
String[] VLC_ARGS = {
"--intf", "dummy", // no interface
"--vout", "dummy", // we don't want video (output)
"--no-audio", // we don't want audio (decoding)
};
MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory(VLC_ARGS);
EmbeddedMediaListPlayerComponent mediaPlayerComponent = new EmbeddedMediaListPlayerComponent();
// Create player.
HeadlessMediaPlayer mediaPlayer = mediaPlayerFactory.newHeadlessMediaPlayer();
// Select input device.
String mrl = "rtsp://user:pass@192.168.1.90/axis-media/media.amp?video=0&audio=0&event=off&analytics=polygon";
mediaPlayer.playMedia(mrl);
mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventListener() {
@Override
public void mediaMetaChanged(MediaPlayer mediaPlayer, int metaType) {
System.out.println("metadata changed");
}
}
暂无答案!
目前还没有任何答案,快来回答吧!