Implement encapsulation of extracted opus payload from RTP packet with ogg container

We have a captured pcap file that includes the opus RTP payload on rfc6716, now we can disable the RTP header and extract the opus payload, we want to encapsulate the payload in ogg opus per spec https://tools.ietf.org/html/ draft-ietf-codec-oggopus-07 (Ogg Encapsulation for Opus Audio Codec) and send, so that the VLC can play the captured opus, we don’t want to save the ogg file, and then skip the VLC for playback, we will send the ogg opus to VLC immediately after encapsulation one package, anyone who has a link to an encapsulation implementation, or to a third-party library ku, which I can call?

+4
source share
2 answers

Packages can be read using the libpcap library and then encapsulated in Ogg using libogg . There is an example program opusrtpin opus-tools that can sniff Opus RTP packages on the loopback interface using libpcap and write them to Ogg. You would like to do something similar, but change pcap_open_live()to something like pcap_open_offline()if you want to read pcap from the save file and write Ogg pages from libogg to the socket instead of the file. Also define OPUS_PAYLOAD_TYPEas the type of RTP payload you want to find.

+2
source

, opusrtp, pcap, .opus .

pcap_open_offline() pcap_open_live(), .

opusrtp fork github.

- ./opusrtp --extract PCAPFILE

rtpdump.opus, .

0

Source: https://habr.com/ru/post/1589334/


All Articles