I have a problem with searching in my own Android application. When I forward my rtmp video (MP4 source), the VLC holds and plays well after 60-120 seconds.
My device is armv7 android TV STB BOX.
libvlc = LibVLC.getInstance();
libvlc.setHardwareAcceleration(LibVLC.HW_ACCELERATION_FULL);
libvlc.setSubtitlesEncoding("");
libvlc.setTimeStretching(false);
libvlc.setFrameSkip(true);
libvlc.setChroma("RV32");
libvlc.setVerboseMode(true);
libvlc.setAout(-1);
libvlc.setDeblocking(4);
libvlc.setNetworkCaching(0);
LibVLC.restart(this);
EventHandler.getInstance().addHandler(mHandler);
holder.setFormat(PixelFormat.RGBX_8888);
holder.setKeepScreenOn(true);
MediaList list = libvlc.getMediaList();
list.clear();
list.add(new Media(libvlc, LibVLC.PathToURI(media)), false);
libvlc.playIndex(0);
On another player, such as MXPlayer, there is no problem with this. Vitamio works well, but there is a problem with audio sync. Without searching for video on VLC, it works well, below is my action back and forth:
switch (event.getKeyCode()) {
case 87:
s = false;
if (length > 0L) {
Long t = time+60000L;
if (t < length) {
libvlc.setTime(time+60000L);
libvlc.play();
}
}
break;
case 88:
s = false;
if (length > 0L) {
Long t = time-60000L;
if (t > 0) {
libvlc.setTime(time-60000L);
libvlc.play();
}
}
break;
}
source
share