Skip to content

SPS parse failure #40

Description

@koush

Here's the sprop-parameter-sets:

a=fmtp:96 packetization-mode=1;profile-level-id=4D0029;sprop-parameter-sets=J00AKedAPAET8s1AQEB8AAADAAQAAAMAoNGADqYAFfl//wKA,KO48gA==
const sps = Buffer.from('J00AKedAPAET8s1AQEB8AAADAAQAAAMAoNGADqYAFfl//wKA', 'base64');
const pps = Buffer.from('KO48gA==', 'base64');

This may be invalid data? But it is what Wyze cameras are returning in their SDP (and throwing during parse).

/Volumes/Dev/scrypted/plugins/prebuffer-mixin/node_modules/h264-sps-parser/dist/bitstream.js:17
            byt = view.getUint8(byteoffset);
                       ^

Uncaught RangeError: Offset is outside the bounds of the DataView
    at DataView.getUint8 (<anonymous>)
    at ExpGolomInit (/Volumes/Dev/scrypted/plugins/prebuffer-mixin/node_modules/h264-sps-parser/dist/bitstream.js:17:24)
    at Bitstream.ExpGolomb (/Volumes/Dev/scrypted/plugins/prebuffer-mixin/node_modules/h264-sps-parser/dist/bitstream.js:30:49)
    at hrd_parameters (/Volumes/Dev/scrypted/plugins/prebuffer-mixin/node_modules/h264-sps-parser/dist/vui.js:9:40)
    at Object.getVUIParams (/Volumes/Dev/scrypted/plugins/prebuffer-mixin/node_modules/h264-sps-parser/dist/vui.js:105:9)
    at Object.parse (/Volumes/Dev/scrypted/plugins/prebuffer-mixin/node_modules/h264-sps-parser/dist/index.js:111:34)
    at /Volumes/Dev/scrypted/plugins/prebuffer-mixin/<repl>.ts:1:4
    at Script.runInThisContext (node:vm:129:12)
    at runInContext (/Users/koush/.nvm/versions/node/v18.14.2/lib/node_modules/ts-node/src/repl.ts:673:19)
    at Object.execCommand (/Users/koush/.nvm/versions/node/v18.14.2/lib/node_modules/ts-node/src/repl.ts:639:28)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions