我的网络知识非常贫乏!)
我在nginx上安装了一个带有2个网络接口的小型服务器流ffmpeg。
p2p1用于提供http/ssh.的广域网。 p4p1用于接收来自intranet的多播数据。 192.168.0.1是公共网络网关。 192.168.1.1为专用网络网关(评论为无互联网退出此网络) 239.0.0.*/24是多播地址。
Linux distribution
3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID : Ubuntu
Description: Ubuntu 14.04.2 LTS
Release : 14.04
Codename : trusty
我的网络接口配置
auto lo
iface lo inet loopback
# NET1
auto p2p1
iface p2p1 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
# NET2
auto p4p1
iface p4p1 inet static
address 192.168.1.100
netmask 255.255.255.0
### gateway 192.168.1.1
现在我的航路表
root@srv:# route
Tabla de rutas IP del núcleo
Destino Pasarela Genmask Indic Métric Ref Uso Interfaz
default 192.168.0.1 0.0.0.0 UG 0 0 0 p2p1
192.168.0.0 * 255.255.255.0 U 0 0 0 p2p1
192.168.1.0 * 255.255.255.0 U 0 0 0 p4p1
我使用端口4022上的udpxy将IPTV组播转换为单播HTTP
udpxy -p 4022
我执行这个
/usr/bin/ffmpeg -i "http://127.0.0.1:4022/rtp/239.0.0.76:8208" -map 0:0 -map 0:1 -c:v libx264 -vf scale=-1:720 -r 25 -profile:v high -level:v 4.0 -crf 18 -preset veryfast -maxrate 2000k -bufsize 2200k -c:a aac -ab 128k -strict -2 -ac 2 -f flv rtmp://127.0.0.1:11111/rtmp/channel1;
ffmpeg version 2.7 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
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
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
http://127.0.0.1:4022/rtp/239.0.0.76:8208: Invalid data found when processing input
因为我能解决这个问题??提前感谢
发布于 2015-06-18 19:30:44
210.0.0.0/24是而不是多播地址。
IPv4组播范围为224.0.0.0/4。
很有可能这就是你有问题的原因。
编辑
还请注意错误消息:
http://127.0.0.1:4022/rtp/239.0.0.76:8208: Invalid data found when processing input
我想这意味着从udpxy获取数据有一个问题,所以尝试运行详细的(udpxy -v -p 4022),看看它说了什么。
https://stackoverflow.com/questions/30923472
复制相似问题