我需要创建一个具有两个流(webm 和 mp4)的提要,以便它可以在所有 HTML5 视频播放器上兼容。webm 流完美运行。但是,当尝试访问mp4流时,服务器吐出以下错误:
Sat Mar 9 23:21:54 2013 muxer does not support non seekable output
Run Code Online (Sandbox Code Playgroud)
这是 ffserver.conf 文件中处理 mp4 流的部分:
<Stream channel1.mp4> # Output stream URL definition
Feed feed1.ffm # Feed from which to receive video
Format mp4
# Audio settings
AudioCodec libmp3lame
AudioBitRate 64 # Audio bitrate
# Video settings
VideoCodec libx264
VideoSize 560x320 # Video resolution
VideoFrameRate 25 # Video FPS
AVOptionVideo flags +global_header # Parameters passed to encoder
# (same as ffmpeg command-line parameters) …Run Code Online (Sandbox Code Playgroud) 我使用以下命令尝试从带有 ffmpeg 的文件进行流式传输:
ffmpeg -re -i GunGrave\ -\ 03\ -\ Rain.webm -c copy -f asf rtmp://127.0.0.1:8090/test.asf
Run Code Online (Sandbox Code Playgroud)
这产生了以下输出:
ffmpeg version N-50515-g28adecf Copyright (c) 2000-2013 the FFmpeg developers built on Mar 5 2013 22:35:30 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
configuration: --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
libavutil 52. 17.103 / 52. 17.103
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.103 / 54. 63.103
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 …Run Code Online (Sandbox Code Playgroud)