来源:http://stackoverflow.com/questions/19256897/when-does-videotoolbox-vtcompressionsession-benefit-from-hardware-acceleration

I've been working on the gstreamer applemedia encoder plugins and improved the VideoToolbox based video encoding. Running a gstreamer pipeline like:

$ gst-launch-1.0 filesrc location=source.avi ! decodebin  ! vtenc_h264 ! h264parse ! qtmux name=mux ! filesink location=sink.mp4

I was expecting to see a very low CPU usage when encoding h264 video using VTCompressionSession on Mac OS systems. However, on the systems I've tested: Mid 2009 Macbook Pro with GeForce 9600M and Mid 2011 Mac mini with Radeon HD 6630M the encoding still consumes between 80% and 130% CPU - which indicates it's not hardware accelerated.

On which hardware configurations, or given which compression parameters (for example for which kVTCompressionPropertyKey_ProfileLevel) does VTCompressionSession use hardware accelerated encoding?

asked Oct 8 '13 at 19:44
drott
393211
 

2 Answers

up vote
3
down vote

accepted

According to http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/applemedia/vtenc.c
you are passing in NULL to VTCompressionSessionCreate() for the
encoderSpecification parameter. Create an encoder specification
dictionary with
kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder set
to kCFBooleanTrue.

answered Feb 1 '14 at 2:17

 
    
Yes, that's a good answer. In
the meantime, I also found this Handbrake branch where they have more
details on these undocumented (?) parameters for the API. github.com/galad87/HandBrake-QuickSync-Mac/commit/… - Any additional to pointers to documentation or more details would be helpful.
– drott
Feb 3 '14 at 12:44
 

The above pipeline will not help you much on determining whether it's
actually the encoding process that's responsible for the high CPU
usage. There is no sync with the clock in the stream, which means the
whole process of decode/encode will go as fast as it can.

Since decodebin is probably using a software decoder, the high CPU
usage you are experiencing is most likely due to the decoding process.

I would recommend to compare the output with:

gst-launch-1.0 videotestsrc is-live=true ! vtenc_h264 ! qtmux ! filesink location=test.mp4

Note specially the property "is-live=true" which is instructing videotestsrc to act as a live source and therefore pushing buffers at a constant rate and not as fast as downstream can consume them.

answered Oct 17 '13 at 0:51
ylatuya
1662
 

When does VideoToolbox' VTCompressionSession benefit from hardware acceleration?的更多相关文章

  1. emulator: ERROR: x86 emulation currently requires hardware acceleration!

    emulator: ERROR: x86 emulation currently requires hardware acceleration!Please ensure Intel  is prop ...

  2. 启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration! CPU acceleration status:HAXM must be updated(version 1.1.1<6.0.1) 解决办法

    启动安卓模拟器报错 emulator: ERROR: x86_64 emulation currently requires hardware acceleration!  CPU accelerat ...

  3. 运行android模拟器,emulator: ERROR: x86 emulation currently requires hardware acceleration!

    运行android模拟器,emulator: ERROR: x86 emulation currently requires hardware acceleration! 问题: 运行android模 ...

  4. android ------ Emulator: error: x86 emulation currently requires hardware acceleration

    我创建 Android 模拟器,运行项目时出现了一个这样的错误: 如下: emulator ERROR:x86 emulation currently requires hardware accele ...

  5. emulator: ERROR: x86 emulation currently requires hardware acceleration!Please ensure Intel HAXM is properly installed and usable.CPU acceleration status: HAX kernel module is not installed!

    Android Studio 1.0 已经放出来了,以后的Android平台开发激昂逐步从Eclipse向Android Studio迁移,为了能不落伍我也特意从Google下载了Android St ...

  6. Android Studio ERROR: x86 emulation currently requires hardware acceleration!报错解决傻瓜教程~

    很早之前就碰到过Android Studio模拟器无法启动的问题,今天终于尝试去解决了下,下面将我解决的方法记录下. 模拟器报错信息为: emulator: ERROR: x86 emulation ...

  7. Android AVD启动报错:emulator: ERROR: x86_64 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable.

    打开Android SDK manager查看安装发现HAXM在windows上无法安装 可以去 http://www.androiddevtools.cn/index.html 下载 Android ...

  8. Android Studio3.1.2运行模拟器出错Emulator:emulator:ERROR:x86 emulation currently requires hardware acceleration!

    出错截图如下所示: 解决方法: 由于我是已经解决了这个问题,安装了Intel x86 Emulator Accelerator,所以显示后面显示的是 Installed,如果报错和我贴的图一样,就可以 ...

  9. Android studio 中,遇到报错:ERROR: x86_64 emulation currently requires hardware acceleration! CPU acceleration status:HAXM must be updated(version 1.1.1<6.0.1)的解决方法

    在 Android SDK 的安装目录下找到intelhaxm-android.exe安装即可.忘记目录位置直接在“计算机”中搜索,如果没有,返回Android studio 的“设置”,找到 这个图 ...

随机推荐

  1. mysql版本引起的驱动问题

    mysql版本引起的驱动问题 com.mysql.jdbc.Driver 是 mysql-connector-java 5中的, com.mysql.cj.jdbc.Driver 是 mysql-co ...

  2. zz【重磅】微软开源自动机器学习工具 - NNI

    [重磅]微软开源自动机器学习工具 - NNI 在机器学习建模时,除了准备数据,最耗时耗力的就是尝试各种超参组合,找到模型最佳效果的过程了.即使是对于有经验的算法工程师和数据科学家,有时候也很难把握其中 ...

  3. 【PL/SQL】PLSQL Developer注册码

    [12.0.7] product code: 4vkjwhfeh3ufnqnmpr9brvcuyujrx3n3le serial Number:226959 password: xs374ca

  4. 微信小程序之页面打开数量限制

    无论是在小程序还是APP中,打开一个页面其实就是创建了一个新的View对象,一层层叠加的.当点击页面的回退按钮就是把当前页面关闭. 这个过程中会涉及到一个问题,就是打开页面的数量.在某些设计下,比如一 ...

  5. 实验二 Java基础(数据/表达式、判定/循环语句)

    实验二 (一)实验内容 编写简单的计算器,完成加减乘除模运算. 要求从键盘输入两个数,使用判定语句选择一种操作,计算结果后输出,然后使用判定和循环语句选择继续计算还是退出. 编写测试代码,测试验证. ...

  6. Django+nginx+gunicore+supervisor+阿里云主机 部署博客项目

    1 准备阶段 1 新鲜的阿里云主机 2 购买一个喜欢的域名 3 创建python的虚拟环境 2 阿里云主机的选取 咱们就是为了实验,我买了最便宜的阿里云主机 3 阿里云主机创建一个超级用户 3.1 默 ...

  7. 【转】python实现Telnet操作

    # -*- coding: utf-8 -*- import logging import telnetlib import time import sys import os host_ip = ' ...

  8. IntelliJ IDEA 超实用使用技巧分享

    https://blog.csdn.net/weixin_38405253/article/details/102583954 知识点概览: 高效率配置 日常使用 必备快捷键(★★) 查找 跳转切换 ...

  9. [JAVA] 日常填坑 java.lang.SecurityException: Prohibited package name: java.xxx

    java虚拟机不允许包名以java开头. https://blog.csdn.net/sinat_28690417/article/details/72328547

  10. 使用spring jpa hibernate框架时报错:javax.validation.UnexpectedTypeException: HV000030

    错误信息: [#%&*^]20190521121942:497.!react:all.,RctJobExecutor-1#D9AA5167921A464CA9DDA14943545426%NA ...