awslabs / amazon-kinesis-video-streams-producer-c

https://awslabs.github.io/amazon-kinesis-video-streams-producer-c/group__PublicMemberFunctions.html
Apache License 2.0
54 stars 68 forks source link

0x52000084 error #128

Closed staowyze closed 3 years ago

staowyze commented 3 years ago

Hi experts,

we are seeing 0x52000084 errors with SDK 3.0, any ideas what could be the cause? here is an sample log

[2020-09-27 14:25:17] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 40180000 bytes 359797 for stream handle 20
[2020-09-27 14:25:17] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 40180000. Bytes available: 359797
[2020-09-27 14:25:17] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339168865420, dts: 16038339168865420, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:17] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:17] [KVS]getKinesisVideoMetrics(): Get the memory metrics size.
[2020-09-27 14:25:17] [KVS]logStreamMetric(): Kinesis Video client and stream metrics:
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Overall storage byte size: 9437184 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Available storage byte size: 8731470 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Allocated storage byte size: 705714 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Total view allocation byte size: 374480 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Total streams frame rate (fps): 1344 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Total streams transfer rate (bps): 1300064 (1269 Kbps)
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Current view duration (ms): 4018 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Overall view duration (ms): 6060 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Current view byte size: 336174 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Overall view byte size: 618660 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Current frame rate (fps): 1344.267712 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Current transfer rate (bps): 1300064 (1269 Kbps)
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Stream uptime in (ms): 4386599 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Total transferred bytes: 36783997 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Total number of streaming sessions: 21 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Total number of active streaming sessions: 21 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Average streaming sessions duration: 190072277 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of Buffered ACKs: 177 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of Received ACKs: 164 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of Persisted ACKs: 163 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of Error ACKs: 10 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of dropped frames: 10 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of skipped frames: 553 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of storage pressure events: 0 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of latency pressure events: 0 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of buffer pressure events: 0 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of stream staleness events: 23 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of latency pressure events: 0 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Number of Put Frame errors: 9 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Average Control Plane API latency (ms): 56 
[2020-09-27 14:25:17] [KVS]logStreamMetric():   Average Data Plane API latency (ms): 1 
[2020-09-27 14:25:17] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 40410000 bytes 437131 for stream handle 20
[2020-09-27 14:25:17] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 40410000. Bytes available: 437131
[2020-09-27 14:25:17] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:17] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:17] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339169177310, dts: 16038339169177310, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:17] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339169199850, dts: 16038339169199850, duration: 0, size: 7590, trackId: 1, isKey 0
[2020-09-27 14:25:17] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 40610000 bytes 421092 for stream handle 20
[2020-09-27 14:25:17] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 40610000. Bytes available: 421092
[2020-09-27 14:25:17] [KVS]postWriteCallback(): postBodyStreamingWriteFunc (curl callback) invoked
[2020-09-27 14:25:17] [KVS]postWriteCallback(): Curl post body write function for stream with handle: b0ee5507ef4d31b1f778e95f3b9b65c67ed26fec7b86a4531e2d8da17ad1260e and upload handle: 20 returned: {"EventType":"RECEIVED","FragmentTimecode":1603833910783,"FragmentNumber":"91343852336295891545297716414643169878437019207"}
[2020-09-27 14:25:17] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 40920000 bytes 421425 for stream handle 20
[2020-09-27 14:25:17] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 40920000. Bytes available: 421425
[2020-09-27 14:25:17] [KVS]postWriteCallback(): Processed ACK OK.
[2020-09-27 14:25:17] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:17] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:17] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:17] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339169580790, dts: 16038339169580790, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:17] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 40030000 bytes 412656 for stream handle 20
[2020-09-27 14:25:17] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 40030000. Bytes available: 412656
[2020-09-27 14:25:17] [KVS]postWriteCallback(): postBodyStreamingWriteFunc (curl callback) invoked
[2020-09-27 14:25:17] [KVS]postWriteCallback(): Curl post body write function for stream with handle: b0ee5507ef4d31b1f778e95f3b9b65c67ed26fec7b86a4531e2d8da17ad1260e and upload handle: 20 returned: {"EventType":"BUFFERING","FragmentTimecode":1603833912782,"FragmentNumber":"91343852336295891550249476571784691307658301891"}

[2020-09-27 14:25:17] [KVS]postWriteCallback(): Processed ACK OK.
[2020-09-27 14:25:17] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:17] [KVS
]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:17] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:17] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339170198230, dts: 16038339170198230, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:17] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339170384060, dts: 16038339170384060, duration: 0, size: 3678, trackId: 1, isKey 0
[2020-09-27 14:25:17] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 37390000 bytes 396617 for stream handle 20
[2020-09-27 14:25:17] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 37390000. Bytes available: 396617
[2020-09-27 14:25:17] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 38000000 bytes 396950 for stream handle 20
[2020-09-27 14:25:17] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 38000000. Bytes available: 396950
[2020-09-27 14:25:17] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339170391630, dts: 16038339170391630, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:17] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 38190000 bytes 400641 for stream handle 20
[2020-09-27 14:25:17] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 38190000. Bytes available: 400641
[2020-09-27 14:25:17] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339171010930, dts: 16038339171010930, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:17] [KVS]postWriteCallback(): postBodyStreamingWriteFunc (curl callback) invoked
[2020-09-27 14:25:17] [KVS]postWriteCallback(): Curl post body write function for stream with handle: b0ee5507ef4d31b1f778e95f3b9b65c67ed26fec7b86a4531e2d8da17ad1260e and upload handle: 20 returned: {"EventType":"PERSISTED","FragmentTimecode":1603833910783,"FragmentNumber":"91343852336295891545297716414643169878437019207"}
[2020-09-27 14:25:17] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 0 bytes 0 for stream handle 20
[2020-09-27 14:25:17] [KVS]postWriteCallback(): Processed ACK OK.
[2020-09-27 14:25:17] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:17] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339171185590, dts: 16038339171185590, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339171207430, dts: 16038339171207430, duration: 0, size: 2046, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 36030000 bytes 384602 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 36030000. Bytes available: 384602
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 36650000 bytes 384935 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 36650000. Bytes available: 384935
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 36820000 bytes 385268 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Report
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339180333040, dts: 16038339180333040, duration: 0, size: 3058, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 31980000 bytes 308470 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 31980000. Bytes available: 308470
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339180396350, dts: 16038339180396350, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 32130000 bytes 311541 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 32130000. Bytes available: 311541
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339180822220, dts: 16038339180822220, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339181041830, dts: 16038339181041830, duration: 0, size: 2848, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 32190000 bytes 311874 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 32190000. Bytes available: 311874
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 32620000 bytes 312207 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 32620000. Bytes available: 312207
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339181519510, dts: 16038339181519510, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 32840000 bytes 315068 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 32840000. Bytes available: 315068
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]postWriteCallback(): postBodyStreamingWriteFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postWriteCallback(): Curl post body write function for stream with handle: b0ee5507ef4d31b1f778e95f3b9b65c67ed26fec7b86a4531e2d8da17ad1260e and upload handle: 20 returned: {"EventType":"RECEIVED","FragmentTimecode":1603833912782,"FragmentNumber":"91343852336295891550249476571784691307658301891"}
[2020-09-27 14:25:18] [KVS]postWriteCallback(): Processed ACK OK.
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]postWriteCallback(): postBodyStreamingWriteFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postWriteCallback(): Curl post body write function for stream with handle: b0ee5507ef4d31b1f778e95f3b9b65c67ed26fec7b86a4531e2d8da17ad1260e and upload handle: 20 returned: {"EventType":"BUFFERING","FragmentTimecode":1603833914807,"FragmentNumber":"91343852336295891555201236728926212778633218447"}

[2020-09-27 14:25:18] [KVS]postWriteCallback(): Processed ACK OK.
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339181827720, dts: 16038339181827720, duration: 0, size: 7268, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28050000 bytes 249913 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28050000. Bytes available: 249913
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339181857950, dts: 16038339181857950, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28360000 bytes 257194 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28360000. Bytes available: 257194
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339182284190, dts: 16038339182284190, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339182430010, dts: 16038339182430010, duration: 0, size: 5111, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28390000 bytes 257527 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28390000. Bytes available: 257527
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28820000 bytes 257860 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28820000. Bytes available: 257860
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339182448710, dts: 16038339182448710, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28970000 bytes 262984 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28970000. Bytes available: 262984
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339182951490, dts: 16038339182951490, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339183154910, dts: 16038339183154910, duration: 0, size: 5246, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28980000 bytes 263317 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAv
ailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28980000. Bytes available: 263317
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 29490000 bytes 263650 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 29490000. Bytes available: 263650
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339183198390, dts: 16038339183198390, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 29690000 bytes 268909 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 29690000. Bytes available: 268909
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339183620350, dts: 16038339183620350, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339183797060, dts: 16038339183797060, duration: 0, size: 4396, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 27000000 bytes 252870 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 27000000. Bytes available: 252870
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 27430000 bytes 253203 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 27430000. Bytes available: 253203
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339184195730, dts: 16038339184195730, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 27600000 bytes 257612 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 27600000. Bytes available: 257612
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339184407930, dts: 16038339184407930, duration: 0, size: 2090, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28000000 bytes 257945 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28000000. Bytes available: 257945
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339184459870, dts: 16038339184459870, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28210000 bytes 260048 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28210000. Bytes available: 260048
[2020-09-27 14:25:18] [KVS]postWriteCallback(): postBodyStreamingWriteFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postWriteCallback(): Curl post body write function for stream with handle: b0ee5507ef4d31b1f778e95f3b9b65c67ed26fec7b86a4531e2d8da17ad1260e and upload handle: 20 returned: {"EventType":"PERSISTED","FragmentTimecode":1603833912782,"FragmentNumber":"91343852336295891550249476571784691307658301891"}
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 0 bytes 0 for stream handle 20
[2020-09-27 14:25:18] [KVS]postWriteCallback(): Processed ACK OK.
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339184914500, dts: 16038339184914500, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339184940000, dts: 16038339184940000, duration: 0, size: 5702, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28260000 bytes 260381 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28260000. Bytes available: 260381
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28720000 bytes 260714 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28720000. Bytes available: 260714
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339185186170, dts: 16038339185186170, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28750000 bytes 266429 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28750000. Bytes available: 266429
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339185586680, dts: 16038339185586680, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339185643030, dts: 16038339185643030, duration: 0, size: 4619, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 28990000 bytes 266762 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 28990000. Bytes available: 266762
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 29390000 bytes 267095 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 29390000. Bytes available: 267095
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339186168370, dts: 16038339186168370, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 26120000 bytes 255355 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 26120000. Bytes available: 255355
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339186371230, dts: 16038339186371230, duration: 0, size: 4886, trackId: 1, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 26640000 bytes 255688 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Rep
orted streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 26640000. Bytes available: 255688
[2020-09-27 14:25:18] [KVS]putKinesisVideoFrame(): debug frame info pts: 16038339186398760, dts: 16038339186398760, duration: 0, size: 320, trackId: 2, isKey 0
[2020-09-27 14:25:18] [KVS]notifyDataAvailable(): Note data received: duration(100ns): 26850000 bytes 260587 for stream handle 20
[2020-09-27 14:25:18] [KVS]defaultStreamDataAvailableCallback(): Reported streamDataAvailable callback for stream handle 9113648. Upload handle 20. Duration available in 100ns: 26850000. Bytes available: 260587
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:18] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:18] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:18] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:19] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:19] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:19] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:19] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:19] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:19] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:19] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:19] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:19] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:19] [KVS]postWriteCallback(): postBodyStreamingWriteFunc (curl callback) invoked
[2020-09-27 14:25:19] [KVS]postWriteCallback(): Curl post body write function for stream with handle: b0ee5507ef4d31b1f778e95f3b9b65c67ed26fec7b86a4531e2d8da17ad1260e and upload handle: 20 returned: {"EventType":"RECEIVED","FragmentTimecode":1603833914807,"FragmentNumber":"91343852336295891555201236728926212778633218447"}
[2020-09-27 14:25:19] [KVS]postWriteCallback(): Processed AC
K OK.
[2020-09-27 14:25:19] [KVS]postReadCallback(): postBodyStreamingReadFunc (curl callback) invoked
[2020-09-27 14:25:19] [KVS]postReadCallback(): Get Stream data returned: buffer size: 16372 written bytes: 16372 for upload handle: 20 current stream handle: 9113648
[2020-09-27 14:25:19] [KVS]postReadCallback(): Wrote 16372 bytes to Kinesis Video. Upload stream handle: 20
[2020-09-27 14:25:19] [KVS]putKinesisVideoFrame(): debug frame info pts: 0, dts: 0, duration: 0, size: 0, trackId: 0, isKey 0
[2020-09-27 14:25:19] [KVS]putKinesisVideoFrame(): Failed to submit frame to Kinesis Video client. status: 0x52000084 decoding timestamp: 0 presentation timestamp: 0
MushMal commented 3 years ago

0x52000084 is defined here: https://github.com/awslabs/amazon-kinesis-video-streams-pic/blob/master/src/client/include/com/amazonaws/kinesis/video/client/Include.h#L181

This status code is returned when you have a multi-track stream, you are using EoFR frame to indicate the termination of the fragment and you are using key-frame flag in the frames. When using multi-track, we can't handle EoFR with ease due to frame reordering. Seems like your application is setting a key-frame flag and the EoFR? Are you running one of the stock samples and modifying it?

staowyze commented 3 years ago

Exactly, we set the FRAME_FLAG_KEY_FRAME flag by accident. However, after removing the FRAME_FLAG_KEY_FRAME flag, the video doesn't look right, we send EoFR when a video clip is over, however, the video clip could have multiple Key frames, does this sound right?

MushMal commented 3 years ago

There are two separate issues.

1) How do you drive the fragmentation. If you specify keyFrameFragmentation = TRUE in StreamInfo.StreamCaps structure then the fragments will be cut whenever you specify a key frame flag. This is useful with video encoders. Your application could configure the encoder to produce say 4 second GoPs and then specify key frame flag with each of the IDR frames. The audio tracks then will be added without any key frame flags. The frame order coordinator will reorder frames to make those monotonically increasing for the final MKV cluster as this is a requirement. 2) When your clip is done you should submit EoFR to ensure that when new clip is produced, the previous fragment won't be retried. This comes from the fact that when the last fragment was sent, no ACKs were generated as the backend doesn't know whether there are more frames coming. After the timeout, the connection gets closed and the state machine goes to ready state (as there is nothing to be sent). With the new frame, a new streaming session is created, however, as there hasn't been a persisted ACK for the previous fragment, there will be rollback to re-stream the previous fragment. This could cause latency pressure firing which could cause re-setting the connection which, in turn, would end up with invalid MKV on the not-yet used connection that's being closed (it's benign).

I would like to understand whether EoFR in multi-track in your case (with key frame fragmentation and all audio frames without any flags) causes the 0x52000084 status code?

staowyze commented 3 years ago

We use video key frames to drive fragment, and audio frames don't have any flags, then we send an single EoFR frame at the end of the video clip, we get 0x52000084 error code right after sending EoFR.

MushMal commented 3 years ago

Got it. Let me dive into this scenario ASAP. Will update soon. Can you confirm that you have key frame fragmentation set to TRUE in the StreamInfo?

staowyze commented 3 years ago

Yes, confirmed, here is our piece of pseudo code

    frame.version = FRAME_CURRENT_VERSION;
    if (MEDIA_TYPE_VIDEO)
    {
        frame.trackId = DEFAULT_VIDEO_TRACK_ID;
        if (MEDIA_CODEC_H264_I)
        {   
            frame.flags = FRAME_FLAG_KEY_FRAME;
        }
        else
        {   
            frame.flags = FRAME_FLAG_NONE;
        }
    }
    else if (MEDIA_TYPE_AUDIO)
    {
        frame.trackId = DEFAULT_AUDIO_TRACK_ID;
    }    
MushMal commented 3 years ago

Confirming, we have an overzealous check for the key-frame in multi-track case with frame order coordinator. Working on a fix for this particular case. The existing logic works with multi-track EoFR in case when the EoFR is driving the fragmentation itself so the fragments are fragmented by the EoFR itself.

In the existing code, you could set the multi-track, set key-frame fragmentation but mark no fragments as key-frames. Just specify EoFR on each fragment end.

While this usage is good for some real-life use cases, this doesn't work as clean in your case with marking clip boundaries in multi-track. This is what we will try to fix without breaking the syntactic validity of the underlying MKV in case of frame reordering.

MushMal commented 3 years ago

Will resolve this as soon as we have the intermittent producer scenario commited

disa6302 commented 3 years ago

Resolving since intermittent producer is available on master.