Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

播放h264文件时解码失败的问题 #61

Open
DeanXi opened this issue Feb 8, 2022 · 4 comments
Open

播放h264文件时解码失败的问题 #61

DeanXi opened this issue Feb 8, 2022 · 4 comments

Comments

@DeanXi
Copy link

DeanXi commented Feb 8, 2022

根据demo,我从监控平台上抓取了Hi profile 的h264文件,进行推流时解码失败。
解析了一下nal,发现该文件nal由00 00 01开头,client端收到的是00 00 00 01 00 00 01开头。
测试数据文件在这里https://github.com/DeanXi/testdata
有人遇到和我一样的问题么,rtp拼包那里没有发现问题。

@PHZ76
Copy link
Owner

PHZ76 commented Feb 21, 2022

你好,我这边只是传输,不会插入其他数据

@DeanXi
Copy link
Author

DeanXi commented Feb 21, 2022

你好,我这边只是传输,不会插入其他数据

测试下来发现00 00 01开头的数据push进去再请求出来会有这个问题,我也没有在代码中找到在哪里修改的数据头。也有可能是client的问题,但用播放器播放智能读到i帧
谢谢您的回复,在读取数据nal的头上补零解决了这个问题

@Tephen
Copy link

Tephen commented Apr 12, 2022

可能因为一般来说将h264打包为RTP时会去掉00 00 001的间隔头,客户端在提取rtp包中的h264数据后会自己添加间隔头.而这个项目的server端在把h264打包成RTP包时候没有去掉间隔序列,而是把它也打包进了数据里,这样客户端又自动添加了一个00 00 00 01的间隔头,就会出现这种情况

@fatalfeel
Copy link

fatalfeel commented Jul 2, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants