如何确保来自不同Android设备的RTMP流具有相同的SPS / PPS?

时间:2018-10-19 03:45:28

标签: android rtmp

我要测试的三个Android设备具有三个不同的AVC数据包。以下是三星,摩托罗拉和Doffe的示例。

三星 1700000000014d001effe10012674d001eda0280bfe5948283030368509a8001000468ee0

摩托罗拉 1700000000014d001effe10012674d001ee901405ff2ca41418181b4284d4001000468ee06e2

杜菲 170000000001640029ffe1001067640029ac1b1a80a02ff9601e1108a701000468ea43cb

当我插入视频时,这会引起很大的问题。视频播放器显然很混乱,无法播放。

如何确保视频标题相同?我应该使用软件编码器,而不使用硬件编码器吗?

1 个答案:

答案 0 :(得分:0)

How is carried out encoding on the clients?

PPS SPS describe your video stream parameters like frame sizes, profile, etc. and almost always are generated by encoder.

How do I ensure that the video headers are the same?

Therefore, you have to ensure all devices use the same video encoder and publish video with the same format (frame size, bitrate, fps, profile, key frame count, etc)

Should I use a software encoder and bypass the hardware encoders?

In your case, preferentially to use soft encoders. But you first just can try to make encoders configurations the same. Most likely it resolve your issue