X264 VFW

From Emgu CV: OpenCV in .NET (C#, VB, C++ and more)
Revision as of 03:00, 2 October 2018 by Canming (talk | contribs) (Write up the introduction for using X264 VFW with VideoWriter.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

VideoWriter & H.264

Open CV's VideoWriter is used for saving image sequences into Video files. For Windows, the default Open CV implementation for saving MJPEG files do not provide much compression, if you are saving a long video file it may consume lost of hard drive space. H.264 video format generally provide great compression ratio and is of good quality. One of the option to encode H.264 file using Open CV's VideoWriter, is to use the FFMPEG backend, and install Cisco's H.264 codec from here. While the cisco H.264 implementation using FFMpeg provides good default compression ratio, but there is no option to specific the quality of the video. Some times we would like to have higher quality video output that takes more spaces, and some times we want lower quality video that can save spaces.

Here we are going to walk you through using the X264 VFW pacakge with VideoWriter, such that you can specify the video quality and producing H.264 files that matches your needs.

System Requirement

Component Requirement Detail
Emgu CV Version 4.0+
Operation System Windows
  • The code used in this tutorial use components from the Open CV / Emgu CV 4.0 release. At tise moment you will need to build the binary from the source code in the Git repository.