ddddhf 2014-12-19 02:23 采纳率: 0%
浏览 9443
已结题

vlc接收h263视频流并实时播放的问题

我Android手机用rtp发送h263视频流到我的电脑,用vlc的sdp文件可以接收到,内容如下:
m=video 5050 RTP/AVP 96
a=rtpmap:96 H263-1998/90000
c=IN IP4 192.168.191.1(手机连我笔记本无线,这是无线的ip)
但是我用libvlc接收,平台vs2010,主要代码如下:
libvlc_instance_t * inst;
libvlc_media_player_t *mp;
libvlc_media_t *m;
libvlc_log_t *log;

    inst = libvlc_new (0, NULL);
    log = libvlc_log_open (inst);
    libvlc_set_log_verbosity (inst, 2);
    unsigned int level = libvlc_get_log_verbosity (inst);
    printf ("vlc log verbosity level = %d\n", level);
    m = libvlc_media_new_location(inst, "rtsp://192.168.191.3:5050");
    mp = libvlc_media_player_new_from_media (m);
    libvlc_media_release (m);
    libvlc_media_player_set_hwnd(mp,::GetDesktopWindow()); 
    libvlc_media_player_play (mp);

     while (!_kbhit())
                    Sleep (100);

    libvlc_media_player_stop (mp);
    libvlc_media_player_release (mp);     
 libvlc_release (inst);
 printf ("message in log = %d\n", libvlc_log_count (log));
 system("pause");
 return 0;

用如上代码运行却显示:
vlc log verbosity level = -1
[0119f734] live555 demux error: Failed to connect with rtsp://192.168.191.1:5050

[0112e3dc] access_realrtsp access error: cannot connect to 192.168.191.1:5050
[0112e3dc] main access error: Connection failed
[0112e3dc] main access error: VLC could not connect to "192.168.191.1:5050".
[011ae264] main input error: open of `rtsp://192.168.191.1:5050' failed
[011ae264] main input error: Your input can't be opened
[011ae264] main input error: VLC is unable to open the MRL 'rtsp://192.168.191.1
:5050'. Check the log for details.
请问各位大神这是哪个地方错了,我vlc没用过,都是百度慢慢找的,接收端已经弄了好久了,求大神帮帮小弟.

  • 写回答

8条回答 默认 最新

  • Justin-Liu 博客专家认证 2014-12-19 02:33
    关注

    连不上,网络问题检查网络连接和防火墙

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog