Re: Design to read a list of recording files in a directory
Posted: Fri May 29, 2015 9:08 am
Hi, unfortunately it doesn't seem to be very easy to do what you need, without doing some C++ coding.
However, maybe you could do it with a shell script. Make a 'concat.xml' scenario that reads ${FILE1} and ${FILE2} and
catenates them to output2.ov. Then you make a loop in a shell e.g. bash or win cmd, something like this
(its bash-like pseudocode)
or, you could call designer from Python (with a similar loop). It'll be very slow as the same data is processed many times, but I guess its better than nothing.
An alternative would be to generate the scenario itself automatically that would have readers for n files. By studying the structure of the OpenViBE
scenario xml, the generation could be possible to do with python, but would take a little effort to code.
Happy hacking,
Jussi
However, maybe you could do it with a shell script. Make a 'concat.xml' scenario that reads ${FILE1} and ${FILE2} and
catenates them to output2.ov. Then you make a loop in a shell e.g. bash or win cmd, something like this
(its bash-like pseudocode)
Code: Select all
cp firstfile.ov tmp.ov
for(thisfile in list of files except the first file) do
openvibe-designer concat.xml --define FILE1 tmp.ov --define FILE2 thisfile --play-fast
mv output2.ov tmp.ov
end
An alternative would be to generate the scenario itself automatically that would have readers for n files. By studying the structure of the OpenViBE
scenario xml, the generation could be possible to do with python, but would take a little effort to code.
Happy hacking,
Jussi