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

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 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法