rtp: Use timestamp difference for video playback rate.#1909
rtp: Use timestamp difference for video playback rate.#1909gareth-palmer wants to merge 1 commit into
Conversation
When playing an audio file that has an associated video file that stream will not finish at the correct time due to incorrect scheduling of ast_readvideo_callback. Non-zero scheduling between frames now only occurs when the frame timestamp changes and when-next is now calculated using the difference in timestamps between frames. Video frames were also sent out with an incorrectly calcuated timestamp because the flag AST_FRFLAG_HAS_TIMING_INFO was not set on frames read from a file. UserNote: The on-disk format for H263 and H264 video streams has changed so any previous recordings are not be playable.
|
Workflow Check completed successfully |
|
cherry-pick-to: 23 |
|
Hi @gareth-palmer , I tested your code and it is working. The video speed issue is fixed but During testing, in random scenarios the video playback is not working. My code changes are also working. You have made changes in 5 files, while I made changes in 1 file. Can you explain which calculation or logic you used for the video playback handling? |
|
The calculation is that Because |
When playing an audio file that has an associated video file that stream will not finish at the correct time due to incorrect scheduling of ast_readvideo_callback.
Non-zero scheduling between frames now only occurs when the frame timestamp changes and when-next is now
calculated using the difference in timestamps between frames.
Video frames were also sent out with an incorrectly calcuated timestamp because the flag AST_FRFLAG_HAS_TIMING_INFO was not set on frames read from a file.
UserNote: The on-disk format for H263 and H264 video streams has changed so any previous recordings are not be playable.