Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

h264 low latency decoding #847

Open
angelo-p opened this issue May 10, 2018 · 3 comments
Open

h264 low latency decoding #847

angelo-p opened this issue May 10, 2018 · 3 comments

Comments

@angelo-p
Copy link

Hello,
I updated to libyami tag 1.3.0 to bring in the LowLatency mode for AVC/H264 playback.
I am playing a mp4 file: 'Serenity_720p.mp4' AVC High profile 1280x720 and I don't see any difference when playing in low latency.

According to my logging, It takes between 1 to 8 input frames to generate an output frame.
To test low latency, I am just setting the VideoConfigBuffer enableLowLatency to true.
Do I need to do anything else?

Thanks
Angelo

@xuguangxin
Copy link
Contributor

It may relate to stream, we have a fix at #844
Could you help try it?
thanks

@angelo-p
Copy link
Author

@xuguangxin
Thanks, adding the VIDEO_DECODE_BUFFER_FLAG_FRAME_END improves decoding latency.
Our application always feeds the codec full frames. Can we set the flag all the time or only when enableLowLatency is set ?

@xuguangxin
Copy link
Contributor

Hi @angelo-p ,
It depends on your use case. Without this flag, we need to search the bitstream and detect frame boundary. We only start to decode current frame when we see next frame started. This introduces one frame delay. But in some case you know exactly we have the entire frame.So you can pass the flag to the decoder.
No need be an entire frame at one time. A frame contains N units, you can send N-1 nal unit without this flags. send Nth nal with this flag.

thanks

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

No branches or pull requests

2 participants