#8518 closed enhancement (fixed)

Can not handle 96 kHz files for converting, stereo or 6 channel files

Reported by: ackbc Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: ac3 eac3
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

stereo and 6 channel files all got error.. there're samples for testing, even trying to output common 640k ac3 got error, seems to be a general problem (96 khz sources), despite different target formats, unrelates to output bitrate setting.
thanks..

How to reproduce:

ffmpeg -i stereo.96khz.crash.flac  -c:a eac3 -b:a 960k 333333.eac3
ffmpeg version git-2020-02-06-343ccfc Copyright (c) 2000-2020 the FFmpeg develop
ers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcode
c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 -
-enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 39.100 / 56. 39.100
  libavcodec     58. 68.100 / 58. 68.100
  libavformat    58. 38.100 / 58. 38.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 74.100 /  7. 74.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, flac, from 'stereo.96khz.crash.flac':
  Metadata:
    VALID_BITS      : 24
    HDCD            : 0
  Duration: 01:55:26.80, start: 5.034667, bitrate: 0 kb/s
    Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit)
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> eac3 (native))
Press [q] to stop, [?] for help
[eac3 @ 000000000045cc80] invalid sample rate
Error initializing output stream 0:0 -- Error while opening encoder for output s
tream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
ffmpeg -i 5.1ch.96khz.crash.dts  -c:a eac3 -b:a 960k 333333.eac3
ffmpeg version git-2020-02-06-343ccfc Copyright (c) 2000-2020 the FFmpeg develop
ers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcode
c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 -
-enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 39.100 / 56. 39.100
  libavcodec     58. 68.100 / 58. 68.100
  libavformat    58. 38.100 / 58. 38.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 74.100 /  7. 74.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, dts, from '5.1ch.96khz.crash.dts':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Audio: dts (DTS-HD MA), 96000 Hz, 5.1(side), s32p (24 bit)
Stream mapping:
  Stream #0:0 -> #0:0 (dts (dca) -> eac3 (native))
Press [q] to stop, [?] for help
[eac3 @ 0000000000144a00] invalid sample rate
Error initializing output stream 0:0 -- Error while opening encoder for output s
tream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
ffmpeg -i 5.1ch.96khz.crash.flac  -c:a eac3 -b:a 960k 333333.eac3
ffmpeg version git-2020-02-06-343ccfc Copyright (c) 2000-2020 the FFmpeg develop
ers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcode
c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 -
-enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 39.100 / 56. 39.100
  libavcodec     58. 68.100 / 58. 68.100
  libavformat    58. 38.100 / 58. 38.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 74.100 /  7. 74.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, flac, from '5.1ch.96khz.crash.flac':
  Metadata:
    VALID_BITS      : 00
    HDCD            : 0
  Duration: 00:00:01.51, start: 0.000000, bitrate: 4601 kb/s
    Stream #0:0: Audio: flac, 96000 Hz, 5.1(side), s32 (24 bit)
File '333333.eac3' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> eac3 (native))
Press [q] to stop, [?] for help
[eac3 @ 0000000000520540] invalid sample rate
Error initializing output stream 0:0 -- Error while opening encoder for output s
tream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

ffmpeg -i 5.1ch.96khz.crash.flac  -c:a dts -strict -2 -ar 96k 333333.dts
ffmpeg version git-2020-02-06-343ccfc Copyright (c) 2000-2020 the FFmpeg develop
ers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcode
c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 -
-enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 39.100 / 56. 39.100
  libavcodec     58. 68.100 / 58. 68.100
  libavformat    58. 38.100 / 58. 38.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 74.100 /  7. 74.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, flac, from '5.1ch.96khz.crash.flac':
  Metadata:
    VALID_BITS      : 00
    HDCD            : 0
  Duration: 00:00:01.51, start: 0.000000, bitrate: 4601 kb/s
    Stream #0:0: Audio: flac, 96000 Hz, 5.1(side), s32 (24 bit)
File '333333.dts' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> dts (dca))
Press [q] to stop, [?] for help
[dca @ 0000000000460640] Specified sample rate 96000 is not supported
Error initializing output stream 0:0 -- Error while opening encoder for output s
tream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
ffmpeg -i stereo.96khz.crash.flac  -c:a eac3 -b:a 640k 333333.dts.eac3
ffmpeg version git-2020-02-06-343ccfc Copyright (c) 2000-2020 the FFmpeg develop
ers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcode
c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 -
-enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 39.100 / 56. 39.100
  libavcodec     58. 68.100 / 58. 68.100
  libavformat    58. 38.100 / 58. 38.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 74.100 /  7. 74.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, flac, from 'stereo.96khz.crash.flac':
  Metadata:
    VALID_BITS      : 24
    HDCD            : 0
  Duration: 01:55:26.80, start: 5.034667, bitrate: 0 kb/s
    Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit)
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> eac3 (native))
Press [q] to stop, [?] for help
[eac3 @ 00000000005fcc80] invalid sample rate
Error initializing output stream 0:0 -- Error while opening encoder for output s
tream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
ffmpeg -i stereo.96khz.crash.flac  -c:a ac3 -b:a 640k 333333.ac3
ffmpeg version git-2020-02-06-343ccfc Copyright (c) 2000-2020 the FFmpeg develop
ers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcode
c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 -
-enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 39.100 / 56. 39.100
  libavcodec     58. 68.100 / 58. 68.100
  libavformat    58. 38.100 / 58. 38.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 74.100 /  7. 74.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, flac, from 'stereo.96khz.crash.flac':
  Metadata:
    VALID_BITS      : 24
    HDCD            : 0
  Duration: 01:55:26.80, start: 5.034667, bitrate: 0 kb/s
    Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit)
Stream mapping:
  Stream #0:0 -> #0:0 (flac (native) -> ac3 (native))
Press [q] to stop, [?] for help
[ac3 @ 000000000032cc80] invalid sample rate
Error initializing output stream 0:0 -- Error while opening encoder for output s
tream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

Attachments (3)

stereo.96khz.crash.flac (336.6 KB ) - added by ackbc 22 months ago.
5.1ch.96khz.crash.dts (969.9 KB ) - added by ackbc 22 months ago.
5.1ch.96khz.crash.flac (850.7 KB ) - added by ackbc 22 months ago.

Change History (6)

by ackbc, 22 months ago

Attachment: stereo.96khz.crash.flac added

by ackbc, 22 months ago

Attachment: 5.1ch.96khz.crash.dts added

by ackbc, 22 months ago

Attachment: 5.1ch.96khz.crash.flac added

comment:1 by Carl Eugen Hoyos, 22 months ago

Component: undeterminedavcodec
Keywords: dts sample rate ac3 removed
Priority: normalwish
Type: defectenhancement

https://en.wikipedia.org/wiki/Dolby_Digital_Plus claims that your request is invalid, why do you think it is a valid request?

comment:3 by Carl Eugen Hoyos, 20 months ago

Keywords: ac3 added
Resolution: fixed
Status: openclosed

For (e)ac3, this is improved since 4679a474f06c229b10976d7f0b4eee0613c2715a

Note: See TracTickets for help on using tickets.