Describe the bug
On some MediaTek/Transsion devices, H.264 encoder selection may pick a secure encoder first
(for example c2.mtk.avc.encoder.secure).
That encoder appears to be intended for DRM / protected-content pipelines. With a normal
camera + Surface/GL streaming path, it may configure successfully but produce no usable
video output.
In practice, RTMP sends audio only:
- audio packets are written
- no SPS/PPS callback for video
- no encoded video output
- no video packets written
After moving secure video encoders to the end of the candidate list, the device selects
a normal AVC encoder and streaming works correctly.
To Reproduce
- Run streaming on an affected MediaTek/Transsion device
- Start an RTMP stream using H.264 video
- Let the library select the default video encoder
- Observe that
c2.mtk.avc.encoder.secure is selected
- Observe that audio is sent but video is not
Expected behavior
A normal non-secure AVC encoder should be selected first when available, so camera streaming
produces normal H.264 video output and RTMP sends both audio and video.
Screenshots
N/A
Smartphone (please complete the following information):
- Library version: 2.7.1
- Device: [your Transsion device model here]
- OS: [your Android version here]
- Media server: [your RTMP server here]
- Class used: GenericStream
Additional context
I verified this against a working Qualcomm device, where a normal non-secure AVC encoder is selected
and both audio/video are sent correctly.
On the affected MTK device, selecting a non-secure encoder fixes the issue.
Local fix:
- move secure video encoders after normal candidates in
VideoEncoder
- deprioritize secure video encoders in
CodecUtil
Describe the bug
On some MediaTek/Transsion devices, H.264 encoder selection may pick a secure encoder first
(for example
c2.mtk.avc.encoder.secure).That encoder appears to be intended for DRM / protected-content pipelines. With a normal
camera + Surface/GL streaming path, it may configure successfully but produce no usable
video output.
In practice, RTMP sends audio only:
After moving secure video encoders to the end of the candidate list, the device selects
a normal AVC encoder and streaming works correctly.
To Reproduce
c2.mtk.avc.encoder.secureis selectedExpected behavior
A normal non-secure AVC encoder should be selected first when available, so camera streaming
produces normal H.264 video output and RTMP sends both audio and video.
Screenshots
N/A
Smartphone (please complete the following information):
Additional context
I verified this against a working Qualcomm device, where a normal non-secure AVC encoder is selected
and both audio/video are sent correctly.
On the affected MTK device, selecting a non-secure encoder fixes the issue.
Local fix:
VideoEncoderCodecUtil