You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

FFmpeg向Nginx推送RTMP流时出现连接重置问题求助

FFmpeg向Nginx推送RTMP流时出现连接重置问题求助

各位大佬好,我现在在树莓派的Debian系统上尝试用FFmpeg把本地视频推送到Nginx的RTMP服务器,但一直遇到Connection reset by peer/Broken pipe的错误,折腾了好一阵都没解决,麻烦大家帮忙看看问题出在哪!

我的系统版本如下:

6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux

Nginx配置(nginx.conf)

rtmp {
        server {
                listen 1935;
                chunk_size 4096;

                application live {
                        live on;
                        record off;
                }
        }
}

视频文件获取方式

我用yt-dlp下载了YouTube上的目标视频,执行的命令是:

yt-dlp -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' https://www.youtube.com/watch?v=n-EdUHNK9UI

FFmpeg推送命令

我用来推流的FFmpeg命令是:

ffmpeg -i 'Setup your own RTMP Server to Receive and Redistribute Live Streaming Video [n-EdUHNK9UI].mp4' -c copy -f mpegts rtmp://127.0.0.1/live/stream -loglevel debug

执行上述命令后,FFmpeg就会抛出Connection reset by peer/Broken pipe的错误,我的FFmpeg版本是5.1.4-0+rpt3+deb12u1,实在找不到问题所在,恳请各位帮忙排查,谢谢!

备注:内容来源于stack exchange,提问作者Dinamo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 10:55:33