0

How to get current frame of RTSP using C /C++language?

I know there is many Python solution: Read Frames from RTSP Stream in Python

If we can not use command (such as ffmpeg ..), just using c/c++ code.

I am try libvlc or openCV. How can I do? Thank you.

Cheng
  • 316
  • 3
  • 9
  • Consider using the gstreamer library – sparik Apr 14 '20 at 01:56
  • RTSP frame? That sounds entirely wrong. RTSP is the stream control protocol. It contains high-level commands like `PLAY rtsp://example.com/media.mp4 RTSP/1.0`. It doesn't bother with individual frames at all. RTSP isn't even video-specific. What would a "frame" even be when playing audio? Audio might have 44100 _samples_ per second. – MSalters Apr 14 '20 at 11:46

1 Answers1

0

Use libvlc_video_set_callbacks() for libvlc 3.x.

There is another, faster, API in libvlc 4.x which uses the GPU.

Docs: https://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc__media__player.html#ga612605f2e5c638d9f4ed59021d714bf0

mfkl
  • 1,914
  • 1
  • 11
  • 21