| Author |  Topic  |  | 
              
                | zhengyuanyi27
   
 
                61 Posts | 
                    
                      |  Posted - Dec 02 2018 :  02:47:33     
 |  
                      | I used  Imageenview1 to capture an avi video file from a camera, and It worked well. Then I tried to copy the ROI image from imageenview1's bitmap to imageenvect1. I added the following sentences to  ImageEnView1DShowNewFrame: "   Imageenview1.CopySelectionToBitmap(ROI_ImageEnvect.Bitmap);
 ROI_imageenvect.update;
 Roi_ImageEnvect.IO.DShowParams.GetSample(Roi_ImageEnvect.IEBitmap);
 ROI_imageenvect.update;
 "
 The ROI images from Imageenview1 displayed well in ROI_ImageEnvect.
 
 Then I tried to record the ROI images to avi video. I added a button, onclick:  "
 DeleteFile('d:\ROI.avi');  ROI_ImageEnvect.io. createavifile('d:\ROI.avi').
 
 After that, I added some sentences to Imageenview1: ImageEnView1DShowNewFrame:
 "   Imageenview1.CopySelectionToBitmap(ROI_ImageEnvect.Bitmap);
 ROI_imageenvect.update;
 Roi_ImageEnvect.IO.DShowParams.GetSample(Roi_ImageEnvect.IEBitmap);
 ROI_imageenvect.update;
 
 Roi_ImageEnvect.IO.SaveToAVI;
 "
 
 Finally, I added another button, onclick:" ROI_ImageenVect.IO.CloseAVIFile;"
 
 The problem is : Sometimes, it worked well and I got the ROI.avi video, but some times I got "Access violation at address 52082191 in module "xvidvfw.dll" read of address 00000014.
 And I am sure the problem is caused by the sentence "Roi_ImageEnvect.IO.SaveToAVI;" since the problem won't display if I delete this sentence, the filesize for the recorded avi file is 0kb.
 
 Could somebody help me?
 Thanks a lot.
 
 Yuanyi
 
 
 
 |  | 
              
                | zhengyuanyi27
   
 
                61 Posts | 
                    
                      |  Posted - Dec 03 2018 :  11:55:31     
 |  
                      | In short words, could somebody give me some example to record the ROI as video from a camera?  I mean, I don't want to record the whole images from a camera, I just want to draw a ROI on the video and record the ROI as video. Thank you very much.
 
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Dec 04 2018 :  05:28:29     
 |  
                      | Hi 
 What version of Windows are you using? Does it have the latest updates?
 
 
 
 Nigel
 Xequte Software
 www.imageen.com
 
 |  
                      |  |  | 
              
                | zhengyuanyi27
   
 
                61 Posts | 
                    
                      |  Posted - Dec 04 2018 :  23:09:38     
 |  
                      | I used windows10 home edition. It has the latest updates. Thanks. |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Dec 05 2018 :  06:09:41     
 |  
                      | Hi 
 After some investigation we think this may happen if fStreamConfig.GetFormat or fSampleGrabberFilter.GetConnectedMediaType fail because they cannot connect to the device.
 
 We have a source update that should fix it. Please email me.
 
 Nigel
 Xequte Software
 www.imageen.com
 
 |  
                      |  |  | 
              
                |  |  Topic  |  |