Harden the shared video-audio example
Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
65b3d41b3a
commit
6bdbaeb038
9 files changed
+533
-110
No files matched your search
@@ -509,9 +509,9 @@ def _coerce_video_to_uint8_frames(video: Any) -> np.ndarray:
|
||||
return frames_u8
|
||||
|
||||
|
||||
def _encode_video_bytes(
|
||||
def encode_video_bytes(
|
||||
video: Any,
|
||||
fps: int,
|
||||
fps: int | float,
|
||||
audio: Any | None = None,
|
||||
audio_sample_rate: int | None = None,
|
||||
video_codec_options: dict[str, str] | None = None,
|
||||
@@ -530,6 +530,10 @@ def _encode_video_bytes(
|
||||
)
|
||||
|
||||
|
||||
# Backward-compatible private alias for existing internal callers.
|
||||
_encode_video_bytes = encode_video_bytes
|
||||
|
||||
|
||||
class FragmentedMP4VideoEncoder:
|
||||
"""Normalize video chunks and append them to one fragmented MP4 stream."""
|
||||
|
||||
|
||||
Reference in new issue
Block a user