vlc 下载地址: http://download.videolan.org/pub/videolan/vlc/3.0.4/win64/
修改缓存时间:
String options[] = {"--subsdec-encoding=GB18030", "video-filter=motionblur", "network-caching=100", "no-plugins-cache", "rtsp-caching=100", "realrtsp-caching=100"};//声明中文编码 缓存
报错: Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': Native library (win32-x86-64/libvlc.dll) not found in resource path
解决方法:
import com.sun.jna.Native;
import uk.co.caprica.vlcj.binding.LibVlc;
Native.loadLibrary("路径", LibVlc.class);
路径: dll的绝对路径或在项目里的相对路径,如 F:\\libvlc 不要加文件格式 .dll
报错: Failed to load class "org.slf4j.impl.StaticLoggerBinder
解决方法: 这个错误是StaticLoggerBinder类不能被加载到内存中。发生这种情况时,无法找到合适的SLF4J绑定类路径。slf4j-nop放置一个(且只有一个)。slf4j-simple jar。slf4j-log4j12 jar。slf4j-jdk14 jar。jar或logback-classic。jar的类路径应该解决这个问题。