Playing Audio and Video on HiPerGator¶
Why Audio and Video May Be Limited on HiPerGator¶
HiPerGator's compute nodes do not have dedicated sound hardware or audio drivers accessible to users. They can transmit only screen images over remote desktop connections (noVNC/VNC) and are optimized for computation, not interactive multimedia.
As a result, standard audio and video playback commands (aplay, mpv, vlc) will
either fail silently or produce errors when run on a compute node.
Option 1: Mount HiPerGator Storage via Samba and Play Locally¶
The most reliable approach is to mount your HiPerGator storage on your local machine using Samba (SMB/CIFS), then play media files using your local media player. This avoids remote display and audio forwarding entirely.
VPN Required
You must be connected to the UF VPN (Cisco AnyConnect) before mounting via Samba. See the Samba access guide for full details.
Once your storage is mounted locally, open files with your preferred media player. This approach delivers full audio and video quality with no latency or compression artifacts.
Option 2: Play via Jupyter Notebooks (Browser-Based)¶
If you prefer to stay within a browser workflow (perhaps due to data sensitivity), JupyterLab on HiPerGator can render audio and video directly in a notebook using HTML5.
Launching JupyterLab¶
- Go to https://ondemand.rc.ufl.edu.
- Select Interactive Apps → Jupyter Notebook.
- Configure your resources and click Launch.
- Click Connect to Jupyter when the session is ready.
Playing Audio in a Notebook¶
from IPython.display import Audio
# Play from a file path on HiPerGator storage
Audio('/blue/YOUR_GROUP/path/to/audio.wav')
Playing Video in a Notebook¶
from IPython.display import Video
Video('/blue/YOUR_GROUP/path/to/video.mp4', embed=True)
Format Compatibility
For best browser compatibility, use H.264-encoded MP4 files. To convert other
formats, use ffmpeg on a HiPerGator compute node:
module load ffmpeg
ffmpeg -i input.avi -c:v libx264 -c:a aac output.mp4
Embedding Video via HTML¶
from IPython.display import HTML
HTML("""
<video width="640" controls>
<source src="files/path/to/video.mp4" type="video/mp4">
</video>
""")
Note
The files/ prefix maps to your Jupyter working directory. Adjust the path
relative to where your notebook is running.