/usr/local/bin/ffmpeg -y -pass 2 -passlogfile 'sites/all/files/videos/original/sample_sorenson.mov' -threads 16 -keyint_min 0 -g 250 -skip_threshold 0 -qmin 1 -qmax 51 -i 'sites/all/files/videos/original/sample_sorenson.mov' -vcodec libvpx -b 204800 -s 476x600 -vf "pad=800:600:162:0" -aspect 4:3 -acodec libvorbis -ac 2 -y 'sites/all/files/videos/converted/sample_sorenson.webm' 2>&1

gives error

FFmpeg version git-8f935b9, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 23 2011 17:52:03 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libvpx
libavutil 50. 39. 0 / 50. 39. 0
libavcodec 52.113. 1 / 52.113. 1
libavformat 52.102. 0 / 52.102. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1. 76. 0 / 1. 76. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0

Seems stream 0 codec frame rate differs from container frame rate: 600.00 (600/1) -> 12.00 (12/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sites/all/files/videos/original/sample_sorenson.mov':
Metadata:
creation_time : 2001-02-19 16:45:54
title : QuickTime Sample Movie
title-eng : QuickTime Sample Movie
copyright : © Apple Computer, Inc. 2001
copyright-eng : © Apple Computer, Inc. 2001
Duration: 00:00:05.00, start: 0.000000, bitrate: 131 kb/s
Stream #0.0(eng): Video: svq1, yuv410p, 190x240, 97 kb/s, 12 fps, 12 tbr, 600 tbn, 600 tbc
Metadata:
creation_time : 2001-02-19 16:45:54
Stream #0.1(eng): Audio: qdm2, 22050 Hz, 2 channels, s16, 32 kb/s
Metadata:
creation_time : 2001-02-19 16:45:54
[buffer @ 0x21290e0] w:190 h:240 pixfmt:yuv410p
[scale @ 0x2129450] w:190 h:240 fmt:yuv410p -> w:476 h:600 fmt:yuv420p flags:0xa0000004
[pad @ 0x2129760] w:476 h:600 -> w:800 h:600 x:162 y:0 color:0x108080FF[yuva]
[libvpx @ 0x2105540] v0.9.5-287-g418f421
[libvpx @ 0x2105540] Failed to initialize encoder: Invalid parameter
[libvpx @ 0x2105540] Additional information: rc_twopass_stats_in requires at least two packets.
Output #0, webm, to 'sites/all/files/videos/converted/sample_sorenson.webm':
Stream #0.0(eng): Video: libvpx, yuv420p, 800x600 [PAR 200:119 DAR 800:357], q=1-51, pass 2, 204 kb/s, 90k tbn, 12 tbc
Metadata:
creation_time : 2001-02-19 16:45:54
Stream #0.1(eng): Audio: libvorbis, 22050 Hz, 2 channels, s16, 64 kb/s
Metadata:
creation_time : 2001-02-19 16:45:54
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

any clues welcome

Comments

firebus’s picture

for now, i'm commenting out the two-pass encoding in the preset and using

'!cmd_path -y -i !videofile -threads 8 -f webm -aspect 4:3 -vcodec libvpx -deinterlace -g 120 -level 216 -profile 0 -qmax 42 -qmin 10 -rc_buf_aggressivity 0.95 -vb 2M -acodec libvorbis -aq 90 -ac 2 -s !widthx!height !convertfile'

which i got from http://ubuntuforums.org/showthread.php?t=1522381

hypertext200’s picture

Please post the running command for convert videos?

firebus’s picture

i already posted both the command that caused the error, and the command that i'm now using the workaround it.

what additional command would you like me to post?

deviato’s picture

Had the same issue, the command is the following:
ffmpeg -threads 16 -keyint_min 0 -g 250 -skip_threshold 0 -qmin 1 -qmax 51 -i 'originalvideo.mp4' -vcodec libvpx -b 204800 -s x -acodec libvorbis -ac 2 -y 'convertedvideo.webm'
Seems unable to determine the video dimensions (-s ..x..).

hypertext200’s picture

There are couple of working presets are there for D7 version. You can grab the code from there, those are working solutions http://drupal.org/project/video_presets

jorrit’s picture

Status: Active » Postponed (maintainer needs more info)

Also, try a recent, self-compiled ffmpeg version with recent versions of the associated libraries. Distros like Ubuntu ship (old) versions of ffmpeg that are not linked to all associated libraries. Manuals can be found on the internet. Please let us know if this helps.

jorrit’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)