Concatenate videos

547 views
Skip to first unread message

thomas.p...@gmail.com

unread,
Mar 16, 2021, 3:21:46 PM3/16/21
to Miniscope
Hi Daniel,

Is there a program or Matlab/Python code that you use to concatenate the avi files that the miniscope generates? Currently, I record 1000 frames until a new video is saved and I would like to concatenate them into one video. However, I tried ffmpeg as well as VLC player but either I'm losing frames or it doesn't work at all.

Do you have any suggestions how I could do this without frame loss?

Thanks!

Cheers,
Thomas

Antonio Luis Florido

unread,
Mar 16, 2021, 3:28:09 PM3/16/21
to thomas.p...@gmail.com, Miniscope
Hi Thomas,

I typically use the concatenate tool from Fiji. It has been giving me good results.

Antonio Florido

--
You received this message because you are subscribed to the Google Groups "Miniscope" group.
To unsubscribe from this group and stop receiving emails from it, send an email to miniscope+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/miniscope/0bab8d3f-37a8-413f-8683-eacc22f9928fn%40googlegroups.com.

Daniel Aharoni

unread,
Mar 16, 2021, 3:28:34 PM3/16/21
to Miniscope
Hi,
imageJ can do this with compression codecs that are compatible with it. 

You can also check out our Python code here: https://github.com/Aharoni-Lab/Miniscope-v4/tree/master/Miniscope-v4-Denoising-Notebook. It is used to clean up some horizontal row noise in version 4.33 or lower of V4 Miniscope recordings but it is also able to change compression type and resave videos. Take a look at the last cell of this Jupiter Notebook, with some minor changes you can get it to re-save an entire recording into a single .avi file.

Federico Sangiuliano

unread,
Mar 16, 2021, 3:28:38 PM3/16/21
to Miniscope
Hello Thomas. You can use FIJI (or imageJ) to concatenate the videos. Once you load your videos, you can use the following:

fiji.png

Thank you

Federico

On Tuesday, March 16, 2021 at 12:21:46 PM UTC-7 thomas.p...@gmail.com wrote:

thomas.p...@gmail.com

unread,
Mar 16, 2021, 5:09:05 PM3/16/21
to Miniscope
Oh cool!
I didn't know. Thank you very much!

Jason Biundo

unread,
Apr 21, 2021, 11:25:51 AM4/21/21
to Miniscope
Hi Daniel,

Do you have any suggestions for how to alter the code to be able to save entire recording into a single .avi file? I am not familiar with the library you used to save the videos.

Thank you!
Jason 

Daniel Aharoni

unread,
Apr 27, 2021, 3:19:40 PM4/27/21
to Miniscope
Hi Jason,
You should be able to adjust the "framesPerFile" value in the user configuration file to change the number of frames saved per avi file. Make this some very large number and it will result in just a single avi file being saved to.

Reply all
Reply to author
Forward
0 new messages