Open muschellij2 opened 6 years ago
Running
library(ari) library(aws.polly) aws.signature::use_credentials(profile = "polly") files = list.files(pattern = ".png$", full.names = TRUE) files = path.expand(files) para = readLines("script.txt") para = para[ !para %in% ""] ari_spin(paragraphs = para, images = files, output = "joey.mp4", voice = "Joey")
and getting
[libx264 @ 0x7fe0e2811600] height not divisible by 2 (3000x1687) Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
and it seems like you can add -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" to ffmpeg as per https://stackoverflow.com/questions/20847674/ffmpeg-libx264-height-not-divisible-by-2/29582287
-vf "scale=trunc(iw/2)*2:trunc(ih/2)*2"
script.txt
Running
and getting
and it seems like you can add
-vf "scale=trunc(iw/2)*2:trunc(ih/2)*2"
to ffmpeg as per https://stackoverflow.com/questions/20847674/ffmpeg-libx264-height-not-divisible-by-2/29582287script.txt