I catched some packets by using wireshark. I decoded them as RTP and I saw MPEG TS packets. Why does not they start with value 47?
enter image description here
Related
I'm a new to this stuff, but I want to try to get some data from an NTP/PTP device I have. The manual states this:
Requesting information from the TM2X00 is done by sending a 3 byte message to the TM2X00, using
UDP/IP, to port 7372. The three bytes, in hexadecimal, are: 0xA1 0x04 0xB2 The TM2X00 will also
respond to a broadcast to the same port.
The response packet is 80 bytes
Do I simply use a UDP send/rec program to send the text 0xA1 0x04 0xB2 via port 7372 to the IP address of the TM2X00 device? Then just listen back for a response over the same port?
I've tried sending the data but I get no response from the TM2X00 device.
Thank you.
I tried sending 0xA1 0x04 0xB2 to the TM2X00 using port 7372 and am looking for an 80 byte response from it. I don't get any response. I can use wireshark and see the data is being sent to the device but that's it. No response. I'm assuming I'm not sending the data properly.
I have a simple application where I send OPUS packets from one client to other say A to B.
A reads one packet from a OPUS file, and send to B.
Again after 20ms or 30ms reads one more packet and send to B, so on..
Till now I was using RTP over UDP, so on receiving side at B, when I receive the packet, I receive complete packet. After receiving complete packet I write to a new file.
This works fine.
Now I am planning to support RTP over TCP.
A will read a complete packet from OPUS file and send to B.
When packet is received at B, it may be received as a single packet or multiple packet (tcp behaviour). My requirement is, I should buffer the data till I receive complete packet. Once I receive complete packet, I will write it to a file.
Now my question is, how do I determine the length of OPUS packet at B while I receiving, so that I can buffer it.
Do not want to use libopus etc if somehow I can avoid it. If by any means from received data, can I find out length of packet?
TCP is a stream protocol. You have two primary choices: add a length word (16 bits is enough) before each Opus packet (read length, then read packet, dealing with buffering (wait to get enough bytes for the read), or pad every Opus packet to a specific size. Opus doesn't use fixed-size packets; they depend on the content and the bitrate and quality settings.
when video and audio are made into RTP package ,and then sending-end sends RTP packages to receiving-end. I want to know that which end is this synchronized process made? sending-end or receiving-end ?
Audio and video are sent in separate RTP sessions each with their own random timestamp offset. They are synchronised at the receiver using RTCP Sender Reports (SR) sent by the sender. RTCP SRs map the RTP timestamps of an RTP session (e.g. video or audio) to an NTP timestamp allowing the receiver to synchronise audio and video. This is all specified in RFC3550. The book by Colin Perkins "RTP: Audio and Video for the Internet" has an excellent description of many aspects of RTP including synchronisation.
SRTCP tracks the number of sent and lost bytes and packets, last received sequence number, inter-arrival jitter for each SRTP packet, and other SRTP statistics.
Does mentioned browsers do something with SRTCP reports when dealing with audio stream, for example adjust bitrate on the fly if network conditions are changed ?
Given that Chrome does adjust bitrate and resolution of VP8 on the fly in a connection, I would assume that OPUS configurations are changed in the connection as well.
You can see the feed back on the sending audio in this image. The bitrate obviously drops slightly when using opus. However, I would imagine that video bitrate would be the first changed in a video call as changing it would have the greater effect.
Obviously, one cannot change the bitrate on a codec that only supports constant bitrates.
All the other stats are a combination of what the RTCP reports give(packetsLost, Rtt, bits sent, etc.) and googles monitoring of the inputs/outputs(audio level, echo cancellation, etc.).
NOTE: this is taken from a session created by AppRtc in chrome.
I have written a program where i get udp packet from a multicast address.
Now i need to extract the mpegts from this packet. I am able to take the payload of the udp packet. Can some one help me to extract the mpeg header from the udp packet.
MpegTS is typically transported over UDP with RTP. Skip the RTP header. The rest (188*7 bytes) is the payload, 7 TS packets. Each packet should start with 0x47.
Update:
There are multiple packetizing layers each wrapping/chunking the sequence. The upper layers are quite nice, the bottom one (elementary stream) is codec dependent and quite messy.
MPEG TS - MPEG PES - MPEG ES