CN101071602B - Method and device for determining video frame playing duration - Google Patents

Method and device for determining video frame playing duration Download PDF

Info

Publication number
CN101071602B
CN101071602B CN2006100803068A CN200610080306A CN101071602B CN 101071602 B CN101071602 B CN 101071602B CN 2006100803068 A CN2006100803068 A CN 2006100803068A CN 200610080306 A CN200610080306 A CN 200610080306A CN 101071602 B CN101071602 B CN 101071602B
Authority
CN
China
Prior art keywords
video
frame
audio
incident
playing duration
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
CN2006100803068A
Other languages
Chinese (zh)
Other versions
CN101071602A (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.)
Quanta Computer Inc
Original Assignee
Quanta Computer Inc
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 Quanta Computer Inc filed Critical Quanta Computer Inc
Priority to CN2006100803068A priority Critical patent/CN101071602B/en
Publication of CN101071602A publication Critical patent/CN101071602A/en
Application granted granted Critical
Publication of CN101071602B publication Critical patent/CN101071602B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention provides a method and device for determining a play lasting period of time, where an audio-video recording system is used to record an audio bit stream and a video bit stream, where the audio bit stream comprises multiple audio frames and the video bit stream comprises N video frames. And the invention determines the play lasting periods of time for the first and last video frames according to the time the system costs to record these audio frames and video frames; when the (i+1)th to (i+NL) video frames are lost, the invention determines the play lasting time of the ith video frame; when the system receives an synchronous correction instruction for the ith video frame, the invention determines the play lasting time for the ith video frame according to a correction value.

Description

Method and the device of decision presentation of video frames duration
Technical field
The present invention is about a kind of method and device that determines a playing duration time (Displaying duration).And especially, the method according to this invention and device are applied in the audio-video recording system (Video/audio recording system), and determine a frame of video with the playing duration time that is played according to various recorded event (Recordingevent).
Background technology
Generally speaking, a multimedia file comprises a video bit stream (Video bit stream) and an audio bit stream (Audio bit stream).This video bit stream comprises a plurality of frame of video (Video frame), and this audio bit stream then comprises a plurality of audio frames (Audio frame).When recording this multimedia file, an audio-video recording system must write down the reproduction time and the order of each audio frame in the reproduction time of each frame of video in this video bit stream and order and this audio bit stream in this multimedia file.When this multimedia file was required to play, an audio-video player (Video/Audio player) these a plurality of reproduction times of basis and order were play frame of video and the audio frame in this multimedia file in regular turn.
Adopt the audio-video recording system of MPEG-4 specification will this a plurality of frame of video and the reproduction time order of these a plurality of audio frames be recorded in the frame table (Frame table) (can with reference to international standard ISO/IEC 14496-1).Each video bit stream or audio bit stream all have other frame table.One frame table comprises at least one project (Item), and each project has two fields (Field) again separately.Record one frame number (Frame number) in first field, second field writes down a frame time (Frame duration).This frame time is represented the playing duration time of a frame of video or an audio frame.This frame number represents to have the number of the successive frame of same number of frames time.Hence one can see that, adopts the audio-video recording system of MPEG-4 specification to write down the relative time of each interframe but not absolute time.
Fig. 1 (A) one meets an embodiment of the multimedia file of MPEG-4 specification.This document comprises a multimedia head 101 and a multi-medium data 102.This multimedia head 101 comprises a frame of video table (Video frame table) 103.This multi-medium data 102 comprises a video bit stream 104 and an audio bit stream 124.This video bit stream comprises frame of video 105 to frame of video 110.
Fig. 1 (B) is an embodiment of frame of video table 103.In frame of video table 103, a project is shown in a tabulation, and each project comprises two fields: number of video frames (Video frame number) 111 and video frame time (Video frame duration) 112.Shown in Fig. 1 (B), first project 113 comprises two fields (2,33), is illustrated in the video bit stream 104 corresponding to this frame of video table 103, and the playing duration time of frame of video 105 and frame of video 106 is all 33 unit interval (Time unit).Second project 114 comprises two fields (1,34), and the playing duration time of representing ensuing frame of video 107 was 34 unit interval.The 3rd project 115 comprises two fields (2,33), is illustrated in the frame of video 108 after the frame of video 107 and the playing duration time of frame of video 109 and is all for 33 unit interval.
Fig. 1 (C) is corresponding to the frame of video table among Fig. 1 (B), and represents the relativeness of the playing duration time of these a plurality of frame of video.In addition, by the number of video frames and the video frame time of all frame of video of accumulative total, can calculate total playing duration time of these a plurality of frame of video.
Record in an audio-video recording system in the middle of the process of a multimedia file, several recorded event may take place, and comprise: beginning (Start), continue (Resume), stop (Stop), suspend (Pause), frame of video is lost (Frame Loss) and audio-video synchronous correction (Video/Audio synchronizationcorrection).These a plurality of recorded event all might cause when this multimedia file is required to play, and an asynchronous error (Asynchronous error) takes place between a video bit stream in this multimedia file and an audio bit stream.
Fig. 2 one causes the embodiment of asynchronous error before and after a recorded event of suspending and a recorded event that continues according to the video record device of prior art.In this MPEG-4 multimedia file of recording according to the audio-video recording system of prior art, video frame time and audio frame time are all definite value.This audio-video recording system is every a time D ARecord an audio frame, every a time D VRecord a frame of video.
Fig. 2 (A) take place one suspend recorded event the time audio frame and frame of video and time relation figure.One recorded event of suspending occurs in time T P, last audio frame of this audio bit stream 210 is an audio frame 211, and total recording time of this audio bit stream 210 is 5D AWhen the recorded event of suspending took place, last frame of video of this video bit stream 212 was a frame of video 213, and total recording time of this video bit stream 212 is 3D VTotal recording time of it should be noted that this audio bit stream 210 (is 5D A) and the total recording time that is not equal to this video bit stream 212 (be 3D V).
Audio frame and frame of video and time relation figure after the recorded event that Fig. 2 (B) generation one continues.After the recorded event of this continuation took place, first audio frame 214 was 5D with the time that is played A, and first frame of video 215 is 3D with the time that is played VThis causes an asynchronous error of 210 of this video bit stream 212 and this audio bit streams, that is the multimedia file that this audio-video recording system is recorded has (3D when phonotape and videotape is play V-5D A) mistiming (dT).
Therefore, a fundamental purpose of the present invention is to provide a kind of method and device that determines a playing duration time.And especially, use method of the present invention and device to determine the playing duration time of frame of video in the multimedia file, can eliminate the asynchronous error between a video bit stream and an audio bit stream, the audio-video nonsynchronous problem during with the solution play multimedia files.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of method and device that determines a playing duration time.One audio-video recording system according to a recorded event (Recording Event) in order to record about an audio bit stream and a video bit stream of a multimedia object (Multimedia object).This audio bit stream comprises a plurality of audio frames.This video bit stream comprises N frame of video.N is one greater than 1 positive integer.The time that method of the present invention and device are recorded these a plurality of audio frames and this a plurality of frame of video according to this recorded event, this system, determine playing duration time to incident frame of video that should recorded event.When (i+1) individual to (i+N L) individual frame of video lost, method of the present invention and device are according to N LDetermine this playing duration time of this i frame of video.Receive that when this system one carries out the instruction of synchronous correction at this i frame of video, method of the present invention and device determine this playing duration time of this i frame of video according to a corrected value.I one scope 1 to the integer index between (N-1).N LOne positive integer less than N.
According to a preferred embodiment of the present invention, when audio-video recording system under the situation of beginning/continuation recorded event, determine this to begin/method of the playing duration time that the incident frame of video of continuation will be played.This method at first begins/continues to record (T constantly according to an audio frequency of the corresponding incident audio frame of beginning/continuation recorded event record A0) and a video of this incident frame of video begin/continue to record (T constantly V0), calculate a gap (E).Then preset video frame time (D at interval according to one of this gap (E) and this video bit stream V), determine this playing duration time (D that this first frame of video will be played RE), and will begin/continue the incident project (1, D RE) insert the frame of video table of multimedia file.
According to a preferred embodiment of the present invention, when audio-video recording system under the situation of stop/pause recorded event, determine the method for the playing duration time that this stop/pause incident frame of video will be played.This method is at first recorded (T constantly according to an audio frequency stop/pause of the corresponding incident audio frame of stop/pause recorded event record AE) and a video stop/pause of this incident frame of video record (T constantly VE), calculate a gap (E).Then preset the audio frame time interval (D according to one of this gap (E) and this audio bit stream A), determine this playing duration time (D that this last frame of video will be played RE), and with stop/pause recorded event project (N v-1, D V) with (1, D RE) insert the frame of video table of multimedia file in regular turn.
According to a preferred embodiment of the present invention, (i+1) individual frame of video to the (i+N in this video bit stream L) when individual frame of video is lost, determine the method for the playing duration time that i frame of video in this video bit stream will be played.This method is according to a default video frame time interval (D of this video bit stream V) and this frame of video loss accumulative total number N L, determine this playing duration time (D that this i frame of video will be played RE), and frame of video lost project (N v-2, D V), (1, D RE) with (1, D V) insert the frame of video table of multimedia file in regular turn.
According to a preferred embodiment of the present invention, receive one when carrying out the instruction of synchronous correction when this system at this i frame of video, determine the method for the playing duration time that i frame of video in this video bit stream will be played.This method is according to a default video frame time interval (D of this video bit stream V) and a frame of video corrected value (dT) at this i frame of video, determine this playing duration time (D that this i frame of video will be played RE), and with synchronous correction incident project (N v-1, D V) with (1, D RE) insert the frame of video table of multimedia file in regular turn.
According to a preferred embodiment of the present invention, determine the device of the playing duration time that the incident frame of video in this video bit stream will be played.This device comprises a processing module (Processingmodule).When recorded event was beginning/continuation incident, this processing module record began/continues to record (T constantly corresponding to an audio frequency of an incident audio frame of beginning/continuation incident A0), a video of this incident frame of video begins/continues to record (T constantly V0).Processing module is according to a default video frame time interval (D of this video bit stream V), determine this playing duration time (D that this incident frame of video will be played RE).
According to a preferred embodiment of the present invention, determine the device of the playing duration time that the incident frame of video in this video bit stream will be played.This device comprises a processing module.When recorded event was the stop/pause incident, this processing module record-keeping system was recorded (T constantly corresponding to an audio frequency stop/pause of an incident audio frame of stop/pause incident AE), a video stop/pause of this incident frame of video records (T constantly VE).Processing module is according to a default audio frame time interval (D of this audio bit stream A), determine this playing duration time (D that this incident frame of video will be played RE).
According to a preferred embodiment of the present invention, (i+1) individual frame of video to the (i+N in this video bit stream L) when individual frame of video is lost, determine the device of the playing duration time that i the frame of video (incident frame of video) in this video bit stream will be played.Processing module is according to a default video frame time interval (D of this video bit stream V) and this frame of video loss accumulative total number N L, determine this playing duration time (D that this i frame of video (incident frame of video) will be played RE).
According to a preferred embodiment of the present invention, when this system receives that one when carrying out the instruction of synchronous correction, determines the device of the playing duration time that i the frame of video (incident frame of video) in this video bit stream will be played at this i frame of video (incident frame of video).Processing module is according to a default video frame time interval (D of this video bit stream V) and a frame of video corrected value (dT) at this i frame of video, determine this playing duration time (D that this i frame of video (incident frame of video) will be played RE).
Of the present invention in order to determine the method for a playing duration time, be applied to write down an audio-video recording system of a multimedia file, this multimedia file has an audio frame table, a frame of video table, an audio bit stream and a video bit stream, and this audio bit stream comprises a plurality of audio frames, this video bit stream comprises a plurality of frame of video, and this method comprises the following step: record an incident frame of video; Judge the pairing recorded event of this incident frame of video; Calculate pairing this playing duration time of this incident frame of video (D according to this recorded event RE); And with this playing duration time (D RE) insert this frame of video table of this multimedia file, wherein, calculate this playing duration time (D when recorded event during for beginning/continuation incident RE) step also comprise: begin/continue to record (T constantly according to a audio frequency corresponding to an incident audio frame of this incident frame of video A0), a video of this incident frame of video begins/continues to record (T constantly V0) and a default video frame time interval (D V), determine this playing duration time (D RE), and this playing duration time (D RE) calculate according to following equation: D RE=D V+ T V0-T A0
Of the present invention in order to determine the device of a playing duration time, be applied to write down an audio-video recording system of a multimedia file, this multimedia file has an audio frame table, a frame of video table, an audio bit stream and a video bit stream, and this audio bit stream comprises a plurality of audio frames, this video bit stream comprises a plurality of frame of video, this device comprises following parts: parts are used to record an incident frame of video; Parts are used to judge the pairing recorded event of this incident frame of video; Parts are used for calculating pairing this playing duration time of this incident frame of video (D according to this recorded event RE); And parts, be used for this playing duration time (D RE) insert this frame of video table of this multimedia file, wherein, calculate this playing duration time (D when recorded event during for beginning/continuation incident RE) parts also comprise: parts are used for beginning/continue to record (T constantly according to the audio frequency corresponding to an incident audio frame of this incident frame of video A0), a video of this incident frame of video begins/continues to record (T constantly V0) and a default video frame time interval (D V), determine this playing duration time (D RE), and this playing duration time (D RE) calculate according to following equation: D RE=D V+ T V0-T A0
Can be further understood by the following detailed description and accompanying drawings about the advantages and spirit of the present invention.
Description of drawings
Fig. 1 (A) one meets an embodiment of the multimedia file of MPEG-4 specification.
The example of Fig. 1 (B) frame of video table.
Fig. 1 (C) is corresponding to the frame of video table among Fig. 1 (B), and represents the relativeness of the playing duration time of these a plurality of frame of video.
Fig. 2 (A) take place one suspend recorded event the time audio frame and frame of video and time relation figure.
Audio frame and frame of video and time relation figure after the recorded event that Fig. 2 (B) generation one continues.
Fig. 3 (A) is according to the process flow diagram of the method for first preferred embodiment of the present invention.
Fig. 3 (B) when a system begins to record or continue to record a multimedia file, the graph of a relation of an audio bit stream and a video bit stream and recording time.
Fig. 4 (A) is according to the process flow diagram of the method for second preferred embodiment of the present invention.
Fig. 4 (B) is when a system stops to record or suspends when recording a multimedia file, the graph of a relation of an audio bit stream and a video bit stream and recording time.
Fig. 5 one comprises the process flow diagram of the method for first preferred embodiment to the, four preferred embodiment simultaneously.
Fig. 6 represents the calcspar according to the audio-video recording system of a preferred embodiment of the present invention.
The main element symbol description
101: multimedia head 102: multi-medium data
103: frame of video table 104: video bit stream
101-110: frame of video 111: number of video frames
112: 113: the first projects of video frame time
115: the three projects of 114: the second projects
124: audio bit stream
210: audio bit stream 211: audio frame
212: video bit stream 213: frame of video
214: audio frame 215: frame of video
S311-S312: process step
321: audio bit stream 322: video bit stream
323: incident audio frame 324: the incident frame of video
S411-S412: process step
421: audio bit stream 422: video bit stream
423: incident audio frame 424: the incident frame of video
S501-S508: process step S511-S513: process step
S521-S524: process step S531-S532: process step
S541-S542: process step P1-P4: program
600: audio-video recording system 601: processing module
602: memory module 603: the audio frequency load module
604: audio input interface 605: video input module
606: video input interface 607: audio coder
608: video encoder 609: memory interface
610: memory module 611: bus
Embodiment
Fundamental purpose of the present invention is to provide a kind of method and device that determines a playing duration time.The present invention is applied to write down the audio-video recording system of a multimedia object (Multimedia object), and this multimedia object is a multimedia file for example, has an audio frame table, a frame of video table, an audio bit stream and a video bit stream.This audio bit stream comprises a plurality of audio frames.This video bit stream comprises a plurality of frame of video, and for example: this video bit stream has N frame of video, and N is one greater than 1 positive integer.Method of the present invention and device are recorded these a plurality of audio frames and the time of these a plurality of frame of video and a recorded event that is taken place according to this system, the playing duration time of the incident frame of video of correspondence when the decision recorded event takes place, and with the newly-increased frame of video table of inserting multimedia file of the playing duration time of incident frame of video, wherein the playing duration time of incident frame of video can be deposited at earlier in the storer, waits to record the frame of video table of inserting multimedia file after finishing again.This recorded event comprises following form: beginning/continuation incident, stop/pause incident, frame of video are lost incident and synchronous correction incident.When (i+1) individual to (i+N L) individual frame of video lost, method of the present invention and device are according to N LDetermine this playing duration time of this i frame of video.Receive that when this system one carries out the instruction of synchronous correction at this i frame of video, method of the present invention and device determine this playing duration time of this i frame of video according to a corrected value.I one scope 1 to the integer index between (N-1).N LOne positive integer less than N.
First preferred embodiment
See also Fig. 3 (A), the process flow diagram of the method for the present invention's first preferred embodiment is disclosed among the figure.When audio-video recording system is under the situation of beginning/continuation incident in recorded event, when recording an incident frame of video, this method begins/continues the playing duration time of incident frame of video when playing in order to determine this, and it is inserted in the frame of video table of multimedia file.At first when step S311, this system is according to the beginning that is taken place/continuation recorded event for this method, and an audio frequency that writes down the incident audio frame of corresponding recorded event begins/continue to record (T constantly A0) and a video of incident frame of video begin/continue to record (T constantly V0), and calculating gap (E) between the two.Then at the default video frame time interval (D of step S312 according to this gap (E) and this video bit stream V), determine this playing duration time (D that this incident frame of video will be played RE), and with this playing duration time (D RE) insert the frame of video table of multimedia file.Wherein, this default video frame time interval (D V) can be set at a video sampling frequency (F S) inverse, also be certain value.
In a practical application, this gap (E) is calculated with following equation:
E=T A0-T V0
In a practical application, this playing duration time (D RE) determine with following equation:
D RE=D V-E, that is
D RE=D V+T V0-T A0
In a practical application, one adopts the flow process of audio-video recording system execution shown in Fig. 3 (A) of MPEG-4 specification, according to the beginning/continuation recorded event and this playing duration time (D that are taken place RE), in the frame of video table of the multimedia file relevant with this incident frame of video, increase at the beginning/continuation recorded event project (1, D RE), promptly the number of this incident frame of video is 1, and this incident video frame time is D RE
See also Fig. 3 (B).In a practical application, one adopts the audio-video recording system of MPEG-4 specification that one audio bit stream 321 and a video bit stream 322 are recorded in the multimedia file.When this system under the situation of beginning/continuation recorded event, begin to record or when continuing to record this multimedia file, this audio bit stream 321 and this video bit stream 322 are disclosed among Fig. 3 (B) with the relation of recording time.Be numbered A 0Audio frame 323 these audio bit streams 321 in beginning/continuation recorded event audio frame.Be numbered V 0Frame of video 324 these video bit streams 322 in beginning/continuation recorded event frame of video.According to the method shown in Fig. 3 (A), the playing duration time of beginning/continuation recorded event frame of video 324 can will be somebody's turn to do by D in this system VBe adjusted into D RE, and should begin/continue the recorded event project (1, D RE) insert in the frame of video table of multimedia file, to avoid when this multimedia file is played, audio-video nonsynchronous problem takes place.
Second preferred embodiment
See also Fig. 4 (A), the process flow diagram of the method for the present invention's second preferred embodiment is disclosed among the figure.When audio-video recording system is under the situation of stop/pause incident in recorded event, when recording an incident frame of video, this method is in order to determining the playing duration time of this stop/pause incident frame of video when playing, and it is inserted in the frame of video table of multimedia file.At first when step S411, this system writes down an audio frequency stop/pause of the incident audio frame of corresponding incident and records (T constantly according to the stop/pause recorded event that is taken place this method AE) and a video stop/pause of incident frame of video record (T constantly VE), and calculating gap (E) between the two.Then at the default audio frame time interval (D of step S412 according to this gap (E) and this audio bit stream A), determine this playing duration time (D that this incident frame of video will be played RE), and with this playing duration time (D RE) insert the frame of video table of multimedia file.Wherein, this default audio frame time interval (D A) can be set at an audio sample frequency (F A) inverse, also be certain value.
In a practical application, this gap (E) is calculated with following equation:
E=T AE-T VE
In a practical application, this playing duration time (D RE) determine with following equation:
D RE=D A+ E, that is
D RE=D A+T AE-T VE
In a practical application, one adopts the flow process of audio-video recording system execution shown in Fig. 4 (A) of MPEG-4 specification, according to the stop/pause recorded event that is taken place, a default video frame time interval (D V), frame of video accumulative total number (N v) and this playing duration time (D RE), in the frame of video table relevant, increase by a stop/pause recorded event project (N in regular turn with this incident frame of video v-1, D V) with (1, D RE), promptly the number of the preceding normal video frame of this incident frame of video is N v-1, each normal video frame time is all D V, the number of this incident frame of video is 1, and this incident video frame time is D RE
See also Fig. 4 (B).In a practical application, one adopts the audio-video recording system of MPEG-4 specification that one audio bit stream 421 and a video bit stream 422 are recorded in the multimedia file.When this system under the situation of stop/pause recorded event, stop to record or suspend when recording this multimedia file, this audio bit stream 421 and this video bit stream 422 are disclosed among Fig. 4 (B) with the pass of recording time.Be numbered A 6 Audio frame 423 these audio bit streams 421 in stop/pause recorded event audio frame.Be numbered V 3Frame of video 424 these video bit streams 422 in stop/pause recorded event frame of video.According to the method shown in Fig. 4 (A), this system can be with the playing duration time of this stop/pause recorded event frame of video 424 by D VBe adjusted into D RE, and with this stop/pause recorded event project (N v-1, D V) with (1, D RE) insert in regular turn in the frame of video table of multimedia file, to avoid when this multimedia file is played, audio-video nonsynchronous problem takes place.
The 3rd preferred embodiment
The method of the present invention's the 3rd preferred embodiment (i+1) individual frame of video to the (i+N in this video bit stream L) when individual frame of video is lost, that is when audio-video recording system be that frame of video is lost under the situation of incident in recorded event, a playing duration time that will be played in order to i the frame of video (being the incident frame of video) that determines in this video bit stream.This method is according to a default video frame time interval (D of this video bit stream V) and this frame of video loss accumulative total number (N L), determine this playing duration time (D that this i frame of video (incident frame of video) will be played RE), and with this playing duration time (D RE) insert the frame of video table of multimedia file.
In a practical application, this playing duration time (D RE) determine with following equation:
D RE=(1+N L)*D V
In a practical application, one adopts the audio-video recording system of MPEG-4 specification to carry out said method, loses incident, this default video frame time (D at interval according to the frame of video that is taken place V), with frame of video accumulative total number (N v) and this playing duration time (D RE), in the frame of video table relevant, increase by a frame of video and lose incident project (N with this i frame of video (incident frame of video) v-2, D V), (1, D RE) with (1, D V), i.e. the number of the normal video frame before frame of video loss incident takes place is N v-2, each normal video frame time is all D V, the number of this incident frame of video is 1, and this incident video frame time is D RE, then be the normal video frame after this incident frame of video.
In a practical application, an audio-video recording system that adopts the MPEG-4 specification is lost under the situation of incident in frame of video when this system according to said method, and i frame of video (incident frame of video) is extended for D with the playing duration time that is played RE, replacing the frame of video of these a plurality of losses, and this frame of video lost project (N v-2, D V), (1, D RE) with (1, D V) insert in regular turn in the frame of video table of multimedia file, to avoid when this multimedia file is played, audio-video nonsynchronous problem takes place.
The 4th preferred embodiment
The method of the present invention's the 4th preferred embodiment receives one when carrying out the instruction of synchronous correction at this i frame of video when this system, that is when the shadow recording system be under the situation of synchronous correction incident in recorded event, a playing duration time that will be played in order to i the frame of video (incident frame of video) that determines in this video bit stream.This method is according to a default video frame time interval (D of this video bit stream V) and a frame of video corrected value (dT) at this i frame of video, determine this playing duration time (D that this i frame of video will be played RE), and with this playing duration time (D RE) insert the frame of video table of multimedia file.
In a practical application, this playing duration time (D RE) determine with following equation:
D RE=D V-dT。
In a practical application, one adopts the audio-video recording system of MPEG-4 specification to carry out said method, according to the synchronous correction incident that is taken place, this default video frame time interval (D V), with frame of video accumulative total number (N v) and this playing duration time (D RE), in the frame of video table relevant, increase by a synchronous correction incident project (N with this i frame of video (incident frame of video) v-1, D V) with (1, D RE), also with this synchronous correction incident project (N v-1, D V) with (1, D RE) insert in regular turn in the frame of video table of multimedia file, to avoid when this multimedia file is played, audio-video nonsynchronous problem takes place.And synchronous correction incident project (N v-1, D V) with (1, D RE) meaning of representative is: the number of the normal video frame before the synchronous correction incident takes place is N v-1, each normal video frame time is all D V, the number of this synchronous correction incident frame of video is 1, and this incident video frame time is D RE
In a practical application, the reference frequency (Reference frequency) in known this system of an audio-video recording system is different with an ideal value, therefore according to i frame of video of said method correction with the playing duration time that is played.
In a practical application, an audio-video recording system that meets the MPEG-4 specification can adopt the first kind of method to the 4th kind of preferred embodiment that comprises the invention described above simultaneously.This system is recorded in the reproduction time order of frame of video in the one frame of video table.See also Fig. 5, the process flow diagram of this method is disclosed among the figure.In step S501, this system receives and begins to record or continue to record an audio bit stream and a video is first crossfire.Then in step S502, a frame of video is added up number (N V) and frame of video loss accumulative total number (N L) all be set at 0, and with a default video frame time interval (D V) be set at a sampling frequency (F S) inverse.In step S503, record a frame of video subsequently.Judge in step S504 then whether this frame of video is successfully recorded in step S503.If the result of step S504 is not, then execution in step S505.Step S505 makes N L=N L+ 1.Repeating step S503 is to step S504 after the step S505, up to the result of step S504 for being.If the result of step S504 is for being execution in step S506.Step S506 makes N V=N V+ 1.Execution in step S507 after step S506 has judged whether that recorded event takes place.If the result of step S507 is not for, then repeating step S503 is to step S507, and for being, and the frame of video of being recorded is an incident frame of video up to the result of step S507.Then judge that at step S508 which kind of recorded event is this recorded event be.If this recorded event at the beginning/continue recorded event, then executive routine P1.Program P1 comprises step S511 to step S513.This system of step S511 begins/continues to record (T constantly according to the audio frequency to an incident audio frame that should the incident frame of video A0) and an audio frequency of this incident frame of video begin/continue to record (T constantly V0), calculate one first gap (E1).Step S512 is according to this E1 and this D VDetermine this playing duration time (D that this incident frame of video will be when playing RE).Step S513 in this frame of video table, increase at the beginning/continue the incident project (1, D RE), also be about to this begin/continue the incident project (1, D RE) insert the frame of video table of multimedia file.After step S513 finishes, get back to step S502.If this recorded event one stop/pause recorded event, then executive routine P2.Program P2 comprises step S521 to step S523.This system of step S521 records (T constantly according to an audio frequency stop/pause of the incident audio frame of this incident frame of video AE) and a video stop/pause of this incident frame of video record (T constantly VE), calculate one second gap (E2).Step S522 is according to this E2 and this D ADetermine this playing duration time (D that this incident frame of video will be when playing RE).Step S 523 increases by two project (N in this frame of video table V-1, D V) and (1, D RE), i.e. stop/pause incident project (N V-1, D V) and (1, D RE), and this stop/pause incident project (N V-1, D V) and (1, D RE) insert the frame of video table of multimedia file in regular turn.After step S523 finished, step S524 stop/pause was recorded.If this recorded event one frame of video is lost incident, and (i+1) individual frame of video to the (i+N in this video bit stream L) individual frame of video lost, executive routine P3 then.Program P3 comprises step S531 to step S532.Step S531 is according to a default video frame time interval (D of this video bit stream V) and this frame of video loss accumulative total number N L, determine this playing duration time (D that this i frame of video will be played RE).Step S532 with this frame of video table in increase by three project (N V-2, D V), (1, D RE) and (1, D V), promptly frame of video is lost incident project (N V-2, D V), (1, D RE) and (1, D V), and this frame of video is lost incident project (N V-2, D V), (1, D RE) and (1, D V) insert the frame of video table of multimedia file in regular turn.Behind the completing steps S532, get back to step S502.If this recorded event one synchronous correction incident, then executive routine P4.Program P4 comprises step S541 to step S542.Step S541 is according to a default video frame time interval (D of this video bit stream V) and a frame of video corrected value (dT) at this i frame of video, determine this playing duration time (D that this i frame of video will be played RE).Step S542 increases by two project (N in the frame of video table relevant with this i frame of video V-1, D V) and (1, D RE), i.e. synchronous correction incident project (N V-1, D RE) and (1, D RE), and this synchronous correction incident project (N V-1, D RE) and (1, D RE) insert the frame of video table of multimedia file in regular turn.Behind the completing steps S542, get back to step S502.
Fig. 6 represents the calcspar according to the audio-video recording system 600 of a preferred embodiment of the present invention.Audio-video recording system 600 comprises processing module 601, memory module 602, audio frequency load module 603, audio input interface 604, video input module 605, video input interface 606, audio coder 607, video encoder 608, memory interface 609, memory module 610 and bus 611.Wherein, each module, interface and the scrambler in the audio-video recording system 600 is connected to each other via bus 611.Audio coder 607 can adopt software design with video encoder 608, is executed in processing module 601 or (Digital Signal Processor DSP) realizes by digital signal processor.Processing module 601 (for example: the ARM microprocessor) (for example: the video record program SDRAM) be used for carrying out memory module 502.Audio frequency load module 603 (for example: microphone) be used for obtaining audio frequency.Audio input interface 604 connects audio frequency load module 603 and bus 611, and the voice data that is obtained will be stored in memory module 602.Video input module 605 (for example: the CMOS inductor) be used for obtaining image.Video input interface 606 connects video input module 605 and bus 611, and the view data of being obtained will be stored in memory module 602.(for example: the MPEG-4AAC audio coder) audio data coding that will be stored in memory module 602 becomes audio frame to audio coder 607.(for example: the MPEG-4 video encoder) coded image data that will be stored in memory module 602 becomes frame of video to video encoder 608.Memory interface 609 connects memory module 610 and bus 611.Memory module 610 (for example: the SD card) store the multimedia file that is made of frame of video and audio frame.The system architecture of Fig. 6 is applicable to System on Chip/SoC (System on a Chip), Portable video record machine (Portable Cam-coder), family expenses formula video record machine (Home Audio/Video Recorder) is with audio-video recording playback converting system (Audio/Video Play/Record Converter).
When the user required to begin to make video recording, the processing module 601 of audio-video recording system 600 was carried out in the memory module 602 according to video record program of the present invention.At first, processing module 601 is with frame of video accumulative total number (N V) and frame of video loss accumulative total number (N L) all be set at 0, and with a default video frame time interval (D V) be set at a sampling frequency (F S) inverse, control audio input interface 604 starts audio frequency load modules 603, and control of video input interface 606 starts video input modules 605.After this, audio input interface 604 is obtained voice data from audio frequency load module 603, and video input interface 606 is obtained video data from video load module 605.After obtaining data, audio input interface 604 and/or video input interface 606 notification handler module 601 are handled.Processing module 601 is moved voice data and/or video data to memory module 602 by bus 611, and control audio scrambler 607 is with voice data boil down to audio frame, and control of video scrambler 608 is a frame of video with video data compression.
Then, processing module 601 judges whether frame of video records success, if frame of video is recorded success and then made N V=N V+ 1, if frame of video is recorded failure and is then made N L=N L+ 1.When the data recording success, processing module 601 has judged whether that further recorded event takes place, if no recorded event takes place, processing module 601 continues to obtain voice data and video data via audio frequency, video input module 603,605, and is converted into corresponding audio frame and frame of video.When recorded event took place, then processing module 601 judged which kind of recorded event is this recorded event be, and the aspect of this recorded event comprises: beginning/continuation incident, stop/pause incident, frame of video are lost incident and synchronous correction incident.Then, processing module 601 is calculated the playing duration time D of corresponding incident frame of video according to recorded event RE, and with the incident project of correspondence (1, D RE) be deposited with memory module 602 via bus 611.Processing module 601 and according to audio-video file layout is formed multimedia file with incident project, audio frame and the frame of video of correspondence, via bus 611, by memory interface 609, writes memory module 610.
The 5th preferred embodiment
Please consult Fig. 5 and Fig. 6 simultaneously, when recorded event was beginning/continuation incident, processing module 601 records of audio-video recording system 600 began/continue to record (T constantly corresponding to an audio frequency of an incident audio frame of beginning/continuation incident A0), a video of this incident frame of video begins/continues to record (T constantly V0).Processing module 601 and according to a default video frame time of this video bit stream (D at interval V), determine this playing duration time (D that this incident frame of video will be played RE).
In a practical application, this gap (E) is calculated with following equation:
E=T A0-T V0
In a practical application, this playing duration time (D RE) determine with following equation:
D RE=D V-E, that is
D RE=D V+T V0-T A0
In a practical application, one adopts the audio-video recording system 600 of MPEG-4 specification at this playing duration time D that determines that this incident frame of video will be played REAfter, processing module 601 in the frame of video table of multimedia file, insert relevant with this incident frame of video at the beginning/continue the incident project (1, D RE), and multimedia file is write memory module 610 by bus 611, memory interface 609.
The 6th preferred embodiment
Please consult Fig. 5 and Fig. 6 simultaneously, when recorded event was the stop/pause incident, processing module 601 records of audio-video recording system 600 were recorded (T constantly corresponding to an audio frequency stop/pause of an incident audio frame of stop/pause incident AE), a video stop/pause of this incident frame of video records (T constantly VE).Processing module 601 and according to a default audio frame time interval (D of this audio bit stream A), determine this playing duration time (D that this incident frame of video will be played RE).
In a practical application, this gap (E) is calculated with following equation:
E=T AE-T VE
In a practical application, this playing duration time (D RE) determine with following equation:
D RE=D A+ E, that is
D RE=D A+T AE-T VE
In a practical application, one adopts the audio-video recording system 600 of MPEG-4 specification at this playing duration time D that determines that this incident frame of video will be played REAfter, processing module 601 is inserted a stop/pause incident project (N relevant with this incident frame of video in the frame of video table of multimedia file v-1, D V) with (1, D RE), and multimedia file is write memory module 610 by bus 611, memory interface 609.
The 7th preferred embodiment
Please consult Fig. 5 and Fig. 6 simultaneously, when recorded event is frame of video loss incident, (i+1) individual frame of video to the (i+N that the processing module 601 of audio-video recording system 600 is judged in these video bit streams L) individual frame of video lost, the processing module 601 of audio-video recording system 600 of the present invention is according to a default video frame time of this video bit stream (D at interval V) and this frame of video loss accumulative total number N L, determine this playing duration time (D that this i frame of video will be played RE).
In a practical application, this playing duration time (D RE) determine with following equation:
D RE=(1+N L)*D V
In a practical application, one adopts the audio-video recording system 600 of MPEG-4 specification at this playing duration time D that determines that this i frame of video (incident frame of video) will be played REAfter, processing module 601 is inserted a frame of video relevant with this incident frame of video and is lost incident project (N in the frame of video table of multimedia file v-2, D V), (1, D RE) with (1, D V), and multimedia file is write memory module 610 by bus 611, memory interface 609.
In a practical application, one adopts the audio-video recording system of MPEG-4 specification with said apparatus i frame of video to be extended for D with the playing duration time that is played RE, to replace the frame of video of these a plurality of losses.
The 8th preferred embodiment
Please consult Fig. 5 and Fig. 6 simultaneously, when recorded event is the synchronous correction incident, the processing module 601 of audio-video recording system 600 receives one when carrying out the instruction of synchronous correction at this i frame of video, and processing module 601 is according to a default video frame time of this video bit stream (D at interval V) and a frame of video corrected value (dT) at this i frame of video, determine this playing duration time (D that this i frame of video will be played RE).
In a practical application, this playing duration time (D RE) determine with following equation:
D RE=D V-dT。
In a practical application, one adopts the audio-video recording system 600 of MPEG-4 specification at this playing duration time D that determines that this i frame of video will be played REAfter, insert a synchronous correction incident project (N in the frame of video table of processing module 601 multimedia files v-1, D V) with (1, D RE), and multimedia file is write memory module 610 by bus 611, memory interface 609.
In a practical application, the reference frequency (Reference frequency) in known this system of an audio-video recording system is different with an ideal value, therefore with i frame of video of said apparatus correction with the playing duration time that is played.
By the above detailed description of preferred embodiments, hope can be known description feature of the present invention and spirit more, and is not to come category of the present invention is limited with above-mentioned disclosed preferred embodiment.On the contrary, its objective is that hope can contain in the category of claim of being arranged in of various changes and tool equivalence institute of the present invention desire application.

Claims (4)

1. one kind in order to determine the method for a playing duration time, be applied to write down an audio-video recording system of a multimedia file, this multimedia file has an audio frame table, a frame of video table, an audio bit stream and a video bit stream, and this audio bit stream comprises a plurality of audio frames, this video bit stream comprises a plurality of frame of video, and this method comprises the following step:
Record an incident frame of video;
Judge the pairing recorded event of this incident frame of video;
Calculate pairing this playing duration time of this incident frame of video (D according to this recorded event RE); And
With this playing duration time (D RE) insert this frame of video table of this multimedia file,
Wherein when recorded event is beginning/continuation incident, calculate this playing duration time (D RE) step also comprise:
Begin/continue to record (T constantly according to a audio frequency corresponding to an incident audio frame of this incident frame of video A0), a video of this incident frame of video begins/continues to record (T constantly V0) and a default video frame time interval (D V), determine this playing duration time (D RE), and this playing duration time (D RE) calculate according to following equation:
D RE=D V+T V0-T A0
2. the method for claim 1 is wherein with this playing duration time (D RE) insert this multimedia file the step of this frame of video table newly-increased at the beginning/continue the incident project (1, D RE), and should begin/continue the incident project (1, D RE) insert this frame of video table of this multimedia file.
3. one kind in order to determine the device of a playing duration time, be applied to write down an audio-video recording system of a multimedia file, this multimedia file has an audio frame table, a frame of video table, an audio bit stream and a video bit stream, and this audio bit stream comprises a plurality of audio frames, this video bit stream comprises a plurality of frame of video, and this device comprises following parts:
Parts are used to record an incident frame of video;
Parts are used to judge the pairing recorded event of this incident frame of video;
Parts are used for calculating pairing this playing duration time of this incident frame of video (D according to this recorded event RE); And
Parts are used for this playing duration time (D RE) insert this frame of video table of this multimedia file,
Wherein when recorded event is beginning/continuation incident, calculate this playing duration time (D RE) parts also comprise:
Parts are used for beginning/continue to record (T constantly according to the audio frequency corresponding to an incident audio frame of this incident frame of video A0), a video of this incident frame of video begins/continues to record (T constantly V0) and a default video frame time interval (D V), determine this playing duration time (D RE), and this playing duration time (D RE) calculate according to following equation:
D RE=D V+T V0-T A0
4. device as claimed in claim 3 is wherein with this playing duration time (D RE) insert the parts of this frame of video table of this multimedia file, newly-increased at the beginning/continue the incident project (1, D RE), and should begin/continue the incident project (1, D RE) insert this frame of video table of this multimedia file.
CN2006100803068A 2006-05-09 2006-05-09 Method and device for determining video frame playing duration Expired - Fee Related CN101071602B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006100803068A CN101071602B (en) 2006-05-09 2006-05-09 Method and device for determining video frame playing duration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006100803068A CN101071602B (en) 2006-05-09 2006-05-09 Method and device for determining video frame playing duration

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN2010101552970A Division CN101800063B (en) 2006-05-09 2006-05-09 Method and device for determining playing duration time of video frame

Publications (2)

Publication Number Publication Date
CN101071602A CN101071602A (en) 2007-11-14
CN101071602B true CN101071602B (en) 2010-08-25

Family

ID=38898775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006100803068A Expired - Fee Related CN101071602B (en) 2006-05-09 2006-05-09 Method and device for determining video frame playing duration

Country Status (1)

Country Link
CN (1) CN101071602B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112584239B (en) * 2019-09-30 2023-05-09 西安诺瓦星云科技股份有限公司 Program preview method and program preview device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1175854A (en) * 1996-08-19 1998-03-11 松下电器产业株式会社 Synchronous reproduction apparatus
CN1402482A (en) * 2001-08-10 2003-03-12 旭联科技股份有限公司 Audio and video teaching material recording and playback system and method
CN1164105C (en) * 1997-12-05 2004-08-25 松下电器产业株式会社 Method of reproduction and reproduction apparatus using the same method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1175854A (en) * 1996-08-19 1998-03-11 松下电器产业株式会社 Synchronous reproduction apparatus
CN1164105C (en) * 1997-12-05 2004-08-25 松下电器产业株式会社 Method of reproduction and reproduction apparatus using the same method
CN1402482A (en) * 2001-08-10 2003-03-12 旭联科技股份有限公司 Audio and video teaching material recording and playback system and method

Also Published As

Publication number Publication date
CN101071602A (en) 2007-11-14

Similar Documents

Publication Publication Date Title
KR100847534B1 (en) Apparatus and method for determining rendering duration of video frame
CN101164055B (en) Media timeline sorting
US5619733A (en) Method and apparatus for synchronizing streaming and non-streaming multimedia devices by controlling the play speed of the non-streaming device in response to a synchronization signal
US10951857B2 (en) Method and system for video recording
CN1954604A (en) Recording/reproduction device, recording/reproduction method, recording medium containing a recording/reproduction program, and integrated circuit used in the recording/reproduction device
CN1359231A (en) Audio signal reproducing method and apparatus without changing tone in fast or slow speed replaying mode
CN101296344B (en) Scene change detection device, coding device, and scene change detection method
JP2002044604A5 (en)
CN102217304A (en) Imaging device and digest playback method
CN104092920A (en) Audio and video synchronizing method
CN100504883C (en) Synchronous plan for multimedia caption and audio frequency description
CN101383961B (en) Content reproduction appratus, content reproduction method, and content reproduction system
WO2012036658A1 (en) Method for semantics based trick mode play in video system
JP5474417B2 (en) Movie data generation apparatus, movie data generation system, movie data generation method, and computer program
CN101071602B (en) Method and device for determining video frame playing duration
CN101345840B (en) Moving image playback apparatus, moving image playback method, and program thereof
CN100488244C (en) Image processing apparatus, image capturing apparatus, and image processing method
CN101800063B (en) Method and device for determining playing duration time of video frame
CN101238727B (en) Video recorder, scene change extracting method, and video/audio recorder
KR100581156B1 (en) Apparatus and method for reproducing video signal
US9729919B2 (en) Remultiplexing bitstreams of encoded video for video playback
CN101594505A (en) Recording and playback method and device
WO1999013647A1 (en) Decoding method and recording medium carrying recorded decoding program
EP0584908B1 (en) Processing of video signals of different frame rates
US20110022400A1 (en) Audio resume playback device and audio resume playback method

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

Granted publication date: 20100825

CF01 Termination of patent right due to non-payment of annual fee