Opened 11 years ago
Last modified 11 years ago
#2855 new defect
Multiple ffmpeg instances are not independent
Reported by: | radashk | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
I'm using ffmpeg to capture jpeg images from an rtmp stream. Here is the commands I use in 2 Ubuntu 12.04 terminals:
/usr/local/bin/ffmpeg -threads 4 -i rtmp://..../chat/mp4:100000.mp4
-q:v 0.6 -r 15 -s 320x240 /frames/10021237_data/frame-%0999d.jpg
/usr/local/bin/ffmpeg -threads 4 -i rtmp://..../chat/mp4:100001.mp4
-q:v 0.6 -r 15 -s 320x240 /frames/10021237_data/frame-%0999d.jpg
I get this output from both:
ffmpeg version N-55388-g9386f33 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 8 2013 14:07:38 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
configuration:
libavutil 52. 41.100 / 52. 41.100
libavcodec 55. 24.100 / 55. 24.100
libavformat 55. 13.102 / 55. 13.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
Input #0, flv, from 'rtmp://......./mp4:10021237.mp4':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 1.92 tbr, 1k tbn, 40 tbc
Stream #0:1: Audio: nellymoser, 44100 Hz, mono, flt
[swscaler @ 0x1910000] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/frames/10021237_data/frame-%0999d.jpg':
Metadata:
encoder : Lavf55.13.102
Stream #0:0: Video: mjpeg, yuvj420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 15 tbc
Stream mapping:
Press [q] to stop, ? for help
However after I stop one of the instances I get this line on the other (before the process cleanly exits):
video:5264kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000408%
So when one stops streaming all the ffmpeg processes end. Is there a way to make them independent?
How can I make 2 ffmpeg instances independent so as killing one does not kill the other. Is this behaviour expected?
Change History (2)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Do not have another rtmp server to test, but the same one is used by flash player.
There are clients connecting to different streams rtmp://.../chat/mp4:<variable>.mp4 and it does behave correctly.
Does this happen with any RTMP server, or only this one?
I suspect the server is closing the connection.