Open a video in C # and loop over into frames and save the processed frames as another video

I am trying to open a video in my frame processing application and then save the results to another video. I used OpenCV ( Emgu ) for my image processing without problems. But I cannot use it properly for video processing, because from time to time the exception "Access violation" appears. I also want to save the audio track of the video for exit. So I just want to iterate through the frames into simple C # code and use the Emgu function for each frame.

This is desirable for my application:

  • Sound preservation
  • Video Codec / Compression Support
  • Fast performance
+4
source share
1 answer

Opencv is a library primarily designed to work with a computer, and therefore there is no built-in function that allows you to process audio data. There's a similar question with a solution here about stackoverflow: Adding audio to video created using OpenCV

To take advantage of FFMPEG and related software, see here: http://opencv.willowgarage.com/wiki/FFMPEG

The access violation error that you encounter when using Emgu may be due to some emgu or opencv errors, version 2.2 has some information about saving the video.

+2
source

Source: https://habr.com/ru/post/1336296/


All Articles