gpt4 book ai didi

stream - 如何通过 ffmpeg 保存 RAW rtp 输出文件

转载 作者:行者123 更新时间:2023-12-04 23:03:56 25 4
gpt4 key购买 nike

我有一个将输出 RTP 保存为文件的问题。
(这可能吗?我说的对吗?)

转码目标如下:
1. 使用 FFMPEG 将 RTP 流保存到本地存储中的文件。
2.输入是文件。
3.输出为RTP流文件。

我正在使用它。

./ffmpeg -re -i ../Video_Sample/03.Fashion_DivX720p_ASP_87s_1000k_720p.mp4 -c:v libx264 -b:v 1000k -preset superfast -an -f rtp -y test.rtp



但我收到了这样的消息:

无法为输出文件 #0 写入 header (编解码器参数不正确?):参数无效

我该如何解决?

最佳答案

RTP 是实时传输协议(protocol),而不是文件。

如果您想流式传输您的 mp4 文件,您可以按如下方式进行:

ffmpeg -re -f mp4 -i ../Video_Sample/03.Fashion_DivX720p_ASP_87s_1000k_720p.mp4 -vcodec libx264 -b 1000k -preset superfast -an -f rtp rtp://hostadress:port

您是说 rpt(报告文件)文件吗?

关于stream - 如何通过 ffmpeg 保存 RAW rtp 输出文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28271383/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com