当前位置:网站首页>Read H264 parameters from mediarecord recording
Read H264 parameters from mediarecord recording
2022-07-02 10:46:00 【Small waves-】
explain :
Many used to do a test project , Want to put android Mobile video access video server , This is how it works :
hold android The real-time video of the mobile phone is uploaded to the background forwarding server , The forwarding server packages the audio and video streams into IPC rtsp Server form , Streaming media connecting to mobile forwarding server is like connecting IPC The equipment is the same , Use rtsp Pull stream mode to get video stream .
So as to realize the mobile phone --- Forwarding server --- Video server —PC Two way communication of client .
This scheme is a simplified scheme , The mobile terminal is only responsible for packet capture playback and remote playback , The forwarding server only implements one rtsp Encapsulation does not have any other functions , Other modules are unchanged . The mobile terminal uses the top mediarecorder object , While recording echo , Pass audio and video on one side .
The mobile terminal needs to use a custom protocol to communicate with the forwarding server , Inform the server of audio and video parameters , Among them, it is very important to obtain video parameters .
how Get video parameters ? Actually ,mediarecorder(H264) The beginning of the recorded data of contains SPS and pps Parameters , Analyze it and take it out , And the same equipment 、 Obtained with the same configuration sps,pps It's all the same , Just get it when you start the interface , You don't need to get it later .
How to get H264 What about parameters? ?
Solution :
1、 Set the video decoding parameter of the recording to H264

2、 Skip the file header after obtaining the video data :
3、 The back is SPS and PPS:
This will find the video parameters , And then it's packaged , Tell the server .
Reference resources :
I seem to have written an article about sps,pps, At that time, I was doing h264 Slice transmission .
About :
qq:9611153 WeChat lgs9611153
边栏推荐
猜你喜欢

Introduction to MySQL 8 DBA foundation tutorial

Operator-1 first acquaintance with operator
![[SUCTF2018]followme](/img/63/9104f9c8bd24937b0fc65053efec96.png)
[SUCTF2018]followme

flink 提交程序

01 install virtual machine

Delivery mode design of Spartacus UI of SAP e-commerce cloud

快速做出原型

stm32和电机开发(上位系统)
![[visual studio] visual studio 2019 community version cmake development environment installation (download | install relevant components | create compilation execution project | error handling)](/img/9f/4265f1e3927fcf66602f0fc9e7a9d9.jpg)
[visual studio] visual studio 2019 community version cmake development environment installation (download | install relevant components | create compilation execution project | error handling)

Internet News: Tencent conference application market was officially launched; Soul went to Hong Kong to submit the listing application
随机推荐
js setTimeout()与面试题
webUI自动化学习
How to get the password of cpolar?
对话吴纲:我为什么笃信“大国品牌”的崛起?
Kustomize使用手册
sqoop创建job出现的一系列问题解决方法
MongoDB-快速上手MongoDB命令行的一些简单操作
[pit avoidance guide] pit encountered using ugui: the text component cannot indent the first line by two spaces
allure--常用配置项
Solutions to a series of problems in sqoop job creation
[jetbrain rider] an exception occurred in the construction project: the imported project "d:\visualstudio2017\ide\msbuild\15.0\bin\roslyn\microsoft.csh" was not found
Win11 arm系统配置.net core环境变量
Blender model import UE, collision settings
SPSS做Shapiro-Wilk正态分析
网络通信学习
2021-09-12
Nonlinear optimization: establishment of slam model
Rapid prototyping
Transport Optimization abstraction
Determine whether there are duplicate elements in the array