Making a movie with higher image resolution?
Does anyone have advice on how I might be able to improve the image resolution of an Igor-created movie?
I'm trying to export a movie of an animated plot from Igor into a form that can be played in PowerPoint (see attached pxp), but the resolution of the generated mp4 appears to be significantly lower than the resolution of the initial plots as viewable in Igor.
Right now, my best solution is to simply draw the plots with really big sizes in Igor, but it seems there has to be a better way of doing this. I've played around a little bit with the /CF flag in the NewMovie function, but this doesn't seem to change things much. Here is my movie-making code:
wave tracker
//NewMovie/O/F=10/CF=800
NewMovie/O/F=10/CF=10
variable i
variable/G kk, freq, tt
variable xx
variable v1, v2
xx = 0
tt = 0
for(i=0; i<= 200;i+=1)
xx = i/5 *freq
v1 = cos( 2*pi*(kk*xx - freq*tt))
v2 = sin( 2*pi*(kk*xx - freq*tt))
tracker = xx
DrawLine 0,0,v1,v2
addmovieframe
doupdate
endfor
closemovie
end
Thanks to anyone who may be able to provide advice! I'm working with a MacBook Pro laptop with retina screen.
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More
Hopefully this is not too late for you. I ran into similar issues, both on Macs and PCs, and decided that the solution was to not use Igor to make the movies. Instead, I use Igor to create a series of image files that I then stitched together into a movie using an external program called ffmpeg (https://www.ffmpeg.org/). Making a large number of image files is somewhat cumbersome, but the resulting video files simultaneously had a much higher resolution than the Igor created videos and a smaller file size. I've attached some instructions for using ffmpeg, along with the ipf for an Igor GUI I use to interface with ffmpeg. I've only had time to learn the basics of ffmpeg, so don't take anything I've said as gospel.
October 17, 2019 at 08:43 am - Permalink
I also used the combination of Igor and ffmpeg to produce some animations. It can take a bit of tweaking to find the optimum parameters, but the end result worked well for me.
October 18, 2019 at 04:38 am - Permalink
I will want to make movies as well. I am therefore also curious here. Is the NewMovie operation limited in the resolution of its video output stream?
October 18, 2019 at 06:26 am - Permalink
@KZarzana the GUI for ffmpeg looks very nice.
@jjweimer yes, encoding within Igor did not produce as nice a result. Things may have changed since I last made a movie.
The ffmpeg commands that I have used are slightly different from the commands generated by KZarzana's GUI, so I'll post them here. This is extracted from a 'note to self' that was stored on an old computer, hence the delay in replying to this thread. I think this worked, but offer no guarantees. You may want to investigate the effect of the additional flags and compare with the output from the GUI (and with Igor's encoding). Note that this was executed from a terminal window, and that I had Igor create PNGs rather than JPEGs:
ffmpeg -framerate 60 -i infile%04d.png -tune animation -preset veryslow -crf 18 -pix_fmt yuv420p -c:v libx264 -r 60 outfile.mp4
October 31, 2019 at 03:10 am - Permalink