Opened 6 years ago
Last modified 5 years ago
#7906 new defect
FFMPEG Hangs on dropped connection - RTMP Input
Reported by: | adamiss5138 | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | rtmp deadlock |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
I'm streaming from one machine (let's call it FFMPEG_1) to another (FFMPEG_2) through RTMP. If there is a network drop both FFMPEGs hang and do not quit. When network gets up again they quit with error. This is ok. But when connection is lost / dropped and you kill FFMPEG_1, network gets up, FFMPEG_2 will stay hanged forever and will reject any incomming connection.
FFMPEG version does not matter. I've tried 4.1.3 on both machines. Didn't help.
How to reproduce:
FFMPEG_1 - Running on Ubuntu 18.04.1 LTS
% ffmpeg -y -re -i video.mp4 -c copy -c:a aac -ac 2 -ar 44100 -f flv rtmp://192.168.100.6/live
ffmpeg version N-48875-g58d167bcd5-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
FFMPEG_2 - Running on Windows 10 Build 1809
% ffmpeg -y -timeout 20 -listen 1 -i rtmp://192.168.100.6/live -c copy -f flv rtmp://nimblestreamer/live
ffmpeg version N-93580-g036b4b0f85 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.3.1 (GCC) 20190414
- Steps to reproduce
- Simulate network connection drop on one machine - does not matter which one (disable network adapter or unplug ethernet cable)
- Kill FFMPEG_1
- Enable network adapter / plug-in ethernet cable
- FFMPEG_2 is now freezed forever and does not accept RTMP input anymore
I'm sorry for my poor English O:)
Change History (3)
comment:1 by , 6 years ago
comment:2 by , 5 years ago
We are experiencing similar issue, when connection to rtsp server goes down, ffmpeg never comes back alive or quits, regardless of "-stimeout" flag.
Is there a way to configure ffmpeg to exit if connection is down for N milliseconds?
comment:3 by , 5 years ago
Component: | ffmpeg → undetermined |
---|---|
Keywords: | deadlock added; input dropped connection hang removed |
Is this issue reproducible with current FFmpeg git head?
Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.
no response? :/