public:it:video

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
public:it:video [2022/02/15 16:33] – [库] oakfirepublic:it:video [2024/04/23 10:48] (当前版本) – [H.265/HEVC] oakfire
行 29: 行 29:
     可参考 [这篇专利文](https://patents.google.com/patent/CN103905927A/zh)     可参考 [这篇专利文](https://patents.google.com/patent/CN103905927A/zh)
 </markdown> </markdown>
-===== tools ===== +===== Tools ===== 
-  * 测试视频下载站:[[https://www.sample-videos.com/index.php#sample-mp4-video]]+  * 测试视频下载站: 
 +    * [[https://www.sample-videos.com/index.php#sample-mp4-video]] 
 +    * [[https://www.libde265.org/downloads-videos/]]
   * [[https://www.videohelp.com/software/Codec-Tweak-Tool|Codec-Tweak-Tool]]   * [[https://www.videohelp.com/software/Codec-Tweak-Tool|Codec-Tweak-Tool]]
 ===== 学习 ===== ===== 学习 =====
   * 一个非常好的科普文章,值得翻译:https://github.com/leandromoreira/digital_video_introduction   * 一个非常好的科普文章,值得翻译:https://github.com/leandromoreira/digital_video_introduction
     * 简中翻译 [[https://github.com/leandromoreira/digital_video_introduction/blob/master/README-cn.md]]     * 简中翻译 [[https://github.com/leandromoreira/digital_video_introduction/blob/master/README-cn.md]]
 +  * [[https://work-blog.readthedocs.io/en/latest/index.html|Linux V4L2]]
 +  * [[https://zhuanlan.zhihu.com/p/143720720|视频的容器与编码]]
 +  * [[https://hughfenghen.github.io/tag/WebAV/|web 音视频处理]]
  
 ===== Container ===== ===== Container =====
 +==== MP4 ==== 
 +  * [[.:mp4]] 
 +==== FLV ==== 
 +  * [[.:flv]]
 ==== HLS ==== ==== HLS ====
   * https://developer.apple.com/streaming/   * https://developer.apple.com/streaming/
行 48: 行 56:
   * https://blog.csdn.net/michaeluo/article/details/75263462   * https://blog.csdn.net/michaeluo/article/details/75263462
 ==== RTSP ==== ==== RTSP ====
 +  * [[.:rtsp]]
   * Real Time Streaming Protocol(RTSP):[[http://tools.ietf.org/html/rfc2326|RFC2326]]   * Real Time Streaming Protocol(RTSP):[[http://tools.ietf.org/html/rfc2326|RFC2326]]
   * rtsp -> hls(m3u8): https://medium.com/androvideo/convert-rtsp-to-hls-using-ffmpeg-2fe2cdf3a0de   * rtsp -> hls(m3u8): https://medium.com/androvideo/convert-rtsp-to-hls-using-ffmpeg-2fe2cdf3a0de
行 53: 行 62:
   * Official site: [[http://www.onvif.org/|onvif.org]]   * Official site: [[http://www.onvif.org/|onvif.org]]
 ===== Codec ===== ===== Codec =====
-==== H.264 ====+==== H.264/AVC ====
   * [[https://www.itu.int/rec/T-REC-H.264]]   * [[https://www.itu.int/rec/T-REC-H.264]]
 +    * nal_unit_type 表格: 文档 7.4.1  Table 7-1
 +    * SPS PPS 的文档位置: H264 文档(T-REC-H.264-202108-I!!PDF-E.pdf)的 7.3.2.1.1 章节
   * [[https://www.cnblogs.com/TaigaCon/p/5215448.html|h.264语法结构分析]] 这篇讲得不错   * [[https://www.cnblogs.com/TaigaCon/p/5215448.html|h.264语法结构分析]] 这篇讲得不错
   * [[https://blog.csdn.net/amazing_yangle/article/details/49029687|H264 两种format]]   * [[https://blog.csdn.net/amazing_yangle/article/details/49029687|H264 两种format]]
行 62: 行 73:
   * [[https://blog.csdn.net/yue_huang/article/details/75126155]]   * [[https://blog.csdn.net/yue_huang/article/details/75126155]]
   * ffmpeg 解包AVCC时,会把h264的SEI信息与第一个关键帧放一起,如果手动把AVCC转AnnexB时,需按长度来判断是否含有多个帧。   * ffmpeg 解包AVCC时,会把h264的SEI信息与第一个关键帧放一起,如果手动把AVCC转AnnexB时,需按长度来判断是否含有多个帧。
 +  * 分辨率与最佳码率的对应关系:https://www.lighterra.com/papers/videoencodingh264/
 +<WRAP center 90%>
 +
 +^ Name            ^ Resolution  ^ Link(Mbps)  ^ Bitrate(Mbps)  ^ Video(kbps)  ^ Audio(kbps)  ^
 +| 240p            | 424x240     | 1.0         | 0.64           | 576          | 64           |
 +| 360p            | 640x360     | 1.5         | 0.96           | 896          | 64           |
 +| 432p            | 768x432     | 1.8         | 1.15           | 1088         | 64           |
 +| 480p            | 848x480     | 2.0         | 1.28           | 1216         | 64           |
 +| 480p HQ         | 848x480     | 2.5         | 1.60           | 1536         | 64           |
 +| 576p            | 1024x576    | 3.0         | 1.92           | 1856         | 64           |
 +| 576p HQ         | 1024x576    | 3.5         | 2.24           | 2176         | 64           |
 +| 720p            | 1280x720    | 4.0         | 2.56           | 2496         | 64           |
 +| 720p HQ         | 1280x720    | 5.0         | 3.20           | 3072         | 128          |
 +| 1080p           | 1920x1080   | 8.0         | 5.12           | 4992         | 128          |
 +| 1080p HQ        | 1920x1080   | 12.0        | 7.68           | 7552         | 128          |
 +| 1080p Superbit  | 1920x1080   | N/A         | 20.32          | 20000        | 320          |
 +
 +</WRAP>
 +  * SPS PPS 解析参考:https://blog.51cto.com/u_12204415/3804504
 +    * H264 文档(T-REC-H.264-202108-I!!PDF-E.pdf)的 7.3.2.1.1 章节
 +    * 哥伦布编码 ue se 之类的,代码实现参考 [[https://github.com/latelee/H264BSAnalyzer/blob/72b155b88e5b4e4df65379f47c287bccb50075da/H264BSAnalyzer/bs.h|bs.h]]
 +==== H.265/HEVC ====
 +  * H265 的 nalu type : https://blog.csdn.net/u011003120/article/details/83411445
 +  - ''type = (code & 0x7E)>>1''
 +  - ''VPS=32 SPS=33 PPS=34 IDR=19 P=1 B=0''<code bash>
 + ① 00 00 00 01 40 01  ---> (0x40 & 0x7E)>>1 = 32 ---> VPS
 + ② 00 00 00 01 42 01  ---> (0x42 & 0x7E)>>1 = 33 ---> SPS
 + ③ 00 00 00 01 44 01  ---> (0x44 & 0x7E)>>1 = 34 ---> PPS
 + ④ 00 00 00 01 26 01  ---> (0x26 & 0x7E)>>1 = 19 ---> IDR
 +</code>
 +
 +=== 浏览器硬解 HEVC 设置 ===
 +
 +  * 苹果电脑目前 Safari 浏览器都支持 HEVC 硬解;以下针对 Windows PC.
 +
 +  * 首先确保PC拥有可以解码HEVC的显卡,具体可查看
 +    * [[https://bluesky-soft.com/en/dxvac/deviceInfo/decoder/amd.html|AMD GPU Decoder Device Information]]
 +    * [[https://bluesky-soft.com/en/dxvac/deviceInfo/decoder/nvidia.html|NVIDIA GPU Decoder Device Information]]
 +    * [[https://bluesky-soft.com/en/dxvac/deviceInfo/decoder/intel.html|Intel GPU Decoder Device Information]]
 +  * 最好安装适配显卡的最新版本驱动
 +  * 安装支持 HEVC 解码的浏览器,具体版本范围见 https://caniuse.com/?search=hevc ,即 chrome 版本在107及以上, edge 版本在 79 以上
 +  * 如果是笔记本电脑等有双显卡混合支持的,要注意设置浏览器使用哪张显卡,设置方法: win+i 打开设置 - 系统 - 屏幕 - 显示卡 - 添加应用-浏览 - 选择浏览器运行exe - 选项选择节能或高性能
 +    * 注:edge 浏览器也需要新添加选择路径,默认列表的edge不是桌面应用。
 +  * edge 浏览器在  windows 上需要安装 HEVC 视屏扩展插件,windows商店里付费安装, 或[[https://free-codecs.com/.hevc_video_extension_download.htm|免费下载]]安装
 +
 +  * chrome 浏览器: ''chrome:%%//%%gpu'' 查看是否有 hevc
 +  * edge 浏览器:''%%edge://gpu%%'',  查看是否有 hevc
 +    * 如果要在B站上硬解HEVC,还需要在edge 浏览器安装User-Agent Switcher and Manager 插件,把UAC 修改为 Safari .  B站视频右下角齿轮菜单-更多播放设置-选择HEVC; 右键视频信息里有 ''hev'' 字样。
 +
 +
 ==== WebM ==== ==== WebM ====
   * VP8/VP9   * VP8/VP9
行 77: 行 138:
 ===== 库 ===== ===== 库 =====
   * [[https://github.com/gitsummore/nile.js|nile.js]]:基于 Torrents 与 WebRTC 的端到端视频流播放技术实现工具。   * [[https://github.com/gitsummore/nile.js|nile.js]]:基于 Torrents 与 WebRTC 的端到端视频流播放技术实现工具。
-  * [[https://github.com/umlaeute/v4l2loopback|V4L2]]:linux 虚拟摄像头+  * [[https://github.com/umlaeute/v4l2loopback|V4L2loopback]]:linux 虚拟摄像头
   * [[.:mpc-hc]]   * [[.:mpc-hc]]
-==== ffmpeg ====+  * [[.:DirectShow]] 
 +  * [[https://gstreamer.freedesktop.org/|GStreamer]] 
 +    * [[https://gstreamer.freedesktop.org/documentation/installing/for-android-development.html?gi-language=c#installing-for-android-development|android NDK 编译]]
   * [[public:it:ffmpeg]]   * [[public:it:ffmpeg]]
  
  
  
  • public/it/video.1644913987.txt.gz
  • 最后更改: 2022/02/15 16:33
  • oakfire