Moin zusammen,
ich brauche mal euer Schwarmwissen, und zwar habe ich eine IPcam Reolink die einen RTSP Stream anbietet.
Jetzt soll dieser Stream über einen externen Trigger (bei mir ein Reedkontakt) den Stream abgreifen und aufzeichnen auf der Festplatte.
Läuft auch, aber
ffmpeg zeichnet erst mit einer Verzögerung von ca. 2-3 sek den Stream auf. Die Startphase von ffmpeg ist unglaublich lang, jetzt meine Frage wer hat Tipps um ffmpeg schneller starten zu lassen (also bis ca. ne Sekunde dann solls aber auch losgehen mit der Aufnahme)
Ich hab gefühlt das komplette INet nach Parametern durchforstet aber besser wird es nicht. Gibts noch andere Alternativen als ffmpeg zum Streamabgreifen?
Hier meine ffmpeg Ausgabe
Di 23. Jun 10:32:46 CEST 2020
Input #0, rtsp, from 'rtsp://192.168.178.210:554/h264Preview_01_sub':
Metadata:
title : Session streamed by "preview"
comment : h264Preview_01_sub
Duration: N/A, start: 1592901170.400063, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 640x480, 9.92 tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
[libx264 @ 0x55c3e62485c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x55c3e62485c0] profile High, level 2.2
[libx264 @ 0x55c3e62485c0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=2 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=9 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.00
Output #0, mp4, to '/tmp/film.mp4':
Metadata:
title : Session streamed by "preview"
comment : h264Preview_01_sub
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640x480, q=-1--1, 9.92 fps, 15232 tbn, 9.92 tbc
Metadata:
encoder : Lavc57.64.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 16000 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc57.64.101 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 50 fps= 20 q=-1.0 Lsize= 268kB time=00:00:04.98 bitrate= 439.5kbits/s dup=17 drop=0 speed=2.02x
video:237kB audio:27kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.393884%
[libx264 @ 0x55c3e62485c0] frame I:1 Avg QP:19.85 size: 52451
[libx264 @ 0x55c3e62485c0] frame P:13 Avg QP:12.57 size: 12287
[libx264 @ 0x55c3e62485c0] frame B:36 Avg QP:13.83 size: 815
[libx264 @ 0x55c3e62485c0] consecutive B-frames: 4.0% 0.0% 0.0% 96.0%
[libx264 @ 0x55c3e62485c0] mb I I16..4: 4.2% 33.2% 62.7%
[libx264 @ 0x55c3e62485c0] mb P I16..4: 0.1% 0.1% 0.0% P16..4: 77.0% 0.0% 0.0% 0.0% 0.0% skip:22.9%
[libx264 @ 0x55c3e62485c0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 13.3% 0.0% 0.0% direct:12.2% skip:74.5% L0:19.5% L1:79.9% BI: 0.6%
[libx264 @ 0x55c3e62485c0] 8x8 transform intra:33.2% inter:32.4%
[libx264 @ 0x55c3e62485c0] coded y,uvDC,uvAC intra: 93.3% 89.3% 61.2% inter: 13.3% 20.9% 4.0%
[libx264 @ 0x55c3e62485c0] i16 v,h,dc,p: 5% 0% 45% 50%
[libx264 @ 0x55c3e62485c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 7% 16% 7% 9% 12% 19% 8% 12%
[libx264 @ 0x55c3e62485c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 17% 13% 9% 9% 7% 12% 6% 15%
[libx264 @ 0x55c3e62485c0] i8c dc,h,v,p: 39% 24% 23% 14%
[libx264 @ 0x55c3e62485c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55c3e62485c0] kb/s:383.22
[aac @ 0x55c3e62b4900] Qavg: 65494.328
Di 23. Jun 10:32:56 CEST 2020
aufgerufen mit:
date && /usr/bin/ffmpeg -hide_banner -rtsp_transport tcp -use_wallclock_as_timestamps 1 -i rtsp://192.168.178.210:554/h264Preview_01_sub -c:v libx264 -threads 2 -vcodec 'libx264' -acodec 'aac' -t 5 -preset superfast -vsync 1 -y "/tmp/film.mp4" && date
Was kann ich verbessern zur Speeduptime?
Danke und Gruß Heinz