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

Wrong syntax for Opus codec line #12

Closed
ibc opened this issue Jan 14, 2014 · 3 comments
Closed

Wrong syntax for Opus codec line #12

ibc opened this issue Jan 14, 2014 · 3 comments

Comments

@ibc
Copy link
Collaborator

ibc commented Jan 14, 2014

The proper way of indicating Opus codec in the SDP is:

a=rtpmap:NNN opus/48000/2

and that is what Chrome generates. But when sdp-transform handles the SDP it converts such a line into:

a=rtpmap:NNN opus/48000

(which is the old syntax for Opus codec)

@clux
Copy link
Owner

clux commented Jan 14, 2014

Yes. The grammar for rtpmap is lacking. It's defined in RFC as:

a=rtpmap:<payload type> <encoding name>/<clock rate> [/<encoding parameters>]

and we are just ignoring the encoding parameters. This is one of those annoying ones where you get an extra slash when the parameters are present, otherwise it's not there. Either have to incorporate the slash in the encoding parameters, or just merge clock rate and encoding parameters in one big string.

Alternatively, rewrite the grammar formating to handle such cases better. Undecided atm.

@ibc
Copy link
Collaborator Author

ibc commented Jan 14, 2014

I propose extending the resulting rtpmap Object with a new field "extraParams":

codec: "opus"
payload: 111
rate: 48000
extraParams: [ "2" ]

Of course those params must appear in the given order and make the String so they can hold any kind of value.

@clux
Copy link
Owner

clux commented Jan 14, 2014

Yeah, the problem is having to make the writer better with dealing with parameters that are only sometimes there to do that. But I have a sensible solution to deal with conditionals in the format string - will get a version up later.

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

2 participants