Changes between Version 5 and Version 6 of Hardware/VAAPI


Ignore:
Timestamp:
Feb 24, 2018, 7:19:31 PM (7 months ago)
Author:
jkqxz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Hardware/VAAPI

    v5 v6  
    186186}}} 
    187187 
     188==== Camera Capture ==== 
     189 
     190Capture a raw stream from a V4L2 camera device and encode it as H.264: 
     191{{{ 
     192ffmpeg -vaapi_device /dev/dri/renderD128 -f v4l2 -video_size 1920x1080 -i /dev/video0 -vf 'format=nv12,hwupload' -c:v h264_vaapi output.mp4 
     193}}} 
     194 
     195Capture an MJPEG stream from a V4L2 camera device (e.g. a UVC webcam), decode it and encode it as H.264: 
     196{{{ 
     197ffmpeg -f v4l2 -input_format mjpeg -video_size 1920x1080 -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i /dev/video0 -vf 'scale_vaapi=format=nv12' -c:v h264_vaapi output.mp4 
     198}}} 
     199The extra scale_vaapi instance is needed here to convert the VAAPI surfaces to the correct format for encoding - webcams will typically supply images in YUV 4:2:2 format. 
     200 
     201==== Screen Capture ==== 
     202 
    188203Capture the screen from X and encode with H.264 at reasonable constant-quality: 
    189204{{{