to_mp4 | R Documentation |
Render slides as an MP4 video file. The function renders to the pdf, converts each slide in the pdf to a png, and then converts the deck of png files to a MP4 video file.
to_mp4( from, to = NULL, density = 100, slides = "all", fps = 1, complex_slides = FALSE, partial_slides = FALSE, delay = 1, keep_intermediates = FALSE )
from |
Path to an |
to |
Name of the output |
density |
Resolution of the resulting PNGs in each slide file. Defaults
to |
slides |
A numeric or integer vector of the slide number(s) to include
in the mp4, or one of |
fps |
Frames per second of the resulting |
complex_slides |
For "complex" slides (e.g. slides with panelsets or
other html widgets or advanced features), set |
partial_slides |
Should partial (continuation) slides be included in the
output? If |
delay |
Seconds of delay between advancing to and printing a new slide.
Only used if |
keep_intermediates |
Should we keep the intermediate files used to
render the final output? The default is |
Slides are rendered as an .mp4
file.
with_example("slides.Rmd", requires_chrome = TRUE, requires_packages = "av", { # Render mp4 from Rmd, html, pdf, or direct URL to_mp4("slides.Rmd") })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.