[FFmpeg-trac] #9420(avdevice:closed): DirectShow (dshow) audio input limited to 44.1 kHz / 16-bit

FFmpeg trac at avcodec.org
Fri Sep 24 09:41:08 EEST 2021


#9420: DirectShow (dshow) audio input limited to 44.1 kHz / 16-bit
-------------------------------------+-------------------------------------
             Reporter:  Brad Isbell  |                    Owner:  (none)
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:  avdevice
              Version:  git-master   |               Resolution:  invalid
             Keywords:  dshow        |               Blocked By:
  directshow audio                   |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by Brad Isbell):

 Replying to [comment:9 Elon Musk]:
 > You get same error because input options must be before -f dshow.

 This is not correct.  The options just need to be before `-i`.

 Please see this demonstration with a 22.05 kHz sample rate, which works
 with either ordering:


 {{{
 ffmpeg -v 9 -loglevel 99 -f dshow -sample_rate 22050 -i audio="DVS Receive
 7-8 (Dante Virtual Soundcard)"
 ffmpeg version 2021-09-22-git-447cf53774-essentials_build-www.gyan.dev
 Copyright (c) 2000-2021 the FFmpeg developers
   built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static --disable-
 w32threads --disable-autodetect --enable-fontconfig --enable-iconv
 --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib
 --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth
 --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-
 libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-
 libass --enable-libfreetype --enable-libfribidi --enable-libvidstab
 --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm
 --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-
 d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt
 --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora
 --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb
 --enable-libopus --enable-libspeex --enable-libvorbis --enable-
 librubberband
   libavutil      57.  6.100 / 57.  6.100
   libavcodec     59.  9.100 / 59.  9.100
   libavformat    59.  5.100 / 59.  5.100
   libavdevice    59.  0.101 / 59.  0.101
   libavfilter     8.  9.100 /  8.  9.100
   libswscale      6.  1.100 /  6.  1.100
   libswresample   4.  0.100 /  4.  0.100
   libpostproc    56.  0.100 / 56.  0.100
 Splitting the commandline.
 Reading option '-v' ... matched as option 'v' (set logging level) with
 argument '9'.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument '99'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'dshow'.
 Reading option '-sample_rate' ... matched as AVOption 'sample_rate' with
 argument '22050'.
 Reading option '-i' ... matched as input url with argument 'audio=DVS
 Receive  7-8 (Dante Virtual Soundcard)'.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option v (set logging level) with argument 9.
 Successfully parsed a group of options.
 Parsing a group of options: input url audio=DVS Receive  7-8 (Dante
 Virtual Soundcard).
 Applying option f (force format) with argument dshow.
 Successfully parsed a group of options.
 Opening an input file: audio=DVS Receive  7-8 (Dante Virtual Soundcard).
 [dshow @ 000001ce02dcd880] Selecting pin Capture on audio only
 dshow passing through packet of type audio size    88200 timestamp
 3101275470000 orig timestamp 3101275470000 graph timestamp 3101285590000
 diff 10120000 DVS Receive  7-8 (Dante Virtual Soundcard)
 [dshow @ 000001ce02dcd880] All info found
 [dshow @ 000001ce02dcd880] stream 0: start_time: 310128 duration: NOPTS
 [dshow @ 000001ce02dcd880] format: start_time: 310128 duration: NOPTS
 (estimate from bit rate) bitrate=705 kb/s
 Guessed Channel Layout for Input Stream #0.0 : stereo
 Input #0, dshow, from 'audio=DVS Receive  7-8 (Dante Virtual Soundcard)':
   Duration: N/A, start: 310127.547000, bitrate: 705 kb/s
   Stream #0:0, 1, 1/10000000: Audio: pcm_s16le, 22050 Hz, stereo, s16, 705
 kb/s
 Successfully opened the file.
 At least one output file must be specified
 }}}


 {{{
 ffmpeg -v 9 -loglevel 99 -sample_rate 22050 -f dshow -i audio="DVS Receive
 7-8 (Dante Virtual Soundcard)"
 ffmpeg version 2021-09-22-git-447cf53774-essentials_build-www.gyan.dev
 Copyright (c) 2000-2021 the FFmpeg developers
   built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static --disable-
 w32threads --disable-autodetect --enable-fontconfig --enable-iconv
 --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib
 --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth
 --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-
 libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-
 libass --enable-libfreetype --enable-libfribidi --enable-libvidstab
 --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm
 --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-
 d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt
 --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora
 --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb
 --enable-libopus --enable-libspeex --enable-libvorbis --enable-
 librubberband
   libavutil      57.  6.100 / 57.  6.100
   libavcodec     59.  9.100 / 59.  9.100
   libavformat    59.  5.100 / 59.  5.100
   libavdevice    59.  0.101 / 59.  0.101
   libavfilter     8.  9.100 /  8.  9.100
   libswscale      6.  1.100 /  6.  1.100
   libswresample   4.  0.100 /  4.  0.100
   libpostproc    56.  0.100 / 56.  0.100
 Splitting the commandline.
 Reading option '-v' ... matched as option 'v' (set logging level) with
 argument '9'.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument '99'.
 Reading option '-sample_rate' ... matched as AVOption 'sample_rate' with
 argument '22050'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'dshow'.
 Reading option '-i' ... matched as input url with argument 'audio=DVS
 Receive  7-8 (Dante Virtual Soundcard)'.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option v (set logging level) with argument 9.
 Successfully parsed a group of options.
 Parsing a group of options: input url audio=DVS Receive  7-8 (Dante
 Virtual Soundcard).
 Applying option f (force format) with argument dshow.
 Successfully parsed a group of options.
 Opening an input file: audio=DVS Receive  7-8 (Dante Virtual Soundcard).
 [dshow @ 000001cf957cd880] Selecting pin Capture on audio only
 dshow passing through packet of type audio size    88200 timestamp
 3101464310000 orig timestamp 3101464310000 graph timestamp 3101474520000
 diff 10210000 DVS Receive  7-8 (Dante Virtual Soundcard)
 [dshow @ 000001cf957cd880] All info found
 [dshow @ 000001cf957cd880] stream 0: start_time: 310146 duration: NOPTS
 [dshow @ 000001cf957cd880] format: start_time: 310146 duration: NOPTS
 (estimate from bit rate) bitrate=705 kb/s
 Guessed Channel Layout for Input Stream #0.0 : stereo
 Input #0, dshow, from 'audio=DVS Receive  7-8 (Dante Virtual Soundcard)':
   Duration: N/A, start: 310146.431000, bitrate: 705 kb/s
   Stream #0:0, 1, 1/10000000: Audio: pcm_s16le, 22050 Hz, stereo, s16, 705
 kb/s
 Successfully opened the file.
 At least one output file must be specified
 dshow passing through packet of type audio size     2524 timestamp
 3101474520000 orig timestamp 3101474520000 graph timestamp 3101474680000
 diff 160000 DVS Receive  7-8 (Dante Virtual Soundcard)
 }}}

 Furthermore, please see this example which fails at 48 kHz, despite using
 `-sample_rate` before `-f dshow`.  The only difference here is 48 kHz, vs
 the 22.05 kHz above:

 {{{
 ffmpeg -v 9 -loglevel 99 -sample_rate 48000 -f dshow -i audio="DVS Receive
 7-8 (Dante Virtual Soundcard)"
 ffmpeg version 2021-09-22-git-447cf53774-essentials_build-www.gyan.dev
 Copyright (c) 2000-2021 the FFmpeg developers
   built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static --disable-
 w32threads --disable-autodetect --enable-fontconfig --enable-iconv
 --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib
 --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth
 --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-
 libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-
 libass --enable-libfreetype --enable-libfribidi --enable-libvidstab
 --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm
 --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-
 d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt
 --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora
 --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb
 --enable-libopus --enable-libspeex --enable-libvorbis --enable-
 librubberband
   libavutil      57.  6.100 / 57.  6.100
   libavcodec     59.  9.100 / 59.  9.100
   libavformat    59.  5.100 / 59.  5.100
   libavdevice    59.  0.101 / 59.  0.101
   libavfilter     8.  9.100 /  8.  9.100
   libswscale      6.  1.100 /  6.  1.100
   libswresample   4.  0.100 /  4.  0.100
   libpostproc    56.  0.100 / 56.  0.100
 Splitting the commandline.
 Reading option '-v' ... matched as option 'v' (set logging level) with
 argument '9'.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument '99'.
 Reading option '-sample_rate' ... matched as AVOption 'sample_rate' with
 argument '48000'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'dshow'.
 Reading option '-i' ... matched as input url with argument 'audio=DVS
 Receive  7-8 (Dante Virtual Soundcard)'.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option v (set logging level) with argument 9.
 Successfully parsed a group of options.
 Parsing a group of options: input url audio=DVS Receive  7-8 (Dante
 Virtual Soundcard).
 Applying option f (force format) with argument dshow.
 Successfully parsed a group of options.
 Opening an input file: audio=DVS Receive  7-8 (Dante Virtual Soundcard).
 [dshow @ 0000024b16b7d880] Could not set audio only options
 [dshow @ 0000024b16b7d880] Searching for audio device within video devices
 for DVS Receive  7-8 (Dante Virtual Soundcard)
 [dshow @ 0000024b16b7d880] Could not find audio only device with name [DVS
 Receive  7-8 (Dante Virtual Soundcard)] among source devices of type
 video.
 audio=DVS Receive  7-8 (Dante Virtual Soundcard): I/O error
 }}}

 Again, the key error is:  "Could not set audio only options"

 If you believe this issue is invalid and you have a working command line,
 could you please share it?  Thank you.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9420#comment:10>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list