This forum software has now been archived into static HTML page (i.e. it does not function as a working forum anymore, so you cannot login.)

In due course a new forum will be available to help support newer CamStudio versions.

Sorry for the inconvenience and thank you for your patience.

Develop video editing feature

edited May 2009 in Code Contributions
I posted the message below on https://sourceforge.net/forum/forum.php?thread_id=3287208&forum_id=447910
"I'd like to develop a new feature, if I can:
adding screen annotation after recording.
One could modify the player or develop a standalone program like the swf producer.
I think the second option is my better choice because the source does not compile under vs2008.
In a week I should start reading and analysing the code, I will try to reuse as much as possible.
The new editor program should play and stop the video, as the current player already does (I think I should just copy this).
Then one could create the annotation (using the cam studio main, nothing to do, maybe...) and put it on the video window
And the new editor program should overlap the original video with the annotation (I have to figure out how), then save.
My objective is not loosing the quality of the original video, but only overwriting the image where the annotation is placed...
I've not yet started, it is just an idea...
:-)"
Please note: I'm not sure whether there is information loss in the codec from the screen capture's data to the avi.
If this is the case, the player and editing feature should be incorporated in the camstudio and not in a separated program because you should be able to play and edit before saving to file. So, if encoding the video and decoding it again is not like zipping and unzipping, a brand new version of camstudio may be needed...
... that is a bit more effort :-)

Comments

  • edited June 2009
    I'm not 100% sure how CamStudio processes the AVI file during capture. I do know a "~temp.avi" file is created inside the "C:\WINDOWS\Temp" directory by default as soon as the recording starts. It seems the video is encoded on the fly, possibly in chunks, as MediaInfo is showing the "~temp.avi" file's FOURCC to match the selected codec from the video options when recording is stopped and you are prompted for a save location. So my guess is the original information is being lost to encoding as the video is being recorded.

    As for overwriting only a few frames of a video w/o re-encoding, I've seen this done via a frame serving application. The one I've heard the most about is called AVISynth, it isn't a standard editor, though. It acts as a buffer in between the source video and the encoder, allowing for intermediary processing of video frames before they're encoded. I haven't messed with it in a while, but I remember it having a bit of a steep learning curve as the editing is done using text commands placed inside a pre-configured script. VirtualDub has a built in frameserver as well, but I've never used it.
  • I have had a chance to look at camstudio's code and it does encode the temp avi on the fly.
    I'm still thinking to write my own code (in vs2008) and if it works I will share it.
    Both avisynth and virtualdub are very interesting but I need something more 'demo' oriented, it should replay the avi capture and let me add the annotations like text and graph.
    I found also other possibly useful code source as a starting point:
    http://www.evanolds.com/sc_techinfo.html
    http://msdn.microsoft.com/en-us/library/ms706539.aspx
    http://www.shrinkwrapvb.com/avihelp/avihelp.htm
    From a technical point of view, as I wrote in my first post, the application should extract the bmp images from the avi and encode them again after changes are made. I can imagine a play/record button, a stop one, then adding the annotation on the video and pressing again the video/play button to make it overlap and finally the save button.
    Of course it takes time to study and develop it :-)
    thanks for your comments
  • No response since long.
    Decided to close discussion.
    Please start new discussion if required.
This discussion has been closed.