Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On macOS, cannot record PCM 16 bits LE; getting pcm_f32le instead #397

Open
jmgeffroy opened this issue Sep 10, 2024 · 1 comment
Open
Labels
bug Something isn't working macOS

Comments

@jmgeffroy
Copy link

Package version
5.1.2

Environment

  • OS: MacOS

Describe the bug

When I try to record with the AudioEncoder.pcm16bits encoder, I get pcm_f32le instead.
I am just using the example app, where I changed the AudioEncoder from AudioEncoder.aacLc to AudioEncoder.pcm16bits

To verify the file I use ffprobe, which comes with ffmpeg.

To Reproduce

Steps to reproduce the behavior:

  1. Open the example project
  2. In AudioRecorder replace AudioEncoder.aacLc by AudioEncoder.pcm16bits
  3. Launch the app on a Mac
  4. Record
  5. Test the file with ffprobe

ffprobe gives the following output:

ffprobe version 7.0.2 Copyright (c) 2007-2024 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.3.9.4)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/7.0.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Input #0, wav, from '/Users/jmgeffroy/Library/Containers/com.llfbandit.example/Data/Documents/audio_1725985905974.m4a':
  Duration: 00:00:02.28, bitrate: 1425 kb/s
  Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 44100 Hz, mono, flt, 1411 kb/s

Expected behavior

The output file should be pcm_s16le, not 32 bits pcm_f32le.

@llfbandit llfbandit added bug Something isn't working macOS labels Sep 12, 2024
@llfbandit
Copy link
Owner

Thanks for the report.
Yes this is a know issue. macOS doesn't care of given settings (partially) with PCM.
This was discovered and discussed here #280.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS
Projects
None yet
Development

No branches or pull requests

2 participants