ffmpeg無法接收組播流問題處理

來源:互聯網
上載者:User

標籤:

  問題:ffmpeg無法對IP組播進行處理,表現如下

[[email protected] /]# 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抓包,是可以抓到組播流的

[[email protected] /]# 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表如下

[[email protected] 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表中未配置組播地址導致,解決辦法如下

[[email protected] logs]# route add -net 225.0.0.0 netmask 255.0.0.0 dev eno1
[[email protected] 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:

[[email protected] 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

 

ffmpeg無法接收組播流問題處理

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.