Questions tagged [vaapi]

The cross-platform VA API enables and provides access to hardware-accelerated video processing, using hardware graphics processing units (GPU) to accelerate video processing.

The VA API interface offers end-user software, such as VLC media player or GStreamer, access to available video acceleration hardware, such a PureVideo or Unified Video Decoder and make use of it.

VA API video decode/encode interface is platform and window system independent but is today primarily targeted at Direct Rendering Infrastructure (DRI) in X Window System on Unix-like operating systems (including GNU/Linux, FreeBSD, Solaris), and Android, however it can potentially also be used with direct framebuffer and graphics sub-systems for video output. Accelerated processing includes support for video decoding, video encoding, subpicture blending, and rendering.

The VA API specification was originally designed by Intel for its GMA (Graphics Media Accelerator) series of GPU hardware with the specific purpose of some day fully replacing the XvMC standard as the default Unix multi-platform equivalent of Microsoft Windows DirectX Video Acceleration (DxVA) API, but today the API is no longer limited to only GPUs nor to Intel specific hardware. Other hardware and manufacturers can freely use this open standard API for hardware accelerated video processing with their own hardware without paying a royalty fee.

Video Acceleration API (Wikipedia article)

60 questions
9
votes
3 answers

How do you get FFMPEG to encode with vaapi?

I've seen various examples of using libavcodec with vaapi to accelerated decoding, but how do you use it to accelerate encoding?
dicroce
  • 45,396
  • 28
  • 101
  • 140
7
votes
1 answer

Transcoding HEVC 4K HDR using ffmpeg and vaapi

I am trying to transcode a 4K HEVC HDR video to a lower bitrate using ffmpeg and VAAPI hardware acceleration for my LG OLED television. I use the following file: Video Using the following command: ffmpeg -init_hw_device vaapi=va:/dev/dri/renderD128…
P. Brand
  • 111
  • 1
  • 6
7
votes
1 answer

record Linux Wayland/DRM screen using ffmpeg's kmsgrab device with superimposed webcam

Setup is Linux, ffmpeg using kabylake iGPU. I am capturing a running sway instance using the kmsgrab device, which requires the use of a hardware backend to coherently process the image on my hardware. Only VA API fits this bill. I want to overlay…
nrdxp
  • 674
  • 7
  • 12
6
votes
1 answer

(FFmpeg) VP9 Vaapi encoding to a .mp4 or .webm container from given official ffmpeg example

I'm trying to implement vp9 hardware acceleration encoding process. I followed ffmpeg offical github's example (Here -> vaapi_encode.c). But given example only save a .yuv file to .h264 file, I would like to save the frames to either .mp4 or .webm…
User800222
  • 351
  • 4
  • 16
5
votes
1 answer

Why does ffmpeg not fully document all VAAPI filter graph operations and are there more than what I've listed here

I've compiled ffmpeg from snapshot with vaapi enabled. $ ffmpeg -hwaccels Hardware acceleration methods: vaapi I was curious about the available filter graph operations that I could do using my GPU, and found this page of…
John Allard
  • 3,564
  • 5
  • 23
  • 42
4
votes
2 answers

how to use ffmpeg with mjpeg_vaapi encoder (with hardware acceleration)?

When I use ffmpeg with mjpeg encoder without hardware acceleration, everything works fine. I use following command: ffmpeg -nostdin -rtsp_transport udp_multicast -allowed_media_types 'video' -i 'rtsp://MYIP' -ss 00:00:0.00 -f image2pipe -q:v 24 -vf…
Marat
  • 167
  • 1
  • 3
  • 9
4
votes
1 answer

FFMPEG Hwaccel error with hwupload

I'm currently trying to use the vaapi hwaccelleration on FFMPEG. In my command, I have hwaccel on vaapi, hwaccel_output_fomrat on vaapi, -hwaccel_device on /dev/dri/renderD128, as well as -vf as format=nv12, hwupload and as video codec -c:v on…
nameless
  • 1,483
  • 5
  • 32
  • 78
3
votes
1 answer

Gstreamer Appsink not getting Data from the Pipeline

I am designing a pipeline to Encode a video frame from a opencv application (got from a web cam) to video/x-h264 format, send it via network and decode it on another device of different type (probably a raspberry pi ) to a proper RGB stream for my…
Varun Vijaykumar
  • 355
  • 6
  • 18
3
votes
1 answer

How do I change the rank of a Gstreamer plugin?

I've downloaded and compiled the vaapi plugin set, and for some specific cases it works great, but it also breaks many of my existing pipelines. I'd like to modify Gstreamer to use other decoders first. Is there a way to alter the rank of Gstreamer…
mpr
  • 3,250
  • 26
  • 44
2
votes
1 answer

ffmpeg vaapi and (video filter) equalizer

I am trying to create a time-lapse video from a set of photos taken by a cheap webcam on my intel/linux machine. I have figure out how to use vaapi and Intel's hardware acceleration to create such video clip. The command I use is the…
2
votes
1 answer

ffmpeg vaapi - scale a video keeping the aspect ratio and padding with black lines

I'm trying to use my Vega 11 GPU to perform hardware accelerated transcoding of some video files to a resolution of 1280x720. I would like to keep the original aspect ratio and add black bars to the borders as necessary. I can get the scaling to…
Rusty Lemur
  • 1,697
  • 1
  • 21
  • 54
2
votes
2 answers

Running gstreamer vaapi in docker

I'm trying to run Gstreamer vaapi plugin in docker. I only need vaapi decoder with intel backend. In docker, looks like it could support vainfo: vainfo error: XDG_RUNTIME_DIR not set in the environment. error: can't connect to X server! libva info:…
Ricky
  • 21
  • 4
2
votes
0 answers

Burn subtitles in a stop motion video, with hardware acceleration

I'm trying to make a year long stop motion video with the images taken from a webcam. I've created a input.txt file with this format inside: ffconcat version 1.0 file 'amianthe201909031230.jpg' duration 0.093034825870647 file…
Belinde
  • 133
  • 8
2
votes
3 answers

Encode video from C++ using libavcodec and VAAPI

I am trying to encode a video in H.264 with libavcodec (version 3.4.6). It works when I use the software encoder "libx264", however it does not when I try to use the hardware encoder of my Intel cpu with VAAPI. Hardware encoding with ffmpeg via…
gretel99
  • 21
  • 1
  • 3
2
votes
0 answers

Gstreamer: vaapih264enc missing, even though other vaapi elements are present

I'm trying to use VAAPI with Gstreamer on Ubuntu 18.04 to encode H.264. I'm pretty sure I have all necessary packages installed (gstreamer1.0-vaapi, vainfo, i965-va-driver and all dependencies). VAAPI is enabled and works: $ vainfo libva info:…
Florian Echtler
  • 2,148
  • 1
  • 15
  • 28
1
2 3 4