MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / load_base64_video

Function load_base64_video

tensorrt_llm/inputs/utils.py:254–264  ·  view source on GitHub ↗
(video: str)

Source from the content-addressed store, hash-verified

252
253
254def load_base64_video(video: str) -> BytesIO:
255 parsed_url = urlparse(video)
256 data_spec, data = parsed_url.path.split(",", 1)
257 media_type, data_type = data_spec.split(";", 1)
258
259 if data_type != "base64":
260 msg = "Only base64 data URLs are supported for now."
261 raise NotImplementedError(msg)
262
263 content = base64.b64decode(data)
264 return content
265
266
267def load_video(video: str,

Callers 2

load_videoFunction · 0.85
async_load_videoFunction · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected