Streampunk / beamcoder

Node.js native bindings to FFmpeg.
GNU General Public License v3.0
392 stars 76 forks source link

How to process the raw stream of h265 and then convert it to binary jpeg #78

Open USTCtuoluo opened 2 years ago

USTCtuoluo commented 2 years ago
let packet = beamcoder.packet({ data: Buffer.from(message.data) });
let decoder = beamcoder.decoder({ name: 'hevc', width: 1920, height: 1080,codec_type: 'video' });

decode cannot be compiled

Bahlinc-Dev commented 2 years ago

Check the error output. Add beamcoder.logging('debug') after import. See what it says, my guess is you are not passing clean h265 to the decoder. Also, if you are creating a packet from scratch you have to set the pts, dts, duration, etc.