problem trying to write BrainVision format file

Working with OpenViBE signal processing scenarios and doing scenario/BCI design
Post Reply
KJeffrey
Posts: 74
Joined: Wed Jul 20, 2022 6:47 pm

problem trying to write BrainVision format file

Post by KJeffrey »

I made a scenario with a Generic stream reader and a BrainVision Format File Writer. The input file was set to D:/downloads/OpenViBE/simple-sinus.ov and the output file to OV_to_BV.vhdr.
When I ran the scenario there were no warnings or errors, and yet it did not create the output file anywhere. I assume it should have gone to the same folder the input file was in. I searched the entire disk and did not find it.

Ideas to troubleshoot this?
-Jeff

Thomas
Posts: 210
Joined: Wed Mar 04, 2020 3:38 pm

Re: problem trying to write BrainVision format file

Post by Thomas »

Hi Jeff,

What version of OpenViBE are you using ?

In order to understand if the problem comes from the location, or the actual writing, I would set the output file in the BrainVisionWriter box to a full path file. This way you will know it's a box issue if the file doesn't appear where you want to.

Actually, I am surprised it worked for you without any path. The box actually tries to detect and create the parent path, which fails (and logs errors) if there is none.

Let us know how you get on.

Cheers,
Thomas

KJeffrey
Posts: 74
Joined: Wed Jul 20, 2022 6:47 pm

Re: problem trying to write BrainVision format file

Post by KJeffrey »

Hi Thomas,

I have BrnVis 3.5.0

I will try your suggestion and get back to you.

No one replied to my earlier post about importing BrnVis format files. Could you take a look at it please?

viewtopic.php?f=17&t=10329

Thanks,
-Jeff

KJeffrey
Posts: 74
Joined: Wed Jul 20, 2022 6:47 pm

Re: problem trying to write BrainVision format file

Post by KJeffrey »

Thomas,

I set the output filename to D:/Research/OpenViBE/OV_to_BV.vhdr
That did not do anything different. gave a warnin that one of more errors occurred, but is lists o warnings and 0 Errors. When I click on View Messages nothing comes up.

No file was created in the intended folder.

-Jeff

Thomas
Posts: 210
Joined: Wed Mar 04, 2020 3:38 pm

Re: problem trying to write BrainVision format file

Post by Thomas »

Hi Jeff,

I guess you meant OpenViBE 3.5.0 ?

It's difficult to understand what goes wrong exactly and I did not manage to reproduce the issue you are facing.

Could you share your scenario, and simple-sinus.ov file so that I can try reproducing the issue ?

Thank you,

Thomas

KJeffrey
Posts: 74
Joined: Wed Jul 20, 2022 6:47 pm

Re: problem trying to write BrainVision format file

Post by KJeffrey »

Yes, OpenViBE 3.5.0.

Here is the scenario. The OV file was too big to attach. It is just one that got downloaded with a tutorial. I assume you can find it: simple-sinus.ov. Or any other OV file on your website that I could download.

Thanks,
-Jeff
Attachments
readOV_write_BV.xml
(5.25 KiB) Downloaded 114 times

Thomas
Posts: 210
Joined: Wed Mar 04, 2020 3:38 pm

Re: problem trying to write BrainVision format file

Post by Thomas »

Hi,

This is puzzling! The scenario is very simple, and I have tried it on two different machine with OpenViBE 3.5.0 and the vhdr files are generated as expected.

I'm short of ideas without seeing more. If you don't manage to get it working, you can drop me an email (http://openvibe.inria.fr/contact/), and we can setup a short call with screen sharing maybe ?

All the best,
Thomas

KJeffrey
Posts: 74
Joined: Wed Jul 20, 2022 6:47 pm

Re: problem trying to write BrainVision format file

Post by KJeffrey »

HI,

I tried the link to your email but I could not get it to work. It takes me to the contact webpage, but nothing I click allows me to send an email.

Please email me at jeriksen@downeurobiology.org to arrange a time.

-Jeff

KJeffrey
Posts: 74
Joined: Wed Jul 20, 2022 6:47 pm

Re: problem trying to write BrainVision format file

Post by KJeffrey »

Also, please look at my last Question posted here:
viewtopic.php?f=17&t=10329
-Jeff

KJeffrey
Posts: 74
Joined: Wed Jul 20, 2022 6:47 pm

Re: problem trying to write BrainVision format file

Post by KJeffrey »

Hi Thomas,

You solved the simple problem, but now I ran into another. I am writing to a specific folder now on the D: drive, and when I hit the Run button it starts to write data to a file, but never stops. I had to manually stop it after several minutes. Should it not stop on its own and close the file? I tried it three times for 1, 2, and 5 minutes, and after stopping it the EEG file was the same length no matter how long I had let it run.

After substituting the actual filename for [$b] I tried to import it into EEGlab using its function pop_loadbv, but got an error message about an output argument "CONV", which is probably nothing you have any awareness of. I do not have BrainVision Analyzer, so EEGlab is the only way we have to open and view BrainVision EEG data.

-Jeff

Thomas
Posts: 210
Joined: Wed Mar 04, 2020 3:38 pm

Re: problem trying to write BrainVision format file

Post by Thomas »

Hi Jeff,

Yes, the File Reader box does not stop the scenario, however, once it has reached the end of the file it's reading, it just stops sending data to the file writer. If the file is 1 minute long, you may stop the scenario after 5 minutes, the written file contains the same data as the input file, and is therefore 1 minute long too.

There is a way to make the scenario stop automatically though, using two more boxes:
  • Timeout box:
    • Input: connected to FileReader box signal output
    • Parameters:
      • Timeout Delay: 1
      • Output Stimulation: Leave as it is
  • Player Controller:
    • input: connected to Timeout Box stimulation output
    • Parameters:
      • Stimulation Name: Same as the stimulation selected in Timeout box
      • Action to perform: Stop
This way, when the FileReader box stops outputting signal, the Timeout box will trigger a stimulation that will tell the player controller box to stop the scenario.

Hope this helps,
Thomas

Post Reply