Video and Audio Loader
⚠️ DEPRECATION WARNING
This component is deprecated and will be removed in a future version of Nappai. Please migrate to the recommended alternative components.
Video and Audio Loader is a simple tool that lets you bring a video or audio file into your Nappai workflow. Once you upload a file, the component reads the file’s contents and gives you the raw data (bytes) that you can pass to other components, such as transcription or analysis tools.
How it Works
When you select a file, the component checks the file’s extension.
- If the file is a WAV audio file, it uses Python’s
wave
module to read the audio frames. - For all other supported formats (MP3, FLAC, MP4, AVI, MOV, AAC, M4A, WMA), it simply opens the file in binary mode and reads the bytes.
If the file type is not supported or an error occurs while reading, the component can either raise an exception or silently returnNone
depending on the Silent Errors setting.
Inputs
- Path: Upload a file. Supported types: wav, mp3, flac, mp4, avi, mov, aac, m4a, wma.
- Silent Errors: If true, errors will not raise an exception.
Outputs
- Output: Returns the raw file data as a
Data
object (bytes). This output can be fed into other components that accept binary media, such as transcription, analysis, or storage components.
Usage Example
- Drag the Video and Audio Loader component onto your canvas.
- Click the Path field and choose a video or audio file from your computer.
- Leave Silent Errors unchecked (default) so that any problem will stop the workflow and show an error message.
- Connect the Output to the next component, for example, an Audio Transcription component, to convert the audio into text.
This simple flow lets you quickly bring media files into Nappai and start processing them.
Related Components
- Audio Transcription – Convert audio bytes into spoken text.
- Video Transcription – Extract spoken words from video files.
- File Reader – Read text files or other non‑binary data.
- Audio Analyzer – Perform audio feature extraction or analysis.
Tips and Best Practices
- Stick to the supported file types listed in the Path input to avoid errors.
- Keep file sizes moderate; very large files may slow down the workflow or hit memory limits.
- If you’re building a batch process and want to skip problematic files, enable Silent Errors so the workflow continues instead of stopping.
Security Considerations
- Only upload files from trusted sources to avoid executing malicious code.
- Be mindful of file size limits to prevent denial‑of‑service attacks by uploading extremely large files.
- If the workflow runs in a shared environment, consider adding a validation step to check file integrity before processing.