我是流媒体世界的新手...所以,请原谅我问了个愚蠢的问题。
我正在尝试通过FFserver在RTSP上流式传输我预先录制的文件。
我的配置文件是:
RTSPPort 8544
<Feed feed2.ffm>
File /home/xyz/tmp/feed2.ffm
FileMaxSize 200K
ACL allow 127.0.0.1
</Feed>
<Stream test.sdp>
Feed feed2.ffm
Format rtsp
VideoFrameRate 15
VideoSize 352x240
VideoBitRate 256
VideoBufferSize 40
VideoGopSize 30
AudioBitRate 64
StartSendOnKey
</Stream>启动服务器后,它会给出以下日志:
$ ./ffserver -f doc/ffserver.conf
ffserver version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Sep 17 2012 19:46:38 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
configuration: --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc
-enable-libvorbis --enable-libvpx --enable-libx264 --enable-version3
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Wed Sep 19 17:03:32 2012 FFserver started.但是,发生的情况是,ffserver上没有响应。
我不知道问题出在哪里。提前谢谢。
发布于 2012-09-27 17:59:23
你没有任何东西可以流传输。你需要开始
ffmpeg -i <source> http://localhost:8090/feed2.ffm如果为http启用端口8090,请使用指令(在配置文件中)
Port 8090这是以前问过的,但标记不好,所以我找不到它。如果有人找到它,请链接到这里。因为启动一个空服务器似乎很常见。
发布于 2015-11-02 23:53:33
马蒂亚斯是对的。当前您没有流式传输任何内容。
给定的ffmpeg-命令应该可以工作,但您可能需要考虑,提要部分可能会产生相反的效果。
如果视频文件已经存储在服务器上,则不需要提要(因为视频本身将作为提要)。
<Stream test.sdp>
File "path_to_your_file" #instead of the Feed
...
</Stream>如果视频文件在不同的计算机上,您必须首先将其流式传输到服务器(参见Matthias的答案)。
编辑
此外,如果您想在流式传输之前处理流,则需要提要。
https://stackoverflow.com/questions/12494360
复制相似问题