if (FALSE) {
# Example OpenPose data
data <- data.frame(
frame = rep(1:10, each = 2),
person = rep(c("left", "right"), times = 10),
x0 = runif(20, 0, 1920), y0 = runif(20, 0, 1080),
x1 = runif(20, 0, 1920), y1 = runif(20, 0, 1080)
)
# Output file path
output_file <- tempfile("output_video", fileext = ".mp4")
# Generate video
op_animate_dyad(
data = data,
output_file = output_file,
fps = 24,
left_color = "blue",
right_color = "red"
)
}
Run the code above in your browser using DataLab