Send a raw argument string to the FFmpeg command-line program. This is a direct command. The function passes the string to FFmpeg unchanged, after the path of the FFmpeg program. So you are responsible for the quoting and the order of the options.
Details
If tidymedia cannot find FFmpeg, the call stops with the error "Could not locate FFmpeg." The warning from find_ffmpeg() comes first. A bad argument or a bad tidymedia.timeout option stops the call before the search.
See also
ffmpeg_codecs() and ffmpeg_encoders() ask FFmpeg what it
supports. The ffm_*() pipeline functions, such as
ffm_run(), are a safer way to build a command.
Other direct command functions:
ffprobe(),
mediainfo()
Examples
# A direct command: the function passes the string to FFmpeg unchanged
ffmpeg("-version")
#> [1] "ffmpeg version 8.0.1-3ubuntu2 Copyright (c) 2000-2025 the FFmpeg developers"
#> [2] "built with gcc 15 (Ubuntu 15.2.0-13ubuntu3)"
#> [3] "configuration: --prefix=/usr --extra-version=3ubuntu2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-pocketsphinx --disable-libcaca --disable-libmfx --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libdvdnav --enable-libdvdread --enable-libjack --enable-libjxl --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-librsvg --enable-shared"
#> [4] "libavutil 60. 8.100 / 60. 8.100"
#> [5] "libavcodec 62. 11.100 / 62. 11.100"
#> [6] "libavformat 62. 3.100 / 62. 3.100"
#> [7] "libavdevice 62. 1.100 / 62. 1.100"
#> [8] "libavfilter 11. 4.100 / 11. 4.100"
#> [9] "libswscale 9. 1.100 / 9. 1.100"
#> [10] "libswresample 6. 1.100 / 6. 1.100"
#> [11] ""
#> [12] "Exiting with exit code 0"