GithubHelp home page GithubHelp logo

chenxinyu0322 / hevcbsanalyzer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from latelee/hevcbsanalyzer

0.0 2.0 0.0 38.71 MB

H264(AVC) and H265(HEVC) bit stream Analyzer, VS2010 project. Same of H264BSAnalyzer.git

C++ 38.55% C 61.32% Objective-C 0.13%

hevcbsanalyzer's Introduction

H264BSAnalyzer -- H.264/AVC H.265/HEVC bitstream analyze tool

Project

VS2010 MFC project, using h264bitstream to implement H.264 bitstream analyze.
The code for H.265 bitstream analyzing is based on h264bitstream code and HM16.6.

Project Feature

  • support different NAL display, including VPS, SPS, PPS, SEI, AUD, Slice.
  • support hex data display for NAL.
  • support displaying detail information using cursor up and down.
  • support different color for different slice, with frame number.
  • auto parse file name.
  • support file name suffix:
    • H.264 format file: .h264,.h264, .avc
    • H.265 format file: .h26, .h265, .hevc
    • auto decide format acording file content if no name suffix specify listing above.
  • support playing H.264、H.265 bitstream video file.
  • pause, stop, play frame by frame for video file.
  • support saving for RGB(24bit) and YUV(yuv420p) file, BMP, JPEG (picture) file.
  • support saving for AVI, MP4, MOV format file.

Usage

Click menu File->OPen option, or drag file to the main window,
and the tool will auto parse file cotent.
double click the item in the main windows will show the detail NAL information.
to play the file, click "Play".

Window view

V1.2 main window:
GUI

V2.0 main window for h.264:
GUI

V2.0 main window for h.265:
GUI

V2.1 main window for h.264:
GUI

V2.1 main window for h.265:
GUI

V3.0 main window for h.264:
GUI

V3.0 main window for h.265:
GUI

Changelog

The binary file will locate in release directory.

  • v1.x

Complete H.264 bitstream analyze.

  • v2.0

Delete manual start function in v1.x.
Add for H.265/HEVC bitstream analyze.
Other update.

  • v2.1

Dispaly bitstream information using CTreeCtrl, ref project: H264Visa、H264VideoESViewer.
Add windows resize.
Other update.
Some problems:
Not decode some SEI information, the H.264 frame rate calcuration may be inaccurate(2x for real frame rate).

  • v3.0

fix code using cppcheck.
support play H.264、H.265 bitstream, minimize compile ffmpeg, static link.
pause, stop, play frame by frame for video file.
support saving for RGB(24bit) and YUV(yuv420p) file, BMP, JPEG (picture) file.
support saving for AVI, MP4, MOV format file.

Testing

The tool is testing width H264Visa, CodecVisa and HM tool.
The testing file is generating by x264/x265 tool, also use some H.265 test sequence file
Only test under Windows 7 64bit OS.

Some bug

Parsing big file will be slow, and may be crash.
Same slice information may be wrong.
The avi file saving for h.265 can't be play. Note: it can't be play by ffplay.
You ca fix yourself, and let me know.

Protocol

  • Copyright CST studio Late Lee
  • Fix some bug for h264bitstream, see the code.
  • The code comes from h264bitstream, is LGPL.
  • Total code is LGPL.
  • You can use the code for study, and commercial purposes, but give no guarantee.

Thanks

This project started at Feb, 2014 for work need, and see the article written by Dr leixiaohua,
and then rewrite the code, refactor the code, and make improve.
Tanks to 雷霄骅 , He's gone, but will last spirit.

Author

CST studio Late Lee
CST studio
Donate the author

H264BSAnalyzer -- H.264/AVC H.265/HEVC码流分析工具

工程说明

VS2010 MFC工程,使用h264bitstream开源项目实现对H.264码流分析。
H.265分析以h264bitstream为参考基准代码,同时参考HM16.6代码。

功能

  • 支持不同NAL的显示,包括VPS、SPS、PPS、SEI、AUD、Slice的解析。
  • 支持显示NAL十六进制数据。
  • 支持上下光标移动显示详细信息。
  • 支持不同slice的着色显示,显示帧序号。
  • 自动解析文件名。
  • 支持文件名后缀:
    • H.264文件后缀名为.h264、.h264、.avc。
    • H.265文件后缀名为.h265、.h265、.hevc。
    • 如无上述后缀名,则根据内容自动识别。
  • 支持播放H.264、H.265裸码流文件。
  • 具备暂停、停止、逐帧播放功能。
  • 支持保存为RGB(24bit)、YUV(yuv420p)原始文件,支持保存为BMP、JPEG图片。支持文件名含%d字符。
  • 支持保存为AVI、MP4、MOV格式视频文件。

用法

菜单File->Open选项;或者直接拖曳文件至工具界面。
工具会自动解析。双击某一项即可查看具体的NAL信息。
点击“Play”菜单出现播放子窗口。

界面

V1.2版本界面:
GUI

V2.0版本H264分析界面:
GUI

V2.0版本H265分析界面:
GUI

V2.1版本H264分析界面:
GUI

V2.1版本H265分析界面:
GUI

V3.0版本H264分析界面:
GUI

V3.0版本H265分析界面:
GUI

版本变更

编译好的工具位于release目录中。

  • v1.x

H264码流分析功能完成。

  • v2.0

去掉v1.x版本手动点击开始分析功能。
添加H.265/HEVC码流分析功能。
其它界面及显示信息完善。

  • v2.1

使用树形控件显示码流字段。显示参考来源为H264Visa、H264VideoESViewer工具。
增加缩放功能。
其它界面及显示信息完善。
遗留问题:
部分SEI信息未做解析;H264帧率计算可能不准确(是真实帧率的2倍)。

  • v3.0

使用cppcheck进行检测,修复个别语句错误之处。
支持播放H.264、H.265裸码流文件。ffmpeg最小编译,静态链接。
具备暂停、停止、逐帧播放功能。
支持保存为RGB(24bit)、YUV(yuv420p)原始文件,支持保存为BMP、JPEG图片。
支持保存为AVI、MP4、MOV格式视频文件。

测试

本工程使用H264Visa、CodecVisa及HM工具对比测试。
所用视频文件为x264/x265编码生成,另外使用H.265测试序列。
本工具仅在Windows 7 64bit操作系统中运行测试通过。

可能潜在问题

分析大文件较慢,可能会崩溃。
本工具虽使用众多文件、工具对比分析,但无法满足所有条件,个别语法可能分析有误。
H.265保存为AVI格式视频无法播放。注:使用ffmpeg转换,用ffplay也无法正常播放。
可自行修正,也可反馈给作者。

协议

  • 版权所有 迟思堂工作室 李迟
  • 修正h264bitstream个别bug。详见代码。
  • 基于h264bitstream适应性修改的代码,遵从LGPL协议。
  • 本工程源码使用LGPL协议。
  • 可用于学习研究之目的,也可用于商业目的,但无义务保证程序功能完全可靠。

致谢

本工程于2014年2月因工作需要,无意看到雷霄骅博士之文章,于其基础上修改、重构、不断完善。
感谢 雷霄骅 博士!斯人已逝,精神长存!

作者

思堂工作室 李迟
迟思堂工作室
欢迎捐赠支持作者

hevcbsanalyzer's People

Contributors

latelee avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.