| ffm_codec | R Documentation |
Set the audio codec, the video codec, or both, for the output file. Use
ffmpeg_codecs() to see a list of the codecs in your FFmpeg version.
The glossary in vignette("tidymedia") explains media terms such as
codec and stream copy.
ffm_codec(object, audio = NULL, video = NULL)
object |
An FFmpeg pipeline ( |
audio |
A string that names the audio codec, or |
video |
A string that names the video codec, or |
object with an added instruction to change the codecs.
https://ffmpeg.org/ffmpeg-codecs.html
ffm_copy(), the shortcut for stream copy, ffmpeg_codecs() to
list the codecs you can use, and standardize_video(), a task function
built on it.
Other pipeline functions:
ffm_batch(),
ffm_compile(),
ffm_concat(),
ffm_copy(),
ffm_crop(),
ffm_drawbox(),
ffm_drop(),
ffm_files(),
ffm_fps(),
ffm_hstack(),
ffm_jobs(),
ffm_loudnorm(),
ffm_map(),
ffm_output_options(),
ffm_overlay(),
ffm_pixel_format(),
ffm_run(),
ffm_scale(),
ffm_seek(),
ffm_trim(),
ffm_vstack(),
print.tidymedia_ffm()
video <- system.file("extdata", "sample.mp4", package = "tidymedia")
ffm_files(video, "output.mp4") |>
ffm_codec(video = "libx264", audio = "aac") |>
ffm_compile()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.