Spike 2 Video Recorder problems

Discussions and questions about topics not covered above
Simon_McMullan
Posts: 8
Joined: 10 Sep 2009, 09:21
Software used: Spike2
1401 type: Power1401 mk II
Location: Sydney, Australia
Contact:

Spike 2 Video Recorder problems

Unread postby Simon_McMullan » 09 Feb 2021, 06:31

Hi
We're trying to synchronise video with electrophysiological signals sampled via 1401 using Spike 2 v7.20 and Spike 2 Video Recorder v1.05. We've digitised the analogue output of our video camera at 60 fps/1040 x 768 using a USB encoder (Startech USB3HDCAP https://www.startech.com/en-au/audio-vi ... /usb3hdcap). The encoder seems to work well; we can select it as a source for other programs (e.g. Zoom) and even record, stream or run as a virtual camera using OBS (Open Broadcaster Software: open source software for video recording and live streaming). However, we hit an error if we try and select the decoder as a source for Spike 2 Video Recorder in the video drop-down menu: the program hangs for a moment and then pops up the following error message:

ConnectPossiblyViaDVSplitter
Error Message 0x80040217 no combination of intermediate filters

Spike 2 Video Recorder seems to work really well if we choose other video sources; it has no problem recording from the integrated webcam or from an external USB webcam (at their max of 30 fps), or from an old USB decoder we found lying around the lab (also limited to 30 fps). We've downloaded all of the latest drivers for the encoder, and have tried using the OBS virtual camera as a workaround (it kind of works some of the time but sometimes seems to stutter).

I was wondering if you had any insights into what we could try next?

All the best
Simon

User avatar
Greg Smith
Major contributor
Posts: 1634
Joined: 19 Jun 2008, 12:27
Software used: Spike2 and Signal
1401 type: Many 1401 types
Location: Cambridge, England
Contact:

Re: Spike 2 Video Recorder problems

Unread postby Greg Smith » 10 Feb 2021, 12:32

Hi Simon,

Is there any possibility of you upgrading to a more modern version of Spike2?

We made a significant change to the s2video at Spike2 version 9.06 in April 2017 (which was also retrofitted to version 8) that added support for mp4 format files and deprecated AVI files. It also much improved the algorithms used to connect up the various DirectShow components that are used to build the video capture system. There were also video enhancements in spike2 versions 9.07 and 9.12, 10.02, 10.06 and 10.07.

We did not update version 7 as our support policy is to add new features to the current version (which was version 9, at the time) and fix bugs (where we can) in the current and previous versions (9 and 8). In this case we added the new feature to version 8 as well.

If it is impossible for you to consider upgrading, it is possible that the latest s2video will work for you as long as you restrict yourself to using the AVI format. I cannot promise it will work... I cannot remember if we have made any changes that would break things. It would at least let you see that the video can be connected up correctly. However, it would be a lot of work for us to sort out the components necessary for you to install this (it is not just the s2video program and supporting libraries, there are additional DirectShow components that the Spike2 installer adds to the system).

The MP4 format has frame time stamps as part of the data stream which is a vast improvement over the AVI format which assumes a constant frame rate and the data capture has all sorts of bodges to get around the fact that almost all cameras generate frames at variable rates. As far as we know, this new format has eliminated problems with loss of frame sync with data recording.

More recent version of Spike2 have had improvements to video capture and also to replay, for example version 10.07 has the following new features (from the Help):

14. The S2Video program has a new option to override frame time stamps. (fixes problems with cameras that lie about frame times)
15. Reviewing MP4 video files now supports frame accurate stepping.
17. The Help includes information on configuring the Xvid video codec.
18. We automatically disable the Enhanced Video Renderer when S2Video runs in a Remote Desktop.
19. S2Video now adjusts file frame times to allow for delays starting up video capture.

If you contact our Sales team they could probably arrange a loan of version 10 for you to evaluate prior to upgrading.
Greg Smith Cambridge Electronic Design

Simon_McMullan
Posts: 8
Joined: 10 Sep 2009, 09:21
Software used: Spike2
1401 type: Power1401 mk II
Location: Sydney, Australia
Contact:

Re: Spike 2 Video Recorder problems

Unread postby Simon_McMullan » 12 Feb 2021, 02:02

Dear Greg
Thanks for taking the time to explain the improved video handling in detail - sounds really promising. I'll get in touch with Sales ....
Cheers
Simon

Simon_McMullan
Posts: 8
Joined: 10 Sep 2009, 09:21
Software used: Spike2
1401 type: Power1401 mk II
Location: Sydney, Australia
Contact:

Re: Spike 2 Video Recorder problems

Unread postby Simon_McMullan » 22 Feb 2021, 06:48

Hi Greg
Carlee very kindly supplied us with a demo of V10 to see if it would correct the problem we encountered; unfortunately, we still get the same error message when selecting the camera directly. We would like to try a few potential workarounds (using third party software to run the video encoder as a virtual camera), but in the mean time we thought it might be worth contacting the video encoder manufacturer to ask if they had any suggestions.

Before doing that, I wonder if you might have a list of the Video Recorder's technical requirements/limitations? e.g. are there any particular video formats it cannot deal with? This might identify the culprit.

Thanks
Simon

User avatar
Greg Smith
Major contributor
Posts: 1634
Joined: 19 Jun 2008, 12:27
Software used: Spike2 and Signal
1401 type: Many 1401 types
Location: Cambridge, England
Contact:

Re: Spike 2 Video Recorder problems

Unread postby Greg Smith » 22 Feb 2021, 13:04

Hi SImon,
Sounds like you are pretty well versed with video so you may want to look deeper into the can of worms...
When faced with a problem like this I usually reach for the GraphStudioNext program to diagnose the formats. You need the 32-bit version as the Spike2 data capture uses this. You can find it at:
https://www.videohelp.com/software/GraphStudio
The latest version is 0.7.1.61 dated Decemeber 2020.

This is not the easiest program in the world to use as it does require you to have a basic understanding of DirectShow and is intended for programmers.

Try adding the camera and the Enhanced Video renderer to the graph and then see if you can get them to connect. If you can, note the format settings and attempt to set the same values in S2video. However, we only allow control over general format and screen resolution...

If you hit the same problems with this program as s2video there is little chance we can do anything to help as we use much the same underlying mechanisms to connect components. If you can get it to connect, we may be able to get s2video to work, but we would probably need to have access to the camera and associated kit and there is no guarantee of success. Also any changes would be to the latest Spike2 version.

The error message you mentioned "Error Message 0x80040217 no combination of intermediate filters..." means that DirectShow was asked to connect two components and it was unable to find a way to convert the stream format from one compatible with the source to one compatible with the destination. The hueristic used to connect is not published and is likely to be complex. The major change we made was to make the connections in much smaller steps, which made the system much more likely to succeed (probably by hugely reducing the search space for matching formats).

If you can find a particular path that works, we can sometimes detect the special case and help the connection by adding intermediate components by hand so as to force the system to take a particular connection route.

Other than using a different camera, I do not know what else to suggest.
Greg Smith Cambridge Electronic Design

Simon_McMullan
Posts: 8
Joined: 10 Sep 2009, 09:21
Software used: Spike2
1401 type: Power1401 mk II
Location: Sydney, Australia
Contact:

Re: Spike 2 Video Recorder problems

Unread postby Simon_McMullan » 22 Feb 2021, 22:55

Hi Greg
Thanks for your prompt response - very helpful. We'll follow your suggestions up and see if there's a setting that works.
The other alternative is to buy a different video encoder and see if Spike Video Recorder can capture from it. Buying random video encoders could get pretty expensive pretty quickly, so I wonder if you had any recommendations that you know will work? We need a mimimum of 60 fps. Resolution not terribly important - 720p would be fine.
Thanks
Simon

User avatar
Greg Smith
Major contributor
Posts: 1634
Joined: 19 Jun 2008, 12:27
Software used: Spike2 and Signal
1401 type: Many 1401 types
Location: Cambridge, England
Contact:

Re: Spike 2 Video Recorder problems

Unread postby Greg Smith » 23 Feb 2021, 16:08

I have no experience with higher-frame rate cameras... I have asked Simon Gray to comment as I have a memory of him mentioning a user who had used a high-speed video camera. There will likely be bandwidth limitations as frame rates and resolutions increase.
Greg Smith Cambridge Electronic Design

User avatar
Greg Smith
Major contributor
Posts: 1634
Joined: 19 Jun 2008, 12:27
Software used: Spike2 and Signal
1401 type: Many 1401 types
Location: Cambridge, England
Contact:

Re: Spike 2 Video Recorder problems

Unread postby Greg Smith » 24 Feb 2021, 17:39

On reflection, I am surprised that you got the same error message with the latest version of s2video. This leads me to ask: "are you sure you were running the latest version and not the old one, by mistake?" If you have a short-cut set it is very easy to run the wrong version, I only ask as I have done this.... Please check The Help->About S2video to see which version you have. I think it should be 2.03.

Also, can you send me the full text of the error message (you can copy and paste some of it), and check if clicking Next in the error message box generates further, different messages.
Greg Smith Cambridge Electronic Design

Simon_McMullan
Posts: 8
Joined: 10 Sep 2009, 09:21
Software used: Spike2
1401 type: Power1401 mk II
Location: Sydney, Australia
Contact:

Re: Spike 2 Video Recorder problems

Unread postby Simon_McMullan » 02 Mar 2021, 05:52

Hi Greg
Thanks for your thoughful comments: we've made some progress.
1. We checked the S2video version - it's 2.03 :?
2. We followed up your suggestion to connect our camera to the Enhanced Video Renderer (EVR) in GraphStudio. Excellent idea!

As you predicted, linking our camera directly to the EVR returned the same error as Spike (inability to find a compatible combination of intermediate filters). However, after some probing with ffmpeg and DirectShow, we found that our camera was returning unencoded raw data, leading us to suspect that the EVR cannot handle the raw video format. To investigate if this is the case we added a raw video filter between the video source and EVR in GraphStudio, which rectified the problem (in GraphStudio at least).

Unfortunately we cannot change the camera output to stream in an acceptable video format, which is frustrating, but were wondering if it be possible to manually add a raw video filter into Spike2Video instead?

User avatar
Greg Smith
Major contributor
Posts: 1634
Joined: 19 Jun 2008, 12:27
Software used: Spike2 and Signal
1401 type: Many 1401 types
Location: Cambridge, England
Contact:

Re: Spike 2 Video Recorder problems

Unread postby Greg Smith » 03 Mar 2021, 14:41

Please connect it with graphdtudionext, then use the the File menu Save option and send me all the files that it generates.There should be 4 files with the extensions: grf, grfx, png and txt. With any luck these will have enough information for me to figure out what to do to detect this case and attempt to make s2video work.

I can have a shot at this without the actual device, but the only way to be sure is to borrow it... sounds a bit expensive to buy on the off-chance...
Greg Smith Cambridge Electronic Design


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest