CN102547435B - System and method for playing and processing multimedia file - Google Patents

System and method for playing and processing multimedia file Download PDF

Info

Publication number
CN102547435B
CN102547435B CN201110424329.7A CN201110424329A CN102547435B CN 102547435 B CN102547435 B CN 102547435B CN 201110424329 A CN201110424329 A CN 201110424329A CN 102547435 B CN102547435 B CN 102547435B
Authority
CN
China
Prior art keywords
frame
data
video
out buffer
audio
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.)
Expired - Fee Related
Application number
CN201110424329.7A
Other languages
Chinese (zh)
Other versions
CN102547435A (en
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.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN201110424329.7A priority Critical patent/CN102547435B/en
Publication of CN102547435A publication Critical patent/CN102547435A/en
Application granted granted Critical
Publication of CN102547435B publication Critical patent/CN102547435B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention is suitable for the multimedia field, and provides a system and a method for playing and processing a multimedia file. The system comprises a detection unit for detecting file type of the multimedia file, an audio data reading and buffering area and a video data reading and buffering area for pre-reading and buffering video data and audio data of a non-interlaced multimedia file, respectively, a reading control unit for reading the video data of the video data reading and buffering area and the audio data of the audio data reading and buffering area according to a preset data reading switching strategy, a separator for receiving the audio and video data read by the reading control unit and separating the audio and video data, a video frame first-in first-out buffer and an audio frame first-in first-out buffer for buffering a video data frame and an audio data frame separated by the separator, respectively, a decoder for decoding the audio and video data frames, and a playing unit for displaying the video and playing the sound according to a decoding result. The system and the method provided by the invention realize smooth playing of the non-interlaced multimedia file.

Description

A kind of multimedia file playback process system and method
Technical field
The invention belongs to MultiMedia Field, relate in particular to a kind of multimedia file playback process system and method.
Background technology
Now, along with the raising of embedded type CPU performance and the progress of various audio/video decoding DSP technology, emerged a large amount of embedded high definition multimedia player products.This series products can all kinds of high definition film sources of smooth decoding, support Doby TrueHD and high-definition digital cinema system (Digital Theatre System, the high definition audio such as DTS), can process the multiple encapsulation format such as blue light, MKV, AVI, MP4/MOV, user just can enjoy the shock effect of high definition film source at home.But, for some multimedia file, the film source of for example MP4/MOV and AVI encapsulation, because the Storage Format of audio, video data is not for interweaving or interweave and to obtain defective tightness, result of broadcast will become very card, or there is image there is no sound, or have sound there is no image, cannot realize smooth playing.
To sum up, in the time that non-weave type multimedia file is play, easily there is playing slack problem in the player of prior art.
Summary of the invention
The object of the present invention is to provide a kind of multimedia file playback process system, be intended to the playing device of solution, prior art in the time that non-weave type multimedia file is play, easily occur playing slack problem.
The present invention is achieved in that a kind of multimedia file playback process system, and system comprises:
Detecting unit, for detection of the file type of multimedia file, described file type comprises interweave file and the non-file that interweaves;
Video data is read buffering area, is non-interweaving when file for the file type of the multimedia file that detects when described detecting unit, pre-reads, cushions the video data of multimedia file;
Voice data is read buffering area, is non-interweaving when file for the file type of the multimedia file that detects when described detecting unit, pre-reads, cushions the voice data of multimedia file;
Read control unit, read switchover policy for data are set, described video data is read to the video data of buffering area and voice data and read the voice data of buffering area and read switchover policy according to described data and read;
Separator reads video data and the voice data that control unit reads described in receiving, and separates and obtains video data frame and audio data frame;
Frame of video first in first out buffer, separates the video data frame obtaining for separator described in buffer memory;
Audio frame first in first out buffer, separates the audio data frame obtaining for separator described in buffer memory;
Decoder, for the video data frame of described frame of video first in first out buffer buffer memory is carried out to video decode, carries out audio decoder to the audio data frame of described audio frame first in first out buffer buffer memory;
Broadcast unit, for according to the result display video of described decoder decoding and play sound.
Another object of the present invention is to provide a kind of multimedia file playing processing method, comprise the following steps:
The file type that detects multimedia file, described multimedia file type comprises interweave file and the non-file that interweaves;
When detecting that the file type of multimedia file is non-interweaving when file, read buffering area and pre-read, cushion the video data of described multimedia file by the video data building, read buffering area and pre-read, cushion the voice data of described multimedia file by the voice data building;
Described video data is read to the video data of buffering area and voice data to be read the voice data of buffering area and reads switchover policy according to default data and read;
Separate with voice data and obtain video data frame and audio data frame read video data that switchover policy reads according to described data;
Separate by separator described in the frame of video first in first out buffer buffer memory building the video data frame obtaining, separate by separator described in the audio frame first in first out buffer buffer memory building the audio data frame obtaining;
Video data frame to described frame of video first in first out buffer buffer memory carries out video decode, and the audio data frame of described audio frame first in first out buffer buffer memory is carried out to audio decoder;
According to the result display video of video decode, play sound according to the result of audio decoder.
The embodiment of the present invention detects the file type of multimedia file by detecting unit, voice data is read buffering area and video data and is read buffering area and pre-read respectively, video data and the voice data of the non-weave type multimedia file that buffering detecting unit detects, reading control unit reads the video data of buffering area and voice data by video data and reads the voice data of buffering area and read switchover policy according to default data and read, separator receives and reads video data and the voice data that control unit reads and carry out separating treatment, frame of video first in first out buffer and audio frame first in first out buffer respectively buffer memory separator separate the video data frame and the audio data frame that obtain, decoder is decoded to audio, video data frame, broadcast unit is according to decoded result display video and play sound, solve while reading non-weave type multimedia file data, redirect is frequent, play smooth not problem, improve the treatment effeciency of multimedia audio-video data, strengthen the compatibility of player.
Brief description of the drawings
Fig. 1 is the structure chart that a kind of multimedia file playback process of the present invention system the first embodiment provides;
Fig. 2 is the storage configuration schematic diagram of the weave type multimedia file that provides of a kind of multimedia file playback process of the present invention system the first embodiment;
Fig. 3 (a), (b) are the storage configuration schematic diagrames of the non-weave type multimedia file that provides of a kind of multimedia file playback process of the present invention system the first embodiment;
Fig. 4 is the flow chart that a kind of multimedia file playing processing method the second embodiment of the present invention provides.
Embodiment
In order to make object of the present invention, technical scheme and beneficial effect clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The embodiment of the present invention detects the file type of multimedia file by detecting unit, voice data is read buffering area and video data and is read buffering area and pre-read respectively, video data and the voice data of the non-weave type multimedia file that buffering detecting unit detects, reading control unit reads the video data of buffering area and voice data by video data and reads the voice data of buffering area and read switchover policy according to default data and read, separator receives and reads video data and the voice data that control unit reads and carry out separating treatment, frame of video first in first out buffer and audio frame first in first out buffer respectively buffer memory separator separate the video data frame and the audio data frame that obtain, decoder is decoded to audio, video data frame, broadcast unit is according to decoded result display video and play sound, solve while reading non-weave type multimedia file data, redirect is frequent, play smooth not problem.
Fig. 1 shows the structure chart of the multimedia file playback process system that first embodiment of the invention provides.For convenience of explanation, only show the part relevant to the embodiment of the present invention.
Conventionally, the location mode of multimedia file is: audio, video data is divided into less data slot, and audio, video data intersects and deposits successively according to time sequencing.
Fig. 2 shows the storage configuration schematic diagram of the weave type multimedia file that first embodiment of the invention provides.The audio, video data of weave type multimedia file is split into more fragment conventionally, and each voice data fragment and video data fragment are less.
Fig. 3 (a), (b) show the storage configuration schematic diagram of the non-weave type multimedia file that first embodiment of the invention provides.Non-weave type multimedia file in the embodiment of the present invention mainly contains two kinds: separately deposit in multimedia file sound intermediate frequency data and video data (1), in a multimedia file, first half is deposited video data, latter half deposits voice data or the first half of multimedia file is deposited voice data, latter half is deposited video data, as shown in Fig. 3 (a); (2) audio, video data interweaves compactly not, if it is individual compared with large fragment to be that voice data and video data are divided into, voice data fragment and video data fragment are intersected and are deposited successively, fragment number is less, and each voice data fragment and video data fragment are very large, as shown in Fig. 3 (a).
In conjunction with Fig. 2 and Fig. 3 (a), (b), can find out, for the multimedia file of weave type, because the data slot of cutting apart is less, just can realize smooth playing to audio, video data by the buffering area of a buffering audio, video data; And for the non-file that interweaves, because the buffering area of audio, video data can not be infinitely great, need ceaselessly redirect to read needed audio, video data, if high-definition multimedia file, data volume is huger, only turns mode by beating heart and carries out data and read, and is difficult to realize smooth playing.
The multimedia file playback process system that the embodiment of the present invention provides, read buffering area and audio data frame first in first out buffer by what set up video data, and set up that data read that switchover policy rationally controls data read the solution above technical problem that weave type multimedia file exists in playing process by no means.
As shown in Figure 1, this multimedia file playback process system mainly comprises: detecting unit 11, video data read that buffering area 12, voice data are read buffering area 13, read control unit 14, separator 15, frame of video first in first out buffer 16, audio frame first in first out buffer 17, decoder 18 and broadcast unit 19.
Wherein:
Detecting unit 11, for detection of the file type of multimedia file, this file type comprises interweave file and the non-file that interweaves;
Video data is read buffering area 12, is non-interweaving when file for the file type of the multimedia file that detects when detecting unit 11, pre-reads, cushions the video data of multimedia file;
Voice data is read buffering area 13, is non-interweaving when file for the file type of the multimedia file that detects when detecting unit 11, pre-reads, cushions the voice data of multimedia file;
Read control unit 14, read switchover policy for data are set, video data is read to the video data of buffering area 12 and voice data and read the voice data of buffering area 13 and read switchover policy according to data and read;
Separator 15, reads for receiving video data and the voice data that control unit 14 reads, and separates and obtains video data frame and audio data frame;
Frame of video first in first out buffer 16, separates for buffer memory separator 15 video data frame obtaining;
Audio frame first in first out buffer 17, separates for buffer memory separator 15 audio data frame obtaining;
Decoder 18, for the video data frame of frame of video first in first out buffer 16 buffer memorys is carried out to video decode, carries out audio decoder to the audio data frame of audio frame first in first out buffer 17 buffer memorys;
Broadcast unit 19, for according to the result display video of decoder decoding and play sound.
Wherein, the step that detecting unit 11 detects the file type of multimedia file is specially:
According to the total bitrate of multimedia file, threshold value D is set t;
Set up index according to multimedia document information, index comprises timestamp t, total playing duration Tlen, the position PosV of t moment frame of video in multimedia file t, the position PosA of t moment audio frame in multimedia file t;
Calculate the phase maximum file distance B of audio, video data interframe in the same time max:
D t = Pos V t - Pos A t D max = MAX D 1 D 2 . . . D Tlen ;
Work as D max> D ttime, the file type of multimedia file is the non-file that interweaves.
Above-mentioned D trefer to frame of video and the positional distance of the audio frame in t moment in multimedia file in t moment, D maxbe specially the maximum in all positional distances that calculate according to above-mentioned different time stamp t.Multimedia file be interweave file be also non-interweave file can by mutually in the same time the positional distance of audio, video data frame in multimedia file determine, if the positional distance in multimedia file between the audio, video data frame in some moment is excessive, represent the defective tightness that this multimedia file interweaves, be the non-file that interweaves, in practical operation, can set the ultimate range being used to indicate between the audio, video data frame that system can tolerate, i.e. above-mentioned threshold value D t.If the positional distance of the audio, video data frame in all moment of multimedia file does not all exceed this threshold value D t, represent that this multimedia file is for the file that interweaves; If the positional distance of the audio, video data frame in some moment has exceeded this threshold value D t, represent that this multimedia file is the non-file that interweaves.
In the present embodiment, can pass through D maxwith D tmagnitude relationship determine the file type of multimedia file, if D max> D t, represent that the audio frequency and video of multimedia file interweave compactly not, be the non-file that interweaves.In order to reduce amount of calculation, also can extract audio/video frames in the mode of fixed time-interval sampling in other embodiments and calculate, but the quantity of the audio/video frames extracting is unsuitable very few.In multimedia file playback process system of the present invention the first preferred embodiment, D tgenerally be set to the multimedia file total bitrate of 3~6 times according to actual conditions.
The video data that the embodiment of the present invention builds reads buffering area 12 and voice data is read buffering area 13 to pre-reading respectively buffers video data and voice data.While reading non-weave type multimedia file data, needn't need data time, all remove redirect file reading at every turn, thereby can effectively reduce the number of times of file redirect, make the redirect of file no longer frequent.
Video data is read buffering area and voice data and is read the length setting of buffering area and will be of moderate size, unsuitable excessive, also unsuitable too small, cause pre-read time to increase because cross conference, affect reaction speed, but also likely buffer memory unwanted data, and the too small effect that does not have buffering.When concrete application, video data is read buffering area generally taking the size of I frame as with reference to arranging, voice data read buffering area generally taking the code check of audio frequency as with reference to arranging.For the film source of different resolution, such as high definition, SD etc., the size that audio, video data is read buffering area also needs slightly to adjust.
In multimedia file playback process system of the present invention the second preferred embodiment, in the time that multimedia file is 1080P high definition film source, it is 3~5 frame I frame signs that video data is read buffering area, and it is 3 seconds reference audio Frame sizes that voice data is read buffering area.
The switchover policy that reasonably audio, video data reads can reduce redirect, and when order reading out data as much as possible, decoder can obtain again the audio, video data frame of timestamp alignment in time.
In the embodiment of the present invention, the aim that data read switchover policy is: the first one section of video data that reads continuously as much as possible, then the section audio data that read continuously as much as possible, these two steps repetitive cycling are successively gone in switching.In the time of reading video data, occur full and cannot continue store data for fear of frame of video first in first out buffer, or audio frame first in first out buffer occurs because broadcasting is the situation of data consumes sky, in the time of continuous reading video data, need the remaining data size in monitoring video frame first in first out buffer and audio frame first in first out buffer, in the time being about to the above-mentioned situation of generation, switching timely and read voice data.Equally, in the time reading voice data, also need the remaining data size in monitoring video frame first in first out buffer and audio frame first in first out buffer, in occurring that audio frame first in first out buffer is about to fill data in full or frame of video first in first out buffer and is about to consume not, switch and remove reading video data.
The data that the embodiment of the present invention provides read switchover policy and are specially:
Step (a): reading the duration is T timevideo data give separator, at during read, the data redundancy situation of monitoring audio frame first in first out buffer and audio frame first in first out buffer, if the data volume in frame of video first in first out buffer is greater than threshold value Tv max, or data volume in audio frame first in first out buffer is less than threshold value Ta min, shift to an earlier date end step (a), execution step (b), otherwise execution step (b) after reading;
Step (b): reading the duration is T timevoice data give separator, at during read, the data redundancy situation of monitoring audio frame first in first out buffer and audio frame first in first out buffer, if the data volume of audio frame first in first out buffer is greater than threshold value Ta max, or data volume in frame of video first in first out buffer is less than threshold value Tv min, shift to an earlier date end step (b), execution step (a), otherwise execution step (a) after reading.
In multimedia file playback process system the 3rd preferred embodiment of the present invention, T timespan be 3~5 seconds, Tv maxand Ta maxspan be 90%~95% of the total size of frame of video first in first out buffer and audio frame first in first out buffer, threshold value Tv minwith Ta minspan is 5%~10% of frame of video first in first out buffer and the total size of audio frame first in first out buffer.
Frame of video first in first out buffer 16 and audio frame first in first out buffer 17 that the embodiment of the present invention builds are used for temporarily depositing audio data frame and the video data frame separated by separator 15, are transferred to decoder 18 and decode.
The needed Frame of some final broadcastings of frame of video first in first out buffer 16 and audio frame first in first out buffer 17 buffer memorys, there is the existence of this buffer memory, video data is read in process that buffering area 12 and voice data read to read buffering area 13 reading control unit 14, after can continuation order reading section data in the time finding that gap appears in the timestamp of Voice & Video, video data or the voice data that timestamp falls behind be read in redirect again, and do not worry delivering to the audio data frame of decoder 18 and video data frame and lose the alignment of timestamp.Like this, further reduce the number of times of redirect, and realize each many as much as possible data of carrying out in order and read.
Reading buffering area and voice data with video data, to read buffering area the same, the size of frame of video first in first out buffer and audio frame first in first out buffer is also moderate, can not be excessive or too small, cross conference and make the control operation response speed such as " broadcasting " and " time-out " slack-off; The too small effect that can play buffer memory.According to the resource situation of system, the size of first in first out buffer is traditionally arranged to be the Frame that can deposit several seconds.In multimedia file playback process system the 4th preferred embodiment of the present invention, frame of video first in first out buffer is the reference video data frame sign of 5~8 seconds, audio frame first in first out buffer is the reference audio Frame size of 5~8 seconds, and the big or small ratio range of audio frame first in first out buffer and frame of video first in first out buffer is 1: 2~1: 4.For the film source of different resolution, the size of above-mentioned each frame of reference video data frame can there are differences, and therefore for different multimedia files, the size of each frame of reference video data frame can be determined in incipient stage definition multimedia file.
Certainly, in the time that detecting unit 11 detects that multimedia file is weave type, use conventional multimedia processing mode to play, be not described in detail in this.
To sum up, by building, video data is read buffering area to the embodiment of the present invention and voice data is read buffering area, build frame of video first in first out buffer and audio frame first in first out buffer, set up rational data and read switchover policy, this multimedia file playback process system can efficient solution the redirect of weave type multimedia file is frequent by no means, play slack problem, can effectively strengthen the compatibility of player.
Fig. 4 shows the multimedia file playing processing method flow chart that second embodiment of the invention provides.
In step S401, detect the file type of multimedia file, multimedia file type comprises interweave file and the non-file that interweaves.
In step S402, when detecting that the file type of multimedia file is non-interweaving when file, read buffering area and pre-read, cushion the video data of multimedia file by the video data building, read buffering area and pre-read, cushion the voice data of multimedia file by the voice data building.
In step S403, video data is read to the video data of buffering area and voice data and read the voice data of buffering area and read switchover policy according to default data and read.
In step S404, separate with voice data and obtain video data frame and audio data frame read video data that switchover policy reads according to data.
In step S405, separate by the frame of video first in first out buffer buffer memory separator building the video data frame obtaining, separate by the audio frame first in first out buffer buffer memory separator building the audio data frame obtaining.
In step S406, the video data frame of frame of video first in first out buffer buffer memory is carried out to video decode, the audio data frame of audio frame first in first out buffer buffer memory is carried out to audio decoder.
In step S407, according to the result display video of video decode, play sound according to the result of audio decoder.
Wherein, the step that detects the file type of multimedia file in step S401 is specially:
According to the total bitrate of multimedia file, threshold value D is set t;
Set up index according to multimedia document information, index comprises timestamp t, total playing duration Tlen, the position PosV of t moment frame of video in multimedia file t, the position PosA of t moment audio frame in multimedia file t;
Calculate the phase maximum file distance B of audio, video data interframe in the same time max:
D t = Pos V t - Pos A t D max = MAX D 1 D 2 . . . D Tlen ;
Work as D max> D ttime, the file type of multimedia file is the non-file that interweaves.
In step S404, data read switchover policy and are specially:
Step (a): reading the duration is T timevideo data give separator, at during read, the data redundancy situation of monitoring audio frame first in first out buffer and audio frame first in first out buffer, if the data volume in frame of video first in first out buffer is greater than threshold value Tv max, or data volume in audio frame first in first out buffer is less than threshold value Ta min, shift to an earlier date end step (a), execution step (b), otherwise execution step (b) after reading;
Step (b): reading the duration is T timevoice data give separator, at during read, the data redundancy situation of monitoring audio frame first in first out buffer and audio frame first in first out buffer, if the data volume of audio frame first in first out buffer is greater than threshold value Ta max, or data volume in frame of video first in first out buffer is less than threshold value Tv min, shift to an earlier date end step (b), execution step (a), otherwise execution step (a) after reading.
In multimedia file playing processing method the first preferred embodiment of the present invention, D tgenerally be set to the multimedia file total bitrate of 3~6 times according to actual conditions.
In multimedia file playing processing method the second preferred embodiment of the present invention, in the time that multimedia file is 1080P high definition film source, it is 3~5 frame I frame signs that video data is read buffering area, and it is 3 seconds reference audio Frame sizes that voice data is read buffering area.
In multimedia file playing processing method of the present invention the 3rd preferred embodiment, T timespan be 3~5 seconds, Tv maxand Ta maxspan be 90%~95% of the total size of frame of video first in first out buffer and audio frame first in first out buffer, threshold value Tv minwith Ta minspan is 5%~10% of frame of video first in first out buffer and the total size of audio frame first in first out buffer.
In multimedia file playing processing method of the present invention the 4th preferred embodiment, frame of video first in first out buffer is the reference video data frame sign of 5~8 seconds, audio frame first in first out buffer is the reference audio Frame size of 5~8 seconds, and the big or small ratio range of audio frame first in first out buffer and frame of video first in first out buffer is 1: 2~1: 4.For the film source of different resolution, the size of above-mentioned each frame of reference video data frame can there are differences, and therefore for different multimedia files, the size of each frame of reference video data frame can be determined in incipient stage definition multimedia file.
Embodiment is described above, does not repeat them here.
By building, video data is read buffering area and voice data is read buffering area in the present invention, build frame of video first in first out buffer and audio frame first in first out buffer, set up rational data and read switchover policy, introduce buffering and first in first out monitoring strategies, broadcasting to non-weave type multimedia file is processed especially, effectively reduce the number of hops that non-weave type multimedia file played data reads, improve the treatment effeciency of multimedia audio-video data, ensured the smooth playing of audio frequency and video simultaneously.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in a computer read/write memory medium, described storage medium, as ROM/RAM, disk, CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a multimedia file playback process system, is characterized in that, described system comprises:
Detecting unit, for detection of the file type of multimedia file, described file type comprises interweave file and the non-file that interweaves;
Video data is read buffering area, is non-interweaving when file for the file type of the multimedia file that detects when described detecting unit, pre-reads, cushions the video data of multimedia file;
Voice data is read buffering area, is non-interweaving when file for the file type of the multimedia file that detects when described detecting unit, pre-reads, cushions the voice data of multimedia file;
Read control unit, read switchover policy for data are set, described video data is read to the video data of buffering area and voice data and read the voice data of buffering area and read switchover policy according to described data and read;
Separator reads video data and the voice data that control unit reads described in receiving, and separates and obtains video data frame and audio data frame;
Frame of video first in first out buffer, separates the video data frame obtaining for separator described in buffer memory;
Audio frame first in first out buffer, separates the audio data frame obtaining for separator described in buffer memory;
Decoder, for the video data frame of described frame of video first in first out buffer buffer memory is carried out to video decode, carries out audio decoder to the audio data frame of described audio frame first in first out buffer buffer memory;
Broadcast unit, for according to the result display video of described decoder decoding and play sound.
2. the system as claimed in claim 1, is characterized in that, the step that described detecting unit detects the file type of multimedia file is specially:
According to the total bitrate of described multimedia file, threshold value D is set t;
Set up index according to described multimedia document information, described index comprises timestamp t, total playing duration Tlen, the position PosV of t moment frame of video in described multimedia file t, the position PosA of t moment audio frame in described multimedia file t;
Calculate the phase maximum file distance B of audio, video data interframe in the same time max:
D t = Pos V t - Pos A t D max = MAX { D 1 D 2 · · · D Tlen } ;
Work as D max> D ttime, the file type of described multimedia file is the non-file that interweaves.
3. the system as claimed in claim 1, is characterized in that, in the time that described multimedia file is 1080P high definition film source, it is 3~5 frame I frame signs that described video data is read buffering area, and it is 3 seconds reference audio Frame sizes that described voice data is read buffering area.
4. the system as claimed in claim 1, it is characterized in that, described frame of video first in first out buffer is the reference video data frame sign of 5~8 seconds, described audio frame first in first out buffer is the reference audio Frame size of 5~8 seconds, and the big or small ratio range of described audio frame first in first out buffer and frame of video first in first out buffer is 1:2~1:4.
5. the system as claimed in claim 1, is characterized in that, described data read switchover policy and are specially:
Step (a): reading the duration is T timevideo data give described separator, at during read, monitor the data redundancy situation of described audio frame first in first out buffer and described audio frame first in first out buffer, if the data volume in frame of video first in first out buffer is greater than threshold value Tv max, or data volume in audio frame first in first out buffer is less than threshold value Ta min, shift to an earlier date end step (a), execution step (b), otherwise execution step (b) after reading;
Step (b): reading the duration is T timevoice data give described separator, at during read, monitor the data redundancy situation of described audio frame first in first out buffer and described audio frame first in first out buffer, if the data volume of audio frame first in first out buffer is greater than threshold value Ta max, or data volume in frame of video first in first out buffer is less than threshold value Tv min, shift to an earlier date end step (b), execution step (a), otherwise execution step (a) after reading.
6. system as claimed in claim 5, is characterized in that, described T timespan be 3~5 seconds, Tv maxand Ta maxspan be 90%~95% of the total size of described frame of video first in first out buffer and audio frame first in first out buffer, threshold value Tv minwith Ta minspan is 5%~10% of described frame of video first in first out buffer and the total size of audio frame first in first out buffer.
7. a multimedia file playing processing method, is characterized in that, said method comprising the steps of:
The file type that detects multimedia file, described multimedia file type comprises interweave file and the non-file that interweaves;
When detecting that the file type of multimedia file is non-interweaving when file, read buffering area and pre-read, cushion the video data of described multimedia file by the video data building, read buffering area and pre-read, cushion the voice data of described multimedia file by the voice data building;
Described video data is read to the video data of buffering area and voice data to be read the voice data of buffering area and reads switchover policy according to default data and read;
Separate with voice data and obtain video data frame and audio data frame read video data that switchover policy reads according to described data;
Separate by separator described in the frame of video first in first out buffer buffer memory building the video data frame obtaining, separate by separator described in the audio frame first in first out buffer buffer memory building the audio data frame obtaining;
Video data frame to described frame of video first in first out buffer buffer memory carries out video decode, and the audio data frame of described audio frame first in first out buffer buffer memory is carried out to audio decoder;
According to the result display video of video decode, play sound according to the result of audio decoder.
8. method as claimed in claim 7, is characterized in that, the step of the file type of described detection multimedia file is specially:
According to the total bitrate of described multimedia file, threshold value D is set t;
Set up index according to described multimedia document information, described index comprises timestamp t, total playing duration Tlen, the position PosV of t moment frame of video in described multimedia file t, the position PosA of t moment audio frame in described multimedia file t;
Calculate the phase maximum file distance B of audio, video data interframe in the same time max:
D t = Pos V t - Pos A t D max = MAX { D 1 D 2 · · · D Tlen } ;
Work as D max> D ttime, the file type of described multimedia file is the non-file that interweaves.
9. method as claimed in claim 7, it is characterized in that, described frame of video first in first out buffer be the reference video data frame sign of 5~8 seconds, described audio frame first in first out buffer is the reference audio Frame size of 5~8 seconds, and the big or small ratio range of described audio frame first in first out buffer and frame of video first in first out buffer is 1:2~1:4.
10. method as claimed in claim 7, is characterized in that, described data read switchover policy and are specially:
Step (a): reading the duration is T timevideo data give described separator, at during read, monitor the data redundancy situation of described audio frame first in first out buffer and described audio frame first in first out buffer, if the data volume in frame of video first in first out buffer is greater than threshold value Tv max, or data volume in audio frame first in first out buffer is less than threshold value Ta min, shift to an earlier date end step (a), execution step (b), otherwise execution step (b) after reading;
Step (b): reading the duration is T timevoice data give described separator, at during read, monitor the data redundancy situation of described audio frame first in first out buffer and described audio frame first in first out buffer, if the data volume of audio frame first in first out buffer is greater than threshold value Ta max, or data volume in frame of video first in first out buffer is less than threshold value Tv min, shift to an earlier date end step (b), execution step (a), otherwise execution step (a) after reading;
Wherein, described T timespan be 3~5 seconds, Tv maxand Ta maxspan be 90%~95% of the total size of described frame of video first in first out buffer and audio frame first in first out buffer, threshold value Tv minwith Ta minspan is 5%~10% of described frame of video first in first out buffer and the total size of audio frame first in first out buffer.
CN201110424329.7A 2011-12-16 2011-12-16 System and method for playing and processing multimedia file Expired - Fee Related CN102547435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110424329.7A CN102547435B (en) 2011-12-16 2011-12-16 System and method for playing and processing multimedia file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110424329.7A CN102547435B (en) 2011-12-16 2011-12-16 System and method for playing and processing multimedia file

Publications (2)

Publication Number Publication Date
CN102547435A CN102547435A (en) 2012-07-04
CN102547435B true CN102547435B (en) 2014-06-25

Family

ID=46353184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110424329.7A Expired - Fee Related CN102547435B (en) 2011-12-16 2011-12-16 System and method for playing and processing multimedia file

Country Status (1)

Country Link
CN (1) CN102547435B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104113778B (en) * 2014-08-01 2018-04-03 广州猎豹网络科技有限公司 A kind of method for decoding video stream and device
CN105472464B (en) * 2015-12-08 2019-01-01 深圳Tcl数字技术有限公司 Television terminal and its data playing method
CN106231395B (en) * 2016-07-28 2020-03-17 腾讯科技(深圳)有限公司 Play control method, media player and computer readable storage medium
CN107801065A (en) * 2017-09-12 2018-03-13 捷开通讯(深圳)有限公司 Multimedia file sharing method, equipment and system based on WiFi Display
CN109600563B (en) * 2018-08-01 2020-05-15 北京微播视界科技有限公司 Method and apparatus for determining a timestamp
CN110784756B (en) * 2019-12-31 2020-05-29 珠海亿智电子科技有限公司 File reading method and device, computing equipment and storage medium
CN111246284B (en) * 2020-03-09 2021-05-25 深圳创维-Rgb电子有限公司 Video stream playing method, system, terminal and storage medium
CN114008570B (en) * 2020-05-28 2024-01-30 京东方科技集团股份有限公司 Touch display device, touch response method and system thereof, and storage medium
CN111669645B (en) * 2020-06-12 2021-09-07 腾讯科技(深圳)有限公司 Video playing method and device, electronic equipment and storage medium
CN114390335B (en) * 2020-10-22 2022-11-18 华为终端有限公司 Method for playing audio and video online, electronic equipment and storage medium
CN112468841B (en) * 2020-11-26 2023-04-07 Oppo广东移动通信有限公司 Audio transmission method and device, intelligent equipment and computer readable storage medium
CN113225309B (en) * 2021-03-19 2023-05-19 深圳市迅雷网络技术有限公司 Method, device, server and storage medium for online playing of multimedia file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1705026A (en) * 2004-06-03 2005-12-07 松下电器产业株式会社 Information playback method
CN1972193A (en) * 2005-11-22 2007-05-30 三星电子株式会社 Compatible-progressive download method and the system thereof
CN101212679A (en) * 2006-12-30 2008-07-02 凌阳科技股份有限公司 AV synchronization method and device for switching multi-channel audio streams during playing of AVI files
CN101473378A (en) * 2006-06-16 2009-07-01 天龙马兰士集团有限公司 Reproduction device, reproduction method, program, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1705026A (en) * 2004-06-03 2005-12-07 松下电器产业株式会社 Information playback method
CN1972193A (en) * 2005-11-22 2007-05-30 三星电子株式会社 Compatible-progressive download method and the system thereof
CN101473378A (en) * 2006-06-16 2009-07-01 天龙马兰士集团有限公司 Reproduction device, reproduction method, program, and storage medium
CN101212679A (en) * 2006-12-30 2008-07-02 凌阳科技股份有限公司 AV synchronization method and device for switching multi-channel audio streams during playing of AVI files

Also Published As

Publication number Publication date
CN102547435A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
CN102547435B (en) System and method for playing and processing multimedia file
TWI395481B (en) Method and apparatus for receiving, storing, and presenting multimedia programming without indexing prior to storage
US6078725A (en) Apparatus for a synchronized playback of audio-video signals
EP1775895A2 (en) Apparatus and method for receiving multiple streams in a mobile broadcast system
US20020122656A1 (en) Method and apparatus for recording broadcast data
CN103475927B (en) Online-video real-time speed change play method and system thereof
CN103125123A (en) Playback device, playback method, integrated circuit, broadcasting system, and broadcasting method
JP2001346205A (en) Method for concealing signal error
TW200836510A (en) Method and system for switching elementary streams on a decoder with zero delay
JP3828053B2 (en) Multimedia data restoring apparatus and method capable of changing capacity of buffer for storing received multimedia data
KR101142379B1 (en) Method and Apparatus of playing digital broadcasting and Method of recording digital broadcasting
US20090046994A1 (en) Digital television broadcast recording and reproduction apparatus and reproduction method thereof
CN102522096A (en) Synchronous replay system for multi-channel audio and video and method thereof
US8254764B2 (en) Recording apparatus, image reproducing apparatus, and special reproduction method therefor
CN102655571A (en) Digital television stream media middleware multi-subtitle display assembly based on embedded platform
US8213778B2 (en) Recording device, reproducing device, recording medium, recording method, and LSI
CN1826806A (en) Exploitation of discontinuity indicator for trick mode operation
JP2007124639A (en) Method and system for storing data packets
WO2007055445A1 (en) A pre-viewing method of multiple movies or movie-clips in multimedia apparatus
JP4763589B2 (en) Playback device and playback method thereof
CN103024362B (en) A kind of dynamic frame per second decoding vision-control method of high-definition image
JP2008299972A (en) Audio video information recording device and recording control method
US20060257108A1 (en) Multimedia reproduction apparatus
JP2004007118A (en) Television signal reproducing apparatus and reproducing method
CN101018300A (en) Method for time shift and television receiver

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140625