Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
[libtheora @ 0x1a5c480]theora_encode_init failed
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Comment | File | Size | Author |
---|---|---|---|
#3 | video_theora_framesize-1920798-3.patch | 3.21 KB | iva2k |
Comments
Comment #1
iva2k CreditAttribution: iva2k commentedDigging the net I found this: http://eatmytux.com/convert-to-theora-with-ffmpeg
which says that video size should be multiples of 16 for theora.
Size of the video in question is '640x360'. I copied command line from the error log, tried it on the server's command line to get the same error. Then I changed to "... -s '640x368' ..." (multiples of 16), and the command worked ok.
It looks like for libtheora caller needs to adjust the size to be multiples of 16.
Comment #2
iva2k CreditAttribution: iva2k commentedThis document contains suggestion on how to deal with frame sizes that are not in 16-multiples:
http://www.theora.org/doc/libtheora-1.2/structtheora__info.html
[UPDATED]
e.g. "... -s 640x360 ..." can be adjusted to "... -s 640x360 -padtop 4 -padbottom 4 ..."
I tried that on the same example as in #1 and it also works. Now to the working code patch...
Comment #3
iva2k CreditAttribution: iva2k commentedHere's a patch that fixes the frame size to be multiples of 16x16 for libtheora.
Comment #4
brycefisherfleig CreditAttribution: brycefisherfleig commentedComment #5
heshanlk