Learn R Programming

ndtv (version 0.13.4)

install.ffmpeg: Instructions for installing ffmpeg on various platforms

Description

The animation package uses ffmpeg to export movies into video formats. This internal function doesn't actually install the ffmpeg library, it just gives instructions on how to do the installation -- which really just point to these docs.

Usage

install.ffmpeg()

Arguments

Value

On winddows: Will open a web browser window to the ffmpeg website and give instructions how to open this help file.

Details

Here are some all-too-brief instructions for the various platforms. After you have installed FFmpeg on your system, you can verify that R knows where to find it by typing Sys.which('ffmpeg') in the R terminal. You many need to first restart R after the install.

Installing in Windows

  • Download the recent 'static' build from https://ffmpeg.org/download.html

  • Downloads are compressed with 7zip, so you may need to first install a 7zip decompression program before you can unpack the installer.

  • Decompress the package and store contents on your computer (probably in Program Files)

  • Edit your system path variable to include the path to the directory containing ffmpeg.exe

Installing on a Mac

  • Download most recent build from https://www.evermeet.cx/ffmpeg/

  • The binary files are compressed with 7zip so may need to install an unarchiving utility: https://theunarchiver.com/

  • Copy ffmpeg to /usr/local/bin/ffmpeg

Installing in Linux/Unix (ffmpeg or avconv)

  • FFmpeg is a standard package on many linux systems. You can check if it is installed with a command like dpkg -s ffmpeg. If it is not installed, you should be able to install with your system's package manager. i.e. sudo apt-get install ffmpeg or search 'ffmpeg' in the Software Center on Ubuntu.

  • Ubuntu and Debian systems may use an alternate program named "avconv" which can be installed with sudo apt-get install libav-tools or by searching 'libav-tools' in Ubuntu's Software Center. Verify that R knows where to find it by typing `Sys.which('avconv')` in the R terminal. You many need to first restart R after the install. The animation library should automatically use 'avconv' if it sees it instead of 'ffmpeg'. If it doesn't, you can tell it to by typing ani.options(ffmpeg='avconv') in your R session

References

https://ffmpeg.org