| has_encoder | R Documentation |
FFmpeg builds differ in the encoders they were compiled with. A build without
libx264 refuses every call that names it, and some Linux
distributions ship exactly that build, because x264 is not free software.
This function answers whether one encoder is in the build this package
resolves. You can then name another encoder, or skip the work, before you
run anything.
has_encoder(name)
name |
A string naming one encoder, spelled as
|
The answer comes from the list ffmpeg_encoders returns. The
list is asked of FFmpeg once per session and then remembered, so a repeated
call does not start FFmpeg again. refresh_ffmpeg_capabilities
makes the next call ask again.
The tidymedia.hardware_encoders option does not change this answer.
That option names the hardware encoders of the machine, and this question is
about the whole build. Use has_hardware_encoder for the GPU
backends.
Where the package finds no FFmpeg at all, the answer is FALSE: nothing
can be encoded, so no encoder is available. A location you saved with
set_ffmpeg that no longer works still gives its warning beside
the FALSE. So a machine you can repair is never reported silently as a
build without the encoder.
A single TRUE or FALSE.
ffmpeg_encoders for the whole list,
has_hardware_encoder for the GPU backends, and
refresh_ffmpeg_capabilities to make the next call ask FFmpeg
again.
Other capability functions:
ffmpeg_codecs(),
ffmpeg_encoders(),
hardware_encoder(),
refresh_ffmpeg_capabilities()
has_encoder("libx264")
has_encoder("no_such_encoder")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.