Page 1 of 1

Video Library - Frame by Frame Modification

Posted: Thu Jul 03, 2014 9:18 am UTC
by Forest Goose
This isn't an area of programming I'm familiar with, that said:

Is there any library/package/etc. that would, essentially, provide a loop over the frames of a video file, exposing them as bitmaps/pixel arrays, then taking the modified frames and building them into a second video? I would, potentially, like to increase the resolution, and a few other things - I have had success with my own methods applied to image files, but I have no idea where to start with video (and couldn't write something myself).

Thank you for any help:-)

-- It doesn't particularly matter to me what language it is in; especially if there is decent documentation.

Re: Video Library - Frame by Frame Modification

Posted: Thu Jul 03, 2014 12:38 pm UTC
by PM 2Ring
Do you know about FFmpeg? The FFmpeg command line utilities are very comprehensive, and you can probably do most things you want to do with a single FFmpeg command line, although in some cases you may want to use FFmpeg in a batch file / script that converts the video to single frames which you can manipulate using your own software and then recombine back into video.

It's pretty easy to do basic transformations with the ffmpeg program, but it does have lots of options, so it takes a while to learn all its capabilities and how to use them properly.

You can access the FFmpeg libraries in your own programs, if you really want to, but why put yourself through the extra hassle of learning the library APIs?

...

Another option is the MLT Multimedia Framework, which I've played around with a little bit, after I discovered that MLTmelt was installed on my Linux system.

Re: Video Library - Frame by Frame Modification

Posted: Thu Jul 03, 2014 12:47 pm UTC
by Robert'); DROP TABLE *;
AForge in .NET has VideoFileReader and VideoFileWriter classes (under the Video.FFMPEG namespace) that contain ReadVideoFrame and WriteVideoFrame methods, which return/take bitmaps. It's effectively an interface on the FFmpeg, but might be easier to use than a batch/script file.

Re: Video Library - Frame by Frame Modification

Posted: Thu Jul 03, 2014 1:15 pm UTC
by KnightExemplar
Forest Goose wrote:This isn't an area of programming I'm familiar with, that said:

Is there any library/package/etc. that would, essentially, provide a loop over the frames of a video file, exposing them as bitmaps/pixel arrays, then taking the modified frames and building them into a second video? I would, potentially, like to increase the resolution, and a few other things - I have had success with my own methods applied to image files, but I have no idea where to start with video (and couldn't write something myself).

Thank you for any help:-)

-- It doesn't particularly matter to me what language it is in; especially if there is decent documentation.


Let me go about a different approach.

Avisynth is a (very basic) scripting language designed for video editors. For exapmle, increasing the size of a video can be as simple as:

http://avisynth.nl/index.php/AddBorders

Code: Select all

AddBorders(0, 86, 0, 86, $000000)


Or if you wanted to "zoom" into a video, you'd do:
http://avisynth.nl/index.php/GaussResize

Code: Select all

AviSource("dv.avi").BilinearResize(352, 240, 8, 0, -8, -0)


VirtualDub is typically the program I use when I write Avisynth scripts. All internal filters can be found here: http://avisynth.nl/index.php/Category:Internal_filters AviSynth also has access to some basic FFMpeg options.

Re: Video Library - Frame by Frame Modification

Posted: Thu Jul 03, 2014 3:21 pm UTC
by speising
the term you're looking for is Frameserver

Re: Video Library - Frame by Frame Modification

Posted: Sat Jul 05, 2014 5:05 am UTC
by troyp
Regarding ffserver, is it still reliably usable?

Ubuntu has switched to the libav fork for the last couple of years, so I have avserver rather than ffserver on my system, but the man page begins:
AVSERVER(1) wrote:WARNING: avserver is unmaintained, largely broken and in need of a complete rewrite. It probably won't work for you. Use at your own risk.

Which makes me wonder if ffserver is in the same state (because if not, why switch to libav?)

Re: Video Library - Frame by Frame Modification

Posted: Tue Jul 08, 2014 6:31 pm UTC
by Forest Goose
Thank you for all the replies - I'm, now, leaning towards http://www.openshotvideo.com/2013/09/li ... n-and.html, has anyone used this before? I'm looking to minimize the amount of dealing with video stuff to focus more on the frame by frame stuff - this seems to fit the bill, but I've seen a few negative reviews. Haven't had a chance to give it a whirl yet. Still looking into some of the other options in this thread as well. Thank you again:-)