CN115484483A - Streaming media audio and video synchronization method, terminal equipment, control device and medium - Google Patents

Streaming media audio and video synchronization method, terminal equipment, control device and medium Download PDF

Info

Publication number
CN115484483A
CN115484483A CN202211043840.7A CN202211043840A CN115484483A CN 115484483 A CN115484483 A CN 115484483A CN 202211043840 A CN202211043840 A CN 202211043840A CN 115484483 A CN115484483 A CN 115484483A
Authority
CN
China
Prior art keywords
audio
playing
video
time length
delay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211043840.7A
Other languages
Chinese (zh)
Inventor
陈文彬
刘浩勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Wantong Information Technology Co ltd
Original Assignee
Guangdong Wantong Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Wantong Information Technology Co ltd filed Critical Guangdong Wantong Information Technology Co ltd
Priority to CN202211043840.7A priority Critical patent/CN115484483A/en
Publication of CN115484483A publication Critical patent/CN115484483A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • H04N21/43072Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen of multiple content streams on the same device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a streaming media audio and video synchronization method, a terminal device, a control device and a medium, which comprises the following steps: sending an audio acquisition request and a video acquisition request which require playing time; acquiring audio cache data and video cache data; calculating the difference value between the audio cache playing time length and the required playing time length to obtain audio delay time length, and if the audio delay time length is greater than the synchronous playing delay threshold value, adjusting the playing speed of the audio cache data to enable the audio delay time length to be less than the synchronous playing delay threshold value; the difference value of the video cache playing time length and the required playing time length is calculated to obtain the video delay time length, if the video delay time length is larger than the synchronous playing delay threshold value, the playing speed of the video cache data is adjusted to enable the video delay time length to be smaller than the synchronous playing delay threshold value, the design processing is efficient and simple, and the synchronous playing of the audio and video data can be well achieved.

Description

Streaming media audio and video synchronization method, terminal equipment, control device and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a streaming media audio and video synchronization method, a terminal device, a control device, and a medium.
Background
Streaming media refers to a form of transmitting multimedia files such as audio data, video data and the like in a streaming manner in a network, and is typically characterized in that continuous audio data and video data are compressed and then are put into a network server, and the audio data and the video data are acquired from the network server after a client sends a request, but the streaming media can be played after a part of the audio data and the video data are cached without waiting for the audio data and the video data to be completely downloaded.
However, when network fluctuation or other abnormal conditions occur, video and audio may be played in a pause state, and even each frame of audio and video cannot be corresponded, such errors are gradually accumulated, so that the use experience of the user is seriously affected. Therefore, in the process of playing, the buffered audio data and video data need to be synchronized, and the conventional practice generally processes the audio data to be played according to the time frame of the video data or processes the video data to be played according to the sampling rate of the audio data.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a streaming media audio and video synchronization method, terminal equipment, a control device and a medium, which have high processing efficiency and can better realize the synchronous playing of audio and video data.
According to the embodiment of the first aspect of the invention, a streaming media audio and video synchronization method comprises the following steps: sending an audio acquisition request and a video acquisition request of which the required playing time lengths are first time values; acquiring audio cache data and video cache data, wherein the audio cache playing time of the audio cache data is a second time value, and the video cache playing time of the video cache data is a third time value; calculating a difference value between the audio cache playing time length and the required playing time length to obtain an audio delay time length, and if the audio delay time length is greater than a synchronous playing delay threshold value, adjusting the playing speed of the audio cache data to enable the audio delay time length to be smaller than the synchronous playing delay threshold value; and calculating the difference value between the video cache playing time length and the required playing time length to obtain the video delay time length, and if the video delay time length is greater than the synchronous playing delay threshold value, adjusting the playing speed of the video cache data to enable the video delay time length to be less than the synchronous playing delay threshold value.
The streaming media audio and video synchronization method provided by the embodiment of the invention at least has the following beneficial effects:
the invention relates to a streaming media audio and video synchronization method, which utilizes a local client clock to generate and send an audio acquisition request and a video acquisition request with the required playing time length being a first time value, at the moment, a network server responds to the request of the local client and sends transmission audio cache data and video cache data to the local client, but the cache playing time lengths of the audio cache data and the video cache data are not necessarily equal to the required playing time length due to network fluctuation or other conditions.
According to some embodiments of the present invention, the calculating a difference between the audio cache playing time length and the required playing time length to obtain an audio delay time length, and if the audio delay time length is greater than a synchronous playing delay threshold, the adjusting the playing speed of the audio cache data includes: s310, calculating a difference value between the audio cache playing time length and the required playing time length to obtain an audio delay time length; s320, judging whether the audio delay time length is greater than a synchronous playing delay threshold value or not; s330, if the audio delay time length is greater than the synchronous playing delay threshold value, adjusting the playing speed of the audio cache data to update the audio cache playing time length; and looping S310-S330 until the audio delay time duration is less than the synchronous playing delay threshold.
According to some embodiments of the present invention, in the S330, the playing speed of the audio buffer data is adjusted by adjusting an audio sampling rate of the audio buffer data, wherein the audio sampling rate is a sampling amount of the audio analog signal in a unit time.
According to some embodiments of the present invention, the calculating a difference between the video cache playing time and the required playing time to obtain a video delay time, and if the video delay time is greater than a synchronous playing delay threshold, the adjusting the playing speed of the video cache data includes: s410, calculating a difference value between the video cache playing time length and the required playing time length to obtain a video delay time length; s420, judging whether the video delay time length is larger than a synchronous playing delay threshold value or not; s430, if the video delay time length is larger than the synchronous playing delay threshold value, adjusting the playing speed of the video cache data to update the video cache playing time length; and circulating S410-S430 until the video delay time length is less than the synchronous playing delay threshold value.
According to some embodiments of the present invention, in the S430, the playing speed of the video buffer data is adjusted by adjusting the number of image frames played in a unit time in the video buffer data.
According to some embodiments of the invention, the synchronization method further comprises: setting the required playing time length before sending the audio acquisition request and the video acquisition request; and correcting the synchronous playing delay threshold value according to the required playing time length.
According to some embodiments of the present invention, the required playing time and the synchronous playing delay threshold are in a linear relationship.
The terminal device according to the second aspect of the embodiment of the present invention includes: the transmission module is used for sending an audio acquisition request and a video acquisition request with the playing time duration being a first time value, and acquiring audio cache data and video cache data; the processing module is used for calculating the difference value between the audio cache playing time length and the required playing time length to obtain audio delay time length, and if the audio delay time length is greater than a synchronous playing delay threshold, the playing speed of the audio cache data is adjusted to enable the audio delay time length to be smaller than the synchronous playing delay threshold; calculating the difference value between the video cache playing time length and the required playing time length to obtain a video delay time length, and if the video delay time length is greater than a synchronous playing delay threshold value, adjusting the playing speed of the video cache data to enable the video delay time length to be smaller than the synchronous playing delay threshold value; and the playing module is used for playing the audio cache data and the video cache data at the adjusted playing speed.
The terminal equipment provided by the embodiment of the invention at least has the following beneficial effects:
the terminal equipment generates by using a clock of a local client and sends an audio obtaining request and a video obtaining request of which the required playing time lengths are first time values through a transmission module, at the moment, a network server responds to the request of the local client and sends transmission audio cache data and video cache data to the local client, but the cache playing time lengths of the audio cache data and the video cache data are not necessarily equal to the required playing time lengths due to network fluctuation or other conditions.
According to a control apparatus of an embodiment of a third aspect of the present invention, comprising: one or more memories; one or more processors configured to execute one or more computer programs stored in the one or more memories, and further configured to execute a streaming media audio-video synchronization method disclosed in any of the embodiments.
The computer-readable storage medium according to the fourth aspect of the present invention includes instructions, which when run on a computer, cause the computer to execute a streaming media audio/video synchronization method disclosed in any of the above embodiments.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a main flow chart of one embodiment of the streaming media audio and video synchronization method of the present invention;
fig. 2 is a flow chart of processing audio buffer data according to an embodiment of the streaming media audio and video synchronization method of the present invention;
fig. 3 is a flow chart of processing video buffer data according to an embodiment of the streaming media audio and video synchronization method of the present invention;
FIG. 4 is a block diagram of a schematic structure of one embodiment of a terminal device according to the present invention;
fig. 5 is a schematic block diagram of a control device according to an embodiment of the present invention.
Reference numerals are as follows:
a transmission module 100; a processing module 200; a play module 300; a memory 400; a processor 500.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention and are not to be construed as limiting the present invention.
In the description of the present invention, it is to be understood that the positional or orientational descriptions referred to, for example, the terms "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., are based on the positional or orientational relationships shown in the drawings and are for convenience of description and simplicity of description only, and do not indicate or imply that the referenced device or element must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, it should be noted that unless otherwise explicitly stated or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as being fixed or detachable or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
As shown in fig. 1 to 3, a streaming media audio and video synchronization method according to an embodiment of a first aspect of the present invention includes the following steps:
s100, sending an audio acquisition request and a video acquisition request of which the required playing time lengths are first time values;
s200, audio cache data and video cache data are obtained, wherein the audio cache playing time of the audio cache data is a second time value, and the video cache playing time of the video cache data is a third time value;
s300, calculating a difference value between the audio cache playing time length and the required playing time length to obtain an audio delay time length, and if the audio delay time length is greater than a synchronous playing delay threshold, adjusting the playing speed of audio cache data to enable the audio delay time length to be less than the synchronous playing delay threshold;
s400, calculating a difference value between the video cache playing time length and the required playing time length to obtain a video delay time length, and if the video delay time length is greater than a synchronous playing delay threshold value, adjusting the playing speed of the video cache data to enable the video delay time length to be smaller than the synchronous playing delay threshold value.
It should be noted that the audio obtaining request and the video obtaining request whose required playing durations are the first time values are formulated by using a local clock of the client as a reference, and the network server provides corresponding audio cache data and video cache data for the client according to the audio obtaining request and the video obtaining request.
The invention relates to a streaming media audio and video synchronization method, which utilizes a local client to send an audio acquisition request and a video acquisition request with the required playing time length being a first time value, wherein a network server responds to the request of the local client to send transmission audio cache data and video cache data to the local client, but the cache playing time lengths of the audio cache data and the video cache data are not necessarily equal to the required playing time length due to network fluctuation or other conditions.
In some embodiments of the present invention, as shown in fig. 2, calculating a difference between an audio cache playing time and a required playing time to obtain an audio delay time, and if the audio delay time is greater than a synchronous playing delay threshold, adjusting the playing speed of the audio cache data includes:
s310, calculating a difference value between the audio cache playing time length and the required playing time length to obtain an audio delay time length;
s320, judging whether the audio delay time length is greater than a synchronous playing delay threshold value or not;
s330, if the audio delay time length is greater than the synchronous playing delay threshold value, adjusting the playing speed of the audio cache data to update the audio cache playing time length;
and circulating S310-S330 until the audio delay time duration is less than the synchronous playing delay threshold value.
Specifically, the first time value of the required playing time is T0, the second time value of the audio cache playing time is T1, the third time value of the video cache playing time is T2, and the audio delay time Δ T1= T1-T0, the audio delay time Δ T1 and the synchronous playing delay threshold are used for judgment, when the audio delay time is greater than the synchronous playing delay threshold, the playing speed of the audio cache data is adjusted, then the audio cache playing time can be updated, and S310-S330 is continuously circulated until the final audio delay time meets the synchronous playing delay threshold.
In some embodiments of the present invention, the playing speed of the audio buffer data may be adjusted by adjusting the sampling rate, the sampling format, the channel layout, and the like, and specifically, in S330, the playing speed of the audio buffer data is adjusted by adjusting the audio sampling rate of the audio buffer data, where the audio sampling rate is the amount of sampling the audio analog signal in a unit time.
Wherein the audio sampling rate can be adjusted according to the following formula, audio playing time Ty of one frame = total amount of audio Samples/audio sampling rate. The audio playing time Ty is adjusted by changing the audio sampling rate, so that the playing speed of the audio buffer data is adjusted.
In some embodiments of the present invention, as shown in fig. 3, calculating a difference between a video cache playing time and a required playing time to obtain a video delay time, and if the video delay time is greater than a synchronous playing delay threshold, adjusting the playing speed of the video cache data includes:
s410, calculating a difference value between the video cache playing time length and the required playing time length to obtain a video delay time length;
s420, judging whether the video delay time length is greater than a synchronous playing delay threshold value or not;
s430, if the video delay time length is larger than the synchronous playing delay threshold value, adjusting the playing speed of the video cache data to update the video cache playing time length;
and circulating S410-S430 until the video delay time length is less than the synchronous playing delay threshold value.
And (3) video delay time delta T2= T2-T0, judging by using the video delay time delta T2 and a synchronous playing delay threshold, when the video delay time is greater than the synchronous playing delay threshold, adjusting the playing speed of the video cache data, then updating the video cache playing time, and continuously circulating S410-S430 until the final video delay time accords with the synchronous playing delay threshold.
In some embodiments of the present invention, in S430, the playing speed of the video buffer data is adjusted by adjusting the number of image frames played in a unit time in the video buffer data, and specifically, the number of image frames played in a unit time may be increased to increase the playing speed, thereby reducing the playing duration of the video buffer.
In some embodiments of the present invention, when acquiring the audio buffer data and the video buffer data in step S200, the client performs streaming from the network server, and selects one of the streaming protocols of the network server, and then starts streaming, the application layer protocols are HLS, RTSP, and RTMP, the transport layer protocols are RTCP and RTP, the network layer protocol is RSVP, and then performs decoding using hard coding and soft coding, the video data formats are finally YUV and RGB, and the audio data format is PCM.
In some embodiments of the invention, the synchronization method further comprises: setting a required playing time length before sending an audio acquisition request and a video acquisition request; and correcting the synchronous playing delay threshold according to the required playing time length.
The required playing time length can be set by a user or a manufacturer according to actual conditions, the required playing time length is not too large and can be generally set to be about 500ms, and the audio delay time length and the video delay time length can be changed along with the change of the required playing time length, so that the synchronous playing delay threshold value also needs to be correspondingly corrected, and the playing of the audio and the video can be better synchronized.
In some embodiments of the present invention, the required playing time and the synchronous playing delay threshold are in a linear relationship, so that the synchronous playing delay threshold can be reasonably corrected according to the change of the required playing time, and the playing of the audio and the video can be better synchronized.
Specifically, the synchronous playing delay threshold may be modified according to a linear formula, where y = ax + b, x is a required playing time, y is the synchronous playing delay threshold, and a and b are constants set by a manufacturer according to an actual situation.
A terminal device according to an embodiment of the second aspect of the present invention, as shown in fig. 4, includes: the transmission module 100 is configured to send an audio obtaining request and a video obtaining request whose required playing durations are first time values, and obtain audio cache data and video cache data; the processing module 200 is configured to calculate a difference between an audio cache playing time and a required playing time to obtain an audio delay time, and adjust a playing speed of the audio cache data to enable the audio delay time to be smaller than a synchronous playing delay threshold if the audio delay time is greater than the synchronous playing delay threshold; calculating the difference between the video cache playing time length and the required playing time length to obtain a video delay time length, and if the video delay time length is greater than the synchronous playing delay threshold value, adjusting the playing speed of the video cache data to enable the video delay time length to be less than the synchronous playing delay threshold value; the playing module 300 plays the audio buffer data and the video buffer data at the adjusted playing speed.
The transmission module 100 may be a network port, a mobile communication chip, etc., the processing module 200 may be composed of a processor and an accessory circuit, such as an MCU, a CPU, etc., and the playing module 300 may include a display screen and a speaker.
The terminal device of the present invention utilizes the clock of the local client to generate and send the audio obtaining request and the video obtaining request with the required playing time length being the first time value through the transmission module 100, at this time, the network server will respond to the request of the local client and send the transmitted audio cache data and the video cache data to the local client, but because of network fluctuation or other conditions, the cache playing time lengths of the audio cache data and the video cache data are not necessarily equal to the required playing time length, because the same required playing time length is utilized to respectively obtain the audio and the video requests, the time length deviation of the audio cache data and the video cache data is not too large, at this time, the processing module 200 utilizes the same synchronous playing delay threshold value to respectively judge the audio delay time length and the video delay time length, if the audio delay time length and the video cache data are larger than the synchronous playing delay threshold value, the playing speed of the audio cache data or the video cache data is correspondingly adjusted, finally, the audio delay time length and the video delay length are smaller than the synchronous playing delay threshold value, at this time, although the playing time of the audio cache data and the video cache data still have the deviation is reduced to a smaller value, the basic playing requirement can be satisfied, the design of the high efficiency and the audio and the synchronization can be realized.
A control apparatus according to an embodiment of the third aspect of the present invention, as shown in fig. 5, includes: one or more memories 400; one or more processors 500 for executing one or more computer programs stored in the one or more memories 400, and further for executing a method for synchronizing the audio and video of the streaming media disclosed in any of the above embodiments.
It should be noted that, for the specific implementation process of the present embodiment, reference may be made to the specific implementation process of the above method embodiment, and a description thereof is omitted here.
The computer-readable storage medium according to the fourth aspect of the present invention includes instructions, which when run on a computer, cause the computer to execute a streaming media audio/video synchronization method disclosed in any of the above embodiments.
It should be noted that, for the specific implementation process of the present embodiment, reference may be made to the specific implementation process of the above method embodiment, and a description thereof is omitted here.
The embodiments of the present application also disclose a computer program product, wherein when the computer program product runs on a computer, the computer is caused to execute part or all of the steps of the method as in the above method embodiments.
It will be understood by those of ordinary skill in the art that all or part of the steps of the methods of the above embodiments may be performed by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, including read-only memory (ROM), random Access Memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically erasable programmable read-only memory (EEPROM), a compact disc-read-only memory (CD-ROM) or other memory, a magnetic disk, a magnetic tape, or any other medium capable of storing data.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (10)

1. A method for synchronizing the audio and video of a streaming media is characterized by comprising the following steps: sending an audio acquisition request and a video acquisition request of which the required playing time lengths are first time values;
acquiring audio cache data and video cache data, wherein the audio cache playing time of the audio cache data is a second time value, and the video cache playing time of the video cache data is a third time value;
calculating a difference value between the audio cache playing time length and the required playing time length to obtain an audio delay time length, and if the audio delay time length is greater than a synchronous playing delay threshold value, adjusting the playing speed of the audio cache data to enable the audio delay time length to be smaller than the synchronous playing delay threshold value;
and if the video delay time length is greater than the synchronous playing delay threshold value, the playing speed of the video cache data is adjusted so that the video delay time length is smaller than the synchronous playing delay threshold value.
2. The method for synchronizing the audio and video of the streaming media according to claim 1, wherein: calculating a difference value between the audio cache playing time length and the required playing time length to obtain an audio delay time length, and if the audio delay time length is greater than a synchronous playing delay threshold value, adjusting the playing speed of the audio cache data comprises:
s310, calculating a difference value between the audio cache playing time length and the required playing time length to obtain an audio delay time length;
s320, judging whether the audio delay time length is greater than a synchronous playing delay threshold value or not; s330, if the audio delay time length is greater than the synchronous playing delay threshold value, adjusting the playing speed of the audio cache data to update the audio cache playing time length;
and looping S310-S330 until the audio delay time duration is less than the synchronous playing delay threshold.
3. The method for synchronizing the audio and video of the streaming media according to claim 2, wherein: in S330, adjusting a playing speed of the audio buffer data by adjusting an audio sampling rate of the audio buffer data, where the audio sampling rate is a sampling amount of the audio analog signal per unit time.
4. The method for synchronizing the audio and video of the streaming media according to claim 1, wherein: calculating a difference value between the video cache playing time length and the required playing time length to obtain a video delay time length, and if the video delay time length is greater than a synchronous playing delay threshold value, adjusting the playing speed of the video cache data comprises:
s410, calculating a difference value between the video cache playing time length and the required playing time length to obtain a video delay time length;
s420, judging whether the video delay time length is greater than a synchronous playing delay threshold value or not;
s430, if the video delay time length is larger than the synchronous playing delay threshold value, adjusting the playing speed of the video cache data to update the video cache playing time length;
and circulating S410-S430 until the video delay time length is less than the synchronous playing delay threshold value.
5. The method for synchronizing the audio and video of the streaming media according to claim 4, wherein: in S430, the playing speed of the video buffer data is adjusted by adjusting the number of image frames played in a unit time in the video buffer data.
6. The method for synchronizing the audio and video of the streaming media according to claim 1, further comprising:
setting the required playing time length before sending the audio acquisition request and the video acquisition request;
and correcting the synchronous playing delay threshold according to the required playing time length.
7. The method according to claim 6, wherein the required playing time and the synchronized playing delay threshold have a linear relationship.
8. A terminal device, comprising:
the transmission module is used for sending an audio acquisition request and a video acquisition request with the playing time duration being a first time value, and acquiring audio cache data and video cache data;
the processing module is used for calculating the difference value between the audio cache playing time length and the required playing time length to obtain audio delay time length, and if the audio delay time length is greater than a synchronous playing delay threshold value, the playing speed of the audio cache data is adjusted to enable the audio delay time length to be smaller than the synchronous playing delay threshold value; calculating the difference value between the video cache playing time length and the required playing time length to obtain a video delay time length, and if the video delay time length is greater than a synchronous playing delay threshold value, adjusting the playing speed of the video cache data to enable the video delay time length to be smaller than the synchronous playing delay threshold value;
and the playing module plays the audio cache data and the video cache data at the adjusted playing speed.
9. A control device, comprising: one or more memories; one or more processors configured to execute one or more computer programs stored in the one or more memories, and further configured to perform a streaming media audio-video synchronization method according to any one of claims 1 to 7.
10. A computer-readable storage medium, comprising instructions which, when executed on a computer, cause the computer to perform a streaming media audio-video synchronization method according to any one of claims 1 to 7.
CN202211043840.7A 2022-08-26 2022-08-26 Streaming media audio and video synchronization method, terminal equipment, control device and medium Pending CN115484483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211043840.7A CN115484483A (en) 2022-08-26 2022-08-26 Streaming media audio and video synchronization method, terminal equipment, control device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211043840.7A CN115484483A (en) 2022-08-26 2022-08-26 Streaming media audio and video synchronization method, terminal equipment, control device and medium

Publications (1)

Publication Number Publication Date
CN115484483A true CN115484483A (en) 2022-12-16

Family

ID=84421921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211043840.7A Pending CN115484483A (en) 2022-08-26 2022-08-26 Streaming media audio and video synchronization method, terminal equipment, control device and medium

Country Status (1)

Country Link
CN (1) CN115484483A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117768993A (en) * 2023-12-25 2024-03-26 广东保伦电子股份有限公司 Audio synchronization method, audio playing system and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117768993A (en) * 2023-12-25 2024-03-26 广东保伦电子股份有限公司 Audio synchronization method, audio playing system and storage medium

Similar Documents

Publication Publication Date Title
CN109714634B (en) Decoding synchronization method, device and equipment for live data stream
CN113225598B (en) Method, device and equipment for synchronizing audio and video of mobile terminal and storage medium
US20220038770A1 (en) Dynamic Playout of Transition Frames While Transitioning Between Playout of Media Streams
JP2006115477A (en) Method and system for presentation of media obtained from media stream
US8867611B2 (en) Video transmitting method and system with image quality adjusting function
CN108810656B (en) Real-time live broadcast TS (transport stream) jitter removal processing method and processing system
CN113852824A (en) Video transcoding method and device, electronic equipment and storage medium
MX2011005782A (en) Audio/video data play control method and apparatus.
US20120050614A1 (en) Movie reproduction system and movie reproduction method
US10389785B2 (en) Method for adaptively streaming an audio/visual material
CN110581973A (en) data playback method and device, terminal equipment and storage medium
KR102566550B1 (en) Method of display playback synchronization of digital contents in multiple connected devices and apparatus using the same
CN115484483A (en) Streaming media audio and video synchronization method, terminal equipment, control device and medium
CN108259998B (en) Player, play control method and device, electronic equipment and play system
KR20110123779A (en) Video content presentation
US8836861B2 (en) Method and apparatus for processing a video signal
CN112752117A (en) Video caching method, device, equipment and storage medium
JPH10285529A (en) Image editing device and image editing method
CN104581340B (en) Client, stream medium data method of reseptance and stream medium data transmission system
JP4511952B2 (en) Media playback device
CN110225385B (en) Audio and video synchronization adjustment method and device
US8842740B2 (en) Method and system for fast channel change
US20030058224A1 (en) Moving image playback apparatus, moving image playback method, and audio playback apparatus
CN107087210B (en) Method and terminal for judging video playing state based on cache time
CN101321286A (en) Method and device for computing caching of terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination