#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_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".