views:

28

answers:

1

We are developing an app to take video files in various formats, perform some simple editing to the files, and output them to a specific format.

I can handle everything except for the editing part through FFMPEG, as the editing requires a user to specify certain things. I need a user to specific any frame ranges that need to be trimmed (only from the beginning or end, never the middle), start/end frame numbers for fading in or out, and overlay text.

I've seen both Splicer and the Directshow.NET wrappers, but I'm not sure it's worth the time to bring all of the editing into our app, and not just use avisynth/ffmpeg/mencoder to perform the actual editing after the user sets all of the above things.

All I really need is a control or wrapper so I can create a control that will play/pause a video, move between frames, and let me grab that specific frame number of the video. I can generate AVS files from that to do the rest. It'd be nice if it would use DirectShow at some level so that any codecs installed on the machine will be available, as the videos could be in WMV, FLV, Divx, MP4, etc. to begin with and we need to support all of those.

Any ideas or suggestions will be considered, but we are going for the fastest (code writing, not execution) implementation.

A: 

What we ended up doing:

We used the Windows Media Player ActiveX control to let the user select points in the video to set for the fades and trimming. We then generate an Avisynth script from that and run it through mencoder to get the final video.

We settled on using the double property from the WMP control that specifies the currentPosition in the clip playing. This was precise enough for our needs to generate a frame number from the clip's frames per seconds and currentPosition to use in the AviSynth script.

Matt
Well, as it turns out, something isn't as precise as it needs to be. I'm guessing the WMP control's currentPosition property isn't completely accurate, the further into the file we are, the more off the frame numbers become from the actual as reported by AviSynth.
Matt