From d1b87b9de9d1a456d3bc67c34e84c633808c8744 Mon Sep 17 00:00:00 2001 From: EEEEE <499827902@qq.com> Date: Mon, 28 Nov 2022 10:27:14 +0800 Subject: [PATCH] doc: Update ffmpeg.md (#180) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加ffmpeg流处理 --- docs/ffmpeg.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/ffmpeg.md b/docs/ffmpeg.md index 40dac2ad..dfd1b3b6 100644 --- a/docs/ffmpeg.md +++ b/docs/ffmpeg.md @@ -718,6 +718,30 @@ $ ffmpeg -i test.mp4 -af "loudnorm=I=-5:LRA=1" out.mp4 $ ffmpeg -i input.mp3 -af "channelmap=1-0|1-1" output.mp3 ``` +流处理 +--- + +### 拉流 + +```bash +# 拉取rtmp流并存储到本地 +$ ffmpeg -i "rtsp://127.0.0.1/test" test.mp4 +``` + +### 推流 + +```bash +# 推送test.mp4到远程 +$ ffmpeg -re -i test.mp4 -f flv rtmp://127.0.0.1/test +``` + +### 转发 + +```bash +# 拉取流并转发 +$ ffmpeg -i "rtsp://127.0.0.1/test" -f mpegts -codec:v mpeg1video http://127.0.0.1/demo +``` + 另见 ---