1

I am using Java and need to save audio/video stream to a local file.

So far I managed to send RTSP commands and get the stream saved.

However, each RTP pack (DynamicRTP-Type-96) does hold a header and a payload. The payload is holding a NAL header and the actual NAL.

What should be actually saved to the resulting video file from this inbound stream ?

Are you aware of Java libs which can each packet parsing ?

Display Name
  • 349
  • 2
  • 10
  • 19

1 Answers1

1

Packets do not normally make a decodable stream as they are, without modification (esp. depacketization). Instead, the payload has certain structure, which is defined by respective document or specification. Typical payloads are:

It would perhaps be helpful to check earlier Qs out, which are very much related:

Community
  • 1
  • 1
Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • please have a looks at http://stackoverflow.com/questions/7665217/how-to-process-raw-udp-packets-so-that-they-can-be-decoded-by-a-decoder-filter-i, Cipi's reply. When start bit is set and end bit is not set, do I have to insert the NAL prefix as well, or only the NAL unit byte followed by the actual VIDEO FRAGMENT DATA ? – Display Name Aug 14 '12 at 07:16