Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, June 6, 2010 8:13:49 PM(UTC)

RieCh  
RieCh

Groups: Registered
Posts: 12


I have a problem capturing a Video Stream from a USB 2.0 Video Device.

When i'm Capturing i see a lot off dropped Frames - Example: Captured 29 frames in 14,01 sec (50 dropped).
This Problem exist on any Computer, using MCMP or MPEG2 Codec.

What can i do?

Thank.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, June 7, 2010 2:27:50 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Frame dropping happens during capture when the hardware is not capable of keeping up with all captured frames in real time.
Unlike convert operations, if the computer cannot do the required steps (capture, compress and store to disk) in the frame's actual time, it must drop a frame to keep the time stamps correct.
With convert operations (for example changing an AVI file to an MPEG file), the computer does not have to drop any frames because it can wait to complete the steps. This means capturing 14 seconds must be done in exactly 14 seconds. On the other hand, converting 14 seconds, can be done in less or more time, depending on how fast the computer can do the processing.

Dropping frames during capture takes place when the computer resources are not enough to handle the load. This could happen if the computer is slow or busy (either processor or hard drive), or the video size is too much to handle in real time.

I did a test here with a typical PC that's more than 3 years old and when capturing video size 1680x1050, around 90% of frames were dropped.
When I changed the size to 640x480, only 23% of frames were dropped.

What is the video size you're capturing at? Does the PC itself have a fast USB 2.0 connection? Does the camera support a smaller size you can capture with?
 
#3 Posted : Wednesday, June 9, 2010 3:30:07 AM(UTC)

RieCh  
RieCh

Groups: Registered
Posts: 12


Hi - Thanks.

The Camera size is smaller then 640x480.
USB 2.0 is OK.
How can i set the MPEG File? I Use the MPEG-2 Codec....


*********************************
My Code to set the Config Parameters...

AxltmmCaptureCtrl2.EnterEdit()

I set the Filename
AxltmmCaptureCtrl2.TargetFile = "c:\temp\capture.avi"

Then i set the Videocompression
...
AxltmmCaptureCtrl2.VideoCompressors.Item(i).Selected = True
...
AxltmmCaptureCtrl2.LeaveEdit()


Capture the Video
DoCapture(LTMMLib.ltmmCapture_Mode.ltmmCapture_Mode_AutoFrames)


    Sub DoCapture(ByVal nMode As Integer)
        Dim result As Integer
        On Error GoTo ErrorHandle
        AxltmmCaptureCtrl2.ReadyCapture(nMode)
        AxltmmCaptureCtrl2.StartCapture(nMode)
        Err.Clear()
        Exit Sub
ErrorHandle:
        MsgBox(Err.Description)
        Err.Clear()
    End Sub


 
#4 Posted : Thursday, June 10, 2010 5:47:06 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Using the ltmmCapture_Mode_AutoFrames mode to capture videos will only take selective frames for the capture source in a sequence scheduled by the ltmmCaptureCtrl.FrameDelay Property.

This means if the video source sends 30 frames per second, and you set the delay to 1 second, the normal thing to happen is to capture 1 frame and drop 29.
Is this what you want to do?

If not, use the ltmmCapture_Mode_Video or ltmmCapture_Mode_VideoAndAudio capture modes instead of AutoFrames.
 
#5 Posted : Wednesday, June 30, 2010 8:14:53 PM(UTC)

RieCh  
RieCh

Groups: Registered
Posts: 12


Hi,

Thank you - this was a good Tip. Now it will work good.

Attached a Testreport - can you give me a statement...




Normal
0


21


false
false
false

DE-AT
X-NONE
X-NONE













MicrosoftInternetExplorer4





























































































































































/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Normale Tabelle";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}


The test I ran played back what appeared to be perfectly in this updated version of video capture


 


The video/audio file lasted 5.45 Minutes


Size: 311 Megabytes


Made up of 7002 Frames.


 


The summary at the
bottom of the screen said that 1193 frames were dropped. Which represents 17%, just as old version.  What does this mean?


 


The replay appeared to run
seamlessly with nothing missing and the audio and video seemed synchronized throughout.


 


Please advise.




 
#6 Posted : Thursday, July 1, 2010 3:41:20 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

17% drop means roughly one frame from every 6 was dropped. Since you're doing live compression on the fly, this could be normal unless you have a super fast processor, hard disk, bus, etc.
Since most frames are not dropped, you should still smooth playback. DirectShow will automatically fill the place of a dropped frame with an adjacent frame during playback without causing jitter.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.196 seconds.