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

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 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误