H.265_open_hevc_伤感哥的学习笔记(1)

我也来陆续发表一些H.265/HEVC的学习总结,本人没玩过H.264这里是从零开始的.就是总结下没其他目的,可能总结一段时间就停了~~,由于水平有限,错误之处求斧正。

先从使用开始谈起.下载地址: https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/tags/到目前为止,最新版本是HM 12。

(PS:什么是HEVC?http://wenku.baidu.com/view/d1a44b48767f5acfa1c7cdbc.html)

下载时需要使用SVN,如windows下的TortoiseSVN (传说中的乌龟?)。TortoiseSVN的下载: http://www.tortoisesvn.net/ 例如下载TortoiseSVN 1.8.2 released

https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/tags/HM-12.0+RExt-4.0/


在D:\openhevc下右击,如下


选”Export” 填入https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/tags/HM-12.0+RExt-4.0/再点击”OK”


然后就下载下来了…


打开它:


其中doc中的”software-manual.pdf”是软件参考文档,这个比较有用!

Cfg文件夹里是一些编码配置文件

进入如下目录D:\openhevc\HM-12.0+RExt-4.0\build


双击”HM_vc10.sln”打开VS工程(前提是你要先装VS2010,VS2010怎么装我就不多说了,网上一大堆)

打开后进行” build”, 于是生成了bin文件夹如下:


生成了这两个exe文件”TAppEncoder.exe”是编码器” TAppDecoder.exe”是解码器到了这一步,表明你之前的步骤都是正确的。

下面讲编码器的使用,右击TAppEncoder,选”设为启动项”,


再右击TAppEncoder选”属性”->配置属性->调试,重点关注命令参数和工作目录

 

工作目录,将其设置为D:\openhevc\HM-12.0+RExt-4.0\bin\vc10\Win32\Debug

为了方便,我们把配置文件、yuv测试序列复制到该目录.. 我们需要至少使用两个配置文件,即在cfg目录中如encoder_intra_main.cfg,以及per-sequence目录如BasketballDrill.cfg。前者主要用于配置各种编码参数,后者主要用于指定输入yuv测试文件的分辨率,待编码帧数等。

完成上述操作,然后在“CommandArguments”一栏填入-c encoder_intra_main.cfg-c BasketballDrill.cfg,用于表明这个编码器使用这两个配置文件所指定的参数进行编码。


(其实使用配置文件不是必须的,可以用命令敲,但是我懒-_-,不懒的大神可以参考soft user manual.pdf)

上述配置结束后应该就可以开始吧YUV测试文件编码成二进制流码文件了。

YUV测试文件Keiba_832x480_30.YUV下载地址(一段480P的关于骑马的短片,考虑到可能编码很慢,于是选择了480P,而不是720P,1080P,4k,8k~)

 http://download.csdn.net/detail/znfc2/6261715

http://download.csdn.net/detail/znfc2/6261725

 

YUV播放器下载地址: http://download.csdn.net/detail/znfc2/6260823

 

YUV播放器要注意设置视频分辨率,如下图(如果1080P太大,可以调整”ZOOM”)


播放效果如下:


下载了480P的YUV测试视频并且确保他能正确播放,接下来准备编码.

首先要修改BasketballDrill.cfg,,,如下

#======== File I/O ===============

InputFile                     :D:/openhevc/HM-12.0+RExt-4.0/bin/vc10/Win32/Debug/Keiba_832x480_30.yuv

InputBitDepth                 : 8           # Input bitdepth

InputChromaFormat             : 420         # Ratio of luminance to chrominancesamples

FrameRate                     : 30          # Frame Rate per second

FrameSkip                     : 0           # Number of frames to be skipped ininput

SourceWidth                   : 832         # Input  frame width

SourceHeight                  : 480         # Input  frame height

FramesToBeEncoded             : 300         # Number of frames to be coded

 

Level                         : 3.1

不修改这个文件的后果如下:


保存之后回到VC2010重新生成解决方案,crtl+F5



POC后面的数据是当前编码的整数,应该是0~299,,,CORE I7 编码480P的速度很慢,建议换成240P的视频试试,

某240PYUV测试视频下载地址:http://download.csdn.net/detail/znfc2/6262551

 

编码结束之后提示,恭喜你,终于编码结束


运行完后会在Debug文件夹下生成rec.yuv和str.bin这两个文件,前者是编码环路产生的重建序列,str.bin是编码过后的hevc格式的二进制码流。


hevc格式的二进制码流目前推荐使用HEVC visa来打开(可以跨平台的国产的哦亲~但是很遗憾,他不是免费的~)

HEVC visa下载地址:http://codecian.com/


HEVC visa解码


如果你是高富帅可以试试HEVC Analyzer…


或者Zond 265 - HEVC Video Analyzer


解码器的使用:在到填入“Command Arguments”之前,跟编码器是完全一样的,输入的命令如下-b str.bin -o deco.yuv。设置完毕之后,运行解码器,应该能够解码出deco.yuv文件来了。

至此,简单的HM使用介绍完毕

本人水平有限,不对之处还请斧正~ 转载请注明出处


Open Source (GPL) H.265/HEVC video encoder 下载网址:https://bitbucket.org/multicoreware/x265/src x265 developer wiki To compile x265 you must first install Mercurial (or TortoiseHg on Windows) and CMake. Then follow these easy steps: (for the most definitive instructions, consult our build README) Linux Instructions # ubuntu packages: $ sudo apt-get install mercurial cmake cmake-curses-gui build-essential yasm # Note: if the packaged yasm is older than 1.2, you must download yasm-1.2 and build it $ hg clone https://bitbucket.org/multicoreware/x265 $ cd x265/build/linux $ ./make-Makefiles.bash $ make Windows (Visual Studio) Instructions $ hg clone https://bitbucket.org/multicoreware/x265 Then run make-solutions.bat in the build\ folder that corresponds to your favorite compiler, configure your build options, click 'configure', click 'generate', then close cmake-gui. You will be rewarded with an x265.sln file. Also see cmake documentation. Intel Compiler Instructions On Windows, you should open an Intel Compiler command prompt and within it run one of the make-makefiles.bat scripts in build/icl32 or build/icl64, then run nmake. On Linux, you can tell cmake to build Makefiles for icpc directly. This requires you to have configured Intel's compiler environment (by sourcing the appropriate shell script). For example: $ source /opt/intel/composer_xe_2013/bin/compilervars.sh intel64 $ cd repos/x265/build/linux $ export CXX=icpc $ export CC=icc $ ./make-Makefiles $ make Command line interface The Makefile/solution builds a static encoder.lib library and a standalone x265 executable that aims to be similar to x264 in its command line interface. Running without arguments shows you the command line help. Info Mission Statement Road Map TODO HOWTO add a new encoder performance primitive HOWTO Contribute patches to x265 HOWTO cross compile from Linux to Windows Coding Style Helpful links
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值