-
Notifications
You must be signed in to change notification settings - Fork 51
Question with fetching flv stream frame render PTS #45
Replies: 2 comments · 7 replies
-
|
Can you post your code snippet so I can analyze the reason? |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Sorry, I've tried a lot of staffs, so it would look a little bit messy... |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Currently, the workable solution for I-frame corresponds to these snippets: eventType.ts: Controller.ts: Hope these snippets will be more comprehensible~ |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
I followed the code above and got the pts of all frames in the console There is no need to judge the condition |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Wierd... |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
I tested it using local flv file. Here is my patch: |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Since I am applying the player in a live streaming scenario, could you please use live stream instead of local file? Thank you very much. |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
I think there is no difference between live streaming and local file in this scenario. I test with live streaming also got the pts of all frames in the console. Have you tested the patch I gave above? Is the video rendering normal? If not, It may be a problem with your live streaming. |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
The problem solved, thanks a lot! |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear author,
I want to know how to correctly obtain the pts timestamp for each frame when playing an FLV stream.
I tried using the FRAME_RENDER event type to pass pts, but I can only get the pts for I-frames and not P-frames (in my case, there are no B-frame types).
My pushed stream has 1 I-frame per 25 frames and with ~24 fps, this is why I know I only fetch the I-frame pts from the browser console log ------ the log frequency is ~1s.

I've attempted modifications in AVPlayer, Controller, VideoRenderPipeline, avframe, etc., but all failed.
I noticed I couldn't see my debug logs about render events/pts in the dev tool console panel.
I'm starting to suspect this might be related to IPC message passing: whether the render task being independent from the player main thread as a worker is preventing me from getting pts messages, but I'm not sure.
I just want to achieve something similar to ffprobe:
Please help me for solving this problem, thank you!
Beta Was this translation helpful? Give feedback.
All reactions