Delays on ffmpeg with rtsp streaming -
i have command
ffmpeg -threads 0 -i rtsp://user:pass@10.10.10.1 -threads 0 -i rtsp://user:pass@10.10.10.2 -map 0:1 -map 1:1 -filter_complex amix=inputs=2:duration=first:dropout_transition=3 -muxdelay 0 -ar 22050 -vn -f flv rtmp://10.10.10.3:1935/live/stream1 -map 0:0 -map 0:1 -muxdelay 0 -ar 22050 -f flv rtmp://10.10.10.3:1935/live/stream4 -map 1:0 -map 1:1 -muxdelay 0 -ar 22050 -f flv rtmp://10.10.10.3:1935/live/stream5
it 3 things: 1) takes audio both ip cameras (10.10.10.1 , 10.10.10.2) - , muxes them in 1 mp3 stream (stream1). 2) takes audio , video cam 10.10.10.1 , streams rtmp://10.10.10.3:1935/live/stream4 3) takes audio , video cam 10.10.10.2 , streams rtmp://10.10.10.3:1935/live/stream5
problem: delays: 1) delay reality: smile in cam1 , see smile on stream4 in 4-5 seconds. 2) different delays on different cameras. both cameras @ me, "hello". first camera shows "hello", in 4-5 seconds second camera shows "hello", , in 2-3 second hear "hello" on stream1.
the important , disturbing problem second one. please solving it. want them simultaneous - both cameras , audiostream.
thank in advance.
p.s. full output [root@minjust ~]# ffmpeg -threads 0 -i rtsp://user:pass@172.22.5.201 -threads 0 -i rtsp://user:pass@172.22.5.202 -map 0:1 -map 1:1 -filter_complex amix=inputs=2:duration=first:dropout_transition=3 -muxdelay 0 -ar 22050 -vn -f flv rtmp://172.22.45.38:1935/live/stream1 -map 0:0 -map 0:1 -muxdelay 0 -ar 22050 -f flv rtmp://172.22.45.38:1935/live/stream4 -map 1:0 -map 1:1 -muxdelay 0 -ar 22050 -f flv rtmp://172.22.45.38:1935/live/stream5 ffmpeg version n-76031-g9099079 copyright (c) 2000-2015 ffmpeg developers built gcc 4.4.7 (gcc) 20120313 (red hat 4.4.7-16) configuration: libavutil 55. 4.100 / 55. 4.100 libavcodec 57. 6.100 / 57. 6.100 libavformat 57. 4.100 / 57. 4.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 11.100 / 6. 11.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 / 2. 0.100 input #0, rtsp, 'rtsp://user:pass@172.22.5.201': metadata: title : media presentation duration: n/a, start: 0.073000, bitrate: n/a stream #0:0: video: h264 (main), yuv420p(tv, bt709), 1280x720, 10 fps, 25 tbr, 90k tbn, 20 tbc stream #0:1: audio: mp2, 16000 hz, mono, s16p, 32 kb/s input #1, rtsp, 'rtsp://user:pass@172.22.5.202': metadata: title : media presentation duration: n/a, start: 0.064000, bitrate: n/a stream #1:0: video: h264 (baseline), yuv420p, 704x576, 12 fps, 25 tbr, 90k tbn, 24 tbc stream #1:1: audio: adpcm_g726, 8000 hz, mono, s16, 16 kb/s stream #1:2: data: none output #0, flv, 'rtmp://172.22.45.38:1935/live/stream1': metadata: title : media presentation encoder : lavf57.4.100 stream #0:0: audio: adpcm_swf ([1][0][0][0] / 0x0001), 22050 hz, mono, s16, 88 kb/s (default) metadata: encoder : lavc57.6.100 adpcm_swf output #1, flv, 'rtmp://172.22.45.38:1935/live/stream4': metadata: title : media presentation encoder : lavf57.4.100 stream #1:0: video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 1280x720, q=2-31, 200 kb/s, 10 fps, 1k tbn, 10 tbc metadata: encoder : lavc57.6.100 flv stream #1:1: audio: adpcm_swf ([1][0][0][0] / 0x0001), 22050 hz, mono, s16, 88 kb/s metadata: encoder : lavc57.6.100 adpcm_swf output #2, flv, 'rtmp://172.22.45.38:1935/live/stream5': metadata: title : media presentation encoder : lavf57.4.100 stream #2:0: video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 704x576, q=2-31, 200 kb/s, 12 fps, 1k tbn, 12 tbc metadata: encoder : lavc57.6.100 flv stream #2:1: audio: adpcm_swf ([1][0][0][0] / 0x0001), 22050 hz, mono, s16, 88 kb/s metadata: encoder : lavc57.6.100 adpcm_swf stream mapping: stream #0:1 (mp2) -> amix:input0 (graph 0) stream #1:1 (g726) -> amix:input1 (graph 0) amix (graph 0) -> stream #0:0 (adpcm_swf) stream #0:0 -> #1:0 (h264 (native) -> flv1 (flv)) stream #0:1 -> #1:1 (mp2 (native) -> adpcm_swf (native)) stream #1:0 -> #2:0 (h264 (native) -> flv1 (flv)) stream #1:1 -> #2:1 (adpcm_g726 (g726) -> adpcm_swf (native)) press [q] stop, [?] [rtsp @ 0x35af820] thread message queue blocking; consider raising thread_queue_size option (current value: 8) [rtsp @ 0x34e1b60] thread message queue blocking; consider raising thread_queue_size option (current value: 8) past duration 0.930214 large past duration 0.647987 large past duration 0.730217 large ...
Comments
Post a Comment