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 : Thursday, June 14, 2012 11:00:06 PM(UTC)

Aniki  
Aniki

Groups: Registered
Posts: 17


Hi everybody,

I am using an IP camera with Directshow using a vendor Driver.
Using GraphEdit, i can build a graph that allow me to preview and capture the video stream of that camera.

The fact is that when I use the LeadTools capture object, i can't get it to work. I am getting a black window when previewing and trying to capture throw an error 8004020D - Buffer overflow.
The camera is delivering a MJPEG data stream.
Can it be a problem for the capture object?

But the fact is that i know what graph could resolve my problem. Is it possible to tell the capture object the graph that it has to build? Or maybe to tell him to add a specific filter at a specific place? To not use a specific filter? Etc...
Can we have an influence on the graph built by the capture object?

Thanks in advance.
 

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 : Friday, June 15, 2012 1:21:22 AM(UTC)

Aniki  
Aniki

Groups: Registered
Posts: 17


I forgot to mention that I connected to the remote graph built by the Leadtools capture object using the EditGraph function. See the attachment for the graph.

Somehow, using the preview output pin from the SmartTee is causing the preview problems. When I rebuilt the graph myself in GraphEdit, I also had problems with the preview output pin from the SmartTee. Using the InfinitePin solves the problem.

But i can't figure out the capture buffer overflow problem. Since it is using the capture output pin from the SmartTee filter, it is getting the good video stream.
I suspect the LTMM Sample corrector to be the problem (or maybe the LTMM Gate filter).
Moreover i don't think that the MJPEG video stream can be stored as is in an AVI file. I tested in GraphEdit and it didn't worked.

Placing the MJPEG decoder at the very begining of the graph (just after the camera filter) would probably solve the 2 problems!
Is it possible to do?
Aniki attached the following image(s):
IP_cam_LEAD_graphedit.jpg
 
#3 Posted : Sunday, June 17, 2012 3:39:23 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


When previewing MJPEG data stream from your camera, the MJPEG decoder should be inserted automatically to the graph, because the data should be uncompressed to preview it using our capture control. There is no direct way to control the graph built by our capture control.
To force decompression, try to insert a Video Processing filter (such as the Video Resize Filter) and disable it (a dummy filter). This should force the Video stream to be de-compressed.
For more information, please check the following help topics:
- Programmatically Inserting a Processor Filter
- Access the Interface of Filters
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#4 Posted : Sunday, June 17, 2012 10:48:35 PM(UTC)

Aniki  
Aniki

Groups: Registered
Posts: 17


Great Mohamed!

It worked like a charm. I added a Video Color filter and then the MJPEG decoder was placed just after the first Smart Tee.
Now the preview and the capture work perfectly!

Note that the preview output pin from the second Smart Tee is now also working.

Thanks for the quick and effective answer Mohamed.
Aniki attached the following image(s):
IP_cam_working1.jpg
 
#5 Posted : Sunday, June 17, 2012 10:51:51 PM(UTC)

Aniki  
Aniki

Groups: Registered
Posts: 17


Sorry for the double post, but i forgot to ask what did you mean when you said "try to insert a Video Processing filter (such as the Video Resize Filter) and disable it (a dummy filter)"?
How can i disable the filter? Or did you mean "try to insert a Video Processing filter and remove it"?

I tried to add and then remove it but the problem comes back as soon as the processor is removed.
 
#6 Posted : Monday, June 18, 2012 2:12:40 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


If you are using GraphEdit, you can disable the filter by showing the filter's properties dialog and uncheck the "Enable" checkbox within the dialog.

If you are using the filter programmatically (in your code), you need to use the interface of the filter and set the LMVResizeFilter.Enabled property to False.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#7 Posted : Monday, June 18, 2012 2:56:40 AM(UTC)

Aniki  
Aniki

Groups: Registered
Posts: 17


I am working with VB6, so I don't think I can access the interface of the filter.
And the ltmmProcessor object doesn't have any "Enabled" property.

I guess i can't do this easily in VB6. Or am I wrong?
 
#8 Posted : Monday, June 18, 2012 4:00:12 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


If you are using LEADTOOLS Multimedia COM controls with VB6, you should be able to access the interface of the filters programmatically.

For more information, please see the following online help topics:

http://www.leadtools.com/help/leadtools/v175/multimedia/com/ocx_vbt/programmaticallyinsertingaprocessorfilterexvb.htm

http://www.leadtools.com/help/leadtools/v175/multimedia/com/ocx_vbt/accesstheinterfaceoffiltersexvb.htm
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#9 Posted : Monday, June 18, 2012 5:31:28 AM(UTC)

Aniki  
Aniki

Groups: Registered
Posts: 17


Thank you for the hint!
I never noticed this function: GetSubObject
Too bad that I don't have the IP camera anymore to test if it would have worked.
If I can get one of those cam again, I will test it and post my results.

Thank again Mohamed.
 
#10 Posted : Tuesday, August 14, 2012 5:02:02 AM(UTC)

Aniki  
Aniki

Groups: Registered
Posts: 17


I have now a new IP camera from the same constructor but not the same model.

I am also getting an error when trying to capture without using the Video processing filter workaround.
This camera is also delivering a compressed video stream (MJPEG or H264).

I just tested to add a Video processor and disabling it.
It solves my problem. I guess that it would have worked for the other camera too.

Thanks again to mohamed, who quickly gave me a workaround!
 
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-2019, Yet Another Forum.NET
This page was generated in 0.225 seconds.