I am trying to use external ffmpeg.exe to convert list of image files into mp4
a = Table[Plot[Sin[ω t], {t, 0, 10}, PlotRange -> {-1, 1}, ImageMargins -> .4],
{ω, .1, 2, .1}];
Export["movie01.png", a, "VideoFrames"];
Run["ffmpeg -f image2 -framerate 12 -i movie%02d.png -c:v libx264 movie.mp4"]
But the conversion is not done. If I run the exactly same ffmpeg code in windows CMD, it works. What is wrong with the above Run command?
solution
It turns out that after adding new exe to the windows environment(in this case, ffmpeg.exe), we have to restart mathematica, or this new exe will not be recognized by mathematica.
Exportand as "movie%02d.png" inRun? – m_goldberg Nov 15 '15 at 23:02Run["del file"]operate in the right directory. BTW, command likeRun["ffmpeg -i movie.mov -c:v libx264 goo.mp4"]will convert correctly. – matheorem Nov 16 '15 at 00:41Import["!node -p console.log('test')", "Text"]you get a similar non response. You could probably work around this with Java. – William Nov 16 '15 at 01:07Runargument in the correct form. – Alexey Popkov Nov 16 '15 at 12:46