Audio and video precise synchronization method based on HTML5 video dynamic frame rate playback
A dynamic frame, audio and video technology, applied in the field of editing and recommendation, HTML5 video playback, can solve problems such as inability to playback, achieve the effect of coherent picture and solve image jitter
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Examples
Embodiment 1
[0029] An accurate audio and video synchronization method based on HTML5 video dynamic frame rate playback, including the following steps:
[0030] Step 1: Convert the video stream into a video frame image and cache it in HTML5 binary data format;
[0031] Step 2: Play the audio stream directly;
[0032] Step 3: Obtain the current moment of the audio stream played in step 2 and convert it to the current frame image sequence number; take out the buffered frame image data corresponding to the sequence number in the step 1 for image display, and use HTML5 included CSS3's transition method eliminates image jitter, and finally presents accurately synchronized audio and video.
[0033] Wherein, the corresponding cached frame image calculated in the step 3, in view of the step 1, the corresponding cached frame image can always be correctly obtained.
Embodiment 2
[0035] The difference between this embodiment and embodiment 1 is that the specific method for converting the video stream into a video frame image and caching in step 1 is:
[0036] S1: Convert the video stream to the corresponding image of each frame according to the frame rate of the video stream, and buffer it in the data queue in HTML5 binary data format. The queue length is 1 to 2 seconds of image data, namely: the original frame rate of the video stream *Cache duration;
[0037] S2: When buffering frame images, the frame image data is buffered at the playback frame rate, and the frame image data is not buffered at the original frame rate; the frame image data corresponding to the playback frame rate becomes the key frame, and the frame image data corresponding to the non-playback frame rate becomes the non-key Frame, non-key frame directly uses the frame image data of the previous adjacent key frame.
[0038] S3: After each frame of image playback, the cache content is update...
Embodiment 3
[0041] The difference between this embodiment and the above embodiments is that the specific steps of step 3 are:
[0042] Step a: Obtain the current moment of the audio stream played in step 2 and convert it to the current frame image sequence number; that is: current moment * original frame rate of the video stream, and round the result to correspond to the buffered frame image Serial number
[0043] Step b: Take out the cached frame image data corresponding to the serial number from the step 1 and use the createObjectURL method to display the image, and use the CSS3 transition method included in HTML5 to eliminate image jitter.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com