gpt4 book ai didi

linux - 如何使用 VLC 自动播放和循环播放?

转载 作者:太空宇宙 更新时间:2023-11-04 04:36:12 25 4
gpt4 key购买 nike

VLC 如何在使用选项时应用给定内容的自动循环?以下无法循环。

private void start() {

frame.setVisible(true);
String mrl = "file:///home/sun/Downloads/t1.avi";
// fails
// String[] options = {
// "--loops",
// "--repeat",};

///Applications/VLC.app/Contents/MacOS/VLC -vv qtcapture:// --sout='#transcode{vcodec=h264,vb=768,fps=25.0,scale=1}:standard{access=udp,mux=ts{dts-delay=9000},dst=239.0.0.5}'

//mediaPlayer.playMedia(mrl, options);
//String[] options = {"--loops"};
// no luck fails too
mediaPlayer.playMedia(mrl,
":sout ':standard{loop}'");


}

最佳答案

如果您使用VLCJ,我建议您调用mediaPlayer.setRepeat(true);它在我的VLCJ项目中的工作原理如下:

mediaPlayer.setRepeat(true);
mediaPlayer.setPlaySubItems(true);
mediaPlayer.playMedia(mrl, options);

使用JRE 1.6 32位进行测试:

  • VLCJ 1.2.0 + VLC 引擎libVLC 1.1.11(Windows 32 位)
  • VLCJ 2.1.0-SNAPSHOT + 每晚构建 VLC 引擎 libVLC 2.1.0(Windows 32 位)

关于linux - 如何使用 VLC 自动播放和循环播放?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9593581/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com