File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -431,7 +431,7 @@ dev.off()
431431tic()
432432steps <- paths $ timestep
433433routine <- " forward-filter"
434- # routine <- "smoother"
434+ routine <- " smoother"
435435if (routine == " forward-filter" ) {
436436 s <- pff_imperfect $ states [timestep %in% steps , ]
437437}
@@ -465,13 +465,23 @@ pf_plot_xy(.map = map_ani,
465465pbapply :: pboptions(pbo )
466466toc()
467467
468- # ### Make animation (~6 mins)
468+ # ### Make full animation (~6 mins)
469469tic()
470470input <- file_list(frames )
471471output <- file.path(dirname(frames ), " ani.mp4" )
472472av :: av_encode_video(input , output , framerate = 1000 )
473473toc()
474474
475+ # ### Make subsampled animation (~40 s)
476+ # A slower framerate with fewer frames is better in pptx
477+ tic()
478+ input <- file_list(frames )
479+ input <- input [seq(1 , length(input ), by = 10 )]
480+ output <- file.path(dirname(frames ), " ani-subsample-fs=25.mp4" )
481+ length(input )
482+ av :: av_encode_video(input , output , framerate = 25 )
483+ toc()
484+
475485
476486# ### End of code.
477487# ########################
You can’t perform that action at this time.
0 commit comments