CN101150729A - Audio and video synchronization playing method - Google Patents

Audio and video synchronization playing method Download PDF

Info

Publication number
CN101150729A
CN101150729A CNA200610062804XA CN200610062804A CN101150729A CN 101150729 A CN101150729 A CN 101150729A CN A200610062804X A CNA200610062804X A CN A200610062804XA CN 200610062804 A CN200610062804 A CN 200610062804A CN 101150729 A CN101150729 A CN 101150729A
Authority
CN
China
Prior art keywords
video
frame
audio
playing method
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA200610062804XA
Other languages
Chinese (zh)
Inventor
张雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Konka Group Co Ltd
Original Assignee
Konka Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Konka Group Co Ltd filed Critical Konka Group Co Ltd
Priority to CNA200610062804XA priority Critical patent/CN101150729A/en
Publication of CN101150729A publication Critical patent/CN101150729A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The invention relates to a method for palying audio and video synchronously, comprising following steps: analyzing index of audio and video frames of play files; executing paly according to the analyzed index; correcting paly according to error of audio and video frames. The method for palying audio and video synchronously can utilize cross characteristic of audio and video frames in the play files to execute dynamic cross correct, obatins the play effect of audio and video synchronization.

Description

Audio and video synchronization playing method
[technical field]
The present invention relates to a kind of audio frequency and video player method, particularly relate to a kind of effect audio and video synchronization playing method preferably.
[background technology]
Along with development of computer, (Audio Video Interleaved, AVI) file of form also extensively is employed Audio Video Interleaved.So-called " Audio Video Interleaved " can carry out synchronous playing with video and audio frequency weave in exactly.The advantage of this video format is that picture quality is good; can stride a plurality of platforms uses; its shortcoming is that volume is too huge; and bad more be the compression standard disunity; general phenomenon be exactly highest version windows media player plays not adopt early stage coding editor's AVI format video; and lowest version windows media player is not play the AVI format video that adopts up-to-date coding editor; so our regular meeting when carrying out the video playback of some AVI forms occurs having only sound not have some indescribable problems such as image owing to the video that the video coding problem causes can not be play or allow to play but exist in the time of can not regulating playing progress rate and broadcast.
Include audio stream and video flowing in the file of AVI form, in playing process owing to reasons such as system resource deficiency, task scheduling are easy to occur video and the nonsynchronous situation of audio frequency.Application program usually can be with the separately decoding separately of video flowing and audio stream, each Media Stream in the process of playing all voluntarily with system correction play.In this case, program needs accurate clock, and the complexity height of algorithm, needs to consume a large amount of cpu resources.In case the operating rate of CPU is not enough, image and the nonsynchronous phenomenon of audio frequency might appear during playback AVI.
[summary of the invention]
The present invention the invention provides a kind of effect audio and video synchronization playing method preferably in order to overcome above-mentioned the deficiencies in the prior art.
The technical solution adopted for the present invention to solve the technical problems is: a kind of audio and video synchronization playing method is provided, and it may further comprise the steps: audio frame and frame of video to played file are carried out the index parsing; Index according to this parsing is play; Error according to this audio frame and frame of video is revised broadcast.
The scheme that the present invention solves further technical problem is: in this index analyzing step, increase an independent territory in each frame of video index information, use the adjacent audio frame information of this independent field mark; Simultaneously in each audio frame information, also increase an independent territory, be used for the adjacent frame of video information of mark.
The scheme that the present invention solves further technical problem is: the error of the video marker frame of the leading current audio frame correspondence of current video frame is during greater than a pre-set threshold value, the frame rate of the presentation of video frames that then slows down within a certain period of time.
The scheme that the present invention solves further technical problem is: the error of video marker frame that current video frame falls behind current audio frame correspondence is during greater than a pre-set threshold value, frame of video is carried out frame-skipping to be handled, make frame of video skip some frames, play-over the video requency frame data of back.
The scheme that the present invention solves further technical problem is: when the error of the video marker frame of the leading or backward current audio frame correspondence of current video frame is less than or equal to a pre-set threshold value, then continue to play.
The scheme that the present invention solves further technical problem is: can't carry out index when resolving to the audio frame of played file and frame of video, directly finish broadcast.
The scheme that the present invention solves further technical problem is: comprise further one judges whether a certain frame of video is the step of end frame, then finish to play when a certain frame of video is end frame.
Compared to prior art, the invention has the beneficial effects as follows: in playing process, the cross characteristic that audio and video synchronization playing method of the present invention can utilize audio frame in the played file and frame of video intersects correction dynamically to Media Stream, it is synchronous to make that result of broadcast reaches audio ﹠ video, the efficient height of program, under the low situation of system configuration, also can reach result of broadcast preferably.
[description of drawings]
Fig. 1 is the file playing flow figure of audio and video synchronization playing method of the present invention.
Fig. 2 is the corresponding relation schematic diagram of the video index indicative audio index of audio and video synchronization playing method of the present invention.
Fig. 3 is the corresponding relation schematic diagram of the audio index instruction video index of audio and video synchronization playing method of the present invention.
Fig. 4 is the schematic diagram that the video playback of audio and video synchronization playing method of the present invention lags behind the audio frequency indication.
Fig. 5 is the correction schematic diagram of audio and video synchronization playing method of the present invention.
[embodiment]
Below in conjunction with drawings and Examples audio and video synchronization playing method of the present invention is described further.
Audio and video synchronization playing method of the present invention may further comprise the steps:
(1) audio frame and the frame of video of played file are carried out the index parsing
Please, before playing video file, this video file is resolved in the lump with reference to figure 1, Fig. 2 and Fig. 3, the index file of extraction, and generate " broadcast index ", in " broadcast index " video and audio file are generated an array of indexes respectively.When extracting index file, according to the context of index file, when generating each frame of video, come mark with adjacent next audio frame, when generating each audio frame, come mark with adjacent next frame of video.
The wall scroll video index that generates is:
The audio frame mark Key frame marker Video data address Frame of video length
The wall scroll audio index that generates is:
The frame of video mark The audio frame initial address Audio frame length The audio stream total length
In this index analyzing step, in each frame of video index information, increase an independent territory, use the adjacent audio frame information of this independent field mark; Simultaneously in each audio frame information, also increase an independent territory, be used for the adjacent frame of video information of mark.
Resolve successfully then carry out next and play step if the audio frame of played file and frame of video are carried out index, resolve unsuccessful then directly finish and play if the audio frame of played file and frame of video are carried out index.
(2) play according to the index of this parsing
See also Fig. 4, wherein Current_Video writes down the frame of video address of current broadcast, and Current_audio writes down the audio frame address of current broadcast, and Current_indecate_video is the video marker frame address of audio frame correspondence; Upgrade Current_Video during the decoded video frame data immediately, upgrade Current_audio during the decoded audio frame data immediately.
Carry out index when the audio frame of played file and frame of video and resolve successfully and carry out when playing step, judge at first whether present Current_Video is the ending frame,, then directly finish if present Current_Video is the ending frame; If present Current_Video is not the ending frame, then carries out and play.
(3) according to the error of this audio frame and frame of video broadcast is revised
See also Fig. 4 and Fig. 5, in playing process, judge whether broadcast is revised according to error between audio frame and the frame of video.A default threshold values, definite concrete condition by application program of this threshold values is provided with voluntarily.When if the error of the video marker frame of the leading or backward current audio frame correspondence of current video frame is less than or equal to this pre-set threshold value, then continue to play.If the difference of current video frame and audio frequency indication current video frame greater than this threshold values the time, is then revised broadcast.
Makeover process is a benchmark with the broadcast of audio frequency, dynamically revises video playback.First when playing every frame video data, the video index Current_indecate_video that the current audio frame of dynamic chek is indicated.Here we suppose that the threshold values of setting is 1, when error is carried out the frame-skipping operation during greater than 1 frame.
When playing every frame video data, judge the difference of Current_Video and Current_indecate_video simultaneously, when Current_indecate_video-Current_Video>threshold values, be that the error of the current video frame video marker frame that falls behind current audio frame correspondence is during greater than a pre-set threshold value, frame of video is carried out frame-skipping to be handled, make frame of video skip some frames, play-over the video requency frame data of back, make broadcast thereafter can reach audio frame and video frame synchronization.
When Current_Video-Current_indecate_video>threshold values, be that the error of video marker frame of the leading current audio frame correspondence of current video frame is during greater than a pre-set threshold value, the frame rate of the presentation of video frames that then slows down within a certain period of time, reduce the speed of video playback, make it after playing these frames, audio frequency and video can be got up again synchronously.
Method audio and video synchronization playing method of the present invention can judge the error between the audio frequency and video, and the broadcast of audio frequency and video is revised, and it is synchronous to make that result of broadcast reaches audio ﹠ video, the efficient height of program.

Claims (8)

1. audio and video synchronization playing method, it may further comprise the steps: the audio frame of played file and frame of video are carried out index resolve; Index according to this parsing is play; Error according to this audio frame and frame of video is revised broadcast.
2. audio and video synchronization playing method according to claim 1 is characterized in that: in this index analyzing step, increase an independent territory in each frame of video index information, use the adjacent audio frame information of this independent field mark; Simultaneously in each audio frame information, also increase an independent territory, be used for the adjacent frame of video information of mark.
3. audio and video synchronization playing method according to claim 2 is characterized in that: the error of the video marker frame of the leading current audio frame correspondence of current video frame is during greater than a pre-set threshold value, the frame rate of the presentation of video frames that then slows down within a certain period of time.
4. audio and video synchronization playing method according to claim 2, it is characterized in that: the error of video marker frame that current video frame falls behind current audio frame correspondence is during greater than a pre-set threshold value, frame of video is carried out frame-skipping to be handled, make frame of video skip some frames, play-over the video requency frame data of back.
5. audio and video synchronization playing method according to claim 2 is characterized in that: when the error of the video marker frame of the leading or backward current audio frame correspondence of current video frame is less than or equal to a pre-set threshold value, then continue to play.
6. audio and video synchronization playing method according to claim 1 is characterized in that: can't carry out index when resolving to the audio frame of played file and frame of video, directly finish broadcast.
7. audio and video synchronization playing method according to claim 1 is characterized in that: comprise that further one judges whether a certain frame of video is the step of end frame.
8. audio and video synchronization playing method according to claim 7 is characterized in that: then finish to play when a certain frame of video is end frame.
CNA200610062804XA 2006-09-22 2006-09-22 Audio and video synchronization playing method Pending CN101150729A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA200610062804XA CN101150729A (en) 2006-09-22 2006-09-22 Audio and video synchronization playing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA200610062804XA CN101150729A (en) 2006-09-22 2006-09-22 Audio and video synchronization playing method

Publications (1)

Publication Number Publication Date
CN101150729A true CN101150729A (en) 2008-03-26

Family

ID=39251024

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA200610062804XA Pending CN101150729A (en) 2006-09-22 2006-09-22 Audio and video synchronization playing method

Country Status (1)

Country Link
CN (1) CN101150729A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404573A (en) * 2011-11-28 2012-04-04 深圳市万兴软件有限公司 Method and device for synchronously processing audio and video
CN101656099B (en) * 2008-08-18 2012-06-27 安凯(广州)微电子技术有限公司 Audio and video production and play method used for MP3 player
CN102685507A (en) * 2011-07-12 2012-09-19 天脉聚源(北京)传媒科技有限公司 Audio and video synchronization method and system for decoding moving picture experts group-2 (MPEG-2) transport streams
CN104883626A (en) * 2015-05-22 2015-09-02 深圳市九洲电器有限公司 Method and system for streaming media management
CN106686445A (en) * 2015-11-05 2017-05-17 北京中广上洋科技股份有限公司 Method of carrying out on-demand jump on multimedia file
WO2018045682A1 (en) * 2016-09-07 2018-03-15 深圳Tcl数字技术有限公司 Method and device for testing audio and picture synchronization
CN108962293A (en) * 2018-07-10 2018-12-07 武汉轻工大学 Video recording modification method, system, terminal device and storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656099B (en) * 2008-08-18 2012-06-27 安凯(广州)微电子技术有限公司 Audio and video production and play method used for MP3 player
CN102685507A (en) * 2011-07-12 2012-09-19 天脉聚源(北京)传媒科技有限公司 Audio and video synchronization method and system for decoding moving picture experts group-2 (MPEG-2) transport streams
CN102685507B (en) * 2011-07-12 2014-07-09 天脉聚源(北京)传媒科技有限公司 Audio and video synchronization method and system for decoding moving picture experts group-2 (MPEG-2) transport streams
CN102404573A (en) * 2011-11-28 2012-04-04 深圳市万兴软件有限公司 Method and device for synchronously processing audio and video
CN104883626A (en) * 2015-05-22 2015-09-02 深圳市九洲电器有限公司 Method and system for streaming media management
CN106686445A (en) * 2015-11-05 2017-05-17 北京中广上洋科技股份有限公司 Method of carrying out on-demand jump on multimedia file
CN106686445B (en) * 2015-11-05 2019-06-11 北京中广上洋科技股份有限公司 The method that multimedia file is jumped on demand
WO2018045682A1 (en) * 2016-09-07 2018-03-15 深圳Tcl数字技术有限公司 Method and device for testing audio and picture synchronization
CN108962293A (en) * 2018-07-10 2018-12-07 武汉轻工大学 Video recording modification method, system, terminal device and storage medium
CN108962293B (en) * 2018-07-10 2021-11-05 武汉轻工大学 Video correction method, system, terminal device and storage medium

Similar Documents

Publication Publication Date Title
CN101150729A (en) Audio and video synchronization playing method
CN100377589C (en) A method for quick generation of video file
CN101951517B (en) Method, system and terminal equipment for decoding and playing video
CN101447207B (en) Media recording method and device thereof
CN104780422A (en) Streaming media playing method and streaming media player
US20080033978A1 (en) Program, data processing method, and system of same
CN103517131A (en) Method for playing segmental videos in gapless mode in television set and television set
CN106653036A (en) Audio mixing and transcoding method based on OTT box
CN102075803B (en) Method for synchronously playing video and audio
CN103581741B (en) Special effect play equipment and method
CN103051899B (en) A kind of method of video decode and device
CN104023260A (en) Hardware decoding implementation method and device, and player
KR101246916B1 (en) Method and apparatus for compensating of audio/video synchronization
US7343088B2 (en) Disc apparatus, disc recording method, disc playback method, recording medium, and program
CN103269450A (en) Multimedia system for Android smart television set
US20090052869A1 (en) Multiplexing method preventing overflow of audio decoder buffer
CN102957966B (en) A kind of method of player and the frame of video embedded time for player
US7664373B2 (en) Program, data processing method, and system of same
CN101030381B (en) Method and apparatus for extracting MP3 file sampling rate
CN105847990A (en) Media file playing method and apparatus
CN100589541C (en) A hardware resource self-adapted AVI file playing method
US7324858B2 (en) Replay apparatus, replay method, recording medium, and computer program
CN108833349B (en) Method for realizing opportunistic source file frame preview and frame cache
CN102047662A (en) Encoder
CN102497554A (en) Dividing method of chapters accurate to frames

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20080326