Question

I am trying to write a program that deletes frames of a video that don't have a particular symbol in them. My general plan:

  1. Split the audio from the video
  2. Split the video into frames
  3. Run the frames through a subroutine that looks for the symbol, by checking the pixels where it should be for being the correct color, and logging the ones that don't.
  4. Delete those frames and corresponding audio seconds
  5. Splices it all back together.

I need some help finding libraries that can do this. I was wondering if wxpython could do the detection of pixel color. I have no idea what library could split audio and video and which could edit audio. I know ffmpeg could split the video into frames but after two days of work I still have not been able to install it for python 2.7, so I either need a way to install it or a different library to do it. Any ideas?

Was it helpful?

Solution

wxPython is mainly for desktop GUI development. I would look at pyAudio for the audio bit or possibly one of the following:

You might be able to use one of the Mplayer wrappers for the video:

Or check out that OpenCV project that Sergey mentioned:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top