[FFmpeg-trac] #10038(undetermined:new): Wrong duration / speed in audio recording made with ffmpeg -f avfoundation
FFmpeg
trac at avcodec.org
Tue Nov 15 02:11:54 EET 2022
#10038: Wrong duration / speed in audio recording made with ffmpeg -f avfoundation
-------------------------------------+-------------------------------------
Reporter: Raimondas | Type: defect
Status: new | Priority: normal
Component: | Version: 5.1.2
undetermined |
Keywords: audio | Blocked By:
avfoundation |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
recorded ~10 seconds of audio, the result audio file is ~5 second long,
plays approx. twice as fast:
{{{
...
[q] command received. Exiting.
size= 1822kB time=00:00:10.74 bitrate=1389.7kbits/s speed=0.999x
}}}
ffprobe on resulting file outputs:
{{{
...
Duration: 00:00:04.86, bitrate: 3072 kb/s
}}}
How to reproduce:
{{{
% ffmpeg -f avfoundation -i :0 -acodec pcm_f32le t1.wav
ffmpeg versions 5.0 and 5.1.2
built on Macos 12.6 and 10.10.5
}}}
-report log attached.
This seems to be related to sampling rate, i.e., if input sampling rate is
192kHz, the recording plays 4x too fast, if input sampling rate is 48kHz,
or 44.1KHz recording times and recording duration reported by ffprobe are
a closer match.
Sampling rate in output file is always correct. Bit depth does not make
difference, changing output format from WAV to FLAC does not make
difference.
Recordings are made on Mac Pro laptops of various generations, either
straight from MacBook Pro Microphone or from external ADC attached via
Firewire/Lightning port. Sample rate change made on Audio MIDI Setup for
the microphone or on the external ADC.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10038>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list