mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-29 19:57:14 +00:00
🐛(summary) support webm
Mutagen lib doesn't support webm files. Since we have ffmpeg installed I just switch to using ffprobe for a broader support.
This commit is contained in:
@@ -12,6 +12,10 @@ and this project adheres to
|
|||||||
|
|
||||||
- ✨(backend) add metadata collection of VAD, connection and chat events
|
- ✨(backend) add metadata collection of VAD, connection and chat events
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- 🐛(summary) support webm #1290
|
||||||
|
|
||||||
## [1.14.0] - 2026-04-16
|
## [1.14.0] - 2026-04-16
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ dependencies = [
|
|||||||
"celery==5.6.2",
|
"celery==5.6.2",
|
||||||
"redis==5.2.1",
|
"redis==5.2.1",
|
||||||
"minio==7.2.20",
|
"minio==7.2.20",
|
||||||
"mutagen==1.47.0",
|
|
||||||
"openai==2.28.0",
|
"openai==2.28.0",
|
||||||
"posthog==7.9.12",
|
"posthog==7.9.12",
|
||||||
"requests==2.33.0",
|
"requests==2.33.0",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"""File service to encapsulate files' manipulations."""
|
"""File service to encapsulate files' manipulations."""
|
||||||
|
|
||||||
import io
|
import io
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -10,7 +11,6 @@ from datetime import timedelta
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
import mutagen
|
|
||||||
import requests
|
import requests
|
||||||
from minio import Minio
|
from minio import Minio
|
||||||
from minio.error import MinioException, S3Error
|
from minio.error import MinioException, S3Error
|
||||||
@@ -155,8 +155,24 @@ class FileService:
|
|||||||
|
|
||||||
def _validate_duration(self, local_path: Path) -> float:
|
def _validate_duration(self, local_path: Path) -> float:
|
||||||
"""Validate audio file duration against configured maximum."""
|
"""Validate audio file duration against configured maximum."""
|
||||||
file_metadata = mutagen.File(local_path).info
|
result = subprocess.run(
|
||||||
duration = file_metadata.length
|
[
|
||||||
|
"ffprobe",
|
||||||
|
"-v",
|
||||||
|
"quiet",
|
||||||
|
"-print_format",
|
||||||
|
"json",
|
||||||
|
"-show_format",
|
||||||
|
local_path,
|
||||||
|
],
|
||||||
|
check=False,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
data = json.loads(result.stdout)
|
||||||
|
duration = float(data["format"]["duration"])
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
"Recording file duration: %.2f seconds",
|
"Recording file duration: %.2f seconds",
|
||||||
|
|||||||
Reference in New Issue
Block a user