Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ffmpeg error with divisibility #9

Open
muschellij2 opened this issue Apr 3, 2018 · 0 comments
Open

Ffmpeg error with divisibility #9

muschellij2 opened this issue Apr 3, 2018 · 0 comments

Comments

@muschellij2
Copy link
Contributor

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

img00
img01
script.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant