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

How can i use celp13K to generate RTP pcap #2

Open
norouzzadegan opened this issue Jun 23, 2020 · 3 comments
Open

How can i use celp13K to generate RTP pcap #2

norouzzadegan opened this issue Jun 23, 2020 · 3 comments

Comments

@norouzzadegan
Copy link

For a project needs to generate rtp pcap with codec qcelp.
ffmpeg only can decode it but for send with rtp ffmpeg need encode with qcelp
celp13k can help me to generate rtp pcap with codec qcelp13
Thank you

@RupW
Copy link
Owner

RupW commented Jun 23, 2020

Hi - I guess this is the RTP packet spec you need

https://tools.ietf.org/html/draft-mckay-qcelp-03

There's no built-in support for this, no. It does generate codec data frames in the right format: you could encode your audio to QCP files then take the data chunks, split them into frames and assemble them into RTP packets but I don't know the format to know how much work that is.

Or if you wanted to edit the source then you could copy or modify io-qcp which writes the codec data frames with QCP file headers.

@RupW
Copy link
Owner

RupW commented Jun 23, 2020

In fact if you just want QCELP-encoded chunks then you might be better off with the original 'packet' format I describe at the bottom of the readme, since each chunk has a fixed size of 36 bytes in that format. You can generate that by encoding with -P, and you'll need to reorder the bytes:

  • first short is the chunk rate byte; write this as a byte
  • subsequent shorts are the correct encoding but switched around: switch pairs of bytes and write as many as you need for the given rate.

You can find the bytes per rate in io_qcp in my code, or in the RFC, or here:
https://tools.ietf.org/html/draft-mckay-qcelp-03#section-3.2

@norouzzadegan
Copy link
Author

Thank You i use QuickTime Broadcaster in Mac OS X snow leopard for generate qcelp rtp pcap

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