编程与软件工程github.com编辑精选
视频技术实战入门:图像、视频、编解码等
A hands-on introduction to video technology: image, video, codec and more
2017 — 2019,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这篇 GitHub 教程围绕图像、视频、编解码器等主题,提供一份动手式的数字视频技术入门。它试图把视频压缩与编码的核心概念讲清楚,适合想系统理解这一领域、又不想一开始就陷入标准细节的读者。
为什么经久不衰:它把抽象的视频压缩与编解码原理讲得系统且可上手,而 MPEG 到 H.265 的核心设计延续多年,使它今天仍是理解视频技术的可靠入口。
HN 评论精选
大屏会暴露低码率编码的色带和块状伪影,Netflix 的编码质量明显优于 Amazon Prime Video。
视频压缩在整个技术栈中仍未被充分理解。我最近买了家用 1080p 投影仪,现在电影/剧集是在 100 英寸屏幕上观看,内容主要来自 Netflix 和 Amazon Prime Video。Netflix 的编码做得很好;Amazon Prime Video 则不然——即便是其英国独家内容(如《美国众神》《黑客军团》),在大屏上画质也相当差:色带、细微渐变上的闪烁块状伪影、暗光场景码率不足。一旦注意到这些问题,就非常分散注意力。反过来说,大屏幕也是高码率高质量内容的绝佳广告;低于 2GB/小时的内容会明显变差。
barrkel查看英文原文
Video compression is not understood well enough throughout the whole stack yet. I recently got a 1080p projector for home use, so now movies / TV series in my home are viewed on a 100" screen. Content is mostly from Netflix and Amazon Prime Video. Netflix does a really good job with encoding. I cannot say the same for Amazon Prime Video; even with their exclusive (in UK) offerings, like American Gods or Mr Robot, the quality of the encode is quite poor when viewed on a big screen. Banding, shimmering blocky artifacts on subtle gradients, insufficient bit budget for dimly lit scenes - once you become aware of the issues, it becomes really distracting. OTOH a really big screen is a fantastic ad for high quality high bitrate content. Anything less than 2GB/hour is noticeably poor.
MPEG-1 到 H.265 的核心架构延续约二十年,多数变化集中在帧尺寸、帧率和码率等参数上。
有趣的是,第一个 ISO 编解码器 MPEG-1 的架构几乎与今天的 H.265 相同。该编解码器在 90 年代末标准化,所以这一设计延续了约 20 年。大多数变化与目标参数有关,如帧尺寸、帧率和码率。只有最后一步 264 到 265 似乎增加了新特性。这是一篇写得很好的介绍。
profpandit查看英文原文
It's interesting to note that the architecture of the first ISO codec MPEG (1) is almost identical to the one we have today H.265 That codec was standardised in the late 90s So this design has carried through for about 20 years. Most of the changes relate to the targeted parameters such as frame size, frame rate and bitrate. Only the last step 264 --> 265 seems to have added new features. This is a very well written introduction
通过写 H.261 解码器入门,再逐步扩展到 MPEG-1/MPEG-2,是可行且有收获的动手学习路线。
如果想更“动手”地学视频编解码,我推荐写一个 H.261 解码器。它只支持两种帧尺寸,没有 B 帧,也没有帧内预测(基本是 JPEG 的子集),约 700 行 C 就能完成,是个简单又有成就感的周末项目。可惜现成 H.261 媒体不多,但看着视频完全由自己写的代码解码出来很有趣,调试时还能看到各种古怪失真。之后可以转向支持可变帧尺寸和 B 帧的 MPEG-1(复用大部分代码,再一个周末,我最终约 1k 行总代码),它有更多现成媒体;再往后是 MPEG-2(可解码 DVD,并要处理隔行)和带帧内预测的 H.263。我因时间原因只做到前两个,但照着标准实现一个基本视频解码器并不算难。
userbinator查看英文原文
If you're interested in more "hands on" or practical video codec learning, I recommend writing a H.261 decoder. Only two supported frame sizes, no B-frames, and no intra prediction (effectively a subset of JPEG) make for a simple yet possibly quite rewarding weekend project that can be completed in around 700 lines of C (my attempt). Unfortunately not much existing media is available in 261, but I think watching a video being decoded entirely by code you wrote is a pretty fun experience, including all the weird and amusing distortions you can see when debugging; and from there you can move on to MPEG-1 with variable frame sizes and B frames (another weekend, assuming you reuse much of the 261 exercise --- I ended up with 1k lines total to decode MPEG-1), and that has somewhat more existing media you'll be able to watch. Then you can try H.262/MPEG-2 and enjoy the intricacies of handling interlacing as well as being able to decode DVDs and a lot of existing content; and then there's H.263 which has intra prediction... I haven't gotten past the first two largely for reasons of time and other things to play with, but IMHO getting a basic implementation of a video decoder is not that hard especially when you're working from a standard.
视频技术教学应先建立问题意识和概念框架,再展开颜色、DCT、帧间预测等细节。
我希望更多做 DSP/媒体技术的人先讲概念,而不是一上来就钻细节。比如“视频编解码器如何工作”应先讲:要解决什么问题(降低视频流所需的每秒比特数,因为它很大),以及怎么解决(不发送多余细节,因为它们要么冗余要么不可感知)。然后再深入颜色表示、图像结构、二维信号变换、DCT 如何通过去相关来更好地集中能量从而减少静态图像比特数,以及帧间共享数据等细节。作为 DSP 从业者,我注意到不先讲概念时大家就眼神发直;不过大家都觉得这是黑魔法也不错,工作有保障。
unlinked_dll查看英文原文
One thing that I wish more folks did with DSP/media tech was to start with concepts instead of diving into details first. Like, "how does a video codec work?" should start with: what is the problem? (reducing the bits per second required for a video stream, since it's big) and how? (don't send superfluous detail, since it's either redundant or imperceptible). Than dive into the details of how color is represented, how images are structured, how 2d signal transforms work, the principle behind the DCT as a method of representing the same data with better energy compaction by decorrelating different components, and how that can be used advantageously to reduce the number of bits for a still image, then talk about shared data between images, etc etc. I've noticed as a DSP guy that when I talk about things without concepts first that everyone's eyes glaze over. Although it is nice that everyone thinks it's black magic, good job security.
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选