aws-samples / amazon-kinesis-video-streams-producer-embedded-c

Light-wight Amazon Kinesis Video Streams Producer SDK For FreeRTOS/Embedded Linux
Apache License 2.0
30 stars 18 forks source link

[QUESTION]How to use mkv_uploader #45

Closed Zevolusion closed 2 years ago

Zevolusion commented 2 years ago

This is a question A clear and concise description of what the question is. I used mkv_uploader https://github.com/aws-samples/amazon-kinesis-video-streams-producer-embedded-c/tree/main/samples/mkv_uploader

But when I upload my mkv video, it only put a few seconds Pic1 bc4dd4e224bb3c61aa950fa20648c31

Pic2 d8c06fc9c1aae204fc4f71af5eeafc5

It is 14s in Pic1, 2min in Pic2

How to fix this?

weichihl commented 2 years ago

In the sample code, the default value of xTimecodeType is TIMECODE_TYPE_ABSOLUTE, which means it uploads this MKV file with timestamp only based on the timestamp stored in the MKV file. From the log, the timestamp stored in the MKV file starts from 0, which means it starts from 1970. That's why it's rejected from KVS endpoint. You can refer to "producer_timestamp" in PutMedia for details. This sample needs some improvement to make it easier to use. But there is no specific schedule for this now.

Zevolusion commented 2 years ago

I got a new issue, after I set ENABLE_AUDIO_TRACK to 1 image

image

but it is fine if set ENABLE_AUDIO_TRACK to 0

And I used old version before it won't occur if I set ENABLE_AUDIO_TRACK to 1

weichihl commented 2 years ago

Could you pull the latest code and try "kvsapp" example? This example integrates stream buffer and KVS streaming function like the original "kvs-linux" example.

Zevolusion commented 2 years ago

it works thanks

Zevolusion commented 2 years ago

I think u should update kvs' part in https://github.com/aws-samples/amazon-kinesis-video-streams-media-interface image image After I set USE_AUDIO_AAC to 1

weichihl commented 2 years ago

The solution has been merged. Could you pull the code and try again? Thanks.

weichihl commented 2 years ago

@Zevolusion I'll close this issue since there are no further updates. Please feel free to reopen it if there are any other questions.