Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPS parse failure #40

Open
koush opened this issue Apr 17, 2023 · 0 comments
Open

SPS parse failure #40

koush opened this issue Apr 17, 2023 · 0 comments

Comments

@koush
Copy link

koush commented Apr 17, 2023

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant