Opened 18 months ago
Last modified 18 months ago
#11474 new defect
Failed FLV RTMP streaming to remote source
| Reported by: | adobez | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | undetermined |
| Version: | unspecified | Keywords: | |
| Cc: | MasterQuestionable | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
Summary of the bug: FFmpeg encounters an error when streaming FLV to RTMP after approximately 1 minute and 40 seconds. The error message suggests an issue with submitting a packet to the muxer.
How to reproduce:
% ffmpeg -stream_loop -1 -re -i input.mp4 -r 24 -c:v libx264 -preset ultrafast -b:v 1200k -maxrate 1500k -bufsize 3000k -c:a aac -b:a 128k -ar 44100 -ac 2 -map 0:v:0 -map 0:a:0 -flvflags no_duration_filesize -max_muxing_queue_size 4096 -f flv "rtmp://live-api.shopee.co.th/live/stream_key" ffmpeg version: ffmpeg version N-118457-gd6a364e7c3-20250210 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 14.2.0 (crosstool-NG 1.26.0.120_4d36f27)
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Change History (4)
comment:1 by , 18 months ago
| Cc: | added |
|---|---|
| Summary: | FFmpeg encounters an error when streaming FLV to RTMP after approximately 1 minute and 40 seconds. The error message suggests an issue with submitting a packet to the muxer. → Failed FLV RTMP streaming to remote source |
comment:2 by , 18 months ago
Please provide the command line you tested together with the complete, uncut console output to make this a valid question.
comment:3 by , 18 months ago
This is the command line that I have testing
const ffmpeg = spawn(ffmpegPath, [
'-stream_loop', '-1',
'-re', '-i', videoPath,
'-r', '30',
'-g', '60',
'-keyint_min', '30',
'-sc_threshold', '0',
'-c:v', 'libx264',
'-preset', 'veryfast',
'-b:v', '1200k',
'-maxrate', '1500k',
'-bufsize', '3000k',
'-c:a', 'aac', '-b:a', '128k',
'-ar', '44100', '-ac', '2',
'-af', 'aresample=async=1:min_hard_comp=0.100000:first_pts=0',
'-pix_fmt', 'yuv420p',
'-flvflags', 'no_duration_filesize',
'-max_muxing_queue_size', '1024',
'-f', 'flv', fullRtmpUrl
]);
The error is
https://prnt.sc/rRmxGxpD93zn
comment:4 by , 18 months ago
͏ av_interleaved_write_frame(): End of file
͏ Error writing trailer of rtmp://... : End of file
͏ https://img001.prntscr.com/file/img001/wOhggMO9Q0KkTuHBO8kcvg.png



͏ Refer:
͏ https://trac.ffmpeg.org/ticket/11465#comment:1
͏ (I/O error pushing to remote source?)
͏ Also, at least post the exact error message.