Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Add opt-in tab/window/screen video capture to system-audio recording (#303): keep the display video track through MediaRecorder, live preview, video mime support in recording sessions with probe-resolved mime after stitch, RECORDING_VIDEO_KBPS bitrate cap, docs and all-locale strings

Murtaza Nasir77bdebb25a00
diff --git a/config/env.asr.example b/config/env.asr.example
index a1fd96ae..dcfa5b91 100644
--- a/config/env.asr.example
+++ b/config/env.asr.example
@@ -282,9 +282,15 @@ INCOGNITO_MODE_DEFAULT=false
# --- Video Retention ---
# When enabled, uploaded video files keep their video stream for in-browser playback
# The audio is extracted to a temp file for transcription, then cleaned up
+# Also enables the in-app recorder's "Also record video" option for system-audio
+# and mic+system recordings (captures the shared tab/window/screen as video)
# Default: false (video uploads extract audio only, video stream is discarded)
VIDEO_RETENTION=false
+# Video bitrate cap (kbps) for in-app tab/window/screen video capture.
+# Screen content compresses well; 2500 kbps keeps an hour of capture near 1 GB.
+# RECORDING_VIDEO_KBPS=2500
+
# --- Video Passthrough to ASR ---
# Send original video files directly to ASR without extracting audio.
# Useful for custom ASR backends that handle video internally (e.g., multi-track audio extraction).
diff --git a/config/env.transcription.example b/config/env.transcription.example
index 80653f1b..0cb540ad 100644
--- a/config/env.transcription.example
+++ b/config/env.transcription.example
@@ -364,9 +364,15 @@ USERS_CAN_DELETE=true
# --- Video Retention ---
# When enabled, uploaded video files keep their video stream for in-browser playback
# The audio is extracted to a temp file for transcription, then cleaned up
+# Also enables the in-app recorder's "Also record video" option for system-audio
+# and mic+system recordings (captures the shared tab/window/screen as video)
# Default: false (video uploads extract audio only, video stream is discarded)
VIDEO_RETENTION=false
+# Video bitrate cap (kbps) for in-app tab/window/screen video capture.
+# Screen content compresses well; 2500 kbps keeps an hour of capture near 1 GB.
+# RECORDING_VIDEO_KBPS=2500
+
# --- Video Passthrough to ASR ---
# Send original video files directly to ASR without extracting audio.
# Useful for custom ASR backends that handle video internally (e.g., multi-track audio extraction).
diff --git a/config/env.whisper.example b/config/env.whisper.example
index b18aa34c..01082fa3 100644
--- a/config/env.whisper.example
+++ b/config/env.whisper.example
@@ -278,9 +278,15 @@ INCOGNITO_MODE_DEFAULT=false
# --- Video Retention ---
# When enabled, uploaded video files keep their video stream for in-browser playback
# The audio is extracted to a temp file for transcription, then cleaned up
+# Also enables the in-app recorder's "Also record video" option for system-audio
+# and mic+system recordings (captures the shared tab/window/screen as video)
# Default: false (video uploads extract audio only, video stream is discarded)
VIDEO_RETENTION=false
+# Video bitrate cap (kbps) for in-app tab/window/screen video capture.
+# Screen content compresses well; 2500 kbps keeps an hour of capture near 1 GB.
+# RECORDING_VIDEO_KBPS=2500
+
# --- Video Passthrough to ASR ---
# Send original video files directly to ASR without extracting audio.
# Useful for custom ASR backends that handle video internally (e.g., multi-track audio extraction).
diff --git a/config/env.whisperx.example b/config/env.whisperx.example
index 618f38f2..f215d4c6 100644
--- a/config/env.whisperx.example
+++ b/config/env.whisperx.example
@@ -209,9 +209,15 @@ ENABLE_PUBLIC_SHARING=true
# --- Video Retention ---
# When enabled, uploaded video files keep their video stream for in-browser playback
# The audio is extracted to a temp file for transcription, then cleaned up
+# Also enables the in-app recorder's "Also record video" option for system-audio
+# and mic+system recordings (captures the shared tab/window/screen as video)
# Default: false (video uploads extract audio only, video stream is discarded)
VIDEO_RETENTION=false
+# Video bitrate cap (kbps) for in-app tab/window/screen video capture.
+# Screen content compresses well; 2500 kbps keeps an hour of capture near 1 GB.
+# RECORDING_VIDEO_KBPS=2500
+
# --- Concurrent Uploads ---
# Maximum number of simultaneous file uploads (default: 3)
MAX_CONCURRENT_UPLOADS=3
diff --git a/docs/admin-guide/recording-sessions.md b/docs/admin-guide/recording-sessions.md
index 3d351e6b..ed9a1f92 100644
--- a/docs/admin-guide/recording-sessions.md
+++ b/docs/admin-guide/recording-sessions.md
@@ -28,9 +28,10 @@ Environment variables, all optional:
| `RECORDING_SESSION_TTL_HOURS` | `24` | Sessions whose `last_seen_at` is older than this are reaped. |
| `RECORDING_SESSION_MAX_BYTES_PER_USER` | `5368709120` (5 GB) | Per-user cap on in-progress (non-finalized) sessions. Soft limit: concurrent chunk uploads on different sessions can overrun by up to a few chunk-sizes (16 MB each by default). Cross-process atomic enforcement would require Redis or Postgres advisory locks; the overrun is small and bounded by worker count. |
| `RECORDING_SESSION_MAX_CHUNK_BYTES` | `16777216` (16 MB) | Per-chunk upload cap. Generous; MediaRecorder chunks are typically <1 MB. |
-| `RECORDING_SESSION_ALLOWED_MIME_TYPES` | `audio/webm,audio/ogg,audio/mp4,audio/mpeg,audio/wav,audio/x-m4a` | Comma-separated whitelist. |
+| `RECORDING_SESSION_ALLOWED_MIME_TYPES` | `audio/webm,audio/ogg,audio/mp4,audio/mpeg,audio/wav,audio/x-m4a,video/webm,video/mp4` | Comma-separated whitelist. The video types carry the optional tab/window/screen video capture. |
| `RECORDING_SESSION_CLEANUP_INTERVAL_SECONDS` | `3600` | How often the background thread sweeps expired sessions. Set to `0` to disable. |
| `RECORDING_MAX_HOURS` | `8` | Absolute ceiling on a single recording. Stops the recorder automatically at this duration regardless of size. |
+| `RECORDING_VIDEO_KBPS` | `2500` | Video bitrate cap (kbps) for the opt-in tab/window/screen video capture. At the default, an hour of capture is roughly 1 GB. |
## Reverse-proxy requirements
diff --git a/docs/features.md b/docs/features.md
index 052685ff..e4f902f7 100644
--- a/docs/features.md
+++ b/docs/features.md
@@ -249,6 +249,8 @@ Reduce eye strain with a full dark mode implementation that affects every interf
When enabled (`VIDEO_RETENTION=true`), uploaded video files preserve their video stream for in-browser playback. Instead of extracting audio and discarding the video, Speakr keeps the original file and renders it with a native `<video>` player alongside the transcript. Audio is extracted to a temporary file for transcription only, then cleaned up automatically. All existing player controls (play/pause, seek, speed, volume) work identically with video since HTML5 `<video>` and `<audio>` share the same media API. HTTP Range requests enable efficient seeking without downloading the entire file. This feature is ideal for presentations, lectures, and screen recordings where the visual context adds value to the transcript. Default: `false` (current behavior preserved — video uploads extract audio only).
+Video retention also unlocks in-app **tab/window/screen video capture**: the System Audio and Mic + System recording modes gain an "Also record video" option that keeps the shared surface as a video recording — a live preview shows while recording, and the result plays back in the same docked video player. Transcription still uses only the audio track. See the [Recording guide](user-guide/recording.md#recording-the-video-too-optional) for details.
+
<div style="max-width: 800px; margin: 2em auto;">
<img src="assets/images/screenshots/main-view-video.png" alt="Video playback alongside transcript" style="border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);">
<p style="text-align: center; margin-top: 0.5rem; font-style: italic; color: #666;">In-browser video playback alongside speaker-labeled transcript and summary</p>
diff --git a/docs/user-guide/recording.md b/docs/user-guide/recording.md
index c5315c99..bceee34d 100644
--- a/docs/user-guide/recording.md
+++ b/docs/user-guide/recording.md
@@ -43,6 +43,15 @@ Captures audio playing through your computer (or a specific browser tab) via the
Records both your microphone AND system audio simultaneously, mixed into a single synchronized track. The recommended mode for online meetings where you're an active participant — it captures both sides of the conversation. Same share dialog as System Audio Recording, with the same Share system audio checkbox requirement.
+### Recording the Video Too (optional)
+
+When the server has video retention enabled (`VIDEO_RETENTION=true`), the two display-capture modes gain an **Also record video** checkbox under the recording buttons. With it ticked, Speakr keeps the shared tab, window, or screen as a video recording alongside the audio — useful for capturing screen shares in meetings without a separate screen recorder.
+
+- The recording view shows a live preview of the captured surface while recording, and the finished recording plays back with the docked video player (the same one used for uploaded video files).
+- Transcription always uses only the audio track; the video changes nothing about transcripts, summaries, or chat.
+- Video capture follows the same platform rules as system audio: whatever surface your browser lets you share (and deliver audio from) is what gets recorded. The choice persists across sessions.
+- Screen video is captured at a capped bitrate (2500 kbps by default, admin-tunable via `RECORDING_VIDEO_KBPS`), so an hour of capture is roughly 1 GB. Long video recordings work best with [server-side recording sessions](../admin-guide/recording-sessions.md) enabled.
+
## Platform Support Matrix
The browser's `getDisplayMedia` API gates what system-audio capture modes actually work. Speakr detects your OS and browser and shows platform-aware hints inline, but the matrix is summarized here:
diff --git a/src/api/recording_sessions.py b/src/api/recording_sessions.py
index ababcd6d..7a4db83d 100644
--- a/src/api/recording_sessions.py
+++ b/src/api/recording_sessions.py
@@ -74,9 +74,14 @@ def _ttl_hours():
def _allowed_mime_types():
+ # video/webm and video/mp4 support the opt-in tab/window/screen video
+ # capture (#303): the recorder streams a video container through the
+ # same chunk pipeline, and the stitch worker's segment detection is
+ # container-based (EBML / ftyp magic), so it needs no video-specific
+ # handling.
raw = os.environ.get(
'RECORDING_SESSION_ALLOWED_MIME_TYPES',
- 'audio/webm,audio/ogg,audio/mp4,audio/mpeg,audio/wav,audio/x-m4a',
+ 'audio/webm,audio/ogg,audio/mp4,audio/mpeg,audio/wav,audio/x-m4a,video/webm,video/mp4',
)
return {m.strip().lower() for m in raw.split(',') if m.strip()}
diff --git a/src/api/recordings.py b/src/api/recordings.py
index cb4fc0e4..85025998 100644
--- a/src/api/recordings.py
+++ b/src/api/recordings.py
@@ -1509,6 +1509,15 @@ def index(recording_id=None):
recording_chunk_seconds = 5
recording_chunk_seconds = max(1, min(60, recording_chunk_seconds))
+ # Video bitrate cap (kbps) for the opt-in tab/window/screen video capture
+ # (#303). Screen content compresses well, so the 2500 kbps default keeps
+ # an hour of capture near 1 GB. Clamped to [100, 50000].
+ try:
+ recording_video_kbps = int(float(os.environ.get('RECORDING_VIDEO_KBPS', '2500')))
+ except (TypeError, ValueError):
+ recording_video_kbps = 2500
+ recording_video_kbps = max(100, min(50000, recording_video_kbps))
+
return render_template('index.html',
use_asr_endpoint=USE_ASR_ENDPOINT, # Backwards compat
connector_supports_diarization=connector_supports_diarization,
@@ -1522,7 +1531,8 @@ def index(recording_id=None):
is_team_admin=is_team_admin,
server_recording_chunks_enabled=server_recording_chunks_enabled,
recording_max_hours=recording_max_hours,
- recording_chunk_seconds=recording_chunk_seconds)
+ recording_chunk_seconds=recording_chunk_seconds,
+ recording_video_kbps=recording_video_kbps)
diff --git a/src/services/recording_stitch.py b/src/services/recording_stitch.py
index 25d815a2..d987a95c 100644
--- a/src/services/recording_stitch.py
+++ b/src/services/recording_stitch.py
@@ -87,6 +87,8 @@ def _mime_to_extension(mime_type: str) -> str:
'audio/x-m4a': 'm4a',
'audio/mpeg': 'mp3',
'audio/wav': 'wav',
+ 'video/webm': 'webm',
+ 'video/mp4': 'mp4',
}
return mapping.get((mime_type or '').lower(), 'webm')
@@ -302,6 +304,17 @@ def stitch_recording_session(session_id: str) -> Tuple[int, str]:
recording.original_filename = final_filename
recording.file_size = file_size
recording.status = 'PENDING'
+ # The session's mime_type is a client claim; the stitched bytes are
+ # authoritative. Re-derive the MIME from the validation probe above so a
+ # video capture is recognized as video (and vice versa) regardless of
+ # what the client declared — same ffprobe-first policy as the upload
+ # pipeline. Keep the claimed value when the probe was unavailable.
+ if probe is not None:
+ try:
+ from src.utils.mime import resolve_media_mime
+ recording.mime_type = resolve_media_mime(final_path, codec_info=probe)
+ except Exception as e:
+ logger.warning(f"Could not resolve stitched mime for {final_path}: {e}")
if not recording.meeting_date:
recording.meeting_date = session.created_at
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index fbdb03c7..2de0a576 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -386,6 +386,22 @@ document.addEventListener('DOMContentLoaded', async () => {
try { localStorage.setItem('disableAudioProcessing', v ? 'true' : 'false'); } catch (_) {}
});
+ // Opt-in: also record the shared tab/window/screen VIDEO during
+ // system-audio and mic+system recordings (#303). Only offered when
+ // the server has VIDEO_RETENTION enabled, since the resulting
+ // video/webm recording relies on the existing video-retention
+ // pipeline to keep its video stream. Persisted in localStorage.
+ const recordSystemVideo = ref(
+ (typeof localStorage !== 'undefined' && localStorage.getItem('recordSystemVideo') === 'true')
+ );
+ watch(recordSystemVideo, (v) => {
+ try { localStorage.setItem('recordSystemVideo', v ? 'true' : 'false'); } catch (_) {}
+ });
+ // True while a video-capturing recording is live — drives the
+ // preview panel in the recording view (audio.js attaches the
+ // display stream to the <video id="recordingVideoPreview">).
+ const recordingVideoActive = ref(false);
+
// Per-input-device state for the multi-source recording flow.
// The user can pick a PRIMARY input (their mic) and an OPTIONAL
// SECONDARY input (e.g. a Pulse monitor source / BlackHole / VB-
@@ -1607,6 +1623,7 @@ document.addEventListener('DOMContentLoaded', async () => {
isRecording, mediaRecorder, audioChunks, audioBlobURL, recordingTime, recordingInterval,
canRecordAudio, canRecordSystemAudio, systemAudioSupported, systemAudioError,
recordingNotes, showSystemAudioHelp, showSystemAudioHelpModal, disableAudioProcessing,
+ recordSystemVideo, recordingVideoActive,
inputAudioDevices, selectedMicDeviceId, selectedSecondaryDeviceId, refreshInputAudioDevices,
platformInfo, audioCaps, helpModalOsTab, virtualAudioDevices, refreshVirtualAudioDevices,
asrLanguage, asrMinSpeakers, asrMaxSpeakers,
diff --git a/static/js/modules/composables/audio.js b/static/js/modules/composables/audio.js
index 93aba40c..4701219e 100644
--- a/static/js/modules/composables/audio.js
+++ b/static/js/modules/composables/audio.js
@@ -14,6 +14,7 @@ export function useAudio(state, utils) {
estimatedFileSize, actualBitrate, recordingNotes, recordingQuality,
maxRecordingMB, fileSizeWarningShown, sizeCheckInterval, recordingDisclaimer,
showRecordingDisclaimerModal, pendingRecordingMode, currentView, showUploadModal, showSystemAudioHelp, disableAudioProcessing,
+ recordSystemVideo, recordingVideoActive, videoRetentionEnabled,
selectedMicDeviceId, selectedSecondaryDeviceId,
isDarkMode, wakeLock, animationFrameId,
activeStreams, visualizer, micVisualizer, systemVisualizer, canRecordAudio,
@@ -51,6 +52,11 @@ export function useAudio(state, utils) {
let serverSessionUploader = null;
let serverSessionMimeType = 'audio/webm';
let serverSessionLastError = null;
+ // Mime type of the recording currently in memory (set at start, restored
+ // from IndexedDB metadata on crash recovery). The legacy single-shot
+ // upload path uses it to build the File with the right container type and
+ // extension — a video capture must not be uploaded as `audio/webm`.
+ let currentRecordingMimeType = 'audio/webm';
function _serverRecordingChunksEnabled() {
const el = document.getElementById('app');
@@ -74,6 +80,59 @@ export function useAudio(state, utils) {
serverSessionLastError = null;
}
+ // Pick the best MediaRecorder container for the capture. Video captures
+ // prefer WebM (VP9 then VP8, both with Opus) because Chromium — the only
+ // engine that can share tab/system audio — muxes it natively; video/mp4
+ // is the Safari-family fallback. Audio captures keep the existing
+ // audio/webm;codecs=opus preference.
+ function _pickRecorderMime(wantsVideo) {
+ const candidates = wantsVideo
+ ? ['video/webm;codecs=vp9,opus', 'video/webm;codecs=vp8,opus', 'video/webm', 'video/mp4']
+ : ['audio/webm;codecs=opus', 'audio/webm'];
+ for (const c of candidates) {
+ if (MediaRecorder.isTypeSupported(c)) return c;
+ }
+ return wantsVideo ? null : 'audio/webm';
+ }
+
+ // Video bitrate cap for tab/screen captures, from the page dataset
+ // (RECORDING_VIDEO_KBPS, default 2500). Screen content compresses well;
+ // 2.5 Mbps keeps an hour of capture near 1 GB instead of browser-default
+ // rates that can triple that.
+ function _videoBitsPerSecond() {
+ const el = document.getElementById('app');
+ const raw = el && el.dataset ? el.dataset.recordingVideoKbps : '';
+ const kbps = parseInt(raw, 10);
+ return (Number.isFinite(kbps) && kbps >= 100 && kbps <= 50000 ? kbps : 2500) * 1000;
+ }
+
+ // Attach the live display stream to the recording view's preview element.
+ // The <video> renders after currentView flips to 'recording', so retry
+ // briefly until it exists.
+ function _attachVideoPreview(stream, attempt = 0) {
+ const el = document.getElementById('recordingVideoPreview');
+ if (el) {
+ el.srcObject = stream;
+ el.play().catch(() => {});
+ } else if (attempt < 20) {
+ setTimeout(() => _attachVideoPreview(stream, attempt + 1), 100);
+ }
+ }
+
+ // Detach the live stream from the preview element (called on stop — the
+ // tracks are ended at that point). recordingVideoActive stays true so the
+ // finished-recording review pane knows to render a <video> player for the
+ // blob instead of the audio bar; it resets on discard/upload.
+ function _detachVideoPreview() {
+ const el = document.getElementById('recordingVideoPreview');
+ if (el) el.srcObject = null;
+ }
+
+ function _clearVideoPreview() {
+ _detachVideoPreview();
+ if (recordingVideoActive) recordingVideoActive.value = false;
+ }
+
// iOS detection
const isiOS = () => {
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
@@ -276,6 +335,7 @@ export function useAudio(state, utils) {
const startRecordingInternal = async (mode, resumeContext = null) => {
try {
recordingMode.value = mode;
+ recordingVideoActive.value = false;
audioChunks.value = [];
// On resume, continue the on-screen timer and size estimate from
// where the prior segment left off so both reflect the WHOLE
@@ -290,6 +350,16 @@ export function useAudio(state, utils) {
let stream;
let combinedStream;
+ // Opt-in tab/window/screen video capture (#303): only meaningful
+ // for the display-capture modes, and only when the server keeps
+ // video streams (VIDEO_RETENTION) — otherwise the pipeline would
+ // strip the video right back out at transcription time.
+ const wantsVideo = (mode === 'system' || mode === 'both')
+ && !!(recordSystemVideo && recordSystemVideo.value)
+ && !!(videoRetentionEnabled && videoRetentionEnabled.value);
+ // The display video track we keep for the recorder (null when the
+ // user did not opt in, or no video mime is supported).
+ let capturedVideoTrack = null;
if (mode === 'microphone') {
if (!canRecordAudio.value) {
@@ -431,13 +501,22 @@ export function useAudio(state, utils) {
);
}
- // Stop video track
- stream.getVideoTracks().forEach(track => track.stop());
- stream = new MediaStream([audioTrack]);
+ // Keep the display video track when the user opted into video
+ // capture; otherwise stop it immediately as before.
+ if (wantsVideo && stream.getVideoTracks().length > 0) {
+ capturedVideoTrack = stream.getVideoTracks()[0];
+ stream.getVideoTracks().slice(1).forEach(track => track.stop());
+ } else {
+ stream.getVideoTracks().forEach(track => track.stop());
+ }
+ const audioOnlyStream = new MediaStream([audioTrack]);
+ stream = capturedVideoTrack
+ ? new MediaStream([capturedVideoTrack, audioTrack])
+ : audioOnlyStream;
activeStreams.value = [stream];
audioContext.value = new (window.AudioContext || window.webkitAudioContext)();
- const source = audioContext.value.createMediaStreamSource(stream);
+ const source = audioContext.value.createMediaStreamSource(audioOnlyStream);
analyser.value = audioContext.value.createAnalyser();
analyser.value.fftSize = 256;
source.connect(analyser.value);
@@ -491,8 +570,14 @@ export function useAudio(state, utils) {
);
}
- // Stop video tracks
- displayStream.getVideoTracks().forEach(track => track.stop());
+ // Keep the display video track when the user opted into video
+ // capture; otherwise stop the video tracks as before.
+ if (wantsVideo && displayStream.getVideoTracks().length > 0) {
+ capturedVideoTrack = displayStream.getVideoTracks()[0];
+ displayStream.getVideoTracks().slice(1).forEach(track => track.stop());
+ } else {
+ displayStream.getVideoTracks().forEach(track => track.stop());
+ }
// Create audio context and combine streams
audioContext.value = new (window.AudioContext || window.webkitAudioContext)();
@@ -514,15 +599,42 @@ export function useAudio(state, utils) {
combinedStream = destination.stream;
activeStreams.value = [micStream, displayStream];
- stream = combinedStream;
+ // With video capture on, the recorder consumes the display
+ // video track plus the Web-Audio mixed mic+system track.
+ stream = capturedVideoTrack
+ ? new MediaStream([capturedVideoTrack, ...combinedStream.getAudioTracks()])
+ : combinedStream;
}
- // Determine best mime type
- const mimeType = MediaRecorder.isTypeSupported('audio/webm;codecs=opus')
- ? 'audio/webm;codecs=opus'
- : 'audio/webm';
+ // Determine best mime type. A video capture needs a video
+ // container; if the browser can't mux one, fall back to
+ // audio-only rather than failing the recording.
+ let mimeType = _pickRecorderMime(!!capturedVideoTrack);
+ if (capturedVideoTrack && !mimeType) {
+ console.warn('[Recording] No supported video container; falling back to audio-only');
+ showToast(
+ (utils.t && utils.t('toasts.videoRecordingUnsupported'))
+ || 'This browser cannot record video — capturing audio only.',
+ 'fa-exclamation-triangle'
+ );
+ capturedVideoTrack.stop();
+ capturedVideoTrack = null;
+ stream = new MediaStream(stream.getAudioTracks());
+ mimeType = _pickRecorderMime(false);
+ }
+ currentRecordingMimeType = mimeType;
- const recorder = new MediaRecorder(stream, { mimeType });
+ const recorderOptions = { mimeType };
+ if (capturedVideoTrack) {
+ recorderOptions.videoBitsPerSecond = _videoBitsPerSecond();
+ }
+ const recorder = new MediaRecorder(stream, recorderOptions);
+
+ // Live preview of the captured surface in the recording view.
+ if (capturedVideoTrack) {
+ recordingVideoActive.value = true;
+ _attachVideoPreview(new MediaStream([capturedVideoTrack]));
+ }
// Start IndexedDB recording session - convert Vue reactive objects to plain objects
try {
@@ -699,6 +811,7 @@ export function useAudio(state, utils) {
if (mediaRecorder.value && isRecording.value) {
mediaRecorder.value.stop();
isRecording.value = false;
+ _detachVideoPreview();
// Clear the recording timer
if (recordingInterval.value) {
@@ -792,6 +905,7 @@ export function useAudio(state, utils) {
await hideRecordingNotification();
try { await RecordingDB.clearRecordingSession(); } catch (_) { /* ignore */ }
_resetServerSessionState();
+ _clearVideoPreview();
// The recording is already finalized server-side — there is
// nothing left to "finish" in the upload modal. Drop back to
// the main view and refresh the sidebar + processing-queue
@@ -810,7 +924,9 @@ export function useAudio(state, utils) {
}
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
- const _rawRecordedFile = new File(audioChunks.value, `recording-${timestamp}.webm`, { type: 'audio/webm' });
+ const recordedMime = (currentRecordingMimeType || 'audio/webm').split(';')[0];
+ const recordedExt = recordedMime === 'video/mp4' ? 'mp4' : 'webm';
+ const _rawRecordedFile = new File(audioChunks.value, `recording-${timestamp}.${recordedExt}`, { type: recordedMime });
// Prevent Vue from wrapping the binary File in a reactive proxy. See
// upload.js for rationale (issue #280).
const recordedFile = (typeof Vue !== 'undefined' && Vue.markRaw)
@@ -845,6 +961,7 @@ export function useAudio(state, utils) {
// Release the in-memory audio resources so the recording view does not
// keep showing the old waveform, but DO NOT clear the IndexedDB session
// (that happens only on upload success — see upload.js).
+ _clearVideoPreview();
if (audioBlobURL.value) {
URL.revokeObjectURL(audioBlobURL.value);
}
@@ -889,7 +1006,9 @@ export function useAudio(state, utils) {
}
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
- const _rawRecordedFile = new File(audioChunks.value, `recording-${timestamp}.webm`, { type: 'audio/webm' });
+ const recordedMime = (currentRecordingMimeType || 'audio/webm').split(';')[0];
+ const recordedExt = recordedMime === 'video/mp4' ? 'mp4' : 'webm';
+ const _rawRecordedFile = new File(audioChunks.value, `recording-${timestamp}.${recordedExt}`, { type: recordedMime });
// Prevent Vue from wrapping the binary File in a reactive proxy. See
// upload.js for rationale (issue #280).
const recordedFile = (typeof Vue !== 'undefined' && Vue.markRaw)
@@ -1006,6 +1125,7 @@ export function useAudio(state, utils) {
// Discard recording
const discardRecording = async () => {
+ _clearVideoPreview();
if (audioBlobURL.value) {
URL.revokeObjectURL(audioBlobURL.value);
}
@@ -1194,7 +1314,10 @@ export function useAudio(state, utils) {
// Restore chunks
audioChunks.value = recovered.chunks;
- // Create blob URL
+ // Create blob URL. Also restore the recording's mime type so the
+ // legacy upload path builds the File with the right container
+ // (a recovered video capture must not be renamed audio/webm).
+ currentRecordingMimeType = recovered.metadata.mimeType || 'audio/webm';
const blob = new Blob(recovered.chunks, { type: recovered.metadata.mimeType });
audioBlobURL.value = URL.createObjectURL(blob);
diff --git a/static/locales/de.json b/static/locales/de.json
index 01b40524..7e41ab7f 100644
--- a/static/locales/de.json
+++ b/static/locales/de.json
@@ -1259,29 +1259,51 @@
},
"recording": {
"acceptDisclaimer": "Ich akzeptiere",
+ "alsoMixIn": "Zusätzlich einmischen (optional)",
"cancelRecording": "Abbrechen",
+ "detectedDevicePrefix": "Erkannt:",
+ "detectedDeviceSuffix": "— wählen Sie es im Mikrofon-Dropdown, um System-Audio einzuleiten.",
+ "disableAudioProcessingHelp": "— aktivieren Sie diese Option, wenn Sie System-Audio über eine Monitor-Quelle oder ein virtuelles Audiogerät (BlackHole, VB-Cable, Pulse-Monitor) einleiten. Bei normaler Mikrofonaufnahme deaktiviert lassen.",
+ "disableAudioProcessingTitle": "Echounterdrückung, Rauschunterdrückung und Auto-Gain deaktivieren",
"discardRecovery": "Verwerfen",
"disclaimer": "Aufnahme-Hinweis",
"duration": "Dauer",
+ "grantMicPermissionHint": "Erteilen Sie einmal Mikrofonzugriff, damit Gerätenamen angezeigt werden.",
+ "howToEnableFullSystemAudio": "so aktivieren Sie das volle System-Audio",
+ "inputDevices": "Eingabegeräte",
+ "linuxMonitorHintPrefix": "\"Monitor of …\"-Einträge nicht zu sehen? Chrome unter Linux filtert diese heraus. Linux → Option C im Hilfeleitfaden zeigt einen einzeiligen",
+ "linuxMonitorHintSuffix": "-Befehl, um einen Pulse-Monitor als reguläre Quelle bereitzustellen, die Chrome auflistet.",
"micPlusSys": "Mikro + System",
"microphone": "Mikrofon",
"microphoneAndSystem": "Mikrofon + System",
"microphonePermissionDenied": "Mikrofon-Berechtigung verweigert",
+ "mixHelp": "Wählen Sie ein Monitor / virtuelles Audiogerät (BlackHole auf macOS, VB-Cable auf Windows oder ein gewrapptes Pulse-Monitor unter Linux), um System-Audio mit Ihrem Mikrofon zu mischen. Beide Streams werden zu einer Aufnahme kombiniert.",
+ "mixingTwoInputs": "Mische 2 Eingänge",
"modeBoth": "Mikrofon + System",
"modeMicrophone": "Mikrofon",
"modeSystem": "System-Audio",
+ "noneOption": "Keiner",
"notes": "Notizen",
"notesPlaceholder": "Notizen zu dieser Aufnahme hinzufügen...",
+ "openGuide": "Anleitung öffnen",
"pauseRecording": "Pause",
+ "primaryInput": "Haupteingang",
+ "recordVideoHelp": "Speichert den geteilten Tab, das Fenster oder den Bildschirm als Videoaufnahme zusammen mit dem Ton. Das Video wird in der Aufnahmeansicht wiedergegeben; die Transkription nutzt weiterhin nur den Ton.",
+ "recordVideoTitle": "Auch Video aufnehmen.",
"recordingFailed": "Aufnahme fehlgeschlagen",
"recordingInProgress": "Aufnahme läuft...",
"recordingMode": "Aufnahmemodus",
"recordingSize": "Geschätzte Größe",
"recordingStopped": "Aufnahme gestoppt",
"recordingTime": "Aufnahmezeit",
+ "recoveryChunksUploaded": "Hochgeladene Segmente",
"recoveryDescription": "Wir haben eine unvollständige Aufnahme aus einer früheren Sitzung gefunden. Möchten Sie diese wiederherstellen?",
+ "recoveryFinishProcessing": "Verarbeitung abschließen",
"recoveryFound": "Nicht gespeicherte Aufnahme gefunden",
+ "recoveryServerDescription": "Eine Aufnahme aus diesem Browser wurde noch auf dem Server gespeichert. Sie können die Verarbeitung jetzt abschließen oder sie verwerfen.",
+ "recoveryServerFound": "Laufende Aufnahme auf dem Server gefunden",
"recoveryTitle": "Aufnahme wiederherstellen",
+ "requestMicPermission": "Mikrofonzugriff anfordern",
"restoreRecording": "Wiederherstellen",
"resumeRecording": "Fortsetzen",
"saveRecording": "Aufnahme speichern",
@@ -1291,34 +1313,15 @@
"stopRecording": "Aufnahme stoppen",
"systemAudio": "System-Audio",
"systemAudioNotSupported": "System-Audio-Aufnahme wird in diesem Browser nicht unterstützt",
- "title": "Audio-Aufnahme",
- "tabAudioHintPrefix": "Unter",
- "tabAudioHintSuffix": "kann der Browser nur",
+ "systemDefault": "Systemstandard",
"tabAudioBold": "Tab-Audio",
"tabAudioHintDash": "direkt aufnehmen —",
- "howToEnableFullSystemAudio": "so aktivieren Sie das volle System-Audio",
+ "tabAudioHintPrefix": "Unter",
+ "tabAudioHintSuffix": "kann der Browser nur",
"tabAudioOnlyTooltip": "Nur Tab-Audio auf dieser Plattform — siehe Hilfe",
- "detectedDevicePrefix": "Erkannt:",
- "detectedDeviceSuffix": "— wählen Sie es im Mikrofon-Dropdown, um System-Audio einzuleiten.",
- "disableAudioProcessingTitle": "Echounterdrückung, Rauschunterdrückung und Auto-Gain deaktivieren",
- "disableAudioProcessingHelp": "— aktivieren Sie diese Option, wenn Sie System-Audio über eine Monitor-Quelle oder ein virtuelles Audiogerät (BlackHole, VB-Cable, Pulse-Monitor) einleiten. Bei normaler Mikrofonaufnahme deaktiviert lassen.",
- "inputDevices": "Eingabegeräte",
- "mixingTwoInputs": "Mische 2 Eingänge",
- "grantMicPermissionHint": "Erteilen Sie einmal Mikrofonzugriff, damit Gerätenamen angezeigt werden.",
- "requestMicPermission": "Mikrofonzugriff anfordern",
- "primaryInput": "Haupteingang",
- "systemDefault": "Systemstandard",
- "virtualMonitor": "virtuell / Monitor",
- "alsoMixIn": "Zusätzlich einmischen (optional)",
- "noneOption": "Keiner",
- "mixHelp": "Wählen Sie ein Monitor / virtuelles Audiogerät (BlackHole auf macOS, VB-Cable auf Windows oder ein gewrapptes Pulse-Monitor unter Linux), um System-Audio mit Ihrem Mikrofon zu mischen. Beide Streams werden zu einer Aufnahme kombiniert.",
- "linuxMonitorHintPrefix": "\"Monitor of …\"-Einträge nicht zu sehen? Chrome unter Linux filtert diese heraus. Linux → Option C im Hilfeleitfaden zeigt einen einzeiligen",
- "linuxMonitorHintSuffix": "-Befehl, um einen Pulse-Monitor als reguläre Quelle bereitzustellen, die Chrome auflistet.",
- "openGuide": "Anleitung öffnen",
- "recoveryServerFound": "Laufende Aufnahme auf dem Server gefunden",
- "recoveryServerDescription": "Eine Aufnahme aus diesem Browser wurde noch auf dem Server gespeichert. Sie können die Verarbeitung jetzt abschließen oder sie verwerfen.",
- "recoveryChunksUploaded": "Hochgeladene Segmente",
- "recoveryFinishProcessing": "Verarbeitung abschließen"
+ "title": "Audio-Aufnahme",
+ "videoPreviewLabel": "Live-Vorschau des aufgenommenen Videos",
+ "virtualMonitor": "virtuell / Monitor"
},
"reprocessModal": {
"audioReTranscribedFromScratch": "Das Audio wird von Grund auf neu transkribiert. Dies wird auch den Titel und die Zusammenfassung basierend auf der neuen Transkription neu generieren.",
@@ -1760,17 +1763,18 @@
"discardUnsavedRecording": "Sie haben eine nicht gespeicherte Aufnahme. Beim Verlassen geht sie verloren. Fortfahren?"
},
"toasts": {
- "processingFailed": "Verarbeitung fehlgeschlagen",
"processingCompleted": "Verarbeitung abgeschlossen!",
+ "processingFailed": "Verarbeitung fehlgeschlagen",
+ "recordingFinalized": "Aufnahme zur Verarbeitung hochgeladen",
+ "recordingMaxDurationReached": "Aufnahme hat die Höchstdauer erreicht und wurde automatisch gestoppt.",
+ "recordingResumeFound": "Eine laufende Aufnahme aus diesem Browser wurde auf dem Server gefunden. Fortsetzen?",
+ "recordingSizeSoftWarning": "Aufnahme ist {{size}}. Erwägen Sie, sie bei Gelegenheit zu stoppen.",
+ "retryingPendingUploads": "Ausstehende Uploads werden erneut versucht…",
+ "shareTargetReceived": "Geteilte Audiodatei empfangen und zur Transkription eingereiht",
"uploadFailedDownloadedLocally": "Upload fehlgeschlagen. Audio wurde im Downloads-Ordner für einen späteren Versuch gespeichert.",
"uploadFailedNoRecovery": "Upload fehlgeschlagen und Audio konnte nicht lokal gespeichert werden. Bitte erneut aufnehmen.",
- "retryingPendingUploads": "Ausstehende Uploads werden erneut versucht…",
"uploadFailedWillRetry": "Upload fehlgeschlagen – gespeichert und wird bei erneuter Verbindung automatisch wiederholt.",
- "shareTargetReceived": "Geteilte Audiodatei empfangen und zur Transkription eingereiht",
- "recordingSizeSoftWarning": "Aufnahme ist {{size}}. Erwägen Sie, sie bei Gelegenheit zu stoppen.",
- "recordingMaxDurationReached": "Aufnahme hat die Höchstdauer erreicht und wurde automatisch gestoppt.",
- "recordingFinalized": "Aufnahme zur Verarbeitung hochgeladen",
- "recordingResumeFound": "Eine laufende Aufnahme aus diesem Browser wurde auf dem Server gefunden. Fortsetzen?"
+ "videoRecordingUnsupported": "Dieser Browser kann kein Video aufnehmen — es wird nur Audio aufgezeichnet."
},
"webhooks": {
"title": "Webhooks",
diff --git a/static/locales/en.json b/static/locales/en.json
index 96d57e4a..4d899c70 100644
--- a/static/locales/en.json
+++ b/static/locales/en.json
@@ -1268,33 +1268,51 @@
},
"recording": {
"acceptDisclaimer": "I Accept",
+ "alsoMixIn": "Also mix in (optional)",
"cancelRecording": "Cancel",
+ "detectedDevicePrefix": "Detected",
+ "detectedDeviceSuffix": "— pick it from the microphone dropdown to route system audio in.",
+ "disableAudioProcessingHelp": "— enable when you're routing system audio in through a monitor source or virtual audio device (BlackHole, VB-Cable, Pulse monitor). Leave off for normal microphone recording.",
+ "disableAudioProcessingTitle": "Disable echo cancellation, noise suppression & auto-gain",
"discardRecovery": "Discard",
"disclaimer": "Recording Disclaimer",
"duration": "Duration",
+ "grantMicPermissionHint": "Grant microphone permission once so device names can populate.",
+ "howToEnableFullSystemAudio": "how to enable full system audio",
+ "inputDevices": "Input devices",
+ "linuxMonitorHintPrefix": "Don't see \"Monitor of …\" entries? Chrome on Linux filters them out. The help guide's Linux → Option C shows a one-line",
+ "linuxMonitorHintSuffix": "command to expose a Pulse monitor as a regular source Chrome will list.",
"micPlusSys": "Mic + Sys",
"microphone": "Microphone",
"microphoneAndSystem": "Microphone + System",
"microphonePermissionDenied": "Microphone permission denied",
+ "mixHelp": "Pick a monitor / virtual audio device (BlackHole on macOS, VB-Cable on Windows, or a wrapped Pulse monitor on Linux) to mix system audio with your mic. Both streams combine into one recording.",
+ "mixingTwoInputs": "Mixing 2 inputs",
"modeBoth": "Microphone + System",
"modeMicrophone": "Microphone",
"modeSystem": "System Audio",
+ "noneOption": "None",
"notes": "Notes",
"notesPlaceholder": "Add notes about this recording...",
+ "openGuide": "Open guide",
"pauseRecording": "Pause",
+ "primaryInput": "Primary input",
+ "recordVideoHelp": "Keeps the shared tab, window, or screen as a video recording alongside the audio. The video plays back in the recording view; transcription still uses only the audio.",
+ "recordVideoTitle": "Also record video.",
"recordingFailed": "Recording failed",
"recordingInProgress": "Recording in progress...",
"recordingMode": "Recording Mode",
"recordingSize": "Estimated Size",
"recordingStopped": "Recording stopped",
"recordingTime": "Recording Time",
+ "recoveryChunksUploaded": "Chunks uploaded",
"recoveryDescription": "We found an unfinished recording from a previous session. Would you like to restore it?",
+ "recoveryFinishProcessing": "Finish processing",
"recoveryFound": "Unsaved Recording Detected",
- "recoveryTitle": "Recover Recording",
- "recoveryServerFound": "In-progress recording found on the server",
"recoveryServerDescription": "A recording from this browser was still being saved on the server. You can finish processing it now, or discard it.",
- "recoveryChunksUploaded": "Chunks uploaded",
- "recoveryFinishProcessing": "Finish processing",
+ "recoveryServerFound": "In-progress recording found on the server",
+ "recoveryTitle": "Recover Recording",
+ "requestMicPermission": "Request microphone permission",
"restoreRecording": "Restore",
"resumeRecording": "Resume",
"saveRecording": "Save Recording",
@@ -1304,30 +1322,15 @@
"stopRecording": "Stop Recording",
"systemAudio": "System Audio",
"systemAudioNotSupported": "System audio recording is not supported in this browser",
- "title": "Audio Recording",
- "tabAudioHintPrefix": "On",
- "tabAudioHintSuffix": "the browser can only capture",
+ "systemDefault": "System default",
"tabAudioBold": "tab audio",
"tabAudioHintDash": "directly —",
- "howToEnableFullSystemAudio": "how to enable full system audio",
+ "tabAudioHintPrefix": "On",
+ "tabAudioHintSuffix": "the browser can only capture",
"tabAudioOnlyTooltip": "Tab audio only on this platform — see help",
- "detectedDevicePrefix": "Detected",
- "detectedDeviceSuffix": "— pick it from the microphone dropdown to route system audio in.",
- "disableAudioProcessingTitle": "Disable echo cancellation, noise suppression & auto-gain",
- "disableAudioProcessingHelp": "— enable when you're routing system audio in through a monitor source or virtual audio device (BlackHole, VB-Cable, Pulse monitor). Leave off for normal microphone recording.",
- "inputDevices": "Input devices",
- "mixingTwoInputs": "Mixing 2 inputs",
- "grantMicPermissionHint": "Grant microphone permission once so device names can populate.",
- "requestMicPermission": "Request microphone permission",
- "primaryInput": "Primary input",
- "systemDefault": "System default",
- "virtualMonitor": "virtual / monitor",
- "alsoMixIn": "Also mix in (optional)",
- "noneOption": "None",
- "mixHelp": "Pick a monitor / virtual audio device (BlackHole on macOS, VB-Cable on Windows, or a wrapped Pulse monitor on Linux) to mix system audio with your mic. Both streams combine into one recording.",
- "linuxMonitorHintPrefix": "Don't see \"Monitor of …\" entries? Chrome on Linux filters them out. The help guide's Linux → Option C shows a one-line",
- "linuxMonitorHintSuffix": "command to expose a Pulse monitor as a regular source Chrome will list.",
- "openGuide": "Open guide"
+ "title": "Audio Recording",
+ "videoPreviewLabel": "Live preview of the captured video",
+ "virtualMonitor": "virtual / monitor"
},
"reprocessModal": {
"audioReTranscribedFromScratch": "The audio will be re-transcribed from scratch. This will also regenerate the title and summary based on the new transcription.",
@@ -1760,17 +1763,18 @@
"discardUnsavedRecording": "You have an unsaved recording. Leaving will discard it. Continue?"
},
"toasts": {
- "processingFailed": "Processing failed",
"processingCompleted": "Processing completed!",
+ "processingFailed": "Processing failed",
+ "recordingFinalized": "Recording uploaded for processing",
+ "recordingMaxDurationReached": "Recording reached the maximum duration and was stopped automatically.",
+ "recordingResumeFound": "An in-progress recording from this browser was detected on the server. Resume?",
+ "recordingSizeSoftWarning": "Recording is {{size}}. Consider stopping when convenient.",
+ "retryingPendingUploads": "Retrying pending upload(s)…",
+ "shareTargetReceived": "Shared audio received and queued for transcription",
"uploadFailedDownloadedLocally": "Upload failed. Audio saved to your Downloads folder for later retry.",
"uploadFailedNoRecovery": "Upload failed and audio could not be saved locally. Please record again.",
- "retryingPendingUploads": "Retrying pending upload(s)…",
"uploadFailedWillRetry": "Upload failed — saved and will retry automatically when you reconnect.",
- "shareTargetReceived": "Shared audio received and queued for transcription",
- "recordingSizeSoftWarning": "Recording is {{size}}. Consider stopping when convenient.",
- "recordingMaxDurationReached": "Recording reached the maximum duration and was stopped automatically.",
- "recordingFinalized": "Recording uploaded for processing",
- "recordingResumeFound": "An in-progress recording from this browser was detected on the server. Resume?"
+ "videoRecordingUnsupported": "This browser cannot record video — capturing audio only."
},
"webhooks": {
"title": "Webhooks",
diff --git a/static/locales/es.json b/static/locales/es.json
index b344313b..ea1e45bc 100644
--- a/static/locales/es.json
+++ b/static/locales/es.json
@@ -1259,29 +1259,51 @@
},
"recording": {
"acceptDisclaimer": "Acepto",
+ "alsoMixIn": "Mezclar también (opcional)",
"cancelRecording": "Cancelar",
+ "detectedDevicePrefix": "Detectado",
+ "detectedDeviceSuffix": "— selecciónalo en el menú de micrófono para enrutar el audio del sistema.",
+ "disableAudioProcessingHelp": "— activa esta opción cuando enrutes audio del sistema a través de un monitor o dispositivo de audio virtual (BlackHole, VB-Cable, monitor de Pulse). Déjala desactivada para una grabación normal de micrófono.",
+ "disableAudioProcessingTitle": "Desactivar cancelación de eco, supresión de ruido y ganancia automática",
"discardRecovery": "Descartar",
"disclaimer": "Aviso de Grabación",
"duration": "Duración",
+ "grantMicPermissionHint": "Concede permiso al micrófono para que aparezcan los nombres de los dispositivos.",
+ "howToEnableFullSystemAudio": "cómo habilitar el audio completo del sistema",
+ "inputDevices": "Dispositivos de entrada",
+ "linuxMonitorHintPrefix": "¿No ves las entradas \"Monitor of …\"? Chrome en Linux las filtra. La sección Linux → Opción C de la guía muestra un comando",
+ "linuxMonitorHintSuffix": "que expone un monitor de Pulse como una fuente normal que Chrome sí listará.",
"micPlusSys": "Micro + Sis",
"microphone": "Micrófono",
"microphoneAndSystem": "Micrófono + Sistema",
"microphonePermissionDenied": "Permiso del micrófono denegado",
+ "mixHelp": "Elige un dispositivo de monitor / audio virtual (BlackHole en macOS, VB-Cable en Windows, o un monitor de Pulse encapsulado en Linux) para mezclar el audio del sistema con tu micrófono. Ambas señales se combinan en una sola grabación.",
+ "mixingTwoInputs": "Mezclando 2 entradas",
"modeBoth": "Micrófono + Sistema",
"modeMicrophone": "Micrófono",
"modeSystem": "Audio del sistema",
+ "noneOption": "Ninguno",
"notes": "Notas",
"notesPlaceholder": "Añade notas sobre esta grabación...",
+ "openGuide": "Abrir guía",
"pauseRecording": "Pausa",
+ "primaryInput": "Entrada principal",
+ "recordVideoHelp": "Conserva la pestaña, ventana o pantalla compartida como grabación de vídeo junto con el audio. El vídeo se reproduce en la vista de grabación; la transcripción sigue usando solo el audio.",
+ "recordVideoTitle": "Grabar también el vídeo.",
"recordingFailed": "La grabación falló",
"recordingInProgress": "Grabación en progreso...",
"recordingMode": "Modo de grabación",
"recordingSize": "Tamaño Estimado",
"recordingStopped": "Grabación detenida",
"recordingTime": "Tiempo de Grabación",
+ "recoveryChunksUploaded": "Fragmentos subidos",
"recoveryDescription": "Encontramos una grabación sin terminar de una sesión anterior. ¿Deseas restaurarla?",
+ "recoveryFinishProcessing": "Finalizar procesamiento",
"recoveryFound": "Grabación no guardada detectada",
+ "recoveryServerDescription": "Una grabación de este navegador todavía se estaba guardando en el servidor. Puedes terminar de procesarla ahora o descartarla.",
+ "recoveryServerFound": "Grabación en curso encontrada en el servidor",
"recoveryTitle": "Recuperar grabación",
+ "requestMicPermission": "Solicitar permiso de micrófono",
"restoreRecording": "Restaurar",
"resumeRecording": "Reanudar",
"saveRecording": "Guardar Grabación",
@@ -1291,34 +1313,15 @@
"stopRecording": "Detener Grabación",
"systemAudio": "Audio del Sistema",
"systemAudioNotSupported": "La grabación de audio del sistema no es compatible con este navegador",
- "title": "Grabación de Audio",
- "tabAudioHintPrefix": "En",
- "tabAudioHintSuffix": "el navegador solo puede capturar",
+ "systemDefault": "Predeterminado del sistema",
"tabAudioBold": "audio de pestaña",
"tabAudioHintDash": "directamente —",
- "howToEnableFullSystemAudio": "cómo habilitar el audio completo del sistema",
+ "tabAudioHintPrefix": "En",
+ "tabAudioHintSuffix": "el navegador solo puede capturar",
"tabAudioOnlyTooltip": "Solo audio de pestaña en esta plataforma — ver ayuda",
- "detectedDevicePrefix": "Detectado",
- "detectedDeviceSuffix": "— selecciónalo en el menú de micrófono para enrutar el audio del sistema.",
- "disableAudioProcessingTitle": "Desactivar cancelación de eco, supresión de ruido y ganancia automática",
- "disableAudioProcessingHelp": "— activa esta opción cuando enrutes audio del sistema a través de un monitor o dispositivo de audio virtual (BlackHole, VB-Cable, monitor de Pulse). Déjala desactivada para una grabación normal de micrófono.",
- "inputDevices": "Dispositivos de entrada",
- "mixingTwoInputs": "Mezclando 2 entradas",
- "grantMicPermissionHint": "Concede permiso al micrófono para que aparezcan los nombres de los dispositivos.",
- "requestMicPermission": "Solicitar permiso de micrófono",
- "primaryInput": "Entrada principal",
- "systemDefault": "Predeterminado del sistema",
- "virtualMonitor": "virtual / monitor",
- "alsoMixIn": "Mezclar también (opcional)",
- "noneOption": "Ninguno",
- "mixHelp": "Elige un dispositivo de monitor / audio virtual (BlackHole en macOS, VB-Cable en Windows, o un monitor de Pulse encapsulado en Linux) para mezclar el audio del sistema con tu micrófono. Ambas señales se combinan en una sola grabación.",
- "linuxMonitorHintPrefix": "¿No ves las entradas \"Monitor of …\"? Chrome en Linux las filtra. La sección Linux → Opción C de la guía muestra un comando",
- "linuxMonitorHintSuffix": "que expone un monitor de Pulse como una fuente normal que Chrome sí listará.",
- "openGuide": "Abrir guía",
- "recoveryServerFound": "Grabación en curso encontrada en el servidor",
- "recoveryServerDescription": "Una grabación de este navegador todavía se estaba guardando en el servidor. Puedes terminar de procesarla ahora o descartarla.",
- "recoveryChunksUploaded": "Fragmentos subidos",
- "recoveryFinishProcessing": "Finalizar procesamiento"
+ "title": "Grabación de Audio",
+ "videoPreviewLabel": "Vista previa en directo del vídeo capturado",
+ "virtualMonitor": "virtual / monitor"
},
"reprocessModal": {
"audioReTranscribedFromScratch": "El audio será re-transcrito desde cero. Esto también regenerará el título y resumen basado en la nueva transcripción.",
@@ -1760,17 +1763,18 @@
"discardUnsavedRecording": "Tiene una grabación sin guardar. Si sale, se descartará. ¿Continuar?"
},
"toasts": {
+ "processingCompleted": "¡Procesamiento completado!",
+ "processingFailed": "Error en el procesamiento",
+ "recordingFinalized": "Grabación subida para procesamiento",
+ "recordingMaxDurationReached": "La grabación alcanzó la duración máxima y se detuvo automáticamente.",
+ "recordingResumeFound": "Se detectó una grabación en curso de este navegador en el servidor. ¿Reanudar?",
+ "recordingSizeSoftWarning": "La grabación ocupa {{size}}. Considere detenerla cuando le convenga.",
+ "retryingPendingUploads": "Reintentando subidas pendientes…",
+ "shareTargetReceived": "Audio compartido recibido y puesto en cola para transcripción",
"uploadFailedDownloadedLocally": "Subida fallida. El audio se guardó en la carpeta de Descargas para reintentarlo más tarde.",
"uploadFailedNoRecovery": "Subida fallida y el audio no pudo guardarse localmente. Por favor, vuelva a grabar.",
- "retryingPendingUploads": "Reintentando subidas pendientes…",
"uploadFailedWillRetry": "Error en la subida — guardada y se reintentará automáticamente al reconectar.",
- "shareTargetReceived": "Audio compartido recibido y puesto en cola para transcripción",
- "recordingSizeSoftWarning": "La grabación ocupa {{size}}. Considere detenerla cuando le convenga.",
- "recordingMaxDurationReached": "La grabación alcanzó la duración máxima y se detuvo automáticamente.",
- "recordingFinalized": "Grabación subida para procesamiento",
- "recordingResumeFound": "Se detectó una grabación en curso de este navegador en el servidor. ¿Reanudar?",
- "processingFailed": "Error en el procesamiento",
- "processingCompleted": "¡Procesamiento completado!"
+ "videoRecordingUnsupported": "Este navegador no puede grabar vídeo; se capturará solo el audio."
},
"webhooks": {
"title": "Webhooks",
diff --git a/static/locales/fr.json b/static/locales/fr.json
index 005695a7..9ca85fc2 100644
--- a/static/locales/fr.json
+++ b/static/locales/fr.json
@@ -1259,29 +1259,51 @@
},
"recording": {
"acceptDisclaimer": "J'accepte",
+ "alsoMixIn": "Mixer aussi (optionnel)",
"cancelRecording": "Annuler",
+ "detectedDevicePrefix": "Détecté :",
+ "detectedDeviceSuffix": "— sélectionnez-le dans la liste du micro pour acheminer l'audio système.",
+ "disableAudioProcessingHelp": "— activez cette option lorsque vous acheminez l'audio système via un monitor ou un périphérique audio virtuel (BlackHole, VB-Cable, monitor PulseAudio). Laissez désactivé pour un enregistrement microphone normal.",
+ "disableAudioProcessingTitle": "Désactiver l'annulation d'écho, la suppression de bruit et le gain automatique",
"discardRecovery": "Ignorer",
"disclaimer": "Avertissement d'Enregistrement",
"duration": "Durée",
+ "grantMicPermissionHint": "Accordez une fois l'autorisation au microphone pour que les noms des périphériques s'affichent.",
+ "howToEnableFullSystemAudio": "comment activer l'audio système complet",
+ "inputDevices": "Périphériques d'entrée",
+ "linuxMonitorHintPrefix": "Vous ne voyez pas les entrées \"Monitor of …\" ? Chrome sous Linux les filtre. La section Linux → Option C du guide montre une commande",
+ "linuxMonitorHintSuffix": "d'une seule ligne pour exposer un monitor Pulse comme une source normale que Chrome listera.",
"micPlusSys": "Micro + Sys",
"microphone": "Microphone",
"microphoneAndSystem": "Microphone + Système",
"microphonePermissionDenied": "Permission du microphone refusée",
+ "mixHelp": "Choisissez un monitor / périphérique audio virtuel (BlackHole sur macOS, VB-Cable sur Windows, ou un monitor Pulse encapsulé sous Linux) pour mixer l'audio système avec votre micro. Les deux flux se combinent en un seul enregistrement.",
+ "mixingTwoInputs": "Mixage de 2 entrées",
"modeBoth": "Microphone + Système",
"modeMicrophone": "Microphone",
"modeSystem": "Audio système",
+ "noneOption": "Aucun",
"notes": "Notes",
"notesPlaceholder": "Ajouter des notes sur cet enregistrement...",
+ "openGuide": "Ouvrir le guide",
"pauseRecording": "Pause",
+ "primaryInput": "Entrée principale",
+ "recordVideoHelp": "Conserve l'onglet, la fenêtre ou l'écran partagé comme enregistrement vidéo avec l'audio. La vidéo est lisible dans la vue d'enregistrement ; la transcription n'utilise toujours que l'audio.",
+ "recordVideoTitle": "Enregistrer aussi la vidéo.",
"recordingFailed": "L'enregistrement a échoué",
"recordingInProgress": "Enregistrement en cours...",
"recordingMode": "Mode d'enregistrement",
"recordingSize": "Taille Estimée",
"recordingStopped": "Enregistrement arrêté",
"recordingTime": "Temps d'Enregistrement",
+ "recoveryChunksUploaded": "Segments téléversés",
"recoveryDescription": "Nous avons trouvé un enregistrement inachevé d'une session précédente. Souhaitez-vous le restaurer ?",
+ "recoveryFinishProcessing": "Terminer le traitement",
"recoveryFound": "Enregistrement non sauvegardé détecté",
+ "recoveryServerDescription": "Un enregistrement de ce navigateur était encore en cours d'enregistrement sur le serveur. Vous pouvez terminer son traitement maintenant ou le supprimer.",
+ "recoveryServerFound": "Enregistrement en cours trouvé sur le serveur",
"recoveryTitle": "Récupérer l'enregistrement",
+ "requestMicPermission": "Demander l'autorisation du microphone",
"restoreRecording": "Restaurer",
"resumeRecording": "Reprendre",
"saveRecording": "Enregistrer l'Enregistrement",
@@ -1291,34 +1313,15 @@
"stopRecording": "Arrêter l'Enregistrement",
"systemAudio": "Audio Système",
"systemAudioNotSupported": "L'enregistrement audio système n'est pas pris en charge dans ce navigateur",
- "title": "Enregistrement Audio",
- "tabAudioHintPrefix": "Sur",
- "tabAudioHintSuffix": "le navigateur ne peut capturer que",
+ "systemDefault": "Par défaut du système",
"tabAudioBold": "l'audio d'onglet",
"tabAudioHintDash": "directement —",
- "howToEnableFullSystemAudio": "comment activer l'audio système complet",
+ "tabAudioHintPrefix": "Sur",
+ "tabAudioHintSuffix": "le navigateur ne peut capturer que",
"tabAudioOnlyTooltip": "Audio d'onglet uniquement sur cette plateforme — voir l'aide",
- "detectedDevicePrefix": "Détecté :",
- "detectedDeviceSuffix": "— sélectionnez-le dans la liste du micro pour acheminer l'audio système.",
- "disableAudioProcessingTitle": "Désactiver l'annulation d'écho, la suppression de bruit et le gain automatique",
- "disableAudioProcessingHelp": "— activez cette option lorsque vous acheminez l'audio système via un monitor ou un périphérique audio virtuel (BlackHole, VB-Cable, monitor PulseAudio). Laissez désactivé pour un enregistrement microphone normal.",
- "inputDevices": "Périphériques d'entrée",
- "mixingTwoInputs": "Mixage de 2 entrées",
- "grantMicPermissionHint": "Accordez une fois l'autorisation au microphone pour que les noms des périphériques s'affichent.",
- "requestMicPermission": "Demander l'autorisation du microphone",
- "primaryInput": "Entrée principale",
- "systemDefault": "Par défaut du système",
- "virtualMonitor": "virtuel / monitor",
- "alsoMixIn": "Mixer aussi (optionnel)",
- "noneOption": "Aucun",
- "mixHelp": "Choisissez un monitor / périphérique audio virtuel (BlackHole sur macOS, VB-Cable sur Windows, ou un monitor Pulse encapsulé sous Linux) pour mixer l'audio système avec votre micro. Les deux flux se combinent en un seul enregistrement.",
- "linuxMonitorHintPrefix": "Vous ne voyez pas les entrées \"Monitor of …\" ? Chrome sous Linux les filtre. La section Linux → Option C du guide montre une commande",
- "linuxMonitorHintSuffix": "d'une seule ligne pour exposer un monitor Pulse comme une source normale que Chrome listera.",
- "openGuide": "Ouvrir le guide",
- "recoveryServerFound": "Enregistrement en cours trouvé sur le serveur",
- "recoveryServerDescription": "Un enregistrement de ce navigateur était encore en cours d'enregistrement sur le serveur. Vous pouvez terminer son traitement maintenant ou le supprimer.",
- "recoveryChunksUploaded": "Segments téléversés",
- "recoveryFinishProcessing": "Terminer le traitement"
+ "title": "Enregistrement Audio",
+ "videoPreviewLabel": "Aperçu en direct de la vidéo capturée",
+ "virtualMonitor": "virtuel / monitor"
},
"reprocessModal": {
"audioReTranscribedFromScratch": "L'audio sera re-transcrit à partir de zéro. Cela régénérera également le titre et le résumé basés sur la nouvelle transcription.",
@@ -1760,17 +1763,18 @@
"discardUnsavedRecording": "Vous avez un enregistrement non sauvegardé. Quitter le supprimera. Continuer ?"
},
"toasts": {
+ "processingCompleted": "Traitement terminé !",
+ "processingFailed": "Échec du traitement",
+ "recordingFinalized": "Enregistrement envoyé pour traitement",
+ "recordingMaxDurationReached": "L'enregistrement a atteint la durée maximale et s'est arrêté automatiquement.",
+ "recordingResumeFound": "Un enregistrement en cours dans ce navigateur a été détecté sur le serveur. Reprendre ?",
+ "recordingSizeSoftWarning": "L'enregistrement fait {{size}}. Pensez à l'arrêter quand vous pourrez.",
+ "retryingPendingUploads": "Nouvelle tentative des envois en attente…",
+ "shareTargetReceived": "Audio partagé reçu et mis en file pour transcription",
"uploadFailedDownloadedLocally": "Échec de l'envoi. L'audio a été enregistré dans votre dossier Téléchargements pour une nouvelle tentative.",
"uploadFailedNoRecovery": "Échec de l'envoi et l'audio n'a pas pu être enregistré localement. Veuillez réenregistrer.",
- "retryingPendingUploads": "Nouvelle tentative des envois en attente…",
"uploadFailedWillRetry": "Échec de l'envoi — enregistré et réessayé automatiquement à la reconnexion.",
- "shareTargetReceived": "Audio partagé reçu et mis en file pour transcription",
- "recordingSizeSoftWarning": "L'enregistrement fait {{size}}. Pensez à l'arrêter quand vous pourrez.",
- "recordingMaxDurationReached": "L'enregistrement a atteint la durée maximale et s'est arrêté automatiquement.",
- "recordingFinalized": "Enregistrement envoyé pour traitement",
- "recordingResumeFound": "Un enregistrement en cours dans ce navigateur a été détecté sur le serveur. Reprendre ?",
- "processingFailed": "Échec du traitement",
- "processingCompleted": "Traitement terminé !"
+ "videoRecordingUnsupported": "Ce navigateur ne peut pas enregistrer la vidéo — capture de l'audio uniquement."
},
"webhooks": {
"title": "Webhooks",
diff --git a/static/locales/pt-BR.json b/static/locales/pt-BR.json
index d30ed822..38cbdf56 100644
--- a/static/locales/pt-BR.json
+++ b/static/locales/pt-BR.json
@@ -1259,29 +1259,51 @@
},
"recording": {
"acceptDisclaimer": "Eu Aceito",
+ "alsoMixIn": "Também misturar (opcional)",
"cancelRecording": "Cancelar",
+ "detectedDevicePrefix": "Detectado:",
+ "detectedDeviceSuffix": "— selecione no menu de microfone para encaminhar o áudio do sistema.",
+ "disableAudioProcessingHelp": "— ative ao encaminhar áudio do sistema via uma fonte monitor ou dispositivo de áudio virtual (BlackHole, VB-Cable, monitor do Pulse). Deixe desativado para gravação normal de microfone.",
+ "disableAudioProcessingTitle": "Desativar cancelamento de eco, supressão de ruído e ganho automático",
"discardRecovery": "Descartar",
"disclaimer": "Aviso de Gravação",
"duration": "Duração",
+ "grantMicPermissionHint": "Conceda permissão de microfone uma vez para que os nomes dos dispositivos apareçam.",
+ "howToEnableFullSystemAudio": "como ativar o áudio completo do sistema",
+ "inputDevices": "Dispositivos de entrada",
+ "linuxMonitorHintPrefix": "Não vê entradas \"Monitor of …\"? O Chrome no Linux as filtra. A seção Linux → Opção C do guia mostra um comando",
+ "linuxMonitorHintSuffix": "de uma linha para expor um monitor do Pulse como uma fonte comum que o Chrome irá listar.",
"micPlusSys": "Mic + Sis",
"microphone": "Microfone",
"microphoneAndSystem": "Microfone + Sistema",
"microphonePermissionDenied": "Permissão do microfone negada",
+ "mixHelp": "Escolha um dispositivo monitor / áudio virtual (BlackHole no macOS, VB-Cable no Windows ou um monitor do Pulse encapsulado no Linux) para misturar áudio do sistema com seu microfone. Ambas as faixas se combinam em uma única gravação.",
+ "mixingTwoInputs": "Misturando 2 entradas",
"modeBoth": "Microfone + Sistema",
"modeMicrophone": "Microfone",
"modeSystem": "Áudio do Sistema",
+ "noneOption": "Nenhum",
"notes": "Notas",
"notesPlaceholder": "Adicione notas sobre esta gravação...",
+ "openGuide": "Abrir guia",
"pauseRecording": "Pausar",
+ "primaryInput": "Entrada primária",
+ "recordVideoHelp": "Mantém a aba, janela ou tela compartilhada como gravação de vídeo junto com o áudio. O vídeo é reproduzido na visualização da gravação; a transcrição continua usando apenas o áudio.",
+ "recordVideoTitle": "Gravar também o vídeo.",
"recordingFailed": "Falha na gravação",
"recordingInProgress": "Gravação em andamento...",
"recordingMode": "Modo de Gravação",
"recordingSize": "Tamanho Estimado",
"recordingStopped": "Gravação parada",
"recordingTime": "Tempo de Gravação",
+ "recoveryChunksUploaded": "Fragmentos enviados",
"recoveryDescription": "Encontramos uma gravação inacabada de uma sessão anterior. Deseja restaurá-la?",
+ "recoveryFinishProcessing": "Concluir processamento",
"recoveryFound": "Gravação Não Salva Detectada",
+ "recoveryServerDescription": "Uma gravação deste navegador ainda estava sendo salva no servidor. Você pode concluir o processamento agora ou descartá-la.",
+ "recoveryServerFound": "Gravação em andamento encontrada no servidor",
"recoveryTitle": "Recuperar Gravação",
+ "requestMicPermission": "Solicitar permissão de microfone",
"restoreRecording": "Restaurar",
"resumeRecording": "Retomar",
"saveRecording": "Salvar Gravação",
@@ -1291,34 +1313,15 @@
"stopRecording": "Parar Gravação",
"systemAudio": "Áudio do Sistema",
"systemAudioNotSupported": "A gravação de áudio do sistema não é suportada neste navegador",
- "title": "Gravação de Áudio",
- "tabAudioHintPrefix": "No",
- "tabAudioHintSuffix": "o navegador só consegue capturar",
+ "systemDefault": "Padrão do sistema",
"tabAudioBold": "áudio da aba",
"tabAudioHintDash": "diretamente —",
- "howToEnableFullSystemAudio": "como ativar o áudio completo do sistema",
+ "tabAudioHintPrefix": "No",
+ "tabAudioHintSuffix": "o navegador só consegue capturar",
"tabAudioOnlyTooltip": "Somente áudio da aba nesta plataforma — ver ajuda",
- "detectedDevicePrefix": "Detectado:",
- "detectedDeviceSuffix": "— selecione no menu de microfone para encaminhar o áudio do sistema.",
- "disableAudioProcessingTitle": "Desativar cancelamento de eco, supressão de ruído e ganho automático",
- "disableAudioProcessingHelp": "— ative ao encaminhar áudio do sistema via uma fonte monitor ou dispositivo de áudio virtual (BlackHole, VB-Cable, monitor do Pulse). Deixe desativado para gravação normal de microfone.",
- "inputDevices": "Dispositivos de entrada",
- "mixingTwoInputs": "Misturando 2 entradas",
- "grantMicPermissionHint": "Conceda permissão de microfone uma vez para que os nomes dos dispositivos apareçam.",
- "requestMicPermission": "Solicitar permissão de microfone",
- "primaryInput": "Entrada primária",
- "systemDefault": "Padrão do sistema",
- "virtualMonitor": "virtual / monitor",
- "alsoMixIn": "Também misturar (opcional)",
- "noneOption": "Nenhum",
- "mixHelp": "Escolha um dispositivo monitor / áudio virtual (BlackHole no macOS, VB-Cable no Windows ou um monitor do Pulse encapsulado no Linux) para misturar áudio do sistema com seu microfone. Ambas as faixas se combinam em uma única gravação.",
- "linuxMonitorHintPrefix": "Não vê entradas \"Monitor of …\"? O Chrome no Linux as filtra. A seção Linux → Opção C do guia mostra um comando",
- "linuxMonitorHintSuffix": "de uma linha para expor um monitor do Pulse como uma fonte comum que o Chrome irá listar.",
- "openGuide": "Abrir guia",
- "recoveryServerFound": "Gravação em andamento encontrada no servidor",
- "recoveryServerDescription": "Uma gravação deste navegador ainda estava sendo salva no servidor. Você pode concluir o processamento agora ou descartá-la.",
- "recoveryChunksUploaded": "Fragmentos enviados",
- "recoveryFinishProcessing": "Concluir processamento"
+ "title": "Gravação de Áudio",
+ "videoPreviewLabel": "Pré-visualização ao vivo do vídeo capturado",
+ "virtualMonitor": "virtual / monitor"
},
"reprocessModal": {
"audioReTranscribedFromScratch": "O áudio será retranscrito do zero. Isso também regenerará o título e o resumo com base na nova transcrição.",
@@ -1760,17 +1763,18 @@
"discardUnsavedRecording": "Você tem uma gravação não salva. Sair vai descartá-la. Continuar?"
},
"toasts": {
+ "processingCompleted": "Processamento concluído!",
+ "processingFailed": "Falha no processamento",
+ "recordingFinalized": "Gravação enviada para processamento",
+ "recordingMaxDurationReached": "A gravação atingiu a duração máxima e foi parada automaticamente.",
+ "recordingResumeFound": "Uma gravação em andamento deste navegador foi detectada no servidor. Retomar?",
+ "recordingSizeSoftWarning": "A gravação tem {{size}}. Considere parar quando for conveniente.",
+ "retryingPendingUploads": "Tentando reenviar uploads pendentes…",
+ "shareTargetReceived": "Áudio compartilhado recebido e enfileirado para transcrição",
"uploadFailedDownloadedLocally": "Upload falhou. Áudio salvo na pasta Downloads para tentar novamente mais tarde.",
"uploadFailedNoRecovery": "Upload falhou e o áudio não pôde ser salvo localmente. Por favor, grave novamente.",
- "retryingPendingUploads": "Tentando reenviar uploads pendentes…",
"uploadFailedWillRetry": "Falha no envio — salvo e será reenviado automaticamente quando você reconectar.",
- "shareTargetReceived": "Áudio compartilhado recebido e enfileirado para transcrição",
- "recordingSizeSoftWarning": "A gravação tem {{size}}. Considere parar quando for conveniente.",
- "recordingMaxDurationReached": "A gravação atingiu a duração máxima e foi parada automaticamente.",
- "recordingFinalized": "Gravação enviada para processamento",
- "recordingResumeFound": "Uma gravação em andamento deste navegador foi detectada no servidor. Retomar?",
- "processingFailed": "Falha no processamento",
- "processingCompleted": "Processamento concluído!"
+ "videoRecordingUnsupported": "Este navegador não consegue gravar vídeo — capturando apenas o áudio."
},
"webhooks": {
"title": "Webhooks",
diff --git a/static/locales/ru.json b/static/locales/ru.json
index 08910c8c..47b90a8d 100644
--- a/static/locales/ru.json
+++ b/static/locales/ru.json
@@ -1259,29 +1259,51 @@
},
"recording": {
"acceptDisclaimer": "Принимаю",
+ "alsoMixIn": "Также подмешать (опционально)",
"cancelRecording": "Отмена",
+ "detectedDevicePrefix": "Обнаружено:",
+ "detectedDeviceSuffix": "— выберите его в списке микрофонов, чтобы направить системный звук.",
+ "disableAudioProcessingHelp": "— включите, когда направляете системный звук через monitor-источник или виртуальное аудиоустройство (BlackHole, VB-Cable, Pulse monitor). Оставьте выключенным для обычной записи с микрофона.",
+ "disableAudioProcessingTitle": "Отключить эхоподавление, шумоподавление и авто-усиление",
"discardRecovery": "Отклонить",
"disclaimer": "Предупреждение о записи",
"duration": "Длительность",
+ "grantMicPermissionHint": "Один раз разрешите доступ к микрофону, чтобы появились имена устройств.",
+ "howToEnableFullSystemAudio": "как включить полный системный звук",
+ "inputDevices": "Устройства ввода",
+ "linuxMonitorHintPrefix": "Не видите записи \"Monitor of …\"? Chrome на Linux их фильтрует. В разделе руководства Linux → Вариант C показана однострочная команда",
+ "linuxMonitorHintSuffix": ", которая показывает Pulse monitor как обычный источник, видимый для Chrome.",
"micPlusSys": "Микр. + Сис.",
"microphone": "Микрофон",
"microphoneAndSystem": "Микрофон + система",
"microphonePermissionDenied": "Доступ к микрофону запрещён",
+ "mixHelp": "Выберите monitor / виртуальное аудиоустройство (BlackHole на macOS, VB-Cable на Windows или обёрнутый Pulse monitor на Linux), чтобы смешать системный звук с микрофоном. Оба потока объединяются в одну запись.",
+ "mixingTwoInputs": "Смешиваются 2 входа",
"modeBoth": "Микрофон + система",
"modeMicrophone": "Микрофон",
"modeSystem": "Системный звук",
+ "noneOption": "Нет",
"notes": "Заметки",
"notesPlaceholder": "Добавьте заметки об этой записи...",
+ "openGuide": "Открыть руководство",
"pauseRecording": "Пауза",
+ "primaryInput": "Основной вход",
+ "recordVideoHelp": "Сохраняет транслируемую вкладку, окно или экран как видеозапись вместе со звуком. Видео воспроизводится в режиме просмотра записи; для транскрипции по-прежнему используется только звук.",
+ "recordVideoTitle": "Также записывать видео.",
"recordingFailed": "Запись не удалась",
"recordingInProgress": "Идёт запись...",
"recordingMode": "Режим записи",
"recordingSize": "Предполагаемый размер",
"recordingStopped": "Запись остановлена",
"recordingTime": "Время записи",
+ "recoveryChunksUploaded": "Загружено фрагментов",
"recoveryDescription": "Мы обнаружили незавершённую запись из предыдущей сессии. Хотите восстановить её?",
+ "recoveryFinishProcessing": "Завершить обработку",
"recoveryFound": "Обнаружена несохранённая запись",
+ "recoveryServerDescription": "Запись из этого браузера ещё сохранялась на сервере. Вы можете завершить её обработку сейчас или отклонить её.",
+ "recoveryServerFound": "На сервере найдена незавершённая запись",
"recoveryTitle": "Восстановить запись",
+ "requestMicPermission": "Запросить доступ к микрофону",
"restoreRecording": "Восстановить",
"resumeRecording": "Возобновить",
"saveRecording": "Сохранить запись",
@@ -1291,34 +1313,15 @@
"stopRecording": "Остановить запись",
"systemAudio": "Системный звук",
"systemAudioNotSupported": "Запись системного звука не поддерживается в этом браузере",
- "title": "Аудиозапись",
- "tabAudioHintPrefix": "В",
- "tabAudioHintSuffix": "браузер может захватывать только",
+ "systemDefault": "По умолчанию",
"tabAudioBold": "звук вкладки",
"tabAudioHintDash": "напрямую —",
- "howToEnableFullSystemAudio": "как включить полный системный звук",
+ "tabAudioHintPrefix": "В",
+ "tabAudioHintSuffix": "браузер может захватывать только",
"tabAudioOnlyTooltip": "На этой платформе доступен только звук вкладки — см. справку",
- "detectedDevicePrefix": "Обнаружено:",
- "detectedDeviceSuffix": "— выберите его в списке микрофонов, чтобы направить системный звук.",
- "disableAudioProcessingTitle": "Отключить эхоподавление, шумоподавление и авто-усиление",
- "disableAudioProcessingHelp": "— включите, когда направляете системный звук через monitor-источник или виртуальное аудиоустройство (BlackHole, VB-Cable, Pulse monitor). Оставьте выключенным для обычной записи с микрофона.",
- "inputDevices": "Устройства ввода",
- "mixingTwoInputs": "Смешиваются 2 входа",
- "grantMicPermissionHint": "Один раз разрешите доступ к микрофону, чтобы появились имена устройств.",
- "requestMicPermission": "Запросить доступ к микрофону",
- "primaryInput": "Основной вход",
- "systemDefault": "По умолчанию",
- "virtualMonitor": "виртуальный / monitor",
- "alsoMixIn": "Также подмешать (опционально)",
- "noneOption": "Нет",
- "mixHelp": "Выберите monitor / виртуальное аудиоустройство (BlackHole на macOS, VB-Cable на Windows или обёрнутый Pulse monitor на Linux), чтобы смешать системный звук с микрофоном. Оба потока объединяются в одну запись.",
- "linuxMonitorHintPrefix": "Не видите записи \"Monitor of …\"? Chrome на Linux их фильтрует. В разделе руководства Linux → Вариант C показана однострочная команда",
- "linuxMonitorHintSuffix": ", которая показывает Pulse monitor как обычный источник, видимый для Chrome.",
- "openGuide": "Открыть руководство",
- "recoveryServerFound": "На сервере найдена незавершённая запись",
- "recoveryServerDescription": "Запись из этого браузера ещё сохранялась на сервере. Вы можете завершить её обработку сейчас или отклонить её.",
- "recoveryChunksUploaded": "Загружено фрагментов",
- "recoveryFinishProcessing": "Завершить обработку"
+ "title": "Аудиозапись",
+ "videoPreviewLabel": "Предпросмотр записываемого видео",
+ "virtualMonitor": "виртуальный / monitor"
},
"reprocessModal": {
"audioReTranscribedFromScratch": "Аудио будет транскрибировано заново с нуля. Это также перегенерирует заголовок и резюме на основе новой транскрипции.",
@@ -1760,17 +1763,18 @@
"discardUnsavedRecording": "У вас несохранённая запись. Если уйти, она будет отменена. Продолжить?"
},
"toasts": {
+ "processingCompleted": "Обработка завершена!",
+ "processingFailed": "Обработка не удалась",
+ "recordingFinalized": "Запись отправлена на обработку",
+ "recordingMaxDurationReached": "Запись достигла максимальной длительности и была остановлена автоматически.",
+ "recordingResumeFound": "На сервере обнаружена незавершённая запись из этого браузера. Возобновить?",
+ "recordingSizeSoftWarning": "Размер записи {{size}}. Подумайте об остановке при удобном случае.",
+ "retryingPendingUploads": "Повторная отправка отложенных загрузок…",
+ "shareTargetReceived": "Аудио получено через «Поделиться» и поставлено в очередь на транскрипцию",
"uploadFailedDownloadedLocally": "Загрузка не удалась. Аудио сохранено в папку «Загрузки» для повторной попытки.",
"uploadFailedNoRecovery": "Загрузка не удалась и аудио не удалось сохранить локально. Пожалуйста, запишите снова.",
- "retryingPendingUploads": "Повторная отправка отложенных загрузок…",
"uploadFailedWillRetry": "Ошибка загрузки — сохранено и будет автоматически повторено при восстановлении связи.",
- "shareTargetReceived": "Аудио получено через «Поделиться» и поставлено в очередь на транскрипцию",
- "recordingSizeSoftWarning": "Размер записи {{size}}. Подумайте об остановке при удобном случае.",
- "recordingMaxDurationReached": "Запись достигла максимальной длительности и была остановлена автоматически.",
- "recordingFinalized": "Запись отправлена на обработку",
- "recordingResumeFound": "На сервере обнаружена незавершённая запись из этого браузера. Возобновить?",
- "processingFailed": "Обработка не удалась",
- "processingCompleted": "Обработка завершена!"
+ "videoRecordingUnsupported": "Этот браузер не может записывать видео — записывается только звук."
},
"webhooks": {
"title": "Вебхуки",
diff --git a/static/locales/zh.json b/static/locales/zh.json
index b8657085..385033e0 100644
--- a/static/locales/zh.json
+++ b/static/locales/zh.json
@@ -1259,29 +1259,51 @@
},
"recording": {
"acceptDisclaimer": "我接受",
+ "alsoMixIn": "同时混入(可选)",
"cancelRecording": "取消",
+ "detectedDevicePrefix": "已检测到",
+ "detectedDeviceSuffix": "— 在麦克风下拉菜单中选择它,以将系统音频路由进来。",
+ "disableAudioProcessingHelp": "— 当您通过 monitor 源或虚拟音频设备(BlackHole、VB-Cable、Pulse monitor)路由系统音频时启用。普通麦克风录音时请保持关闭。",
+ "disableAudioProcessingTitle": "禁用回声消除、噪声抑制和自动增益",
"discardRecovery": "丢弃",
"disclaimer": "录音免责声明",
"duration": "时长",
+ "grantMicPermissionHint": "请授予一次麦克风权限,以便显示设备名称。",
+ "howToEnableFullSystemAudio": "如何启用完整的系统音频",
+ "inputDevices": "输入设备",
+ "linuxMonitorHintPrefix": "没有看到 \"Monitor of …\" 条目?Linux 上的 Chrome 会过滤掉它们。帮助指南 Linux → 选项 C 中展示了一行",
+ "linuxMonitorHintSuffix": "命令,可将 Pulse monitor 暴露为 Chrome 可识别的普通源。",
"micPlusSys": "麦克风 + 系统",
"microphone": "麦克风",
"microphoneAndSystem": "麦克风 + 系统",
"microphonePermissionDenied": "麦克风权限被拒绝",
+ "mixHelp": "选择一个 monitor / 虚拟音频设备(macOS 上的 BlackHole、Windows 上的 VB-Cable,或 Linux 上包装好的 Pulse monitor),将系统音频与您的麦克风混合。两路音频流将合并为一段录音。",
+ "mixingTwoInputs": "正在混合 2 个输入",
"modeBoth": "麦克风 + 系统",
"modeMicrophone": "麦克风",
"modeSystem": "系统音频",
+ "noneOption": "无",
"notes": "笔记",
"notesPlaceholder": "添加关于此录音的笔记...",
+ "openGuide": "打开指南",
"pauseRecording": "暂停",
+ "primaryInput": "主输入",
+ "recordVideoHelp": "将共享的标签页、窗口或屏幕连同音频一起保存为视频录制。视频可在录音详情中播放;转录仍然只使用音频。",
+ "recordVideoTitle": "同时录制视频。",
"recordingFailed": "录音失败",
"recordingInProgress": "录音进行中...",
"recordingMode": "录音模式",
"recordingSize": "预计大小",
"recordingStopped": "录音已停止",
"recordingTime": "录音时长",
+ "recoveryChunksUploaded": "已上传的片段",
"recoveryDescription": "我们发现了上次会话中未完成的录音。是否要恢复?",
+ "recoveryFinishProcessing": "完成处理",
"recoveryFound": "检测到未保存的录音",
+ "recoveryServerDescription": "此浏览器中的一段录音仍在服务器上保存。您可以现在完成处理,或将其丢弃。",
+ "recoveryServerFound": "在服务器上发现进行中的录音",
"recoveryTitle": "恢复录音",
+ "requestMicPermission": "请求麦克风权限",
"restoreRecording": "恢复",
"resumeRecording": "恢复",
"saveRecording": "保存录音",
@@ -1291,34 +1313,15 @@
"stopRecording": "停止录音",
"systemAudio": "系统音频",
"systemAudioNotSupported": "此浏览器不支持系统音频录制",
- "title": "音频录制",
- "tabAudioHintPrefix": "在",
- "tabAudioHintSuffix": "上,浏览器只能直接捕获",
+ "systemDefault": "系统默认",
"tabAudioBold": "标签页音频",
"tabAudioHintDash": "—",
- "howToEnableFullSystemAudio": "如何启用完整的系统音频",
+ "tabAudioHintPrefix": "在",
+ "tabAudioHintSuffix": "上,浏览器只能直接捕获",
"tabAudioOnlyTooltip": "此平台仅支持标签页音频 — 查看帮助",
- "detectedDevicePrefix": "已检测到",
- "detectedDeviceSuffix": "— 在麦克风下拉菜单中选择它,以将系统音频路由进来。",
- "disableAudioProcessingTitle": "禁用回声消除、噪声抑制和自动增益",
- "disableAudioProcessingHelp": "— 当您通过 monitor 源或虚拟音频设备(BlackHole、VB-Cable、Pulse monitor)路由系统音频时启用。普通麦克风录音时请保持关闭。",
- "inputDevices": "输入设备",
- "mixingTwoInputs": "正在混合 2 个输入",
- "grantMicPermissionHint": "请授予一次麦克风权限,以便显示设备名称。",
- "requestMicPermission": "请求麦克风权限",
- "primaryInput": "主输入",
- "systemDefault": "系统默认",
- "virtualMonitor": "虚拟 / monitor",
- "alsoMixIn": "同时混入(可选)",
- "noneOption": "无",
- "mixHelp": "选择一个 monitor / 虚拟音频设备(macOS 上的 BlackHole、Windows 上的 VB-Cable,或 Linux 上包装好的 Pulse monitor),将系统音频与您的麦克风混合。两路音频流将合并为一段录音。",
- "linuxMonitorHintPrefix": "没有看到 \"Monitor of …\" 条目?Linux 上的 Chrome 会过滤掉它们。帮助指南 Linux → 选项 C 中展示了一行",
- "linuxMonitorHintSuffix": "命令,可将 Pulse monitor 暴露为 Chrome 可识别的普通源。",
- "openGuide": "打开指南",
- "recoveryServerFound": "在服务器上发现进行中的录音",
- "recoveryServerDescription": "此浏览器中的一段录音仍在服务器上保存。您可以现在完成处理,或将其丢弃。",
- "recoveryChunksUploaded": "已上传的片段",
- "recoveryFinishProcessing": "完成处理"
+ "title": "音频录制",
+ "videoPreviewLabel": "捕获视频的实时预览",
+ "virtualMonitor": "虚拟 / monitor"
},
"reprocessModal": {
"audioReTranscribedFromScratch": "音频将从头重新转录。这也将基于新转录重新生成标题和摘要。",
@@ -1760,17 +1763,18 @@
"discardUnsavedRecording": "您有一段未保存的录音。离开将丢弃该录音。是否继续?"
},
"toasts": {
+ "processingCompleted": "处理完成!",
+ "processingFailed": "处理失败",
+ "recordingFinalized": "录音已上传等待处理",
+ "recordingMaxDurationReached": "录音已达到最长时长,已自动停止。",
+ "recordingResumeFound": "在服务器上检测到此浏览器的未完成录音。是否继续?",
+ "recordingSizeSoftWarning": "录音大小为 {{size}},可在方便时停止。",
+ "retryingPendingUploads": "正在重试待处理的上传…",
+ "shareTargetReceived": "已接收共享音频并加入转录队列",
"uploadFailedDownloadedLocally": "上传失败。音频已保存到下载文件夹,可稍后重试。",
"uploadFailedNoRecovery": "上传失败,且音频未能本地保存。请重新录制。",
- "retryingPendingUploads": "正在重试待处理的上传…",
"uploadFailedWillRetry": "上传失败——已保存,将在重新联网后自动重试。",
- "shareTargetReceived": "已接收共享音频并加入转录队列",
- "recordingSizeSoftWarning": "录音大小为 {{size}},可在方便时停止。",
- "recordingMaxDurationReached": "录音已达到最长时长,已自动停止。",
- "recordingFinalized": "录音已上传等待处理",
- "recordingResumeFound": "在服务器上检测到此浏览器的未完成录音。是否继续?",
- "processingFailed": "处理失败",
- "processingCompleted": "处理完成!"
+ "videoRecordingUnsupported": "此浏览器无法录制视频,将仅录制音频。"
},
"webhooks": {
"title": "Webhook",
diff --git a/templates/components/recording-view.html b/templates/components/recording-view.html
index 80e3887b..e979f465 100644
--- a/templates/components/recording-view.html
+++ b/templates/components/recording-view.html
@@ -4,6 +4,17 @@
<!-- Top: Visualizer and Status (Fixed) -->
<div class="flex-shrink-0 p-3 md:p-6 text-center bg-[var(--bg-tertiary)] border-b border-[var(--border-primary)]">
<div v-if="isRecording" class="w-full mx-auto mb-3 md:mb-4">
+ <!-- Live preview of the captured tab/window/screen when the
+ user opted into video recording (#303). The stream is
+ attached by audio.js (srcObject can't be template-bound). -->
+ <div v-if="recordingVideoActive" class="max-w-2xl mx-auto mb-2 md:mb-3">
+ <video id="recordingVideoPreview"
+ class="w-full max-h-48 md:max-h-64 rounded-lg bg-black object-contain"
+ muted autoplay playsinline></video>
+ <p class="text-[10px] text-[var(--text-muted)] mt-0.5">
+ <i class="fas fa-video mr-1"></i>${ t('recording.videoPreviewLabel') }
+ </p>
+ </div>
<!-- Dual visualizer for 'both' mode -->
<div v-if="recordingMode === 'both'" class="max-w-4xl mx-auto flex gap-2 md:gap-4">
<div class="w-1/2 min-h-[8rem] md:min-h-[12rem] h-32 md:h-48 flex flex-col bg-[var(--bg-primary)] rounded-lg p-1.5 md:p-2">
@@ -28,7 +39,13 @@
</div>
</div>
<div v-if="!isRecording && audioBlobURL" class="w-full mb-3 md:mb-4">
- <div class="audio-player-container">
+ <!-- A video capture reviews as a video player; audio-only
+ recordings keep the compact audio bar. -->
+ <div v-if="recordingVideoActive" class="max-w-2xl mx-auto">
+ <video :src="audioBlobURL" controls playsinline
+ class="w-full max-h-64 md:max-h-80 rounded-lg bg-black object-contain"></video>
+ </div>
+ <div v-else class="audio-player-container">
<audio :src="audioBlobURL" controls class="w-full">
Your browser does not support the audio element.
</audio>
diff --git a/templates/components/upload-view.html b/templates/components/upload-view.html
index aaae18ee..09fc1666 100644
--- a/templates/components/upload-view.html
+++ b/templates/components/upload-view.html
@@ -273,6 +273,21 @@
</button>
</div>
+ <!-- Opt-in video capture for the two display-capture modes
+ (#303). Only offered when the server retains video
+ streams (VIDEO_RETENTION) — without retention the
+ pipeline would strip the video back out at
+ transcription time, so the toggle would be a no-op. -->
+ <label v-if="canRecordSystemAudio && videoRetentionEnabled"
+ class="flex items-start gap-2 mt-1 px-1 cursor-pointer">
+ <input type="checkbox" v-model="recordSystemVideo" class="checkbox mt-0.5">
+ <span class="text-[11px] flex-1" style="color: var(--text-secondary);">
+ <i class="fas fa-video mr-1 text-[var(--text-muted)]"></i>
+ <strong>${ t('recording.recordVideoTitle') }</strong>
+ ${ t('recording.recordVideoHelp') }
+ </span>
+ </label>
+
<!-- Compact platform-aware hint when full system audio is
not available on this OS / browser combination. -->
<div v-if="audioCaps && audioCaps.supportsTabAudio && !audioCaps.supportsSystemAudio"
diff --git a/templates/index.html b/templates/index.html
index 2963ac07..80ec13cb 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -113,6 +113,7 @@
data-server-recording-chunks="{{ 'True' if server_recording_chunks_enabled else 'False' }}"
data-recording-max-hours="{{ recording_max_hours }}"
data-recording-chunk-seconds="{{ recording_chunk_seconds }}"
+ data-recording-video-kbps="{{ recording_video_kbps }}"
class="h-full flex flex-col opacity-0 transition-opacity duration-500">
<!-- Header -->
diff --git a/tests/test_recording_sessions.py b/tests/test_recording_sessions.py
index c3dd1705..cb44afa3 100644
--- a/tests/test_recording_sessions.py
+++ b/tests/test_recording_sessions.py
@@ -100,6 +100,26 @@ def test_create_session_returns_session_id_and_makes_dir():
shutil.rmtree(upload_folder, ignore_errors=True)
+def test_create_session_accepts_video_mime_types():
+ """video/webm and video/mp4 carry the opt-in tab/screen video capture
+ (#303) through the same chunk pipeline."""
+ upload_folder = _make_tmp_upload_folder()
+ with app.app_context():
+ app.config["UPLOAD_FOLDER"] = upload_folder
+ user = _setup_user("sess_video_mime")
+ client = app.test_client()
+ _login(client, user)
+ for mime in ("video/webm", "video/mp4"):
+ resp = client.post("/upload/session", json={"mime_type": mime})
+ assert resp.status_code == 201, resp.data
+ body = resp.get_json()
+ assert body["mime_type"] == mime
+ db.session.delete(db.session.get(RecordingSession, body["session_id"]))
+ db.session.delete(user)
+ db.session.commit()
+ shutil.rmtree(upload_folder, ignore_errors=True)
+
+
def test_create_session_rejects_unsupported_mime_type():
upload_folder = _make_tmp_upload_folder()
with app.app_context():
diff --git a/tests/test_recording_stitch.py b/tests/test_recording_stitch.py
index 2521cd7d..aab97786 100644
--- a/tests/test_recording_stitch.py
+++ b/tests/test_recording_stitch.py
@@ -68,6 +68,41 @@ _WEBM_OK = _have_webm_encoder()
_needs_webm = pytest.mark.skipif(not _WEBM_OK, reason="ffmpeg build lacks WebM/Opus encoder")
+def _have_webm_video_encoder():
+ """True if this ffmpeg build can mux VP8/VP9 video WebM (guards the
+ video-capture stitch tests the same way _have_webm_encoder guards
+ the audio ones)."""
+ try:
+ r = subprocess.run(
+ ['ffmpeg', '-hide_banner', '-loglevel', 'error', '-y',
+ '-f', 'lavfi', '-i', 'testsrc=duration=1:size=160x120:rate=10',
+ '-c:v', 'libvpx', '-f', 'webm',
+ os.path.join(tempfile.gettempdir(), f'_webmvprobe_{uuid.uuid4().hex}.webm')],
+ capture_output=True,
+ )
+ return r.returncode == 0
+ except FileNotFoundError:
+ return False
+
+
+_WEBM_VIDEO_OK = _have_webm_video_encoder()
+_needs_webm_video = pytest.mark.skipif(
+ not _WEBM_VIDEO_OK, reason="ffmpeg build lacks VP8/VP9 WebM encoder")
+
+
+def _generate_video_webm(path, duration_seconds=3):
+ """Write a real WebM file with a video AND audio stream — a stand-in for
+ one MediaRecorder run with tab/screen video capture enabled (#303)."""
+ cmd = [
+ 'ffmpeg', '-hide_banner', '-loglevel', 'error', '-y',
+ '-f', 'lavfi', '-i', f'testsrc=duration={duration_seconds}:size=160x120:rate=10',
+ '-f', 'lavfi', '-i', f'sine=frequency=440:duration={duration_seconds}',
+ '-c:v', 'libvpx', '-c:a', 'libopus', '-ac', '1', '-ar', '48000',
+ '-f', 'webm', path,
+ ]
+ subprocess.run(cmd, check=True)
+
+
def _generate_webm(path, duration_seconds=3, freq_hz=440):
"""Write a real WebM/Opus file — a stand-in for one MediaRecorder run."""
cmd = [
@@ -158,6 +193,9 @@ def test_mime_to_extension_maps_known_types():
assert _mime_to_extension('audio/ogg') == 'ogg'
assert _mime_to_extension('audio/whatever') == 'webm'
assert _mime_to_extension('') == 'webm'
+ # Tab/window/screen video capture (#303)
+ assert _mime_to_extension('video/webm') == 'webm'
+ assert _mime_to_extension('video/mp4') == 'mp4'
def test_chunk_paths_returns_sorted_chunks():
@@ -367,6 +405,70 @@ def test_stitch_preserves_a_real_user_title():
shutil.rmtree(upload_folder, ignore_errors=True)
+@_needs_webm_video
+def test_stitch_video_session_end_to_end():
+ """A video capture (#303) delivered as byte-fragments must stitch to a
+ playable video file: full duration preserved, .webm extension, and the
+ recording's mime resolved to video/* from the probe."""
+ upload_folder = tempfile.mkdtemp(prefix="speakr-stitch-video-")
+ with app.app_context():
+ app.config["UPLOAD_FOLDER"] = upload_folder
+ user = _make_user()
+ recording, session, sess_dir = _plant_session(upload_folder, user, 'video/webm', chunk_count=4)
+
+ src = os.path.join(upload_folder, 'src.webm')
+ _generate_video_webm(src, duration_seconds=6)
+ _split_into_chunks(src, sess_dir, n_parts=4)
+ os.remove(src)
+
+ recording_id, media_path, metadata = stitch_recording_session(session.id)
+
+ assert os.path.exists(media_path)
+ assert media_path.endswith('.webm')
+ duration = _probe_duration(media_path)
+ assert 5.5 <= duration <= 6.5, f"expected ~6s, got {duration}"
+
+ rec = db.session.get(Recording, recording_id)
+ assert rec.status == 'PENDING'
+ assert rec.mime_type and rec.mime_type.startswith('video/'), rec.mime_type
+
+ os.remove(media_path)
+ db.session.delete(db.session.get(RecordingSession, session.id))
+ db.session.delete(rec)
+ db.session.delete(user)
+ db.session.commit()
+ shutil.rmtree(upload_folder, ignore_errors=True)
+
+
+@_needs_webm_video
+def test_stitch_probe_overrides_client_claimed_mime():
+ """The session mime is a client claim; the stitched bytes are
+ authoritative. A session claiming audio/webm whose chunks actually carry
+ video must end up with a video/* recording mime (ffprobe-first policy)."""
+ upload_folder = tempfile.mkdtemp(prefix="speakr-stitch-liar-")
+ with app.app_context():
+ app.config["UPLOAD_FOLDER"] = upload_folder
+ user = _make_user()
+ recording, session, sess_dir = _plant_session(upload_folder, user, 'audio/webm', chunk_count=2)
+
+ src = os.path.join(upload_folder, 'src.webm')
+ _generate_video_webm(src, duration_seconds=3)
+ _split_into_chunks(src, sess_dir, n_parts=2)
+ os.remove(src)
+
+ recording_id, media_path, metadata = stitch_recording_session(session.id)
+
+ rec = db.session.get(Recording, recording_id)
+ assert rec.mime_type and rec.mime_type.startswith('video/'), rec.mime_type
+
+ os.remove(media_path)
+ db.session.delete(db.session.get(RecordingSession, session.id))
+ db.session.delete(rec)
+ db.session.delete(user)
+ db.session.commit()
+ shutil.rmtree(upload_folder, ignore_errors=True)
+
+
def test_stitch_raises_when_no_chunks_on_disk():
upload_folder = tempfile.mkdtemp(prefix="speakr-stitch-nochunks-")
with app.app_context():
@@ -440,6 +542,11 @@ if __name__ == "__main__":
test_stitch_multi_segment_resume_sums_durations_end_to_end()
else:
print("(skipping WebM end-to-end tests: no encoder)")
+ if _WEBM_VIDEO_OK:
+ test_stitch_video_session_end_to_end()
+ test_stitch_probe_overrides_client_claimed_mime()
+ else:
+ print("(skipping WebM video end-to-end tests: no VP8/VP9 encoder)")
test_stitch_raises_when_no_chunks_on_disk()
test_stitch_raises_when_session_missing()
print("All stitch tests passed.")