博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ffmpeg无法接收组播流问题处理
阅读量:7026 次
发布时间:2019-06-28

本文共 3903 字,大约阅读时间需要 13 分钟。

  问题:ffmpeg无法对IP组播进行处理,表现如下

[root@os01 /]# ffprobe udp://225.0.0.2:9000ffprobe version 2.7.1 Copyright (c) 2007-2015 the FFmpeg developers  built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)  configuration: --enable-gpl --enable-nonfree --enable-static --enable-pthreads  libavutil      54. 27.100 / 54. 27.100  libavcodec     56. 41.100 / 56. 41.100  libavformat    56. 36.100 / 56. 36.100  libavdevice    56.  4.100 / 56.  4.100  libavfilter     5. 16.101 /  5. 16.101  libswscale      3.  1.101 /  3.  1.101  libswresample   1.  2.100 /  1.  2.100  libpostproc    53.  3.100 / 53.  3.100 (一直卡在这里)

  

  而通过tcpdump抓包,是可以抓到组播流的

[root@os01 /]# tcpdump -ieno1 host 225.0.0.2 and port 9000tcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on eno1, link-type EN10MB (Ethernet), capture size 65535 bytes09:03:35.745690 IP bogon.37266 > 225.0.0.2.cslistener: UDP, length 131609:03:35.759688 IP bogon.37266 > 225.0.0.2.cslistener: UDP, length 131609:03:35.763224 IP bogon.37266 > 225.0.0.2.cslistener: UDP, length 131609:03:35.766720 IP bogon.37266 > 225.0.0.2.cslistener: UDP, length 131609:03:35.770256 IP bogon.37266 > 225.0.0.2.cslistener: UDP, length 131609:03:35.773768 IP bogon.37266 > 225.0.0.2.cslistener: UDP, length 1316

 

  查看route表如下

[root@os01 logs]# routeKernel IP routing tableDestination     Gateway         Genmask         Flags Metric Ref    Use Ifacedefault         bogon           0.0.0.0         UG    100    0        0 eno4link-local      0.0.0.0         255.255.0.0     U     1003   0        0 eno2172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0172.28.1.0      0.0.0.0         255.255.255.0   U     100    0        0 eno3172.28.33.0     0.0.0.0         255.255.255.0   U     100    0        0 eno1172.28.34.0     0.0.0.0         255.255.255.0   U     0      0        0 eno2192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 eno4192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

 

  故,分析得出,上述问题是由route表中未配置组播地址导致,解决办法如下

[root@os01 logs]# route add -net 225.0.0.0 netmask 255.0.0.0 dev eno1
[root@os01 logs]# routeKernel IP routing tableDestination     Gateway         Genmask         Flags Metric Ref    Use Ifacedefault         bogon           0.0.0.0         UG    100    0        0 eno4link-local      0.0.0.0         255.255.0.0     U     1003   0        0 eno2172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0172.28.1.0      0.0.0.0         255.255.255.0   U     100    0        0 eno3172.28.33.0     0.0.0.0         255.255.255.0   U     100    0        0 eno1172.28.34.0     0.0.0.0         255.255.255.0   U     0      0        0 eno2192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 eno4192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0225.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 eno1

 

  再次验证ffmpeg:

[root@os01 logs]# ffprobe udp://225.0.0.2:9000ffprobe version 2.7.1 Copyright (c) 2007-2015 the FFmpeg developers  built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)  configuration: --enable-gpl --enable-nonfree --enable-static --enable-pthreads  libavutil      54. 27.100 / 54. 27.100  libavcodec     56. 41.100 / 56. 41.100  libavformat    56. 36.100 / 56. 36.100  libavdevice    56.  4.100 / 56.  4.100  libavfilter     5. 16.101 /  5. 16.101  libswscale      3.  1.101 /  3.  1.101  libswresample   1.  2.100 /  1.  2.100  libpostproc    53.  3.100 / 53.  3.100[h264 @ 0x2ed1160] non-existing PPS 0 referenced    Last message repeated 1 times[h264 @ 0x2ed1160] decode_slice_header error[h264 @ 0x2ed1160] no frame![h264 @ 0x2ed1160] non-existing PPS 0 referenced    Last message repeated 1 times[h264 @ 0x2ed1160] decode_slice_header error[h264 @ 0x2ed1160] no frame![h264 @ 0x2ed1160] non-existing PPS 0 referenced    Last message repeated 1 times

 

转载地址:http://hnoxl.baihongyu.com/

你可能感兴趣的文章
.Echo 命令中经常提到回显,是什么意思?
查看>>
MySQL在大数据Limit使用
查看>>
iOS中如何创建一个滑出式导航面板(1)
查看>>
Solr5.3.1整合IKAnalyzer
查看>>
Swift - 06 - 数值类型转换和类型别名
查看>>
华为3G模块EM770W在LINUX下的驱动安装
查看>>
omnet++4.0安装使用
查看>>
Jquery JSOPN在WebApi中的问题
查看>>
[React Testing] Conditional className with Shallow Rendering
查看>>
a or an
查看>>
Coursera课程《大家的python》(Python for everyone)课件
查看>>
PHP程序猿必须学习的第二课——站点安全问题预防
查看>>
2016第5周三
查看>>
Spring学习10-SpringMV核心组件2及SpringMVC项目示例
查看>>
hdu 5620 KK's Steel(推理)
查看>>
(笔记)电路设计(十五)之基本电路单元的认识
查看>>
nginx 日志获取不到远程访问ip问题解决
查看>>
有若干个字符串,比較找出当中最大者
查看>>
开源 免费 java CMS - FreeCMS2.0 会员我的评论
查看>>
Servlet 工程 web.xml 中的 servlet 和 servlet-mapping 标签 《转载》
查看>>