当前位置:网站首页>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 .
边栏推荐
- The difference between character array and string
- 软件架构与设计(九)-----基于组件的架构
- 生命的感悟
- Grpc protocol buffer
- Easy start, swagger
- Daily news on July 28, 2022: Science: AI has made another breakthrough in protein design, and can design specific functional proteins
- Explain the difference set, intersection set and union set of complex type set in detail.Net
- Installing CONDA and configuring Jupiter
- The subst command mirrors a folder to a local disk
- Qt信号与槽的五种连接方式
猜你喜欢

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

如何获取及嵌入Go二进制执行包信息

800V高压系统

Matlab exports high-definition pictures without distortion in word compression and PDF conversion

EasyExcel复杂表头导出(一对多)

机器学习的3大“疑难杂症”,因果学习是突破口 | 重庆大学刘礼

关于Simulink如何生成模型覆盖率报告

百度提出动态自蒸馏方法,结合交互模型与双塔模型实现稠密段落检索

CANoe使用教程

Self cultivation of programmers
随机推荐
Summary and arrangement of postgraduate entrance examination information of 211 colleges and universities nationwide
Leetcode - sliding window extremum, search tree postorder traversal, statistical difference pairs, dividing equal subsets
Execution process of SQL statement
多线程
10. Implementation of related data accumulation task
Matlab exports high-definition pictures without distortion in word compression and PDF conversion
提速1200倍!MIT开发新一代药物研发AI,吊打老模型
leetcode-括号有效性问题
Write a standard character device driver with your hands
Framework定制系列(六)-----屏蔽FallbackHome手机启动中弹窗直接进入Launcher
软件架构与设计(九)-----基于组件的架构
8. Realization of real-time data backup and real-time clock function
monkey压力测试
为赴美上市做准备?Arm宣布将剥离物联网服务业务:未来将聚焦芯片底层设计
Canoe tutorial
Grpc frequently asked questions
MIT指出公开预训练模型不能乱用
22、电文处理任务实现
Vs usage skills
软件架构与设计(八)-----分布式架构