However, globbing is not available on Windows. If you want to make videos from image sequences not made by mapmate, they will also commonly follow this convention, but not always, in which case you will have to rename your files.Īn alternative and often convenient way to provide a general pattern for matching to a set of input files is with globbing. Any image sequences generated by mapmate will follow this kind of file naming convention. If using Windows, you must use this approach. In this example, %04d represents the file numbering 0000, 0001, 0002. The pattern used indicates how may places are occupied by the file indices, which should be constant. Which requires specifying the entire, non-changing file name with the only substitution being for the unique, order, consecutive integer file numbering component of the file name. Input FilesĪ common way to specify a set of input image files when using FFmpeg directy is to provide something like myimages%04d.png, When external solutions exist, it does not make sense to port the solution to every problem into R.įuture package versions may provide more and more functionality and control over video production directly from R through ffmpeg or other functions,īut at this time this should not be a primary development goal for mapmate. There always comes a point where it makes the most sense to transition from one application to another. If you are not an FFmpeg expert, use other video editing software. If you are an FFmpeg expert, you don't need to use ffmpeg at all (but perhaps consider helping to improve this code!). To crop and pan and rotate, to apply effects and transitions and every other form of video processing to your image sequences finish the production outside of R, because that is what makes sense. Ultimately, if you want an incredibly fancy video, do not rely on ffmpeg to splice and merge and overlay and juxtapose all your layers together, That mapmate aims to avoid entangling itself with for the convenience of generating relatively basic video output directly from an R session.
#Ffmpeg command line examples full
The goal that mapmate attempts to fulfill is strictly that of animation pre-production and it does so by focusing on the generation of still image sequences.Īny animation is expected to be done later by the user via software dedicated to video editing and production.įfmpeg is provided in mapmate as an exception to the rule for users who wish to trade the full control and flexibility over video editing and production See packages like animation if that is more the goal. Keep in mind that the purpose of mapmate is not to generate animations directly from R. While additional uses may be incorporated into ffmpeg in future, the FFmpeg multimedia framework itself provides a far broader suite of tools and functionality than is needed here. Since this function is provided in the context of the mapmate package, it is aimed at assisting with converting still image sequences to video. The ffmpeg R function is primarily useful to users not well versed in the use of the FFmpeg multimedia framework who will be satisfied with the level of flexibility provided. It translates arguments provided by the user in familiar R syntax into a system call to the ffmpeg command line tool, which must be installed on the system.įfmpeg does not provide complete flexibility to allow making every possible valid call to FFmpeg,īut users who are that well versed in the use of FFmpeg can use the command line utility directly or pass their custom calls directly to system from within R. Detailsįfmpeg is a wrapper function around the popular FFmpeg command line multimedia framework. Returns the system call to FFmpeg as a character string. Logical, whether to show FFmpeg output on the R console.