Open dharmik-dalwadi-seaflux opened 2 years ago
I am facing this error when decode the mkv file with h264 codec.
[h264 @ 0x3c78200] No start code is found. [h264 @ 0x3c78200] Error splitting the input into NAL units.
MKV File which i'm using : https://github.com/aws/amazon-kinesis-video-streams-parser-library/blob/master/src/test/resources/output_get_media.mkv
const beamcoder = require('beamcoder'); async function run() { const demuxer = await beamcoder.demuxer('<video-file>.mkv'); console.log(JSON.stringify(demuxer)); const decoder = beamcoder.decoder({ name: 'h264' }); let packet = {}; for (let x = 0; x < 1000 && packet !== null; x++) { packet = await demuxer.read(); if (packet && packet.stream_index === 0) { const data = await decoder.decode(packet); console.log(data) } } } run();
This error might be related to the mkv format : https://stackoverflow.com/questions/39105571/decoding-mp4-mkv-using-ffmpeg-fails
Is there a way to use something like https://www.ffmpeg.org/doxygen/trunk/group__lavc__core.html#gac7b282f51540ca7a99416a3ba6ee0d16 using beamcoder? Might be related to #35
This issue has been fixed by providing the extradata into the decoder.
decoder.extradata = demuxer.streams[0].codecpar.extradata
what is it extradata?
I am facing this error when decode the mkv file with h264 codec.
Error
Reproduction Steps
MKV File which i'm using : https://github.com/aws/amazon-kinesis-video-streams-parser-library/blob/master/src/test/resources/output_get_media.mkv
Related
This error might be related to the mkv format : https://stackoverflow.com/questions/39105571/decoding-mp4-mkv-using-ffmpeg-fails
Is there a way to use something like https://www.ffmpeg.org/doxygen/trunk/group__lavc__core.html#gac7b282f51540ca7a99416a3ba6ee0d16 using beamcoder? Might be related to #35