jhudsl / ari

:dancers: The Automated R Instructor
https://jhudatascience.org/ari/
Other
146 stars 38 forks source link

Using ffmpeg 5.0.1 ari_stich fails to stich #38

Open jgjuara opened 2 years ago

jgjuara commented 2 years ago

Using ffmpeg 5.0.1 ari_stich fails to stich Images and wav because it uses vsync 2 which is no longer supported as option Instead of vsync 2, when working with version of ffmpeg that doesnt support numbers as parameters should use "vfr" parameter.

Example

when running:

ari_narrate(output = "test.mp4", service = "google",
            cleanup = F, capture_method = "iterative",
            script = "ari_comments.Rmd",
  voice = "en-US-Standard-B")

Console output says:

`"Passing a number to -vsync is deprecated, use a string argument as described in the manual."

And video is created but images and sound are no sync.

I could fix it changing vsync parameter option to "vfr" in source code of ari_stich function beacause it is not a parameter option to pass direct into ari_narrate.

Maybe the solution is just add an video_sync_method parameter to ari_narrate to inject to the ari_stich call.