aboutsummaryrefslogtreecommitdiff
path: root/tests/test-video-audio-recording-ffmpeg-functions.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-01 13:45:19 -0400
committerCraig Jennings <c@cjennings.net>2026-07-01 13:45:19 -0400
commite46376a2d9263ba9c8ef26891de44bd5920bd4a9 (patch)
treea4c9e52ae6d1d1e9b028f691a3b7822442134ada /tests/test-video-audio-recording-ffmpeg-functions.el
parent5a887435102236ac8381d24db5c75c02b9109276 (diff)
downloaddotemacs-e46376a2d9263ba9c8ef26891de44bd5920bd4a9.tar.gz
dotemacs-e46376a2d9263ba9c8ef26891de44bd5920bd4a9.zip
fix(recording): record audio-only to lossless FLAC, not AAC/M4A
Audio-only recordings were written as AAC in an MP4/.m4a container. The stop path SIGINTs ffmpeg, and if the MP4 muxer doesn't write its moov trailer before exit, the file has no moov atom and won't decode. ffmpeg and AssemblyAI both reject it. Three recordings were lost that way and had to be rebuilt with untrunc. The video path already avoids this by using Matroska, which needs no finalize pass. I switched the audio-only path to FLAC. FLAC frames are self-contained, so an abruptly stopped recording still decodes, with no trailer to miss at close. It's also lossless, dropping the 64k AAC encode that degraded speech before transcription. AssemblyAI recommends a lossless source and accepts FLAC directly. The transcription path passes audio files through untouched.
Diffstat (limited to 'tests/test-video-audio-recording-ffmpeg-functions.el')
-rw-r--r--tests/test-video-audio-recording-ffmpeg-functions.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-video-audio-recording-ffmpeg-functions.el b/tests/test-video-audio-recording-ffmpeg-functions.el
index 4b3570a2..3a38d00a 100644
--- a/tests/test-video-audio-recording-ffmpeg-functions.el
+++ b/tests/test-video-audio-recording-ffmpeg-functions.el
@@ -164,8 +164,8 @@
(should update-called)))
(test-ffmpeg-teardown)))
-(ert-deftest test-video-audio-recording-ffmpeg-record-audio-normal-creates-m4a-file ()
- "Test that audio recording creates .m4a file."
+(ert-deftest test-video-audio-recording-ffmpeg-record-audio-normal-creates-flac-file ()
+ "Test that audio recording creates .flac file."
(test-ffmpeg-setup)
(unwind-protect
(let ((command nil))
@@ -176,7 +176,7 @@
((symbol-function 'cj/recording--validate-system-audio)
(lambda () nil)))
(cj/ffmpeg-record-audio audio-recordings-dir)
- (should (string-match-p "\\.m4a" command))))
+ (should (string-match-p "\\.flac" command))))
(test-ffmpeg-teardown)))
;;; Stop Functions - Normal Cases