Opened 13 years ago

Closed 13 years ago

#849 closed defect (invalid)

libvorbis: problem with odd sample rate

Reported by: ami_stuff Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I don't know if this is regression in ffmpeg or libvorbis, please decide yourself.

C:\>ffmpeg -i 12345.wav -acodec libvorbis out.ogg

ffmpeg version N-32138-g312645e, Copyright (c) 2000-2011 the FFmpeg developers
  built on Aug 28 2011 21:12:09 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil    51. 14. 0 / 51. 14. 0
  libavcodec   53. 12. 0 / 53. 12. 0
  libavformat  53. 10. 0 / 53. 10. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 35. 0 /  2. 35. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[wav @ 01EBA740] parser not found for codec pcm_u8, packets or times may be inva
lid.
Input #0, wav, from '12345.wav':
  Duration: 00:00:05.07, bitrate: 197 kb/s
    Stream #0.0: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 12345 Hz, 2 channels, u8
, 197 kb/s
Incompatible sample format 'u8' for codec 'libvorbis', auto-selecting format 's1
6'
[libvorbis @ 024366C0] oggvorbis_encode_init: init_encoder failed
Output #0, ogg, to 'out.ogg':
    Stream #0.0: Audio: vorbis, 12345 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
  Stream #0.0 -> #0.0: pcm_u8 -> libvorbis
Error while opening encoder for output stream #0.0 - maybe incorrect parameters
such as bit_rate, rate, width or height
C:\>ffmpeg -i 12345.wav -acodec libvorbis out.ogg

ffmpeg version N-32071-g276f43b, Copyright (c) 2000-2011 the FFmpeg developers
  built on Aug 23 2011 11:01:40 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil    51. 13. 0 / 51. 13. 0
  libavcodec   53. 11. 0 / 53. 11. 0
  libavformat  53.  9. 0 / 53.  9. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 34. 2 /  2. 34. 2
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[wav @ 01EBA740] parser not found for codec pcm_u8, packets or times may be inva
lid.
Input #0, wav, from '12345.wav':
  Duration: 00:00:05.07, bitrate: 197 kb/s
    Stream #0.0: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 12345 Hz, 2 channels, u8
, 197 kb/s
Incompatible sample format 'u8' for codec 'libvorbis', auto-selecting format 's1
6'
Output #0, ogg, to 'out.ogg':
  Metadata:
    encoder         : Lavf53.9.0
    Stream #0.0: Audio: vorbis, 12345 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0: pcm_u8 -> libvorbis
Press [q] to stop, [?] for help
size=      45kB time=00:00:05.07 bitrate=  73.2kbits/s
video:0kB audio:42kB global headers:3kB muxing overhead 0.652575%

Attachments (1)

12345.wav (122.3 KB ) - added by ami_stuff 13 years ago.

Download all attachments as: .zip

Change History (2)

by ami_stuff, 13 years ago

Attachment: 12345.wav added

comment:1 by Cigaes, 13 years ago

Component: undeterminedavcodec
Resolution: invalid
Status: newclosed
Version: unspecifiedgit-master
cigaes@hellroy /tmp $ oggenc -b 128 12345.wav
Opening with wav module: WAV file reader
Encoding "12345.wav" to 
         "12345.ogg" 
at approximate bitrate 128 kbps (VBR encoding enabled)
Mode initialisation failed: invalid parameters for bitrate
zsh: exit 1     oggenc -b 128 12345.wav

It works with -b 64: apparently it is a libvorbis limitation, that was brought into evidence when the default bitrate was changed from 64k (quite awful with real audio) to 128k.

And it has nothing to do with the sample rate being odd, just it being to low.

Why would you use fixed bitrate anyway?

OTOH, error reporting from libvorbis is not good at all.

Note: See TracTickets for help on using tickets.