A precise audio and video 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] A method for accurately synchronizing audio and video based on HTML5 video dynamic frame rate playback, comprising the following steps:
[0030] Step 1: Convert the video stream to a video frame image and cache it in the binary data format of HTML5;
[0031] Step 2: Play the audio stream directly;
[0032] Step 3: Obtain the current moment of the audio stream played in the step 2, and convert it into the current frame image serial number; take out the cached frame image data corresponding to the serial number from the step 1 for image display, and use HTML5 included CSS3's transition method eliminates image jitter, and finally presents audio and video that are precisely synchronized.
[0033] Wherein, the corresponding cached frame image calculated in the step 3 can always be correctly acquired in view of the step 1.
Embodiment 2
[0035] The difference between this embodiment and Embodiment 1 is that in the step 1, the specific method of converting the video stream into a video frame image and caching is as follows:
[0036] S1: According to the frame rate of the video stream, the video stream is converted into a corresponding image of each frame, and cached in the data queue in the binary data format of HTML5. 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 caching frame images, cache frame image data at the playback frame rate, not 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 non-key Frames, non-key frames directly use the frame image data of the previous adjacent and nearest key frames.
[0038] S3: After each frame image is played back, the cache content is updated im...
Embodiment 3
[0041] The difference between this embodiment and the above embodiment 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 number; that is: current moment * original frame rate of the video stream, and round up the result to correspond to the cached frame image serial number;
[0043] Step b: Take out the cached frame image data corresponding to the serial number from the step 1, 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