【问题标题】:VLC player cannot play network stream from the vlcj StreamHttp sample applicationVLC 播放器无法播放来自 vlcj StreamHttp 示例应用程序的网络流
【发布时间】:2012-03-23 13:37:37
【问题描述】:

当我在 JAVA 中运行示例代码时,我收到以下消息-

Streaming 'F:\Video\Don.mp4' to ':sout=#rtp{sdp=rtsp://@127.0.0.1:5555/demo}'
       _       _
__   _| | ___ (_)
\ \ / / |/ __|| |
 \ V /| | (__ | |
  \_/ |_|\___|/ | 2.1.0
            |__/  www.capricasoftware.co.uk

VLCJ is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

VLCJ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with VLCJ.  If not, see <http://www.gnu.org/licenses/>.

Copyright 2009, 2010, 2011, 2012 Caprica Software Limited.

vlcj: (Info.java:66)                           | INFO  | vlcj: 2.1.0

vlcj: (Info.java:67)                           | INFO  | java: 1.6.0_26 Sun Microsystems Inc.

vlcj: (Info.java:68)                           | INFO  | java home: C:\Program Files\Java\jre6

vlcj: (Info.java:69)                           | INFO  | os: Windows 7 6.1 x86

vlcj: (LibVlcFactory.java:143)                 | INFO  | vlc: 2.0.1 Twoflower, changeset 2.0.1-0-gf432547

vlcj: (LibVlcFactory.java:144)                 | INFO  | libvlc: C:\Program Files\VideoLAN\VLC\libvlc.dll

[18587ed0] stream_out_rtp stream out: Consider passing --rtsp-host=IP on the command line instead.

上面的语句“stream_out_rtp 流出”是什么意思? 我尝试在 http 中流式传输时遇到的类似错误

【问题讨论】:

  • 您是否尝试使用 VLCJ 创建 RTP/RTSP 服务器?是的,这是可能的,但首先通过 VLC 媒体播放器尝试使用 VLC 命令行测试您的 :sout 命令。当您调用其工厂构造函数factory = new MediaPlayerFactory(options);时,您可以在 VLCJ 的选项字符串数组中传递 VLC 选项 --rtsp-host=127.0.0.1
  • 我在选项中传递它'String media = args[0]; String options = formatRtspStream("127.0.0.1", 5555, "demo"); mediaPlayer.playMedia(media, options, ":no-sout-rtp-sap", ":no-sout-standard-sap", ":sout-all", ":sout-keep" );'
  • 在工厂实例中传递选项字符串数组,而不是在媒体播放器实例中。

标签: http video-streaming rtsp vlc vlcj


【解决方案1】:
 mediaPlayer.playMedia("dshow://", 
                    ":sout=#rtp{sdp=rtsp://@:5555/demo}",
                      ":no-sout-rtp-sap", 
                     ":no-sout-standard-sap", 
                      ":sout-all",
                      ":rtsp-caching=100",
                      ":sout-keep");

试试这个对我有用..

【讨论】:

    猜你喜欢
    • 2013-06-01
    • 2021-05-09
    • 1970-01-01
    • 1970-01-01
    • 2013-05-13
    • 2011-08-18
    • 1970-01-01
    • 1970-01-01
    • 2016-07-17
    相关资源
    最近更新 更多