当前位置:网站首页>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
边栏推荐
- Understand the composition of building energy-saving system
- 13. Semaphore critical zone protection
- Solution of mysql8 forgetting password file in Windows Environment
- ERROR 1118 (42000): Row size too large (> 8126)
- Pytest framework implements pre post
- flume 190 INSTALL
- Database dictionary Navicat automatic generation version
- Pytest-- test report allure configuration
- [visual studio] every time you open a script of unity3d, a new vs2017 will be automatically reopened
- (五)APA场景搭建之挡位控制设置
猜你喜欢
![[Fantasy 4] the transformation from U3D to UE4](/img/bb/665eba3c8cd774c94fe14f169121da.png)
[Fantasy 4] the transformation from U3D to UE4

Flutter——Canvas自定义曲线图

【TS】1368- 秒懂 TypeScript 泛型工具类型!

Operator-1 first acquaintance with operator

Sum the two numbers to find the target value

从MediaRecord录像中读取H264参数
![[Fantasy 4] introduction and use of UMG components (under update...)](/img/33/7e3b74192b7fd73d5145f85e061d1f.png)
[Fantasy 4] introduction and use of UMG components (under update...)

Considerations for Apache deploying static web page projects

Pytest learning --base

How to get the password of cpolar?
随机推荐
Ks009 implement pet management system based on SSH
session-cookie与token
[visual studio] visual studio 2019 community version cmake development environment installation (download | install relevant components | create compilation execution project | error handling)
UVM factory mechanism
Operator-1 first acquaintance with operator
01-spooldir
[unity3d] cannot correctly obtain the attribute value of recttransform, resulting in calculation error
传输优化抽象
Merge ordered sequence
MongoDB-快速上手MongoDB命令行的一些简单操作
Shapiro Wilk normal analysis by SPSS
flume 190 INSTALL
lunix重新分配root 和 home 空间内存
Flink实时计算topN热榜
[Lua] summary of common knowledge points (including common interview sites)
In the face of uncertainty, the role of supply chain
[pit avoidance guide] pit encountered by unity3d project when accessing Tencent bugly tool
2021-10-02
[Fantasy 4] introduction and use of UMG components (under update...)
Solutions to a series of problems in sqoop job creation