-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Streaming MP4 file data to Kinesis Video Streams results in Transferred a partial file error with CURL #1195
Comments
After some more tinkering, I resorted to directly using the camera stream after encoding it using software H264 encoding (libx264) from ffmpeg. However, now I seem to be dropping a lot of frames with the below errors occurring: [video_streamer_node-1] WARN - viewItemRemoved(): Reporting a dropped frame/fragment. and [video_streamer_node-1] DEBUG - storageOverflowPressureHandler invoked Which might be a result of this error: postWriteCallback(): Curl post body write function for stream with handle: <stream-name> and upload handle: 1 returned: {"EventType":"ERROR","FragmentTimecode":0,"FragmentNumber":"91343852333181491818755708519218936382025283882","ErrorCode":"FRAGMENT_TIMECODE_LESSER_THAN_PREVIOUS","ErrorId":4004} And then I am also getting insane fps for some reason: [video_streamer_node-1] DEBUG - Kinesis Video client and stream metrics for <stream-name>
[video_streamer_node-1] >> Overall storage byte size: 268435456
[video_streamer_node-1] >> Available storage byte size: 1291042
[video_streamer_node-1] >> Allocated storage byte size: 267144414
[video_streamer_node-1] >> Total view allocation byte size: 144080
[video_streamer_node-1] >> Total streams elementary frame rate (fps): 10000000
[video_streamer_node-1] >> Total streams transfer rate (bps): 14424456 (14086 Kbps)
[video_streamer_node-1] >> Current view duration (ms): 0
[video_streamer_node-1] >> Overall view duration (ms): 0
[video_streamer_node-1] >> Current view byte size: 267096126
[video_streamer_node-1] >> Overall view byte size: 267096126
[video_streamer_node-1] >> Current elementary frame rate (fps): 1e+07
[video_streamer_node-1] >> Current transfer rate (bps): 14424456 (14086 Kbps) Another question with regards to the initial title of this question - is there a way to see if data is being received by the AWS Kinesis Video Stream online even though it might not be seen through the console as it is not H264 encoded? |
The extremely high fps was due to incorrect time stamps being sent to KVS in the producer side - this was corrected by using the correct time stamps. I am now running into the problem of the stream on KVS side not being extremely stable. It runs for a few seconds and then starts to buffer with the following message "Searching for media - Your media preview will start once data is retrieved from the video" for around 1 second and then plays a chunk of the stream and them begins to buffer again. Also, the video is extremely patchy, with a lot of frames being dropped. I do sometimes see the overflow pressure callback being invoked and the dropped frame callback also being invoked, but I have kept the buffer size on the producer size to 200 seconds, which is an extremely large amount of time. |
I am using AWS KVS to stream a live camera feed. As a quick MVP I have opted to replicate the camera feed with a MP4 file which I manually send to the AWS KVS stream frame-by-frame (I use OpenCV to read the MP4 and convert it to frames) using the
putFrame
function. I am not seeing any errors initially from logs, but after a couple seconds afterputFrame
ing all the video frames I am given an error of the form:On the AWS KVS CloudWatch metrics side I am able to see spikes in
PutMedia Active Connections
,PutMedia Success
,HLS and MPEG-DASH Requests
, andHLS and MPEG-DASH Success
. I am getting 100% success rates withPutMedia Success
, but 0% success rates withHLS and MPEG-DASH Success
.Could anyone give me any ideas on what could be causing this error? Would the data I send in the frame object I pass to
putFrame
be non-ideal - I have read that you can stream non-video data as well (which would mean what data I send shouldn't really affect the streaming?). Does the MP4 video encoding have any affect? I have uploaded the full logs below.Logs
The text was updated successfully, but these errors were encountered: