ffmpeg无法接收组播流问题处理
问题:ffmpeg无法对IP组播进行处理,表现如下
[root@os01 /]# ffprobe udp://225.0.0.2:9000
ffprobe version 2.7. Copyright (c) - the FFmpeg developers
built with gcc 4.8. (GCC) (Red Hat 4.8.-)
configuration: --enable-gpl --enable-nonfree --enable-static --enable-pthreads
libavutil . 27.100 / . 27.100
libavcodec . 41.100 / . 41.100
libavformat . 36.100 / . 36.100
libavdevice . 4.100 / . 4.100
libavfilter . 16.101 / . 16.101
libswscale . 1.101 / . 1.101
libswresample . 2.100 / . 2.100
libpostproc . 3.100 / . 3.100
(一直卡在这里)
而通过tcpdump抓包,是可以抓到组播流的
[root@os01 /]# tcpdump -ieno1 host 225.0.0.2 and port
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eno1, link-type EN10MB (Ethernet), capture size bytes
::35.745690 IP bogon. > 225.0.0.2.cslistener: UDP, length
::35.759688 IP bogon. > 225.0.0.2.cslistener: UDP, length
::35.763224 IP bogon. > 225.0.0.2.cslistener: UDP, length
::35.766720 IP bogon. > 225.0.0.2.cslistener: UDP, length
::35.770256 IP bogon. > 225.0.0.2.cslistener: UDP, length
::35.773768 IP bogon. > 225.0.0.2.cslistener: UDP, length
查看route表如下
[root@os01 logs]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default bogon 0.0.0.0 UG eno4
link-local 0.0.0.0 255.255.0.0 U eno2
172.17.0.0 0.0.0.0 255.255.0.0 U docker0
172.28.1.0 0.0.0.0 255.255.255.0 U eno3
172.28.33.0 0.0.0.0 255.255.255.0 U eno1
172.28.34.0 0.0.0.0 255.255.255.0 U eno2
192.168.0.0 0.0.0.0 255.255.255.0 U eno4
192.168.122.0 0.0.0.0 255.255.255.0 U virbr0
故,分析得出,上述问题是由route表中未配置组播地址导致,解决办法如下
[root@os01 logs]# route add -net 225.0.0.0 netmask 255.0.0.0 dev eno1
[root@os01 logs]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default bogon 0.0.0.0 UG eno4
link-local 0.0.0.0 255.255.0.0 U eno2
172.17.0.0 0.0.0.0 255.255.0.0 U docker0
172.28.1.0 0.0.0.0 255.255.255.0 U eno3
172.28.33.0 0.0.0.0 255.255.255.0 U eno1
172.28.34.0 0.0.0.0 255.255.255.0 U eno2
192.168.0.0 0.0.0.0 255.255.255.0 U eno4
192.168.122.0 0.0.0.0 255.255.255.0 U virbr0
225.0.0.0 0.0.0.0 255.0.0.0 U eno1
再次验证ffmpeg:
[root@os01 logs]# ffprobe udp://225.0.0.2:9000
ffprobe version 2.7. Copyright (c) - the FFmpeg developers
built with gcc 4.8. (GCC) (Red Hat 4.8.-)
configuration: --enable-gpl --enable-nonfree --enable-static --enable-pthreads
libavutil . 27.100 / . 27.100
libavcodec . 41.100 / . 41.100
libavformat . 36.100 / . 36.100
libavdevice . 4.100 / . 4.100
libavfilter . 16.101 / . 16.101
libswscale . 1.101 / . 1.101
libswresample . 2.100 / . 2.100
libpostproc . 3.100 / . 3.100
[h264 @ 0x2ed1160] non-existing PPS referenced
Last message repeated times
[h264 @ 0x2ed1160] decode_slice_header error
[h264 @ 0x2ed1160] no frame!
[h264 @ 0x2ed1160] non-existing PPS referenced
Last message repeated times
[h264 @ 0x2ed1160] decode_slice_header error
[h264 @ 0x2ed1160] no frame!
[h264 @ 0x2ed1160] non-existing PPS referenced
Last message repeated times
ffmpeg无法接收组播流问题处理的更多相关文章
- 使用VLC创建组播流
vlc既是一个播放器,又可以成为一个流媒体服务器.最近需要做udp组播播放相关的东西,需要先在本地搭建一个udp组播服务器,因为机器上本来就装有vlc,所以就用它了. 第一步: 点击媒体->流 ...
- linux下播放组播流出现setsockopt:No such device错误
在linux下播放组播流出现setsockopt:No such device错误是因为多播IP没有add路由表里面 可以采用如下命令完成: root@android:/ # busybox rout ...
- Android为TV端助力:UDP协议(接收组播和单播)
private static String MulticastHost="224.9.9.98";private static int POST=19999;private sta ...
- ffmpeg笔记——UDP组播接收总结
ffmpeg在avformat_open_input里面已经实现了UDP的协议,所以只需要设置好参数,将url传递进去就可以了. 和打开文件的方式基本一样: 01 AVCodecContext *pV ...
- dell n2000 组播抑制
http://en.community.dell.com/support-forums/network-switches/f/866/t/19677497 http://en.community.de ...
- CCIE路由实验(6) -- 组播Multicasting
1.组播IGMP的各种情况2.PIM Dense-Mode3.PIM Sparse-Mode4.PIM双向树和SSM5.动态RP之auto-rp6.动态RP之BSR7.Anycast RP8.域间组播 ...
- SDN网络IPv6组播机制支持实时视频业务海量用户扩展
以 OpenFlow 技术为核心的软件定义网络(SDN)框架具有集中控制的功能能够自己感知网络拓扑的变化,在细粒度的路径选择.接入控制.负载均衡方面有着天然的优势,为 IPv6 组播功能的实现提供了好 ...
- 组播(Multicast)传输
组播(Multicast)传输: 在发送者和每一接收者之间实现点对多点网络连接. 如果一台发送者同时给多个的接收者传输相同的数据,也只需复制一份的相同数据包.它提高了数据传送效率.减少了骨干网络出现拥 ...
- android multicast 多播(组播)问题
有谁遇到过同样问题的可以探讨下,或者已经解决问题的,能够指导下我 获取组播锁 private InetAddress group; WifiManager wm=(WifiManager ...
随机推荐
- 第三篇 SQL Server安全主体和安全对象
本篇文章是SQL Server安全系列的第三篇,详细内容请参考原文. 一般来说,你通过给主体分配对象的权限来实现SQL Server上的用户与对象的安全.在这一系列,你会学习在SQL Server实例 ...
- nsstring打印结构体
// // main.m // 09-常用结构体 // // Created by apple on 14-3-20. // Copyright (c) 2014年 apple. All ri ...
- iOS 隐藏系统的导航,使用自定义的导航
#import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @pr ...
- iOS tableViewCell侧滑改变收藏状态
/** * 图片素材 链接: http://pan.baidu.com/s/1mhi1sfQ 密码: w2wq */ #import <UIKit/UIKit.h> ...
- bind: address already in use
2016/04/18 09:46:06 server.go:36: listen at 0.0.0.0:9530 2016/04/18 09:46:06 server.go:39: listen er ...
- Lintcode: Previous Permuation
Given a list of integers, which denote a permutation. Find the previous permutation in ascending ord ...
- 通达信:显示K线图日期
INFO_A:=STRCAT('INFO_A=', STRCAT(CON2STR(REF(MONTH, REF_BAR_A), 0), STRCAT('-', STRCAT(CON2STR(REF(D ...
- Centos7 安装 Nginx
Nginx有很多版本的,下面我给个链接http://nginx.org/packages/mainline/centos/7/x86_64/RPMS/ 下载对应当前系统版本的nginx包(packag ...
- C++之路进阶——优先队列优化最短路径算法(dijkstra)
一般的dijkstra算法利用贪心的思想,每次找出最短边,然后优化到其他点的的距离,我们还采用贪心思路,但在寻找最短边进行优化,之前是双重for循环,现在我们用优先队列来实现. 代码解释: //样例程 ...
- bzoj4547 小奇的集合
当序列中最大和次大都是负数的时候,其相加会是一个更小的负数,因此答案为(Σai)+(m1+m2)*k,如果最大是正数次大是负数,那么一直相加直到两个数都为正数,当最大和次大都是正数时,做一下矩阵乘法即 ...