Run idPlayer from MATLAB console

117 views
Skip to first unread message

cc...@cornell.edu

unread,
Oct 16, 2017, 12:17:08 PM10/16/17
to idTracker/idSocial users
Is there a way to run idPlayer directly from the MATLAB console? I have recently been having trouble with exteremely slow speeds when attempting to correct the trajectories_nogaps file using idPlayer.exe. I am not sure whether running idPlayer directly from MATLAB will faster or not, but I thought it would be worth a try. 

My videos are shot in 1080p and are approximately 1hr long. 

Thanks!
Caleb

Alfonso Pérez Escudero

unread,
Oct 16, 2017, 12:40:21 PM10/16/17
to idTracker/idSocial users
Hi!

Yes, here is how:

- Load the datosegm.mat file of the video you want to watch (it is in the segm subfolder that you will find in the same folder as the video once the tracking has finished).
- In Matlab, execute datosegm2muestravideo_nuevo(variable)

idPlayer should launch.

Sorry for the uninformative name of this function.

About the speed: Matlab can be very slow opening certain formats, and it can get slower as the video progresses further. I think it happens because it does not keep a memory of the last opened frame, so when the video codec compresses the information making a difference with the last frame, Matlab needs to read all frames from the beginning of the video to open any one frame in the middle. It can improve massively by transforming the video to a different format.

I hope this helps!

Alfonso

cc...@cornell.edu

unread,
Oct 16, 2017, 2:08:27 PM10/16/17
to idTracker/idSocial users
Thanks Alfonso, this works! However, the play speed within idplayer is still very slow. 

Do you have a recommendation for a particular codec/file format? Typically my workflow has been to convert the original .avi file from the camera (which idtracker for some reason cannot process/obtain trajectories) to a .mp4 file format, but running corrections on these videos with idplayer has been painfully slow and inefficient. 

-Caleb 

Alfonso Pérez Escudero

unread,
Oct 16, 2017, 5:28:46 PM10/16/17
to idTracker/idSocial users
This codec business is a bit mysterious for me. Depending on the settings, mp4 videos will work great or will give this type of problem. In particular, when transforming videos with Handbrake I had the problem, but when transforming them with another software called "MTS video converter" or something like that, I did not (even though the parameters were apparently identical). This "MTS video converter" is a commercial software, but if I recollect correctly it was relatively cheap (this was years ago).

So my only advice is to try different formats and stick to the one that works best. Sorry I don´t have anything cleverer to say about this.

al.
Reply all
Reply to author
Forward
0 new messages