bob123
bob123

Reputation: 11

How to convert/decode data.Payload from kinesisvideomedia.getMedia request in AWS to an mkv file?

I'm trying to getMedia from an AWS kinesis instance which is working (as in I can stream video to it). Once I have saved the data which comes in from the getMedia call, in my nodejs code. I'm trying to convert the data.Payload which is of type Buffer to mkv file to use later in my program. Any suggestions/solutions would be gladly appreciated, have spent quite a while searching.

The data file I have saved(which is of correct type)
""""
"ContentType": "application/json",
"Payload": {
    "type": "Buffer",
    "data": [
            ......
"""

kinesisvideomedia.getMedia(params, function (err, data) {
if (err) {
    console.log(err, err.stack); // an error occurred
} 
else{     
    console.log(data); 
    .... saving data code

Upvotes: 1

Views: 293

Answers (0)

Related Questions