当前位置:网站首页>H265 streaming on OBS
H265 streaming on OBS
2022-07-28 15:41:00 【I'm not a code God】
OBS The official made it clear that they did not support H265, It seems that I won't support it in the future , What's the reason ? You can see the quarrel on the official forum
I don't want to read English , I'd like to make a brief statement here , Because of Adobe The company's RTMP There is no support in the agreement H265, So they don't want to support H265. Of course, the voice of the masses is still very strong . So here comes the question , How to modify OBS Open source code makes it support H265 How about the format ?
Start trying :
First github On clone Next OBS Source code , According to the official instructions , Configure the compilation environment , I won't go into that . After successful compilation , Start trying to find some code of the encoder .
find obs-ffmpeg This module , There's a file in it jim_nvenc.c
struct obs_encoder_info nvenc_info = {
.id = "jim_nvenc",
.codec = "h264",
.type = OBS_ENCODER_VIDEO,
.caps = OBS_ENCODER_CAP_PASS_TEXTURE,
.get_name = nvenc_get_name,
.create = nvenc_create,
.destroy = nvenc_destroy,
.update = nvenc_update,
.encode_texture = nvenc_encode_tex,
.get_defaults = nvenc_defaults,
.get_properties = nvenc_properties,
.get_extra_data = nvenc_extra_data,
.get_sei_data = nvenc_sei_data,
};This is the code above nvenc Of h264 Coding module ,nvenc yes NVIDIA Video card coding tool launched , At the same time have h264 and h265 Coding function , It's just OBS Not used h265 It's just the part of .
So follow the code above , structure h265 Module .
struct obs_encoder_info hevc_nvenc_info = {
.id = "hevc_nvenc",
.codec = "hevc",
.type = OBS_ENCODER_VIDEO,
.caps = OBS_ENCODER_CAP_PASS_TEXTURE,
.get_name = hevc_nvenc_get_name,
.create = hevc_nvenc_create,
.destroy = nvenc_destroy,
.update = nvenc_update,
.encode_texture = nvenc_encode_tex,
.get_defaults = nvenc_defaults,
.get_properties = nvenc_properties,
.get_extra_data = nvenc_extra_data,
.get_sei_data = nvenc_sei_data,
};Most functions can be reused h264 Of , except create and get_name.
create The function is also basically the same as H264 equally , Inside the handle NV_ENC_CODEC_H264_GUID Replace with NV_ENC_CODEC_HEVC_GUID, Replace it like this ,
Then go to obs_ffmpeg.c Add inside obs_register_encoder(&nvenc_encoder_info); To register .OBS You can use this encoder . Of course, it didn't succeed in the end ,nVidia The driver of reported an error , It's hard to study , So the sword goes sideways , Find clues provided by foreign friends ,OBS There is also a video recording function , You can choose FFMPEG Custom output , You can choose from URL Output , Then push the stream . At this point, you need to compile one that can h265 Push stream FFMPEG, Then put obs Compile the configuration , Compile together , You can call this customized FFMPEG, Final realization H265 Of rtmp Push flow .
边栏推荐
- Summary and arrangement of postgraduate entrance examination information of 985 colleges and universities nationwide
- monkey压力测试
- 如何搭建openGrok代码服务器
- 提速1200倍!MIT开发新一代药物研发AI,吊打老模型
- Multithreading
- Leetcode - sliding window extremum, search tree postorder traversal, statistical difference pairs, dividing equal subsets
- 20. Channel allocation task implementation
- Opencv - draw mask images of multiple instances
- 4.8 hd-gr GNSS navigation software source code
- How to write a JMeter script common to the test team
猜你喜欢

How many of the top ten test tools in 2022 do you master

详解.NET的求复杂类型集合的差集、交集、并集

Introduction to grpc

生命的感悟

Baidu proposes a dynamic self distillation method to realize dense paragraph retrieval by combining interactive model and double tower model

NFTScan 与 NFTPlay 在 NFT 数据领域达成战略合作

Self cultivation of programmers

vs动态库调试

MIT pointed out that the public pre training model should not be used indiscriminately

融云实时社区解决方案
随机推荐
德国电信否认加强与华为合作,并称过去3年已缩减与华为的合作
Sharing of award-winning activities: you can get up to iphone13 after using WordPress to build your own blog
Among the three "difficult and miscellaneous diseases" of machine learning, causal learning is the breakthrough | Liu Li, Chongqing University
【删除指定数字——leetcode]
2. Self narration of open source GPS project hd-gr GNSS
21、电文处理任务定义
Multithreading
QCustomPlot绘图工具常用方法
How many tips do you know about using mock technology to help improve test efficiency?
生命的感悟
关于word文档中插入的图片只显示下面一部分
4、主程序和累积中断处理例程实现代码
The subst command mirrors a folder to a local disk
Leetcode - random set, longest multiclass subsequence
An article about rsocket protocol
ECCV 2022 | ssp: a new idea of small sample tasks with self-supporting matching
百度提出动态自蒸馏方法,结合交互模型与双塔模型实现稠密段落检索
Easy start, swagger
华为全球员工总数创新高:19.4万人,研发人员占比近50%
腾讯面试之--请你设计一个实现线程池顺序执行