torio_media_reader ¶
Optional torio media reader for MMAudio training preprocessing.
Classes¶
fastvideo.pipelines.preprocess.mmaudio.torio_media_reader.MMAudioTorioRowPreprocessor dataclass ¶
MMAudioTorioRowPreprocessor(duration_s: float, target_sample_rate: int, target_samples: int, normalize_audio: bool, clip_fps: int = 8, sync_fps: int = 25, clip_size: int = 384, sync_size: int = 224)
Decode one V2A metadata row on a background CPU thread.
Functions:¶
fastvideo.pipelines.preprocess.mmaudio.torio_media_reader.preprocess_mmaudio_media_with_torio ¶
preprocess_mmaudio_media_with_torio(media_path: str | Path, *, duration_s: float, target_sample_rate: int, target_samples: int, normalize_audio: bool, clip_fps: int = 8, sync_fps: int = 25, clip_size: int = 384, sync_size: int = 224) -> tuple[Tensor, Tensor, Tensor, float]
Decode audio and dual-rate video with StreamingMediaDecoder.
The dependency is imported lazily so normal FastVideo environments do not require the deprecated torio package. This backend is intended for offline reference-compatible training preprocessing only.
Source code in fastvideo/pipelines/preprocess/mmaudio/torio_media_reader.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |