ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Extract, Process and Insert frames from .AVI files

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
yogiyang Posted - Aug 26 2011 : 00:40:11
I have observed that ImageEn will allow one to open .AVI files. I was wondering if it is possible to Extract a range of frames from the video and then process them and Insert them back to their respective location in the AVI file.




Yogi Yang
2   L A T E S T    R E P L I E S    (Newest First)
yogiyang Posted - Aug 28 2011 : 23:36:11
@Fabrizio,
Thanks for your help.

I will try as you have suggested and get back here if I am stuck anywhere.

Once more thanks for your help.


Yogi Yang
fab Posted - Aug 27 2011 : 13:30:52
You could use OpenMediaFile method to open the AVI (or any other multipage file format) for reading and CreateAVIFile of the same object to open an AVI for writing, like in this example:

// writes "Hello!" in each frame of "input.avi" and writes the resulting video to "output.avi"
var
  frameIndex:integer;
  bmp:TIEBitmap;
  io:TImageEnIO;
begin
  bmp := TIEBitmap.Create();
  io := TImageEnIO.CreateFromBitmap(bmp);

  try
    io.OpenMediaFile('input.avi');
    io.CreateAVIFile('output.avi');
    for frameIndex:=100 to 200 do
    begin
      io.LoadFromMediaFile(frameIndex);
      with bmp.Canvas do
      begin
        Pen.Color := clRed;
        Font.Size := 40;
        TextOut(0, 0, 'Hello!');
      end;
      io.SaveToAVI();
    end;
    io.CloseAVIFile();
    io.CloseMediaFile();

  finally
    io.Free();
    bmp.Free();
  end;
end;


Just two notes:
1) timings could be differents
2) audio is not supported
3) you need the right codec installed