FFMPEG连接到tcp://127.0.0.1:8090失败:连接被拒绝

时间:2017-03-02 09:22:12

标签: ffmpeg rtsp tcp-ip ffserver

运行此命令以读取HTTP输出的RTSP输入时,我遇到以下错误:

ffmpeg -i rtsp://@nuc.smbox.co:554/udpstream_ch1_stream1 -acodec copy -vcodec copy http://127.0.0.1:8090/feed1.ffm

我收到以下错误:

Input #0, rtsp, from 'rtsp://@nuc.smbox.co:554/udpstream_ch1_stream1':
  Metadata:
    title           : Moxa Streaming Server
    comment         : /dev/Streaming
  Duration: N/A, start: 0.129807, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuvj420p(pc, progressive), 1920x1080, 30 fps, 30 tbr, 90k tbn, 60 tbc
    Stream #0:1: Audio: pcm_mulaw, 8035 Hz, mono, s16, 64 kb/s
[tcp @ 0x7fcec8d149c0] Connection to tcp://127.0.0.1:8090 failed: Connection refused
http://127.0.0.1:8090/feed1.ffm: Connection refused

我的配置文件设置为:

HTTPPort 8090
HTTPBindAddress 0.0.0.0
RTSPPort 554
RTSPBindAddress 0.0.0.0
MaxClients 10
MaxBandwidth 50000
NoDaemon

<Feed feed1.ffm>
   File /tmp/feed1.ffm
   # FileMaxSize 5M
   ACL allow localhost
   ACL allow 127.0.0.1
   ACL allow 27.54.62.164
   # ACL allow nuc.smbox.co
   ACL allow 192.168.0.0 192.168.255.255
   ACL allow 10.10.0.0 10.10.255.255
</Feed>

<Stream stream.mp4>
   Feed feed1.ffm
   Format mp4

   VideoCodec libx264
   VideoFrameRate 25
   # VideoBufferSize 40
   # VideoBitRate 512K
   VideoSize 640x480
   # VideoGopSize 15
   # StartSendOnKey

   # NoAudio

   # i had problems with videostreaming with file. player said that header were corrupted, so i used this config, but it doesnt help. i still let it in.
   AVOptionVideo flags +global_header

   # ffpreset-fast (i think you can remove this in latest ffmpeg)
   AVOptionVideo coder 1
   AVOptionVideo flags +loop
   AVOptionVideo cmp +chroma
   AVOptionVideo partitions +parti8x8+parti4x4+partp8x8+partb8x8
   AVOptionVideo me_method hex
   AVOptionVideo subq 6
   AVOptionVideo me_range 16
   AVOptionVideo g 250
   AVOptionVideo keyint_min 25
   AVOptionVideo sc_threshold 40
   AVOptionVideo i_qfactor 0.71
   AVOptionVideo b_strategy 1
   AVOptionVideo qcomp 0.6
   AVOptionVideo qmin 10
   AVOptionVideo qmax 51
   AVOptionVideo qdiff 4
   AVOptionVideo bf 3
   AVOptionVideo refs 2
   #AVOptionVideo directpred 1
   AVOptionVideo trellis 1
   #AVOptionVideo flags2 +bpyramid+mixed_refs+wpred+dct8x8+fastpskip
   AVOptionVideo wpredp 2
   #AVOptionVideo rc_lookahead 30
</Stream>

<Stream stat.html>
   Format status
   ACL allow 127.0.0.1
   ACL allow localhost
   ACL allow 192.168.0.0 192.168.255.255
</Stream>

<Redirect index.html>
   URL http://www.ffmpeg.org/
</Redirect>

我已在线阅读,并尝试将HTTP地址绑定到127.0.0.1,甚至在配置文件中明确允许127.0.0.1,但我仍然遇到错误。有什么想法吗?

0 个答案:

没有答案