Video

gllm-docprocarrow-up-right | Tutorial : Video Loader | Use Case: Advanced DPO Pipeline | API Referencearrow-up-right

Video Loader is designed for extracting information from Video file.

chevron-rightPrerequisiteshashtag

This example specifically requires completion of all setup steps listed on the Prerequisites page.

Installation

# you can use a Conda environment
pip install --extra-index-url https://oauth2accesstoken:$(gcloud auth print-access-token)@glsdk.gdplabs.id/gen-ai-internal/simple/ "gllm-docproc[video]"

You can use the following as a sample file: video-example.mp4arrow-up-right.

Video Transcript Loader

VideoTranscriptLoader is responsible to extract information from video file by utilizing the GLLM Multimodal Audio to Textarrow-up-right..

1

Create a script called main.py:

from gllm_docproc.loader.video import VideoTranscriptLoader

source = "./data/source/video-example.mp4"

# initialize video transcript loader
loader = VideoTranscriptLoader()

# load video file
loaded_elements = loader.load(source)
2

Run the script:

python main.py
3

The loader will generate the following: output JSONarrow-up-right.

Last updated