How to import with ffmpeg in fiji scripting

I’m looking to use a python script to import mp4 files into fiji. I’ve installed the ffmpeg plugin which works fine manually but I’m love to turn it into a script. How would I do the equivalent of file > import > movie (FFMPEG)? Appreciate any help

You can use the macro recorder to get the required command. Just switch it to Javascript mode and use the command in records. As it is calling the Java API of ImageJ, the command is the same for all scripting languages, apart from the trailing semicolon (;) that you can omit in Python/Jython.

1 Like

thanks for the reply! I now have this working, thank you!

Anyone else completely new like me this code may help you:

imp ="Movie (FFMPEG)...", "choose=[] use_virtual_stack first_frame=0 last_frame=-1")
1 Like