Wir haben viele Optionen ausprobiert, viele Encoder. Wir haben es mit verschiedenen Stream-Quellen (ffmpeg, wowzaGoCoder, wirecast) und verschiedenen Streaming-Engines (wowza, nginx-rtmp) reproduziert. Einige Konfigurationen erschweren die Wiedergabe, treten jedoch immer noch auf ...
Wie kann es sein, dass derselbe Stream "manchmal" eine Videospur hat? Was fehlt uns? Wie können wir diesen (sehr frustrierenden) Fehler widerstandsfähiger machen?
Bearbeiten:
Wenn wir den Stream aufnehmen und die Videospur nicht erkennt, zeigt das Protokoll nach einiger Zeit, dass die Videospur erkannt wird. Da jedoch die Aufzeichnung bereits ohne gestartet wurde, hat der aufgezeichnete Stream keine Videospur.
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers built with Apple LLVM version 8.0.0 (clang-800.0.38) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libvpx --enable-vda libavutil 55. 17.103 / 55. 17.103 libavcodec 57. 24.102 / 57. 24.102 libavformat 57. 25.100 / 57. 25.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 31.100 / 6. 31.100 libavresample 3. 0. 0 / 3. 0. 0 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-i' ... matched as input file with argument 'rtmp://stream-engine/myStream'. Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'. Reading option '-f' ... matched as option 'f' (force format) with argument 'flv'. Reading option 'output.flv' ... matched as output file. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input file rtmp://stream-engine/myStream. Successfully parsed a group of options. Opening an input file: rtmp://stream-engine/myStream. [rtmp @ 0x7fa1a5d00c60] No default whitelist set [tcp @ 0x7fa1a5c0dac0] No default whitelist set [rtmp @ 0x7fa1a5d00c60] Handshaking... [rtmp @ 0x7fa1a5d00c60] Type answer 3 [rtmp @ 0x7fa1a5d00c60] Server version 13.14.10.13 [rtmp @ 0x7fa1a5d00c60] Proto = rtmp, path = /source/S1IwVWndb, app = source, fname = S1IwVWndb [rtmp @ 0x7fa1a5d00c60] Server bandwidth = 5000000 [rtmp @ 0x7fa1a5d00c60] Client bandwidth = 5000000 [rtmp @ 0x7fa1a5d00c60] New incoming chunk size = 4096 [rtmp @ 0x7fa1a5d00c60] Creating stream... [rtmp @ 0x7fa1a5d00c60] Sending play command for 'S1IwVWndb' [flv @ 0x7fa1a6801200] Format flv probed with size=2048 and score=100 [flv @ 0x7fa1a6801200] Before avformat_find_stream_info() pos: 13 bytes read:2271 seeks:0 [flv @ 0x7fa1a6801200] Unknown type |RtmpSampleAccess [flv @ 0x7fa1a6801200] max_analyze_duration 5000000 reached at 5019000 microseconds st:0 [flv @ 0x7fa1a6801200] After avformat_find_stream_info() pos: 87184 bytes read:87184 seeks:0 frames:241 Input #0, flv, from 'rtmp://stream-engine/myStream': Metadata: Server : NGINX RTMP (github.com/arut/nginx-rtmp-module) displayWidth : 1280 displayHeight : 544 fps : 24 profile : level : Duration: 00:00:00.00, start: 344.126000, bitrate: N/A Stream #0:0, 241, 1/1000: Audio: aac (LC), 48000 Hz, 5.1, fltp, 128 kb/s Successfully opened the file. Parsing a group of options: output file output.flv. Applying option c (codec name) with argument copy. Applying option f (force format) with argument flv. Successfully parsed a group of options. Opening an output file: output.flv. [file @ 0x7fa1a5c1cec0] Setting default whitelist 'file,crypto' Successfully opened the file. Output #0, flv, to 'output.flv': Metadata: Server : NGINX RTMP (github.com/arut/nginx-rtmp-module) displayWidth : 1280 displayHeight : 544 fps : 24 profile : level : encoder : Lavf57.25.100 Stream #0:0, 0, 1/1000: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, 5.1, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) [flv @ 0x7fa1a6801200] video stream discovered after head already parsed [flv @ 0x7fa1a6801200] New video stream 0:1 at pos:144269 and DTS:352.667s size= 371kB time=00:00:22.57 bitrate= 134.6kbits/s speed= 1.3x video:0kB audio:353kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.082170% Input file #0 (rtmp://stream-engine/myStream): Input stream #0:0 (audio): 1058 packets read (361263 bytes); Total: 1058 packets (361263 bytes) demuxed Output file #0 (output.flv): Output stream #0:0 (audio): 1058 packets muxed (361263 bytes); Total: 1058 packets (361263 bytes) muxed 0 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x7fa1a5c1cf80] Statistics: 3 seeks, 1061 writeouts [AVIOContext @ 0x7fa1a5d00fa0] Statistics: 2401247 bytes read, 0 seeks [rtmp @ 0x7fa1a5d00c60] Deleting stream..
Versuchen Sie die Erkennung mit `-analyzeduration 20M -probesize 20M` vor` -i ... `
Gyan vor 7 Jahren
2
Außerdem kann stream_loop unzuverlässig sein und Lücken in Markierungen erzeugen.
Gyan vor 7 Jahren
0
@ Mulvya vielen Dank, es hat funktioniert!
Pat-rice vor 7 Jahren
0
1 Antwort auf die Frage
1
Pat-rice
Dank mulvya-Kommentar: Der empfangene Stream verfügt nicht über eine konsistente Videospur . Durch Erhöhen des Analysewerts und der Testgröße erhält ffmpeg mehr Chancen, alle Informationen zu ermitteln, die zur korrekten Verarbeitung des Streams erforderlich sind.