1

I am new to VLC or libVLC. I am using C# (.Net Framework 4.8) and targeting to encode and decode video frames (each frame in form of Bitmap or byte array of Bitmap) as byte arrays in H.264 video streams, i.e., each frame being encoded as a byte array and then decoded. It is difficult to find any sample code for these simple functions.

I used OpenH264 and OpenH264Lib to perform similar functions. It works but seems the performance is unsatisfactory.

Can anyone help me? Thanks a lot!

Linus
  • 51
  • 4

1 Answers1

0

LibVLC(sharp) is not the right tool for the right job. LibVLCSharp is good at playing videos, but enconding/decoding raw frames will likely be hard to do.

The ffmpeg libraries (libavcodec, libavformat...) are more suited for this. Please have a look at FFMpeg.Autogen

cube45
  • 3,429
  • 2
  • 24
  • 35
  • It seems that FFMpeg.Autogen is one of the wrappers for FFMpeg. If I call it to encode/decode frequently, e.g. if I have to decode several video streams concurrently and each video stream is of 30fps, does it have a performance issue as wrapper calls for exe actually? – Linus Jun 17 '22 at 06:16
  • Probably less overhead than calling an exe multiple times, yes. – cube45 Jun 17 '22 at 10:09