ffmpeg将视频流传输到本地文件,但不将其流传输到远程ffserver

问题描述 投票:1回答:0

我正在使用ffmpeg从网络摄像头流式传输视频。 我设法通过键入以下命令将视频保存到硬盘上的文件中:

ffmpeg -rtbufsize 1500M -f dshow -i video="SF Camera":audio="Microphone (Realtek High Definition Audio)" test1.webm

它可以正常工作,我看到了test1.webm输出,以后可以播放。 但是,当我键入:

ffmpeg -rtbufsize 1500M -f dshow -i video="SF Camera":audio="Microphone (Realtek High Definition Audio)" http://10.172.180.195:8090/feed1.ffm

我收到以下错误:

Input #0, dshow, from 'video=SF Camera:audio=Microphone (Realtek High Definition
 Audio)':
  Duration: N/A, start: 739862.012000, bitrate: N/A
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 30 tbr,
10000k tbn, 30 tbc
    Stream #0:1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
http://10.172.180.195:8090/feed1.ffm: Invalid data found when processing input

我的ffserver.conf文件如下所示:

HTTPPort 8090                      # Port to bind the server to
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000             # Maximum bandwidth per client
                               # set this high enough to exceed stream bitrate
CustomLog -
NoDaemon                       # Remove this if you want FFserver to daemonize after start

<Feed feed1.ffm>               # This is the input feed where FFmpeg will send
   File ./feed1.ffm            # video stream.
   FileMaxSize 1G              # Maximum file size for buffering video
   ACL allow 10.172.180.109         # Allowed IPs
</Feed>

<Stream test.webm>              # Output stream URL definition
   Feed feed1.ffm              # Feed from which to receive video
   Format webm

   # Audio settings
   AudioCodec vorbis
   AudioBitRate 64             # Audio bitrate

   # Video settings
   VideoCodec libvpx
   VideoSize 720x576           # Video resolution
   VideoFrameRate 25           # Video FPS
   AVOptionVideo flags +global_header  # Parameters passed to encoder
                                       # (same as ffmpeg command-line parameters)
   AVOptionVideo cpu-used 0
   AVOptionVideo qmin 10
   AVOptionVideo qmax 42
   AVOptionVideo quality good
   AVOptionAudio flags +global_header
   PreRoll 15
   StartSendOnKey
   VideoBitRate 400            # Video bitrate
</Stream>

<Stream status.html>            # Server status URL
   Format status
   # Only allow local people to get the status
   ACL allow localhost
   ACL allow 192.168.0.0 192.168.255.255
</Stream>

<Redirect index.html>    # Just an URL redirect for index
   # Redirect index.html to the appropriate site
   URL http://www.ffmpeg.org/
</Redirect>

那就是我的问题-有人知道哪里出问题了吗?

ffmpeg video-streaming ffserver
© www.soinside.com 2019 - 2024. All rights reserved.