cfg = [];

cfg.InstitutionName             = 'Radboud University';
cfg.InstitutionalDepartmentName = 'Donders Institute for Brain, Cognition and Behaviour';
cfg.InstitutionAddress          = 'Kapittelweg 29, 6525 EN, Nijmegen, The Netherlands';

% this is required for dataset_description.json
cfg.dataset_description.Name                = 'Video example';
cfg.dataset_description.BIDSVersion         = 'unofficial extension';

% this is optional for dataset_description.json
cfg.dataset_description.License             = 'n/a';
cfg.dataset_description.Authors             = 'n/a';
cfg.dataset_description.Acknowledgements    = 'n/a';
cfg.dataset_description.Funding             = 'n/a';
cfg.dataset_description.ReferencesAndLinks  = 'n/a';
cfg.dataset_description.DatasetDOI          = 'n/a';

% provide some metadata about the task that was performed
cfg.TaskDescription = 'The subject was walking, stopping, turning, etcetera, while wearing a mobile EEG system on his head and a mobile NIRS system in his pocket';

cfg.method    = 'copy'; % video should simply be copied, not converted
cfg.dataset   = './original/Video_20190411_210224.mp4';
cfg.bidsroot  = './bids';
cfg.datatype  = 'video';
cfg.sub       = '01';
cfg.task      = 'walking';

% construct an empty table that has the required columns 'onset' and 'duration' (in seconds)
% this uses the optional 'trial_type' column to indicate what happened
onset      = nan;
duration   = nan;
trial_type = {''};
cfg.events = table(onset, duration, trial_type);

% add the actual  events with onset, duration and trial_type
cfg.events(1,:) = {12, 2, 'standing up'};
cfg.events(2,:) = {15, 11, 'walking'};
cfg.events(3,:) = {26, 3, 'right turn'};
cfg.events(4,:) = {29, 10, 'walking'};

data2bids(cfg);

