从ffserver寻找并暂停视频流

时间:2023-01-27 23:49:38

I managed to successfully feed ffserver from ffmpeg. ffmpeg takes input as PIPE:

我成功地从ffmpeg提供了ffserver。 ffmpeg将输入视为PIPE:

ffmpeg -loglevel fatal -f image2pipe -re -vcodec png -i - -vcodec libx264 http://localhost:8090/%s.ffm

External java process generates svg/png images and pushes to ffpmepg

外部java进程生成svg / png图像并推送到ffpmepg

My ffserver config allows me to buffer live feeds in ffm file without defining the size of the file.

我的ffserver配置允许我在ffm文件中缓冲实时源,而不定义文件的大小。

My stream configuration looks like this:

我的流配置如下所示:

<Stream live2.mjpg>
   Feed feed2.ffm
   Format mpjpeg
   VideoFrameRate 25
   VideoSize 640x880
   VideoQMin 1
   VideoQMax 5
   NoAudio
   Strict -1
</Stream>

The problem is that, despite that I can watch streams in VLC by opening network:

问题是,尽管我可以通过打开网络在VLC中观看流:

http://0.0.0.0:8090/live2.mjpg

But I can not seek through already buffered movie. Is there a way to achieve seeking through movie, pausing, and resume playing from "now"? I have tried already rtsp with h264, mpg and sdp but without success:

但我不能通过已经缓冲的电影来寻求。有没有办法通过电影,暂停和从“现在”恢复播放?我用h264,mpg和sdp尝试过已经rtsp,但没有成功:

<Stream test1.mpg/sdp/h264>
   Format rtp
   Feed feed2.ffm
   VideoCodec libx264
   VideoSize 640x880
   VideoQMin 1
   VideoQMax 5
   NoAudio
   Strict -1
   VideoFrameRate 25
</Stream>

Is rtsp solution for this problem, or I need something else?

是rtsp解决这个问题的方法,还是我需要别的东西?

Can this be achieved from dynamic file since I am using PIPE?

这可以通过动态文件实现,因为我正在使用PIPE?

1 个解决方案

#1


  • RTSP

    RTSP support in ffserver seems a bit sketchy, you could try Darwin Streaming Server or the Live555 media server. The two seem to support some forms of trick-play at least for VOD. Since you're using a pipe this won't probably help.

    ffserver中的RTSP支持似乎有点粗略,您可以尝试Darwin Streaming Server或Live555媒体服务器。这两个似乎至少对VOD支持某种形式的技巧游戏。由于您使用的是管道,这可能无济于事。

  • RTMP

    Some RTMP servers/clients support in-buffer seeking (Smart Seeking).

    一些RTMP服务器/客户端支持缓冲区内寻找(Smart Seeking)。

    About Smart Seek

    关于Smart Seek

    Adobe Media Server 3.5.3 and Flash Player 10.1 work together to support smart seeking in VOD streams and in live streams that have a buffer. [Source].

    Adobe Media Server 3.5.3和Flash Player 10.1协同工作,支持在VOD流和具有缓冲区的实时流中进行智能搜索。 [资源]。

    ffserver doesn't support RTMP output but you can use your ffmpeg command to push your stream directly to the server:

    ffserver不支持RTMP输出,但您可以使用ffmpeg命令将流直接推送到服务器:

    ffmpeg -re -i <input> -f flv rtmp://...

    ffmpeg -re -i -f flv rtmp:// ...

    There's a Nginx RTMP module and a C++ RTMP server although it's not very clear if they support smart seeking. VLC seems to be able to seek a bit while paused and there are usually options to modify the size of the client RTMP buffer.

    有一个Nginx RTMP模块和一个C ++ RTMP服务器,虽然它们是否支持智能搜索还不是很清楚。 VLC似乎能够在暂停时寻找一点,并且通常有选项来修改客户端RTMP缓冲区的大小。

#1


  • RTSP

    RTSP support in ffserver seems a bit sketchy, you could try Darwin Streaming Server or the Live555 media server. The two seem to support some forms of trick-play at least for VOD. Since you're using a pipe this won't probably help.

    ffserver中的RTSP支持似乎有点粗略,您可以尝试Darwin Streaming Server或Live555媒体服务器。这两个似乎至少对VOD支持某种形式的技巧游戏。由于您使用的是管道,这可能无济于事。

  • RTMP

    Some RTMP servers/clients support in-buffer seeking (Smart Seeking).

    一些RTMP服务器/客户端支持缓冲区内寻找(Smart Seeking)。

    About Smart Seek

    关于Smart Seek

    Adobe Media Server 3.5.3 and Flash Player 10.1 work together to support smart seeking in VOD streams and in live streams that have a buffer. [Source].

    Adobe Media Server 3.5.3和Flash Player 10.1协同工作,支持在VOD流和具有缓冲区的实时流中进行智能搜索。 [资源]。

    ffserver doesn't support RTMP output but you can use your ffmpeg command to push your stream directly to the server:

    ffserver不支持RTMP输出,但您可以使用ffmpeg命令将流直接推送到服务器:

    ffmpeg -re -i <input> -f flv rtmp://...

    ffmpeg -re -i -f flv rtmp:// ...

    There's a Nginx RTMP module and a C++ RTMP server although it's not very clear if they support smart seeking. VLC seems to be able to seek a bit while paused and there are usually options to modify the size of the client RTMP buffer.

    有一个Nginx RTMP模块和一个C ++ RTMP服务器,虽然它们是否支持智能搜索还不是很清楚。 VLC似乎能够在暂停时寻找一点,并且通常有选项来修改客户端RTMP缓冲区的大小。