我想将来自RTSP流的输出组合到中,流、HLS流和几个图像静态流。我可以单独做这件事(很明显),但我很难把事情组合起来。能给我一只手吗?
以下是我的输出(起作用):
输出HLS流:
ffmpeg -rtsp_transport tcp -i '$RTSP_URL'
-c:v copy -b:v 64K -f flv rtmp://localhost/hls/stream_low \
-c:v copy -b:v 512K -f flv rtmp://localhost/hls/stream_high输出图像静物:
ffmpeg -hide_banner -i '$(RTSP_URL)' -y \
-vframes 1 -vf "scale=1920:-1" -q:v 10 out/screenshot_1920x1080.jpeg \
-vframes 1 -vf "scale=640:-1" -q:v 10 out/screenshot_640x360.jpeg \
-vframes 1 -vf "scale=384:-1" -q:v 10 out/screenshot_384x216.jpeg \
-vframes 1 -vf "scale=128:-1" -q:v 10 out/screenshot_128x72.jpeg任何帮助都是非常感谢的(我还发布了一个赏金^_^)
谢谢你们!
发布于 2018-11-27 05:23:23
简单地说
ffmpeg -rtsp_transport tcp -i '$RTSP_URL'
-c:v copy -b:v 64K -f flv rtmp://localhost/hls/stream_low \
-c:v copy -b:v 512K -f flv rtmp://localhost/hls/stream_high \
-vframes 1 -vf "scale=1920:-1" -q:v 10 out/screenshot_1920x1080.jpeg \
-vframes 1 -vf "scale=640:-1" -q:v 10 out/screenshot_640x360.jpeg \
-vframes 1 -vf "scale=384:-1" -q:v 10 out/screenshot_384x216.jpeg \
-vframes 1 -vf "scale=128:-1" -q:v 10 out/screenshot_128x72.jpeg注意,正如输出协议所述,"HLS“流实际上是一个RTMP流。而且,在-c:v copy中,没有视频编码,所以-b:v没有任何效果。
https://stackoverflow.com/questions/53493022
复制相似问题