0

I have to write a code to send the Video Stream from a USB Camera to the PC (EK-RA6M5 is in between processing the cam data and sending out on UDP) where I have a VLC media player

I can start receiving on the media player with udp://@:1234

But I am unable to figure out what will be the exact packet format which I have to send to the VLC.

Please help me with the precise packet format required by the VLC media player.

Thanks

siddharth taunk
  • 309
  • 4
  • 12

1 Answers1

0

Video (and audio) can be encoded, packaged and transported in many different formats as you have likely seen.

There is no one format which is always used and always supported.

Because of this, players like VLC player will generally support multiple different formats.

However, there are some common formats for different use cases.

For streaming video, e.g. Netflix, YouTube etc, a commonly supported format is H.264 encoding, fragmented MP4 container and HLS or DASH ABR streaming.

For real time CCTV and web camera feeds from a camera, which sounds like it is your use case, the most common format is likely H.264 encoding and RTSP/RTP transport. It's worth noting that the terms RTP and RTSP are sometimes used interchangeably but they actually are distinct things - have a look at the discussion with this question and answers: What is RTSP and WebRTC for streaming?).

VLC player will definitely play back an RTSP/RTP stream directly, although it can be tricky to get it working sometimes and you may have to play around with the protocol parameters, especially if you want it to be as near real time as possible. In my experience it is easier to test with the VLC player first on a laptop and then on mobile, if you need to have it work on mobile also.

One thing to note - if you want your stream to be available to multiple people then you might want to send it to a server which then makes it available to clients via regular HTTP or ABR streaming. This is the approach used commonly by sites which aggregate webcams, i.e. providing many web cam displays on a single site. If you do this however, there will be latency added by the re packaging and the streaming protocols.

Mick
  • 24,231
  • 1
  • 54
  • 120