How to use a hardware device for HW-accelerated encoding with `ffmpeg` `snap`? The 2019 Stack Overflow Developer Survey Results Are InHow do I tell if Ubuntu supports hardware-accelerated graphics on my laptop?ffmpeg & ffprobe & libfdk-aac on Ubuntu 14.10 serverMulti-Core Encoding with VP9 FFmpegHow to use FFmpeg Command for Reverse Video?how to get vdpau hardware acceleration using ffmpeg on ubuntu?How is hardware (/dev nodes) accessed from with a snap?How to automatically segment video using ffmpeg without re-encoding?FFmpeg command for mpeg-ts encodingHow can l use ffmpeg to extract frames with a certain fps ans scalingHow to interface ffmpeg with snap image

If a Druid sees an animal’s corpse, can they Wild Shape into that animal?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Why isn't airport relocation done gradually?

What do hard-Brexiteers want with respect to the Irish border?

Deal with toxic manager when you can't quit

Does the shape of a die affect the probability of a number being rolled?

How can I autofill dates in Excel excluding Sunday?

Delete all lines which don't have n characters before delimiter

Why not take a picture of a closer black hole?

Loose spokes after only a few rides

Origin of "cooter" meaning "vagina"

Aging parents with no investments

Should I use my personal e-mail address, or my workplace one, when registering to external websites for work purposes?

How to save as into a customized destination on macOS?

What is the most effective way of iterating a std::vector and why?

Is a "Democratic" Oligarchy-Style System Possible?

FPGA - DIY Programming

How come people say “Would of”?

What is the meaning of Triage in Cybersec world?

Can one be advised by a professor who is very far away?

How to notate time signature switching consistently every measure

Are spiders unable to hurt humans, especially very small spiders?

How to deal with fear of taking dependencies

Reference request: Oldest number theory books with (unsolved) exercises?



How to use a hardware device for HW-accelerated encoding with `ffmpeg` `snap`?



The 2019 Stack Overflow Developer Survey Results Are InHow do I tell if Ubuntu supports hardware-accelerated graphics on my laptop?ffmpeg & ffprobe & libfdk-aac on Ubuntu 14.10 serverMulti-Core Encoding with VP9 FFmpegHow to use FFmpeg Command for Reverse Video?how to get vdpau hardware acceleration using ffmpeg on ubuntu?How is hardware (/dev nodes) accessed from with a snap?How to automatically segment video using ffmpeg without re-encoding?FFmpeg command for mpeg-ts encodingHow can l use ffmpeg to extract frames with a certain fps ans scalingHow to interface ffmpeg with snap image



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















Using the ffmpeg package 18.04 from apt I can encode a video hardware-accelerated in HEVC on Kaby Lake:



ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mkv -vf 'format=nv12,hwupload' -c:v hevc_vaapi -qp 25 output.mkv


I also installed the ffmpeg from snap (Snapcrafters) to try out ffmpeg 4



Trying with snap ffmpeg:



/snap/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mkv -vf 'format=nv12,hwupload' -c:v hevc_vaapi -qp 25 output.mkv


I get this error:



No VA display found for device: /dev/dri/renderD128.
Device creation failed: -22.
Failed to set value '/dev/dri/renderD128' for option
'vaapi_device': Invalid argument


Update:



libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.1.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSlice
VAProfileVP9Profile2 : VAEntrypointVLD


ls -al /dev/dri



total 0
drwxr-xr-x 3 root root 100 mrt 31 21:02 .
drwxr-xr-x 22 root root 4300 apr 9 16:18 ..
drwxr-xr-x 2 root root 80 mrt 31 21:02 by-path
crw-rw----+ 1 root video 226, 0 mrt 31 21:02 card0
crw-rw----+ 1 root video 226, 128 mrt 31 21:02 renderD128









share|improve this question



















  • 1





    Hello there, can you show us the output of vainfo?

    – 林正浩
    Apr 3 at 5:16











  • I added the requested info.

    – Janghou
    2 days ago






  • 1





    Thanks. Now show us the output of ls -al /dev/dri. I'm suspecting that you're on an NVIDIA Optimus-based laptop, with two GPUs.

    – 林正浩
    2 days ago











  • Nope, no GPU-card

    – Janghou
    yesterday

















1















Using the ffmpeg package 18.04 from apt I can encode a video hardware-accelerated in HEVC on Kaby Lake:



ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mkv -vf 'format=nv12,hwupload' -c:v hevc_vaapi -qp 25 output.mkv


I also installed the ffmpeg from snap (Snapcrafters) to try out ffmpeg 4



Trying with snap ffmpeg:



/snap/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mkv -vf 'format=nv12,hwupload' -c:v hevc_vaapi -qp 25 output.mkv


I get this error:



No VA display found for device: /dev/dri/renderD128.
Device creation failed: -22.
Failed to set value '/dev/dri/renderD128' for option
'vaapi_device': Invalid argument


Update:



libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.1.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSlice
VAProfileVP9Profile2 : VAEntrypointVLD


ls -al /dev/dri



total 0
drwxr-xr-x 3 root root 100 mrt 31 21:02 .
drwxr-xr-x 22 root root 4300 apr 9 16:18 ..
drwxr-xr-x 2 root root 80 mrt 31 21:02 by-path
crw-rw----+ 1 root video 226, 0 mrt 31 21:02 card0
crw-rw----+ 1 root video 226, 128 mrt 31 21:02 renderD128









share|improve this question



















  • 1





    Hello there, can you show us the output of vainfo?

    – 林正浩
    Apr 3 at 5:16











  • I added the requested info.

    – Janghou
    2 days ago






  • 1





    Thanks. Now show us the output of ls -al /dev/dri. I'm suspecting that you're on an NVIDIA Optimus-based laptop, with two GPUs.

    – 林正浩
    2 days ago











  • Nope, no GPU-card

    – Janghou
    yesterday













1












1








1








Using the ffmpeg package 18.04 from apt I can encode a video hardware-accelerated in HEVC on Kaby Lake:



ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mkv -vf 'format=nv12,hwupload' -c:v hevc_vaapi -qp 25 output.mkv


I also installed the ffmpeg from snap (Snapcrafters) to try out ffmpeg 4



Trying with snap ffmpeg:



/snap/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mkv -vf 'format=nv12,hwupload' -c:v hevc_vaapi -qp 25 output.mkv


I get this error:



No VA display found for device: /dev/dri/renderD128.
Device creation failed: -22.
Failed to set value '/dev/dri/renderD128' for option
'vaapi_device': Invalid argument


Update:



libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.1.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSlice
VAProfileVP9Profile2 : VAEntrypointVLD


ls -al /dev/dri



total 0
drwxr-xr-x 3 root root 100 mrt 31 21:02 .
drwxr-xr-x 22 root root 4300 apr 9 16:18 ..
drwxr-xr-x 2 root root 80 mrt 31 21:02 by-path
crw-rw----+ 1 root video 226, 0 mrt 31 21:02 card0
crw-rw----+ 1 root video 226, 128 mrt 31 21:02 renderD128









share|improve this question
















Using the ffmpeg package 18.04 from apt I can encode a video hardware-accelerated in HEVC on Kaby Lake:



ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mkv -vf 'format=nv12,hwupload' -c:v hevc_vaapi -qp 25 output.mkv


I also installed the ffmpeg from snap (Snapcrafters) to try out ffmpeg 4



Trying with snap ffmpeg:



/snap/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mkv -vf 'format=nv12,hwupload' -c:v hevc_vaapi -qp 25 output.mkv


I get this error:



No VA display found for device: /dev/dri/renderD128.
Device creation failed: -22.
Failed to set value '/dev/dri/renderD128' for option
'vaapi_device': Invalid argument


Update:



libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.1.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSlice
VAProfileVP9Profile2 : VAEntrypointVLD


ls -al /dev/dri



total 0
drwxr-xr-x 3 root root 100 mrt 31 21:02 .
drwxr-xr-x 22 root root 4300 apr 9 16:18 ..
drwxr-xr-x 2 root root 80 mrt 31 21:02 by-path
crw-rw----+ 1 root video 226, 0 mrt 31 21:02 card0
crw-rw----+ 1 root video 226, 128 mrt 31 21:02 renderD128






18.04 video snap ffmpeg hardware-acceleration






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday







Janghou

















asked Sep 7 '18 at 16:51









JanghouJanghou

2,55632340




2,55632340







  • 1





    Hello there, can you show us the output of vainfo?

    – 林正浩
    Apr 3 at 5:16











  • I added the requested info.

    – Janghou
    2 days ago






  • 1





    Thanks. Now show us the output of ls -al /dev/dri. I'm suspecting that you're on an NVIDIA Optimus-based laptop, with two GPUs.

    – 林正浩
    2 days ago











  • Nope, no GPU-card

    – Janghou
    yesterday












  • 1





    Hello there, can you show us the output of vainfo?

    – 林正浩
    Apr 3 at 5:16











  • I added the requested info.

    – Janghou
    2 days ago






  • 1





    Thanks. Now show us the output of ls -al /dev/dri. I'm suspecting that you're on an NVIDIA Optimus-based laptop, with two GPUs.

    – 林正浩
    2 days ago











  • Nope, no GPU-card

    – Janghou
    yesterday







1




1





Hello there, can you show us the output of vainfo?

– 林正浩
Apr 3 at 5:16





Hello there, can you show us the output of vainfo?

– 林正浩
Apr 3 at 5:16













I added the requested info.

– Janghou
2 days ago





I added the requested info.

– Janghou
2 days ago




1




1





Thanks. Now show us the output of ls -al /dev/dri. I'm suspecting that you're on an NVIDIA Optimus-based laptop, with two GPUs.

– 林正浩
2 days ago





Thanks. Now show us the output of ls -al /dev/dri. I'm suspecting that you're on an NVIDIA Optimus-based laptop, with two GPUs.

– 林正浩
2 days ago













Nope, no GPU-card

– Janghou
yesterday





Nope, no GPU-card

– Janghou
yesterday










0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1073146%2fhow-to-use-a-hardware-device-for-hw-accelerated-encoding-with-ffmpeg-snap%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1073146%2fhow-to-use-a-hardware-device-for-hw-accelerated-encoding-with-ffmpeg-snap%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?