← Blog
A lavender film reel with cream cutouts and a short orange film strip.
Published on
2026-11-13

Video transcoding: choose CPU or GPU by the job

Video transcoding converts an existing video into a different encoded form, often to change its codec, resolution, or bitrate for playback. The right processing setup depends on the source, the required outputs, and the time available to finish them.

A GPU can be useful when its supported media hardware fits the job. A CPU can be the simpler choice for other encoders, filters, or occasional processing. Before renting either, check whether the file needs re-encoding at all, then define what makes an output acceptable.

Does the video need transcoding?

A container, such as MP4 or MKV, holds media streams. A codec, such as H.264, describes how a stream is encoded. Changing the container does not necessarily require changing the encoded video.

FFmpeg distinguishes streamcopy from transcoding. Streamcopy moves encoded packets without decoding or re-encoding them. It can work for a container change when the destination supports the streams, but it cannot apply filters that need decoded frames. Resizing a picture, for example, requires processing those frames.

Inspect the source rather than trusting its filename. ffprobe reports container and stream information in human-readable or machine-readable form. Use that inventory to decide which video, audio, subtitle, and other streams must survive the conversion.

Required changeFirst approach to evaluateAcceptance check
Put compatible streams in another containerStreamcopy, also called remuxingThe destination container and target player support every required stream
Create a smaller-resolution copyDecode, resize, and encode videoDimensions, aspect ratio, readability, and playback meet the requirement
Use a different video codecDecode and encode with the selected codecTarget devices support the codec, profile, and other output settings
Change only the audioProcess audio and copy video where compatibleAudio format, channel layout, synchronization, and video preservation pass

Define one job before choosing hardware

Consider a fictional training-video service. A customer uploads a ten-minute 1080p recording. The application must produce a 1080p delivery copy and a 720p copy within fifteen minutes of accepting the upload. Both use an agreed H.264/AAC MP4 profile that has been tested in the service's target players. These are example requirements, not measured performance or universal delivery settings.

The service also requires readable slide text, synchronized audio, correct orientation, and preservation of the chosen caption track. A small file that makes the text unreadable fails, even if it finishes quickly. Define how captions are delivered and how unusual inputs are handled before building the happy path.

Record the source duration, dimensions, frame rate, video and audio formats, bit depth, color information, and required tracks. Decide whether variable frame rate or HDR input is accepted, converted through a separately tested path, or rejected. Avoid silently changing color or timing merely to make a job complete.

The deadline includes queueing, input access, processing, output checks, and delivery. A two-minute encode does not meet a fifteen-minute deadline if the job first spends twenty minutes waiting for a worker.

Choose CPU or GPU around the processing stages

Map the work from input to output: read the file, decode the selected streams, apply transformations, encode the outputs, and write them to their destination. Measure where time is spent. Adding encoder capacity will not fix slow input transfers or a saturated disk.

When CPU processing is a useful baseline

A CPU baseline is worth testing when the required software encoder or filters fit a maintainable CPU workflow, volume is modest, or the deadline allows it. It also gives you a reference against which to evaluate another configuration. More cores alone do not establish how many jobs can run at once: worker concurrency, encoder threads, memory, and disk compete for resources.

Our vCPU versus physical core guide explains why a VM's advertised vCPU count needs interpretation. Test the actual instance configuration with representative inputs instead of assigning a universal number of videos per core.

When hardware encoding is worth evaluating

On supported NVIDIA hardware, NVENC handles video encoding and NVDEC handles decoding. Those capabilities are distinct from general GPU compute. Check the exact board and required formats in NVIDIA's encode and decode support matrix; GPU memory size or an AI benchmark is not sufficient evidence of media support.

The NVIDIA FFmpeg guide also makes the software stack part of the requirement. Verify the FFmpeg build, codec SDK compatibility, driver, and chosen processing path. Support for a hardware encoder does not establish that every filter or the entire workflow runs on the GPU.

Compare outputs at the quality your application needs. Matching bitrate alone does not demonstrate equivalent visual quality across encoder settings. The broader CPU, GPU, and NPU comparison explains their different roles; the video workload still needs its own test.

When a managed media service deserves a comparison

If the team cannot operate workers, queues, software updates, output validation, and recovery, compare a managed service alongside a rented VM. Review its accepted formats, output controls, job limits, data location, retention, and complete charges. Infrastructure rental gives you control, but operating the media application remains a separate responsibility.

Test outputs, not just successful processes

Build an acceptance set from media your service expects to receive. Include short and long clips, detailed slides, motion, quiet audio, captions, and deliberately unsupported inputs. Preserve an approved source and record the configuration used for each output.

  • Inspect the produced container, streams, duration, dimensions, and frame rate.
  • Check picture quality, text readability, orientation, and color in representative scenes.
  • Listen for audio problems and verify synchronization throughout the clip.
  • Check required captions, track selection, and playback on target devices.
  • Confirm that failed or incomplete outputs never become the advertised finished result.

A successful process exit is one signal, not the full acceptance test. Automated checks can reject obvious failures; representative playback and visual review address properties that metadata cannot establish. Keep unsupported or damaged uploads out of an endless retry cycle.

Compare complete cost at a fixed quality target

For the fictional ten-minute upload, two accepted ten-minute outputs represent twenty accepted output minutes. Count each required output once. Retries and failed attempts add cost but do not add accepted minutes. Keep the same output set and quality requirements when comparing configurations.

Use total job cost divided by accepted output minutes as one comparison metric. Include processing time, allocated idle capacity, temporary storage, input and output transfers where charged, retries, and operational work. Track the percentage of jobs that also meet the deadline; an inexpensive late result may not satisfy the service.

Record for each configurationWhy it matters
Exact machine, software versions, encoder settings, and source setMakes the comparison reproducible
Accepted outputs and quality failuresPrevents fast but unusable results from looking efficient
Queue wait, processing time, validation time, and delivery timeShows whether the full deadline is met
Concurrency, peak memory, temporary disk, and failure countExposes limits under realistic load
Total cost and accepted output minutesConnects the bill to usable results

Increase concurrency in steps and repeat the test with the expected mix of inputs. Two output sizes need not consume the same resources, and a single easy clip does not establish production capacity. Record measurements before making a savings claim.

Make the workflow recoverable

Give each job an identity tied to its source and output configuration. Keep partial outputs separate from accepted ones, and retry failed work without overwriting a valid result. Retain enough information to explain which version produced an output and why validation passed or failed.

Plan temporary-disk capacity and cleanup for interrupted jobs. Apply upload limits and processing timeouts, isolate untrusted media processing, keep the software maintained, and restrict access to sources and results. Test recovery after a worker stops, including what the application tells the user while a job is retried.

Evaluate a video workload with Hivenet

Compute with Hivenet provides CPU and GPU infrastructure for customer-operated workloads. You choose and maintain the transcoding software and application. Confirm the required media capabilities and available instance configuration before planning a hardware-encoding trial.

Start with a small representative source set and a written output requirement. Bring the codecs, resolutions, quality checks, deadline, expected volume, and measured baseline when you discuss the workload with Hivenet. That gives the CPU or GPU choice a useful basis: accepted videos delivered on time, at a cost your service can sustain.

Your next workload belongs on Hivenet.

Pick one AI, compute, or storage workload and see the difference for yourself. Spin it up in minutes, or let our team map your fastest path to production.