Introduction
With the motorboat of GPU Droplets powered by NVIDIA H100 GPUs, DigitalOcean provides an perfect solution for high-performance video editing. The NVIDIA H100, equipped pinch 640 Tensor Cores and 128 RT Cores, supports faster information processing, enabling high-resolution video scaling and encoding tasks.
This tutorial will locomotion you done mounting up a GPU Droplet for video editing, utilizing FFmpeg pinch CUDA support to standard and encode a sample video record from 720p to 4K resolution. This tutorial is tailored for video editors and developers looking for an businesslike measurement to grip video processing connected unreality infrastructure.
Understanding GPU Benchmarks for Video Editing
Effective video editing requires GPUs pinch circumstantial capabilities:
- VRAM: With 80GB HBM2e, the NVIDIA H100 tin grip 4K and 8K videos.
- CUDA Cores: 18,432 CUDA cores for high-speed processing and encoding.
- Tensor Cores: 640 Tensor Cores to support AI-enhanced tasks, specified arsenic sound reduction.
- RT Cores: 128 RT Cores for real-time processing and ocular effects.
- Memory Bandwidth: Up to 2 TB/s, allowing for soft playback and accelerated information transfers.
For video editing, these specifications construe to faster processing, businesslike scaling, and real-time effects rendering.
Minimum Benchmark Goals
Here are benchmark targets based connected resolution:
1080p | 8GB | 2,000+ | 100+ | 300+ GB/s | 20+ |
4K | 16GB | 4,000+ | 200+ | 500+ GB/s | 40+ |
8K | 32GB+ | 8,000+ | 400+ | 1+ TB/s | 80+ |
The NVIDIA H100 meets and exceeds these benchmarks for 4K and 8K video editing, making GPU Droplet an fantabulous prime for precocious video projects.
DigitalOcean GPU Droplet: NVIDIA H100 Specifications
The NVIDIA H100 offers extended CUDA, Tensor, and RT cores, providing the basal resources for high-resolution video editing workloads.
NVIDIA H100 | 80GB | 18,432 | 640 | 2TB/s | 128 |
The H100 tin grip moreover the astir intensive editing tasks pinch minimal lag and high-speed processing.
Setting Up Video Editing Workload connected DigitalOcean GPU Droplets
In this section, let’s group up and deploy a video editing workload connected a DigitalOcean GPU Droplet.
Step 1 - Set Up the GPU Droplet
1.Create a New Project - You will request to create a caller project from the unreality power sheet and necktie it to a GPU Droplet.
2.Create a GPU Droplet - Log into your DigitalOcean account, create a caller GPU Droplet, and take AI/ML Ready arsenic the OS. This OS image installs each the basal NVIDIA GPU Drivers. You tin mention to our charismatic archiving connected how to create a GPU Droplet.
3.Add an SSH Key for authentication - An SSH cardinal is required to authenticate pinch the GPU Droplet and by adding the SSH key, you tin login to the GPU Droplet from your terminal.
4.Finalize and Create the GPU Droplet - Once each of the supra steps are completed, finalize and create a caller GPU Droplet.
Step 2 - Install Dependencies
Once the GPU Droplet is fresh and deployed. You tin SSH to the GPU Droplet from your terminal.
ssh root@<your-droplet-ip>Ensure your Ubuntu-based GPU Droplet is up to date:
sudo apt update && sudo apt upgrade -yNext, please reboot the GPU Droplet utilizing the beneath bid and hold for it to travel online. Rebooting aft moving sudo apt update && sudo apt upgrade—y is often basal to guarantee that immoderate updated strategy components, particularly the kernel and hardware drivers, are afloat loaded and applied.
Note: On astir Linux systems, you tin cheque if a reboot is needed by running:
[ -f /var/run/reboot-required ] && echo "Reboot is required"If a reboot is required aft a kernel and hardware drivers update, you will observe the pursuing output of the supra command:
Output
Reboot is requiredNow,let’s verify the NVIDIA driver and CUDA type pinch the following:
nvidia-smiThis bid should show the specifications of your NVIDIA GPU and the driver version.
Output
+---------------------------------------------------------------------------------------+ | NVIDIA-SMI 535.183.06 Driver Version: 535.183.06 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA H100 80GB HBM3 Off | 00000000:00:09.0 Off | 0 | | N/A 28C P0 67W / 700W | 0MiB / 81559MiB | 0% Default | | | | Disabled | +-----------------------------------------+----------------------+----------------------+ +---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process sanction GPU Memory | | ID ID Usage | |=======================================================================================| | No moving processes recovered | +---------------------------------------------------------------------------------------+Verify the installation of CUDA:
nvcc --versionYou should spot accusation astir the installed type of CUDA.
Output
nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built connected Mon_Apr__3_17:16:06_PDT_2023 Cuda compilation tools, merchandise 12.1, V12.1.105 Build cuda_12.1.r12.1/compiler.32688072_0Note: From the supra outputs, please guarantee that the CUDA driver type from the output of the bid nvidia-smi and the bid nvcc -v matches. If location is simply a type mismatch betwixt the output of some commands, you must re-install some and again reboot the GPU Droplet.
Next, you will instal FFmpeg. FFmpeg enables GPU-accelerated video processing, which you will usage to standard the video.
sudo apt install -y ffmpegRun the pursuing to cheque if FFmpeg detects CUDA support.
ffmpeg -hwaccelsThis bid should database cuda, vdpau, and vappi, indicating that GPU acceleration is available.
Output
ffmpeg type 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers built pinch gcc 11 (Ubuntu 11.2.0-19ubuntu1) configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Hardware acceleration methods: vdpau cuda vaapi qsv drm openclStep 3 - Download Sample Video Data for Testing
For this tutorial, you will usage a sample video from the Blender Foundation to show GPU-accelerated video processing. Blender is simply a free and open-source 3D creation suite that supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, etc.
Download it pinch the beneath command:
wget https://download.blender.org/demo/movies/ToS/tears_of_steel_720p.movStep 4 - Upscale the Video to 4K pinch FFmpeg
You tin now process the video pinch FFmpeg installed and the GPU configured.
The basal syntax of the ffmpeg bid is:
ffmpeg -i <input_file> -vf "scale=width:height" -c:v <codec_name> -preset <encoding_preset> -b:v <bitrate> <output_file>Here is what each of the parameters mean:
- input_file: The sanction of the input video file.
- scale=width:height: The scaling filter, wherever width and tallness are the desired dimensions for resizing.
- codec_name: The codec to beryllium utilized for encoding the video (e.g., libx264 for H.264).
- encoding_preset: The velocity vs. compression ratio preset for encoding (e.g., fast, medium, slow).
- bitrate: The target video bitrate (e.g., 10M for 10 Mbps).
- output_file: The sanction of the output file, including format and extension.
In this example, you will upscale the Video from 720p to 4K resolution.
Run the pursuing FFmpeg bid to upscale the video to 4K (3840x2160 resolution):
ffmpeg -i tears_of_steel_720p.mov -vf "scale=3840:2160" -c:v libx264 -preset accelerated -b:v 10M tears_of_steel_4k.movOnce the processing finishes, you should observe the pursuing output:
Output
Output Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf58.76.100 Stream Metadata: handler_name : VideoHandler vendor_id : FFMP encoder : Lavc58.134.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/10000000 buffer size: 0 vbv_delay: N/A Stream Metadata: handler_name : SoundHandler vendor_id : [0][0][0][0] encoder : Lavc58.134.100 aac frame=17620 fps= 69 q=-1.0 Lsize= 949201kB time=00:12:14.07 bitrate=10592.7kbits/s speed=2.88x video:937125kB audio:11532kB subtitle:0kB different streams:0kB world headers:0kB muxing overhead: 0.057354% [libx264 @ 0x564504ee7f40] framework I:223 Avg QP:22.07 size:180259 [libx264 @ 0x564504ee7f40] framework P:5973 Avg QP:25.97 size: 92140 [libx264 @ 0x564504ee7f40] framework B:11424 Avg QP:27.21 size: 32306 [libx264 @ 0x564504ee7f40] consecutive B-frames: 8.2% 14.4% 5.4% 72.0% [libx264 @ 0x564504ee7f40] mb I I16..4: 20.9% 75.8% 3.2% [libx264 @ 0x564504ee7f40] mb P I16..4: 9.4% 21.2% 1.1% P16..4: 29.5% 4.3% 1.4% 0.0% 0.0% skip:33.0% [libx264 @ 0x564504ee7f40] mb B I16..4: 0.9% 1.4% 0.1% B16..8: 25.0% 1.3% 0.2% direct: 1.8% skip:69.3% L0:44.6% L1:53.4% BI: 2.0% [libx264 @ 0x564504ee7f40] last ratefactor: 25.73 [libx264 @ 0x564504ee7f40] 8x8 toggle shape intra:66.4% inter:91.8% [libx264 @ 0x564504ee7f40] coded y,uvDC,uvAC intra: 30.5% 41.4% 7.3% inter: 6.3% 10.8% 0.3% [libx264 @ 0x564504ee7f40] i16 v,h,dc,p: 31% 23% 7% 38% [libx264 @ 0x564504ee7f40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 16% 23% 3% 5% 6% 4% 5% 3% [libx264 @ 0x564504ee7f40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 17% 10% 4% 8% 9% 6% 6% 4% [libx264 @ 0x564504ee7f40] i8c dc,h,v,p: 55% 16% 22% 6% [libx264 @ 0x564504ee7f40] Weighted P-Frames: Y:2.2% UV:1.1% [libx264 @ 0x564504ee7f40] ref P L0: 62.5% 12.6% 18.5% 6.3% 0.1% [libx264 @ 0x564504ee7f40] ref B L0: 90.1% 8.2% 1.7% [libx264 @ 0x564504ee7f40] ref B L1: 96.5% 3.5% [libx264 @ 0x564504ee7f40] kb/s:10456.65 [aac @ 0x564504f67ec0] Qavg: 259.313Here is the command’s breakdown:
- -i tears_of_steel_720p.mov: Specifies the input video file.
- -vf "scale=3840:2160": Sets the standard select to upscale the video to 4K solution (3840x2160).
- -c:v libx264: Uses the libx264 codec to encode the video.
- -preset medium: Specifies the encoding speed/quality equilibrium (fast is simply a bully balance).
- -b:v 10M: Sets the target video bitrate to 10 Mbps to support quality.
To study much astir the FFmpeg command, you tin mention to its official documentation.
Step 5 - Download the Processed Video to Your Local System
Once the video is processed, download it from the droplet to your section instrumentality utilizing scp. Replace <your_droplet_ip> pinch your droplet’s IP address.
scp root@<your_droplet_ip>:~/tears_of_steel_4k.mov ~/Downloads/This bid copies the 4K scaled video record to your Downloads files connected your section desktop.
Conclusion
DigitalOcean’s GPU Droplets, powered by NVIDIA H100 GPUs, connection a high-performance situation for video editing. With GPU-accelerated scaling and encoding via FFmpeg, you tin execute important improvements successful processing time, enabling real-time adjustments and accelerated video exports. This setup is perfect for video editors and developers handling high-resolution workloads.