CN106385525A - Video play method and device - Google Patents
Video play method and device Download PDFInfo
- Publication number
- CN106385525A CN106385525A CN201610808055.4A CN201610808055A CN106385525A CN 106385525 A CN106385525 A CN 106385525A CN 201610808055 A CN201610808055 A CN 201610808055A CN 106385525 A CN106385525 A CN 106385525A
- Authority
- CN
- China
- Prior art keywords
- video
- frame
- audio frequency
- timestamp
- queue
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/04—Synchronising
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/04—Synchronising
- H04N5/06—Generation of synchronising signals
Abstract
The present invention discloses a video play method and device. The video play method and device are used in the video play process to improve the consistency of video and sound. The method comprises: receiving the play instruction of a target multimedia file; downloading audio/video fragments corresponding to the target multimedia file in order according to the play sequence, wherein the audio/video fragments include the audio data and the video data corresponding to the multimedia file; decoding the audio data in the audio/video fragments; comparing the first time stamp corresponding to the decoded audio data with the second time stamp corresponding to the video data; determining the video data corresponding to the second time stamp which is consistent to the first time stamp; decoding the video data corresponding to the second time stamp; and performing synchronization play of the audio data and the video data. According to the invention, the consistency of the image and the sound can be improved in the video play process.
Description
Technical field
The present invention relates to Internet technical field, particularly to a kind of video broadcasting method and device.
Background technology
Internet video is broadly divided into video request program and two kinds of forms of net cast.Video request program is by regarding of recording in advance
Frequency stores in the server with the form of files in stream media, and net cast is then to develop on the basis of video request program, depending on
Frequently live is during video record, the content of recording is sent in the form of video fragment in real time and is watching this and regard
Frequently live all users.
In prior art, in user's watching video live broadcast, constantly download newly-generated video fragment from server, right
Video fragment is decapsulated, and obtains voice data and video data.Voice data and video data are decoded respectively,
Voice data after broadcast decoder and video data immediately after decoding.
However, because voice data and video data are all independent decodings, if audio decoder speed and video decoding speed
When spending inconsistent, then can cause image in video and the inconsistent problem of sound.Thus, how a kind of video playback side is proposed
Method, in order to, in video display process, to improve the concordance of image and sound, to be a technical problem urgently to be resolved hurrily.
Content of the invention
The present invention provides a kind of video broadcasting method and device, in order to, in video display process, to improve image and sound
Concordance.
The present invention provides a kind of video broadcasting method, including:
Receive the play instruction of destination multimedia file;
The corresponding audio frequency and video fragment of described destination multimedia file, described audio frequency and video fragment are downloaded successively according to playing sequence
In comprise the corresponding voice data of described multimedia file and video data;
Voice data in described audio frequency and video fragment is decoded;
Stamp second timestamp corresponding with video data of corresponding for the decoded voice data very first time is compared;
Determine and compare the consistent corresponding video data of the second timestamp with stamp of the described very first time;
To described second timestamp, corresponding video data is decoded;
Synchronous playing audio data and video data.
The beneficial effects of the present invention is:The very first time is being stabbed with just decoding and the after corresponding voice data is decoded
One timestamp compares the consistent corresponding video data of the second timestamp, and voice data and video data are synchronous broadcastings,
Thus avoid video data and voice data decoding speed is inconsistent and lead to sound and image during video playback inconsistent
Situation occurs, thus, in video display process, improve the concordance of image and sound.
In one embodiment, before the voice data in described audio frequency and video fragment being decoded, methods described is also wrapped
Include:
Described audio frequency and video fragment is decapsulated, obtains voice data, video data, each frame audio frequency corresponding time
Stamp and the corresponding timestamp of each frame video;
Each frame audio frequency and the reproduction time of each frame video are respectively obtained according to described timestamp;
Each frame audio frequency in described voice data is sequentially inserted into the first audio frame by the sequencing according to reproduction time
Queue tail of the queue;
Each frame video in described video data is sequentially inserted into the first frame of video by the sequencing according to reproduction time
Queue tail of the queue.
The having the beneficial effects that of the present embodiment:Sequencing according to reproduction time is by each frame in described voice data
Audio frequency is sequentially inserted into the first audio frequency frame queue tail of the queue it is ensured that being decoded according to the sequencing of reproduction time in decoding;With
Reason, each frame video in described video data is sequentially inserted into the first video frame queue team by the sequencing according to reproduction time
Tail is it is ensured that be decoded the correctness it is ensured that playing in decoding according to the sequencing of reproduction time.
In one embodiment, the voice data in described audio frequency and video fragment is decoded, including:
Obtain each frame audio frequency from described first audio frequency frame queue head of the queue successively;
The each frame audio frequency getting is decoded successively according to acquisition order;
To described second timestamp, corresponding video data is decoded, including:
Determine video data corresponding with the second timestamp in the first video frame queue;
Video data corresponding with the second timestamp is decoded.
The having the beneficial effects that of the present embodiment:Because each frame audio frequency in voice data is all the elder generation according to reproduction time
Sequentially it is sequentially inserted into the first audio frequency frame queue tail of the queue afterwards, thus it is ensured that the decoding process of audio frequency is also according to reproduction time
Sequencing carry out, secondly as the second timestamp timestamp corresponding with decoded voice data compare consistent, because
And, video data corresponding with the second timestamp is decoded ensure that with the decoding process of video is also according to reproduction time
Sequencing carry out.
In one embodiment, methods described also includes:
Decoded each frame audio frequency is sequentially inserted into by the second audio frequency frame queue tail of the queue according to the sequencing of decoding time;
Decoded each frame video is once inserted by the second video frame queue tail of the queue according to the sequencing of decoding time.
The having the beneficial effects that of the present embodiment:Because each frame audio frequency is all to be inserted successively according to the sequencing of decoding time
Enter the second audio frequency frame queue tail of the queue, and because each frame video is all to be sequentially inserted into second according to the sequencing of decoding time
Video queue tail of the queue, and when playing, data can only be read from queue head of the queue, thus it is ensured that being capable of root in playing process
Sequencing according to the decoding time plays out to audio, video data.
In one embodiment, described synchronous playing audio data and video data, including:
By the video counts in the corresponding timestamp of voice data and the second video queue in described second audio frequency frame queue
Compare according to corresponding timestamp to obtain the consistent voice data of timestamp and video data;
The consistent voice data of synchronous reproduction time stamp and video data.
The having the beneficial effects that of the present embodiment:The having the beneficial effects that of the present embodiment:By by audio frequency consistent for timestamp
Data and video data synchronization play, it is to avoid video data and voice data decoding speed inconsistent and when leading to video playback
Sound and the inconsistent situation of image occur, and further increase the concordance of image and sound.
The present invention also provides a kind of video play device, including:
Receiver module, for receiving the play instruction of destination multimedia file;
Download module, for the corresponding audio frequency and video fragment of described destination multimedia file is downloaded successively according to playing sequence,
The corresponding voice data of described multimedia file and video data is comprised in described audio frequency and video fragment;
First decoder module, for being decoded to the voice data in described audio frequency and video fragment;
Comparing module, for during by stamp of corresponding for the decoded voice data very first time corresponding with video data second
Between stab and compare;
Determining module, compares the consistent corresponding video data of the second timestamp for determining with stamp of the described very first time;
Second decoder module, is decoded for video data corresponding to described second timestamp;
Playing module, for synchronous playing audio data and video data.
In one embodiment, described device also includes:
Decapsulation module, before the voice data in described audio frequency and video fragment is decoded, to described audio frequency and video
Fragment is decapsulated, corresponding with each frame video to obtain voice data, video data, the corresponding timestamp of each frame audio frequency
Timestamp;
Obtain module, for each frame audio frequency and the reproduction time of each frame video are respectively obtained according to described timestamp;
First insertion module, for the sequencing according to reproduction time by each frame audio frequency in described voice data according to
Secondary insertion the first audio frequency frame queue tail of the queue;
Second insertion module, for the sequencing according to reproduction time by each frame video in described video data according to
Secondary insertion the first video frame queue tail of the queue.
In one embodiment, the first decoder module, including:
Acquisition submodule, for obtaining each frame audio frequency successively from described first audio frequency frame queue head of the queue;
First decoding sub-module, for being decoded each frame audio frequency getting successively according to acquisition order;
Second decoder module, including:
Determination sub-module, for determining video data corresponding with the second timestamp in the first video frame queue;
Second decoding sub-module, for being decoded to video data corresponding with the second timestamp.
In one embodiment, described device also includes:
Decoded each frame audio frequency is sequentially inserted into for the sequencing according to the decoding time by the 3rd insertion module
Two audio frequency frame queue tails of the queue;
Decoded each frame video is once inserted for the sequencing according to the decoding time by the 4th insertion module
Two video frame queue tails of the queue.
In one embodiment, described playing module, including:
Compare submodule, for by the corresponding timestamp of voice data in described second audio frequency frame queue and the second video
The corresponding timestamp of video data in queue is compared to obtain the consistent voice data of timestamp and video data;
Play submodule, for the consistent voice data of synchronous reproduction time stamp and video data.
Other features and advantages of the present invention will illustrate in the following description, and, partly become from description
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations write
In book, claims and accompanying drawing, specifically noted structure is realizing and to obtain.
Below by drawings and Examples, technical scheme is described in further detail.
Brief description
Accompanying drawing is used for providing a further understanding of the present invention, and constitutes a part for description, the reality with the present invention
Apply example and be used for explaining the present invention together, be not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of video broadcasting method in one embodiment of the invention;
Fig. 2 is a kind of flow chart of video broadcasting method in one embodiment of the invention;
Fig. 3 is a kind of block diagram of video play device in one embodiment of the invention;
Fig. 4 is a kind of block diagram of video play device in one embodiment of the invention.
Specific embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are illustrated it will be appreciated that preferred reality described herein
Apply example to be merely to illustrate and explain the present invention, be not intended to limit the present invention.
Fig. 1 is a kind of flow chart of video broadcasting method in one embodiment of the invention, as shown in figure 1, video in the present invention
Player method can be used for terminal, and the method can be implemented as following steps S101-S107:
In step S101, receive the play instruction of destination multimedia file;
In step s 102, destination multimedia file corresponding audio frequency and video fragment is downloaded successively according to playing sequence, sound regards
The corresponding voice data of multimedia file and video data is comprised in frequency fragment;
In step s 103, the voice data in audio frequency and video fragment is decoded;
In step S104, during by stamp of corresponding for the decoded voice data very first time corresponding with video data second
Between stab and compare;
In step S105, determine and compare the consistent corresponding video data of the second timestamp with very first time stamp;
In step s 106, to the second timestamp, corresponding video data is decoded;
In step s 107, synchronously playing audio frequency data and video data.
In the present embodiment, executive agent can be mobile terminal or computer.
, when user passes through mobile terminal watching video live broadcast, select to enter by clicking operation taking mobile terminal as a example
Target direct broadcast band, mobile terminal receive this clicking operation be equivalent to reception to target direct broadcast band corresponding multimedia file
Play instruction, destination multimedia file corresponding audio frequency and video fragment is downloaded from direct broadcast server successively according to playing sequence.
Audio frequency and video fragment is decapsulated, to obtain voice data, video data, the corresponding timestamp of each frame audio frequency
The corresponding timestamp with each frame video.
Voice data in audio frequency and video fragment is decoded.Because the data volume of voice data is more much smaller than video,
Thus, in the present embodiment, by soft decoding process, voice data is decoded.
In the audio, video data in audio frequency and video fragment, each frame audio frequency and each frame video have corresponding timestamp,
During decoding audio frequency, obtain stamp of the decoded audio frequency corresponding very first time, by the timestamp in very first time stamp and video data
Compare, determine and compare the second consistent timestamp with very first time stamp, determine the corresponding video data of the second timestamp, and
Corresponding for second timestamp video data is decoded.
After the decoding, synchronously playing audio frequency data and video data.
In addition, Voice & Video play frame number per second differing, thus, in the corresponding timestamp of video data
In, may not there is the corresponding timestamp of some audio frames.In addition, with the very first time stamp with the second timestamp compare consistent not
It is that requirement very first time stamp is identical with the second timestamp, as long as the difference of very first time stamp and the second timestamp is less than presetting
Value, then it is believed that the two is that comparison is consistent.For example, preset value is 1 millisecond, the picture that such error is led to and sound
Inconsistent, user cannot experience.
Secondly, when in the corresponding timestamp of video data, do not exist compare consistent timestamp with present frame audio frequency when, can
Wouldn't decoding video data, but further decoding next frame audio frequency, and extract this frame audio frequency corresponding very first time stamp.Determine and be somebody's turn to do
Frame audio frequency corresponding very first time stamp compares the consistent corresponding video data of the second timestamp.
Above-described embodiment describes the specific embodiment being applied to this programme during live broadcast service.This video can be additionally used in
Demand (telecommunication) service, specific embodiment is similar to the above embodiments, will not be described here.
The beneficial effects of the present invention is:The very first time is being stabbed with just decoding and the after corresponding voice data is decoded
One timestamp compares the consistent corresponding video data of the second timestamp, and voice data and video data are synchronous broadcastings,
Thus avoid video data and voice data decoding speed is inconsistent and lead to sound and image during video playback inconsistent
Situation occurs, thus, in video display process, improve the concordance of image and sound.
In one embodiment, as shown in Fig. 2 before above-mentioned steps S103, method also can be implemented as following steps
S201-S204:
In step s 201, audio frequency and video fragment is decapsulated, obtain voice data, video data, each frame audio frequency
Corresponding timestamp and the corresponding timestamp of each frame video;
In step S202, each frame audio frequency and the reproduction time of each frame video are respectively obtained according to timestamp;
In step S203, each frame audio frequency in voice data is sequentially inserted into by the sequencing according to reproduction time
One audio frequency frame queue tail of the queue;
In step S204, each frame video in video data is sequentially inserted into by the sequencing according to reproduction time
One video frame queue tail of the queue.
In the present embodiment, audio frequency and video fragment is decapsulated, obtain voice data, video data, each frame audio frequency pair
The timestamp answered and the corresponding timestamp of each frame video;Each frame audio frequency and each frame video are respectively obtained according to timestamp
Reproduction time;
First audio frequency frame queue of the voice data after being provided for caching decapsulation eases up the video counts after depositing decapsulation
According to the first video frame queue.Because queue only allows to execute update in tail of the queue, execute deletion action in tail of the queue, thus,
In the present embodiment, each frame audio frequency in voice data is sequentially inserted into by the first audio frequency according to reproduction time order from front to back
Frame queue tail of the queue;And according to the order from front to back of reproduction time, each frame video in video data is sequentially inserted into first
Video frame queue tail of the queue.The sequencing of this reproduction time is according to each frame voice data and the corresponding timestamp of video data
Obtain.
The having the beneficial effects that of the present embodiment:Sequencing according to reproduction time is by each frame audio frequency in voice data
It is sequentially inserted into the first audio frequency frame queue tail of the queue it is ensured that being decoded according to the sequencing of reproduction time in decoding;In the same manner, root
According to the sequencing of reproduction time, each frame video in video data is sequentially inserted into the first video frame queue tail of the queue it is ensured that
During decoding, the correctness it is ensured that playing is decoded according to the sequencing of reproduction time.
In one embodiment, above-mentioned steps S103 can be implemented as following steps A1-A2:
In step A1, obtain each frame audio frequency successively from the first audio frequency frame queue head of the queue;
In step A2, each frame audio frequency getting is decoded successively according to acquisition order;
Above-mentioned steps S106 can be implemented as following steps A3-A4:
In step A3, determine video data corresponding with the second timestamp in the first video frame queue;
In step A4, video data corresponding with the second timestamp is decoded.
Because each frame audio frequency in voice data is all to be sequentially inserted into the first audio frequency according to the sequencing of reproduction time
In frame queue, thus, in the present embodiment, obtain audio frequency from the first audio frequency frame queue head of the queue, and entered successively according to acquisition order
Row decoding is it is ensured that decoding process is also to carry out according to the sequencing of reproduction time.When video data is decoded, really
Video data corresponding with the second timestamp in fixed first video frame queue;Video data corresponding with the second timestamp is carried out
Decoding, due to the second timestamp timestamp corresponding with decoded voice data compare consistent, thus, to the second timestamp
Corresponding video data is decoded ensure that the decoding process of video is also to carry out according to the sequencing of reproduction time.
When video, when playing, frame per second is 25 frames/second, and audio frequency is with AAC (Advanced Audio Coding, senior sound
Frequency encodes) as a example form, when the audio sample rate of this form is 48000, a frame audio pack contains 1024 sampled points, thus,
During broadcasting, the playback rate of audio frequency is 46.875 frames/second.Thus, the audio frame number of broadcasting per second is about the video of broadcasting per second
2 times of frame number.Therefore, in the corresponding timestamp of video data, may not there is the corresponding timestamp of some audio frames, and with
It is not that requirement very first time stamp is identical with the second timestamp that very first time stamp compares consistent with the second timestamp, as long as the
The difference of one timestamp and the second timestamp is less than preset value, then it is believed that the two is that comparison is consistent.
Further, since the audio frame number of broadcasting per second is about 2 times of the video frame number of broadcasting per second, thus, decoding
It is possible to setting solution bit rate is often to decode two frame audio frequency in journey, just decoding one frame video, will decode two frame audio frequency and decoding
One frame video is as decoding periods.Secondly as the audio frame number of broadcasting per second is slightly less than the video frame number of broadcasting per second
2 times, in decoding process, the corresponding timestamp of same decoding periods sound intermediate frequency data timestamp corresponding with video data
Difference can be increasing, and wherein the corresponding timestamp of voice data is more than the corresponding timestamp of video data.For above-mentioned situation,
One time threshold can be set, when the reproduction time error of voice data and video data reaches this time threshold, then in decoding
After next frame audio frequency, just decoding one frame video, by the way, can revise voice data in decoding process intermittent
With the difference of video data timestamp so that the difference of the corresponding timestamp of Voice & Video is maintained at an acceptable scope
Interior.
The having the beneficial effects that of the present embodiment:Because each frame audio frequency in voice data is all the elder generation according to reproduction time
Sequentially it is sequentially inserted into the first audio frequency frame queue tail of the queue afterwards, thus it is ensured that the decoding process of audio frequency is also according to reproduction time
Sequencing carry out, secondly as the second timestamp timestamp corresponding with decoded voice data compare consistent, because
And, video data corresponding with the second timestamp is decoded ensure that with the decoding process of video is also according to reproduction time
Sequencing carry out.
In one embodiment, after above-mentioned steps S106, method also can be implemented as following steps B1-B2:
In step bl is determined., decoded each frame audio frequency is sequentially inserted into by the second audio frequency according to the sequencing of decoding time
Frame queue tail of the queue;
In step B2, decoded each frame video is once inserted by the second video according to the sequencing of decoding time
Frame queue tail of the queue.
Decoding speed due to voice data and video data may be more than broadcasting speed, if being not provided with decoded
Voice data and the buffer zone of video data, may make decoded audio, video data be dropped or make broadcasting F.F.
Effect, thus, in the present embodiment, it is provided for caching the second audio frequency frame queue of decoded voice data and for caching solution
Second video frame queue of the video data after code.Sequencing according to the decoding time is by decoded each frame audio frequency successively
Insert the second audio frequency frame queue tail of the queue;According to the sequencing of decoding time, decoded each frame video is once inserted second
Video frame queue tail of the queue.
The having the beneficial effects that of the present embodiment:Because each frame audio frequency is all to be inserted successively according to the sequencing of decoding time
Enter the second audio frequency frame queue tail of the queue, and because each frame video is all to be sequentially inserted into second according to the sequencing of decoding time
Video queue tail of the queue, and when playing, data can only be read from queue head of the queue, thus it is ensured that being capable of root in playing process
Sequencing according to the decoding time plays out to audio, video data.
In one embodiment, above-mentioned steps S107 can be implemented as following steps C1-C2:
In step C1, by the corresponding timestamp of voice data and the second video queue in the second audio frequency frame queue
The corresponding timestamp of video data is compared to obtain the consistent voice data of timestamp and video data;
In step C2, synchronous reproduction time stabs consistent voice data and video data.
In the present embodiment, by the corresponding timestamp of voice data and the second video queue in the second audio frequency frame queue
The corresponding timestamp of video data is compared to obtain the consistent voice data of timestamp and video data;Synchronous reproduction time
Stab consistent voice data and video data.
For example, when video, when playing, frame per second is 25 frames/second, and audio frequency is still taking AAC form as a example, in video data
In corresponding timestamp, may not there is the corresponding timestamp of some audio frames, and stab and the second timestamp ratio with the very first time
To not being unanimously that requirement very first time stamp is identical with the second timestamp, as long as the difference of very first time stamp and the second timestamp
Value is less than preset value, then it is believed that the two is that comparison is consistent.
Further, since the audio frame number of broadcasting per second is about 2 times of the video frame number of broadcasting per second, thus, playing
It is also possible to be set to for two frame audio frequency and a frame video to synchronize broadcasting in journey, in playing process, when voice data with regard
When the reproduction time error of frequency evidence reaches this time threshold, then play next frame video while playing next frame audio frequency,
By the way, the error of voice data and video data reproduction time can constantly be revised, so that Voice & Video is broadcast
The error putting the time keeps within the acceptable range.
The having the beneficial effects that of the present embodiment:By voice data consistent for timestamp and video data synchronization are play,
Avoid video data and voice data decoding speed is inconsistent and lead to the inconsistent situation of sound and image during video playback
Occur, further increase the concordance of image and sound.
Fig. 3 is a kind of block diagram of video play device in one embodiment of the invention, as shown in figure 3, video is broadcast in the present invention
Put device and can be used for terminal, this device is included as lower module:
Receiver module 31, for receiving the play instruction of destination multimedia file;
Download module 32, for downloading destination multimedia file corresponding audio frequency and video fragment, sound successively according to playing sequence
The corresponding voice data of multimedia file and video data is comprised in video fragment;
First decoder module 33, for being decoded to the voice data in audio frequency and video fragment;
Comparing module 34, for stabbing corresponding with video data second by corresponding for the decoded voice data very first time
Timestamp is compared;
Determining module 35, compares the consistent corresponding video data of the second timestamp for determining with very first time stamp;
Second decoder module 36, is decoded for video data corresponding to the second timestamp;
Playing module 37, for synchronously playing audio frequency data and video data.
In one embodiment, as shown in figure 4, device also includes:
Decapsulation module 41, before the voice data in audio frequency and video fragment is decoded, enters to audio frequency and video fragment
Row decapsulation, to obtain voice data, video data, the corresponding timestamp of each frame audio frequency and each frame video corresponding time
Stamp;
Obtain module 42, for each frame audio frequency and the reproduction time of each frame video are respectively obtained according to timestamp;
First insertion module 43, for the sequencing according to reproduction time by each frame audio frequency in voice data successively
Insert the first audio frequency frame queue tail of the queue;
Second insertion module 44, for the sequencing according to reproduction time by each frame video in video data successively
Insert the first video frame queue tail of the queue.
In one embodiment, the first decoder module, including:
Acquisition submodule, for obtaining each frame audio frequency successively from the first audio frequency frame queue head of the queue;
First decoding sub-module, for being decoded each frame audio frequency getting successively according to acquisition order;
Second decoder module, including:
Determination sub-module, for determining video data corresponding with the second timestamp in the first video frame queue;
Second decoding sub-module, for being decoded to video data corresponding with the second timestamp.
In one embodiment, device also includes:
Decoded each frame audio frequency is sequentially inserted into for the sequencing according to the decoding time by the 3rd insertion module
Two audio frequency frame queue tails of the queue;
Decoded each frame video is once inserted for the sequencing according to the decoding time by the 4th insertion module
Two video frame queue tails of the queue.
In one embodiment, playing module, including:
Compare submodule, for by the corresponding timestamp of voice data in the second audio frequency frame queue and the second video queue
In the corresponding timestamp of video data compare to obtain the consistent voice data of timestamp and video data;
Play submodule, for the consistent voice data of synchronous reproduction time stamp and video data.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can be using complete hardware embodiment, complete software embodiment or the reality combining software and hardware aspect
Apply the form of example.And, the present invention can be using in one or more computers wherein including computer usable program code
The shape of the upper computer program implemented of usable storage medium (including but not limited to disk memory and optical memory etc.)
Formula.
The present invention is the flow process with reference to method according to embodiments of the present invention, equipment (system) and computer program
Figure and/or block diagram are describing.It should be understood that can be by each stream in computer program instructions flowchart and/or block diagram
Flow process in journey and/or square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processor instructing general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device is to produce
A raw machine is so that produced for reality by the instruction of computer or the computing device of other programmable data processing device
The device of the function of specifying in present one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide computer or other programmable data processing device with spy
Determine in the computer-readable memory that mode works so that the instruction generation inclusion being stored in this computer-readable memory refers to
Make the manufacture of device, this command device realize in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or
The function of specifying in multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing device so that counting
On calculation machine or other programmable devices, execution series of operation steps to be to produce computer implemented process, thus in computer or
On other programmable devices, the instruction of execution is provided for realizing in one flow process of flow chart or multiple flow process and/or block diagram one
The step of the function of specifying in individual square frame or multiple square frame.
Obviously, those skilled in the art can carry out the various changes and modification essence without deviating from the present invention to the present invention
God and scope.So, if these modifications of the present invention and modification belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprise these changes and modification.
Claims (10)
1. a kind of video broadcasting method is it is characterised in that include:
Receive the play instruction of destination multimedia file;
The corresponding audio frequency and video fragment of described destination multimedia file is downloaded successively according to playing sequence, wraps in described audio frequency and video fragment
Containing the corresponding voice data of described multimedia file and video data;
Voice data in described audio frequency and video fragment is decoded;
Stamp second timestamp corresponding with video data of corresponding for the decoded voice data very first time is compared;
Determine and compare the consistent corresponding video data of the second timestamp with stamp of the described very first time;
To described second timestamp, corresponding video data is decoded;
Synchronous playing audio data and video data.
2. the method for claim 1 is it is characterised in that be decoded it to the voice data in described audio frequency and video fragment
Before, methods described also includes:
Described audio frequency and video fragment is decapsulated, to obtain voice data, video data, the corresponding timestamp of each frame audio frequency
The corresponding timestamp with each frame video;
Each frame audio frequency and the reproduction time of each frame video are respectively obtained according to described timestamp;
Each frame audio frequency in described voice data is sequentially inserted into the first audio frequency frame queue by the sequencing according to reproduction time
Tail of the queue;
Each frame video in described video data is sequentially inserted into the first video frame queue by the sequencing according to reproduction time
Tail of the queue.
3. method as claimed in claim 2 is it is characterised in that be decoded to the voice data in described audio frequency and video fragment,
Including:
Obtain each frame audio frequency from described first audio frequency frame queue head of the queue successively;
The each frame audio frequency getting is decoded successively according to acquisition order;
To described second timestamp, corresponding video data is decoded, including:
Determine video data corresponding with the second timestamp in the first video frame queue;
Video data corresponding with the second timestamp is decoded.
4. method as claimed in claim 3 is it is characterised in that methods described also includes:
Decoded each frame audio frequency is sequentially inserted into by the second audio frequency frame queue tail of the queue according to the sequencing of decoding time;
Decoded each frame video is once inserted by the second video frame queue tail of the queue according to the sequencing of decoding time.
5. method as claimed in claim 4, it is characterised in that described synchronous playing audio data and video data, is wrapped
Include:
By the video data pair in the corresponding timestamp of voice data and the second video queue in described second audio frequency frame queue
The timestamp answered is compared to obtain the consistent voice data of timestamp and video data;
The consistent voice data of synchronous reproduction time stamp and video data.
6. a kind of video play device is it is characterised in that include:
Receiver module, for receiving the play instruction of destination multimedia file;
Download module, for the corresponding audio frequency and video fragment of described destination multimedia file is downloaded successively according to playing sequence, described
The corresponding voice data of described multimedia file and video data is comprised in audio frequency and video fragment;
First decoder module, for being decoded to the voice data in described audio frequency and video fragment;
Comparing module, for stabbing second timestamp corresponding with video data by corresponding for the decoded voice data very first time
Compare;
Determining module, compares the consistent corresponding video data of the second timestamp for determining with stamp of the described very first time;
Second decoder module, is decoded for video data corresponding to described second timestamp;
Playing module, for synchronous playing audio data and video data.
7. device as claimed in claim 6 is it is characterised in that described device also includes:
Decapsulation module, before the voice data in described audio frequency and video fragment is decoded, to described audio frequency and video fragment
Decapsulated, with obtain voice data, video data, the corresponding timestamp of each frame audio frequency and each frame video corresponding when
Between stab;
Obtain module, for each frame audio frequency and the reproduction time of each frame video are respectively obtained according to described timestamp;
Each frame audio frequency in described voice data is inserted successively by the first insertion module for the sequencing according to reproduction time
Enter the first audio frequency frame queue tail of the queue;
Each frame video in described video data is inserted successively by the second insertion module for the sequencing according to reproduction time
Enter the first video frame queue tail of the queue.
8. device as claimed in claim 7 is it is characterised in that the first decoder module, including:
Acquisition submodule, for obtaining each frame audio frequency successively from described first audio frequency frame queue head of the queue;
First decoding sub-module, for being decoded each frame audio frequency getting successively according to acquisition order;
Second decoder module, including:
Determination sub-module, for determining video data corresponding with the second timestamp in the first video frame queue;
Second decoding sub-module, for being decoded to video data corresponding with the second timestamp.
9. device as claimed in claim 8 is it is characterised in that described device also includes:
3rd insertion module, for being sequentially inserted into the second sound according to the sequencing of decoding time by decoded each frame audio frequency
Frequency frame queue tail of the queue;
4th insertion module, regards for decoded each frame video once being inserted second according to the sequencing of decoding time
Frequency frame queue tail of the queue.
10. device as claimed in claim 9 is it is characterised in that described playing module, including:
Compare submodule, for by the corresponding timestamp of voice data in described second audio frequency frame queue and the second video queue
In the corresponding timestamp of video data compare to obtain the consistent voice data of timestamp and video data;
Play submodule, for the consistent voice data of synchronous reproduction time stamp and video data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610808055.4A CN106385525A (en) | 2016-09-07 | 2016-09-07 | Video play method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610808055.4A CN106385525A (en) | 2016-09-07 | 2016-09-07 | Video play method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106385525A true CN106385525A (en) | 2017-02-08 |
Family
ID=57939200
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610808055.4A Pending CN106385525A (en) | 2016-09-07 | 2016-09-07 | Video play method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106385525A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110225413A (en) * | 2019-07-09 | 2019-09-10 | 广州品唯软件有限公司 | A kind of video broadcasting method and device |
CN110769179A (en) * | 2018-07-25 | 2020-02-07 | 视联动力信息技术股份有限公司 | Audio and video data stream processing method and system |
CN111757144A (en) * | 2020-04-13 | 2020-10-09 | 湖南化工职业技术学院(湖南工业高级技工学校) | Network computer multimedia video playing method and system |
US11114133B2 (en) | 2018-08-01 | 2021-09-07 | Beijing Microlive Vision Technology Co., Ltd. | Video recording method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1949880A (en) * | 2005-10-11 | 2007-04-18 | 三星电子株式会社 | Device and method for synchronizing data in digital television receiver |
CN101808242A (en) * | 2009-02-16 | 2010-08-18 | 索尼公司 | Buffer control device, buffer control method and program |
US20120036547A1 (en) * | 2005-08-19 | 2012-02-09 | Nec Viewtechnology, Ltd. | Moving image distribution system and moving image distribution server |
CN102421035A (en) * | 2011-12-31 | 2012-04-18 | 青岛海信宽带多媒体技术有限公司 | Method and device for synchronizing audio and video of digital television |
CN103024517A (en) * | 2012-12-17 | 2013-04-03 | 四川九洲电器集团有限责任公司 | Method for synchronously playing streaming media audios and videos based on parallel processing |
CN105516090A (en) * | 2015-11-27 | 2016-04-20 | 刘军 | Media play method, device and music teaching system |
-
2016
- 2016-09-07 CN CN201610808055.4A patent/CN106385525A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120036547A1 (en) * | 2005-08-19 | 2012-02-09 | Nec Viewtechnology, Ltd. | Moving image distribution system and moving image distribution server |
CN1949880A (en) * | 2005-10-11 | 2007-04-18 | 三星电子株式会社 | Device and method for synchronizing data in digital television receiver |
CN101808242A (en) * | 2009-02-16 | 2010-08-18 | 索尼公司 | Buffer control device, buffer control method and program |
CN102421035A (en) * | 2011-12-31 | 2012-04-18 | 青岛海信宽带多媒体技术有限公司 | Method and device for synchronizing audio and video of digital television |
CN103024517A (en) * | 2012-12-17 | 2013-04-03 | 四川九洲电器集团有限责任公司 | Method for synchronously playing streaming media audios and videos based on parallel processing |
CN105516090A (en) * | 2015-11-27 | 2016-04-20 | 刘军 | Media play method, device and music teaching system |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110769179A (en) * | 2018-07-25 | 2020-02-07 | 视联动力信息技术股份有限公司 | Audio and video data stream processing method and system |
CN110769179B (en) * | 2018-07-25 | 2022-07-08 | 视联动力信息技术股份有限公司 | Audio and video data stream processing method and system |
US11114133B2 (en) | 2018-08-01 | 2021-09-07 | Beijing Microlive Vision Technology Co., Ltd. | Video recording method and device |
CN110225413A (en) * | 2019-07-09 | 2019-09-10 | 广州品唯软件有限公司 | A kind of video broadcasting method and device |
CN111757144A (en) * | 2020-04-13 | 2020-10-09 | 湖南化工职业技术学院(湖南工业高级技工学校) | Network computer multimedia video playing method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8670072B1 (en) | Method and apparatus for streaming media data processing, and streaming media playback equipment | |
CA2771187C (en) | Encoding video streams for adaptive video streaming | |
CN108495152B (en) | Video live broadcast method and device, electronic equipment and medium | |
CN102215429B (en) | Recording method for mobile TV | |
CN105187896B (en) | The media file playing method and system more being segmented | |
CN106470352B (en) | Live channel playing method, device and system | |
KR102469142B1 (en) | Dynamic playback of transition frames while transitioning between media stream playbacks | |
CN107426629B (en) | Streaming media file processing method and live broadcast system | |
CN105657524A (en) | Seamless video switching method | |
CN106385525A (en) | Video play method and device | |
US7930449B2 (en) | Method and system for data transmission | |
CN101232611B (en) | Image process apparatus and method thereof | |
CN103024603B (en) | A kind of for solving playing network video time the device and method that pauses in short-term | |
CN105791938B (en) | The joining method and device of multimedia file | |
US10503460B2 (en) | Method for synchronizing an alternative audio stream | |
JP2013192062A (en) | Video distribution system, video distribution apparatus, video distribution method and program | |
CN110519627B (en) | Audio data synchronization method and device | |
CN110662116A (en) | Web player based on WebAssembly technology and playing method | |
US11968246B2 (en) | Playback mode determining method and apparatus | |
CN105187897B (en) | The media file span playback method and system more being segmented | |
CN103648011A (en) | Audio and video synchronization device and method based on HLS protocol | |
CN109040818B (en) | Audio and video synchronization method, storage medium, electronic equipment and system during live broadcasting | |
CN107371053B (en) | Audio and video stream contrast analysis method and device | |
CN103491430A (en) | Streaming media data processing method and electronic device | |
CN102170453A (en) | Audio and video coding method and playing method for shortening waiting time before on demand playing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170208 |
|
RJ01 | Rejection of invention patent application after publication |