LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   ffmpeg error: converting to Webm (http://www.linuxquestions.org/questions/linux-software-2/ffmpeg-error-converting-to-webm-906631/)

hydraMax 10-05-2011 02:58 PM

ffmpeg error: converting to Webm
 
A few weeks back I wanted to convert a bunch of 3gp videos over to Webm/VP8, and ffmpeg did the job beautifully. Now I'm trying to convert some old MOV (Quicktime) videos over to WebM/VP8, but I'm getting an error for every video I try:

Code:

$ ffmpeg -i 100_0410.MOV out.webm
ffmpeg version 0.7.4, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 22 2011 16:35:03 with gcc 4.4.5
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-network --disable-vaapi --disable-vdpau --enable-libmp3lame --enable-libvo-aacenc --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-indev=v4l --disable-indev=v4l2 --disable-indev=oss --disable-indev=jack --enable-x11grab --disable-outdev=oss --enable-libfreetype --enable-libvpx --disable-altivec --disable-avx --cpu=host --enable-hardcoded-tables
  libavutil    50. 43. 0 / 50. 43. 0
  libavcodec  52.122. 0 / 52.122. 0
  libavformat  52.110. 0 / 52.110. 0
  libavdevice  52.  5. 0 / 52.  5. 0
  libavfilter  1. 80. 0 /  1. 80. 0
  libswscale    0. 14. 1 /  0. 14. 1
  libpostproc  51.  2. 0 / 51.  2. 0

Seems stream 0 codec frame rate differs from container frame rate: 100.00 (100/1) -> 13.01 (57000/4381)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '100_0410.MOV':
  Metadata:
    creation_time  : 2007-12-31 23:12:03
    comment        : EASTMAN KODAK COMPANY  KODAK DX7440 ZOOM DIGITAL CAMERA
    comment-eng    : EASTMAN KODAK COMPANY  KODAK DX7440 ZOOM DIGITAL CAMERA
  Duration: 00:00:08.76, start: 0.000000, bitrate: 1520 kb/s
    Stream #0.0(eng): Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 1422 kb/s, 13.01 fps, 13.01 tbr, 1368k tbn, 100 tbc
    Metadata:
      creation_time  : 2007-12-31 23:12:03
    Stream #0.1(eng): Audio: pcm_mulaw, 12000 Hz, 1 channels, s16, 96 kb/s
    Metadata:
      creation_time  : 2007-12-31 23:12:03
File 'out.webm' already exists. Overwrite ? [y/N] y
[buffer @ 0x629ba0] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[libvpx @ 0x628fd0] v0.9.6
[libvorbis @ 0x6296b0] oggvorbis_encode_init: init_encoder failed
Output #0, webm, to 'out.webm':
    Stream #0.0(eng): Video: libvpx, yuv420p, 640x480 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 13.01 tbc
    Metadata:
      creation_time  : 2007-12-31 23:12:03
    Stream #0.1(eng): Audio: libvorbis, 12000 Hz, 1 channels, s16, 64 kb/s
    Metadata:
      creation_time  : 2007-12-31 23:12:03
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

To be honest, I'm not sure to what these settings need to be adjusted, if indeed they do. Does anyone have any insight?

By the way, ffmpeg allows me to convert the Quicktime videos to MPEG4 without any errors. But then the same error occurs when I try to convert from MPEG4 to WebM/VP8. Furthermore, I can view the videos fine in VLC, in Quicktime or in MPEG4 format, so it seems that the videos themselves are not damaged.

macemoneta 10-05-2011 04:07 PM

The problem is the audio bit rate (12000) is unsupported by the codec. Specify 22050 or 44100:
Code:

ffmpeg -i 100_0410.MOV -ar 22050 out.webm

hydraMax 10-05-2011 05:12 PM

Quote:

Originally Posted by macemoneta (Post 4491052)
The problem is the audio bit rate (12000) is unsupported by the codec. Specify 22050 or 44100:
Code:

ffmpeg -i 100_0410.MOV -ar 22050 out.webm

Works great! Your awesome. Thanks!

How'd you know that? :scratch:

macemoneta 10-05-2011 05:47 PM

Quote:

Originally Posted by hydraMax (Post 4491082)
How'd you know that? :scratch:

The message said that the output stream #0.1 (the audio) may have an incorrect parameter, such as the bit rate... So I tried encoding a webm video, forcing the bit rate to 12000 to match your case and got the same error. I tried the typical 22050 and 44100 bit rates and they worked.


All times are GMT -5. The time now is 07:25 PM.