CN100409681C - Image-sound synchronous recording and playing method - Google Patents

Image-sound synchronous recording and playing method Download PDF

Info

Publication number
CN100409681C
CN100409681C CNB2005100289671A CN200510028967A CN100409681C CN 100409681 C CN100409681 C CN 100409681C CN B2005100289671 A CNB2005100289671 A CN B2005100289671A CN 200510028967 A CN200510028967 A CN 200510028967A CN 100409681 C CN100409681 C CN 100409681C
Authority
CN
China
Prior art keywords
video
file
audio
image
information
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
CNB2005100289671A
Other languages
Chinese (zh)
Other versions
CN1777265A (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.)
Shanghai Sunrise Simcom Electronic Technology Co Ltd
Original Assignee
Shanghai Chenxing Electronics Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Chenxing Electronics Science and Technology Co Ltd filed Critical Shanghai Chenxing Electronics Science and Technology Co Ltd
Priority to CNB2005100289671A priority Critical patent/CN100409681C/en
Publication of CN1777265A publication Critical patent/CN1777265A/en
Application granted granted Critical
Publication of CN100409681C publication Critical patent/CN100409681C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The present invention discloses a video and audio synchronously recording method. In the method, a video file and an audio file are synchronously recorded, and a time mark of each frame of video images is set up; after the recordation is completed, the video file and the audio file are synthesized into one video and audio file. The present invention also discloses a video and audio synchronously playing method. In the method, video information and audio data in a video and audio file are read, and the video and audio file is the video and audio file; video images in the video information are played, the audio data in the video information is synchronously played, timing marks are set up during the process of playing, and the timing marks and the time marks in the video information are compared with determine the video images to be played. The present invention is added with the support of audio on the basis of a soundless video to realize video and audio synthesis and can be compatible with the existing video format.

Description

Image-sound synchronous recording and player method
Technical field
The present invention relates to a kind of multi-media recording and player method, particularly a kind of image-sound synchronous recording and player method.
Background technology
Current multimedia technology is used very extensive in field of wireless communication, many functions such as the tinkle of bells, MP3, camera, shooting, FM frequency modulation are applied in the mobile phone products.In some practical application,, in using, camera function can only realize recording and playing of noiseless MJPEG owing to be subjected to the restriction of platform or Driver.
Summary of the invention
The objective of the invention is to overcome the defective of above-mentioned prior art, a kind of image-sound synchronous recording method and player method that can carry out Synchronous Processing in video record and broadcast to audio frequency is provided.
The objective of the invention is to be achieved through the following technical solutions:
A kind of image-sound synchronous recording method, in the method: simultaneously recorded video file and audio file, and the time tag of every frame video image is set; Record finish after, with the synthetic audio/video file of this video file and this audio file.
Wherein, carry out following operation in described recorded video file process: create video file, the file header information of this video file of initialization writes at least one frame video information in this video file, upgrade the file header information of this video file then.
Wherein, in described recording audio file process, carry out following operation: create audio file, in this audio file, write voice data, and write down the length information of this audio file.
Wherein, in described building-up process, carry out following operation: in this video file, write the voice data in this audio file, and in the file header information of this video file, add the length information of described voice data, and form described audio/video file, delete this audio file finishing after.
Wherein, the file header information of this video file comprises: the frame number of video information, video data size.
Wherein, described video information comprises: the time tag of the video image of present frame, data length and present frame.
Wherein, described video file is the MJPEG form, and described audio file is the AMR form.
Wherein, the unit of this time tag is second, and it upgraded once every one second.
Technical scheme of the present invention also comprises a kind of audio-visual synchronous broadcast method, and in this method: read video information and voice data in the audio/video file, this audio/video file is the described audio/video file of claim 1; Play the video image in the described video information, play this voice data simultaneously, and the timing sign is set in playing process, relatively the definite video image that will play of the time tag in this timing sign and the video information.
Wherein, the length information according to the described voice data in the file header information of this audio/video file reads described voice data.
Wherein, the unit of described timing sign is second, and it upgraded once every one second.
Wherein, in playing process, whether the time tag of judging the current video image that reads is greater than the timing sign, if then wait if not, is then carried out the display video image operation.
Wherein, in the display image operation, carry out following steps::
1) judge that whether this timing sign upgrades, if this timing sign upgrades, then carry out step 2), if this timing sign does not upgrade, then carry out step 4);
2) judge this timing sign whether greater than the time tag of the described current video image that reads, if, then carry out step 3), if not, then carry out step 4);
3) abandon the current video image that reads, read the next frame video information;
4) judge and to have read the video information frame number, if not, then show this video image, if then stop playing whether greater than the frame number of the video information that writes down in this audio/video file.
Wherein, judge by timing sign updating mark is set whether this timing sign upgrades, this timing sign updating mark is a Boolean type variable, and its initial value is false, carrying out describedly when abandoning the current video image step that reads, the value that this timing identification renewal sign is set is for false.
Positive progressive effect of the present invention is: on the basis of noiseless video, add the support of audio frequency, realize audio-visual synthesizing, and can with existing video format compatibility.
Description of drawings
Fig. 1 is the process schematic diagram of first embodiment of the invention.
Fig. 2 is the process schematic diagram of second embodiment of the invention.
Embodiment
Provide preferred embodiment of the present invention below in conjunction with accompanying drawing, to describe technical scheme of the present invention in detail.
First embodiment
As shown in Figure 1,
A kind of image-sound synchronous recording method, it is recorded video file and audio file simultaneously, and the time tag of every frame video image is set, record finish after, with this video file and the synthetic audio/video file of this audio file.Which time zone this time tag specifically is in order to write down every frame video image.
This method comprises the steps:
Step 110 is created video file and audio file, and described video file is the MJPEG form, and described audio file is the AMR form, and these two kinds of file formats are known file format;
Step 120, the file header information of this video file of initialization increases following information on former MJPEG file format basis: the frame number of video information, video data size, this time tag of initialization, the unit of this time tag are second;
Step 130, recorded video can be by recording this video by existing equipment, and the length of recording audio data and recording audio data can adopt existing equipment to record this voice data simultaneously;
Step 140, obtain the present frame video information, and the present frame video information that preservation is obtained in this video file, described video information comprises: the time tag of the video image of present frame, data length and present frame, can upgrade this time tag by an existing first timer, it upgraded a time tag every one second, and write down the frame number and the video data size of the video information of having preserved;
Step 150 judges whether to stop to take, and if not, then carry out step 140, if then carry out step 170;
Step 160 judges whether memory space is full, if, then carry out step 170, if not, then carry out step 140;
Step 170, stop video and audio recording, close this timer, and this voice data is write the rear portion of this video file, promptly behind the data field of this video file, add this voice data, upgrade the file header information of described video file, promptly upgrade described video information frame number, video data size, and in this document header, write the length of this voice data, after finishing, delete this audio file.
Second embodiment
The broadcast of audio recording time and reproduction time equivalence and may command video can be play the back simultaneously at video and audio frequency the playing process of video is carried out specific processing according to relevant information, with realize effectively each other synchronously.
As shown in Figure 2, a kind of audio-visual synchronous broadcast method, in this method: read video information and voice data in the audio/video file, this audio/video file is the audio/video file of stating described in first embodiment; Play the video image in the described video information, play this voice data simultaneously, and the timing sign is set in playing process, relatively the definite video image that will play of the time tag in this timing sign and the video information.
This method comprises the steps:
Step 210, from this audio/video file, read file header information, and read described voice data by the length of the described voice data in this document header, be provided with and the described timing sign of initialization, the unit of this timing sign is second, is provided with and a timing sign of initialization updating mark, it can be the Boolean type variable, initial value is false, is provided with and one of initialization reading images information frame number, and its initial value is zero;
Step 220, displaying video image, playing audio-fequency data simultaneously, can utilize this video image of existing device plays and this voice data, and begin to upgrade described timing sign, and can utilize an existing second timer to upgrade this timing sign, it upgraded once described timing sign every one second;
Whether step 230, the time tag of judging the present frame video information read greater than the timing sign, if, illustrate that then video playback is too fast, carry out circular wait, if not, then carry out step 240, promptly begin to carry out the display image operation;
Step 240 reads current frame video image, and upgrades the described information of reading images frame number, whenever reads a frame image information, and this is reading images information frame number increase by;
Step 250 judges whether this timing sign updating mark is true, if be true, represents that then this timing sign upgrades, carry out step 260, if be not true, is vacation, then carry out step 280;
Whether step 260 judges this timing sign greater than the described current time tag that reads frame video image, if, represent that then video playback is slow excessively, carry out step 270, if not, then carry out step 280;
Step 270 abandons the current video image that reads, and reads the next frame video information, and this timing sign updating mark is set for false, forwards step 230 to;
Step 280 is then judged and has been read the video information frame number whether greater than the frame number of the video information that writes down in this audio/video file, if not, then carry out step 290, if, then finish, promptly stop playing;
Step 290 shows this current frame video image and forwards step 230 to.
When this second timer upgrades described timing sign, the value of this timing sign updating mark is made as very.
Above-mentioned first, second embodiment can be applicable on the existing hardware device, as can be used for the MTK platform, be applicable to the platform by digital signal processor (DSP) driving sensor (Sensor) such as M1 and M6217, be suitable for the combination of all digital signal processors of this platform (DSP), transducer (Sensor) and LCD (LCD).On this platform, thereby can call DSP Driver interface function finishes every frame coding and carries out video image and record, the audio recording function that can call the MTK system provides carries out voice data and records, the demonstration of video image can be called DSP Driver interface function and be finished, the audio recording function that the broadcast of voice data can be called the MTK system to be provided is finished, and this first and second timer timer that all can adopt this internal system to provide.
The present invention also is applied to have the hardware platform of identical function, and it all within the present invention's scope required for protection, does not repeat them here.

Claims (11)

1. an image-sound synchronous recording method is characterized in that, in this method: and simultaneously recorded video file and audio file, and the time tag of every frame video image is set, which time zone this time tag specifically is in order to write down every frame video image; Record finish after, write voice data in this audio file to this video file rear portion, and in the file header information of this video file, add the length information of described voice data, with this video file and the synthetic audio/video file of this audio file.
2. image-sound synchronous recording method according to claim 1, it is characterized in that, in described recorded video file process, carry out following operation: create video file, the file header information of this video file of initialization, in this video file, write at least one frame video information, upgrade the file header information of this video file then.
3. image-sound synchronous recording method according to claim 2 is characterized in that, carries out following operation in described recording audio file process: create audio file, write voice data in this audio file, and write down the length information of this voice data.
4. image-sound synchronous recording method according to claim 3 is characterized in that, the file header information of this video file comprises: the frame number of video information, video data size.
5. image-sound synchronous recording method according to claim 4 is characterized in that, described video information comprises: the time tag of the video image of present frame, data length and present frame.
6. image-sound synchronous recording method according to claim 5 is characterized in that, the form of described video file is the MJPEG form, and the form of described audio file is the AMR form.
7. image-sound synchronous recording method according to claim 6 is characterized in that, the unit of this time tag is second, and it upgraded once every one second.
8. an audio-visual synchronous broadcast method is characterized in that, in this method: read video information and voice data in the audio/video file, this audio/video file is the audio/video file that the described image-sound synchronous recording method of claim 1 is synthesized; Play the video image in the described video information, play this voice data simultaneously, and the timing sign is set in playing process, whether the time tag of judging the current video image that reads is greater than the timing sign: if then wait for; If not, then carry out the display video image operation; In the display video image operation, carry out following steps:
1) judge that whether this timing sign upgrades, if this timing sign upgrades, then carry out step 2), if this timing sign does not upgrade, then carry out step 4);
2) judge this timing sign whether greater than the time tag of the described current video image that reads, if, then carry out step 3), if not, then carry out step 4);
3) abandon the current video image that reads, read the next frame video information;
4) judge and to have read the video information frame number, if not, then show this video image, if then stop playing whether greater than the frame number of the video information that writes down in this audio/video file.
9. audio-visual synchronous broadcast method according to claim 8 is characterized in that, reads described voice data according to the length information of the described voice data in the file header information of this audio/video file.
10. audio-visual synchronous broadcast method according to claim 9 is characterized in that, the unit of described timing sign is second, and it upgraded once every one second.
11. audio-visual synchronous broadcast method according to claim 10, it is characterized in that, by being set, timing sign updating mark judges whether this timing sign upgrades, this timing sign updating mark is a Boolean type variable, its value has been upgraded for this timing sign of true respresentation, and its value represents then that for vacation the timing sign does not upgrade.
CNB2005100289671A 2005-08-19 2005-08-19 Image-sound synchronous recording and playing method Expired - Fee Related CN100409681C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100289671A CN100409681C (en) 2005-08-19 2005-08-19 Image-sound synchronous recording and playing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100289671A CN100409681C (en) 2005-08-19 2005-08-19 Image-sound synchronous recording and playing method

Publications (2)

Publication Number Publication Date
CN1777265A CN1777265A (en) 2006-05-24
CN100409681C true CN100409681C (en) 2008-08-06

Family

ID=36766533

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100289671A Expired - Fee Related CN100409681C (en) 2005-08-19 2005-08-19 Image-sound synchronous recording and playing method

Country Status (1)

Country Link
CN (1) CN100409681C (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118776B (en) * 2007-08-21 2012-09-05 中国科学院计算技术研究所 Method, system and device for realizing audio and video data synchronizing
CN101557474B (en) * 2008-05-28 2010-11-10 北京同步科技有限公司 Method for realizing time point alignment of video files recorded by multi-channel recording elements
CN101645967B (en) * 2009-05-14 2015-03-04 上海闻泰电子科技有限公司 Mobile terminal for processing multimedia data in user-defined format and realization method thereof
WO2015107909A1 (en) * 2014-01-20 2015-07-23 パナソニックIpマネジメント株式会社 Reproduction device and data reproduction method
CN104219538B (en) * 2014-09-15 2018-01-16 深圳市云宙多媒体技术有限公司 A kind of audio frequency and video gather upload and data processing method and system in real time
CN104735412B (en) * 2015-03-11 2017-08-01 大连理工大学 A kind of audio frequency and video synthesis of Metro Passenger emergency communication and synchronous broadcast method
CN112995720B (en) * 2019-12-16 2022-11-18 成都鼎桥通信技术有限公司 Audio and video synchronization method and device
CN111354384A (en) * 2020-02-27 2020-06-30 北京奇艺世纪科技有限公司 GIF picture generation method, playing method and device and electronic equipment
CN111356003B (en) * 2020-03-11 2022-03-29 安徽文香科技有限公司 Data writing method, system and terminal equipment
CN112423103A (en) * 2020-09-02 2021-02-26 一可科技有限公司 Method for merging audio file and video file, playing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002259298A (en) * 2001-03-02 2002-09-13 Square Co Ltd Transmitting method for electronic mail, information processor, recording medium, and computer program
CN1402482A (en) * 2001-08-10 2003-03-12 旭联科技股份有限公司 Audio and video teaching material recording and playback system and method
CN1436001A (en) * 2002-01-28 2003-08-13 北京华诺信息技术有限公司 Method for synchronizing video with audio in decoding system
WO2004004330A2 (en) * 2002-06-27 2004-01-08 Koninklijke Philips Electronics N.V. Robust method for achieving audio/video synchronization in mpeg decoders in personal video recording applications
WO2005039175A1 (en) * 2003-10-16 2005-04-28 Matsushita Electric Industrial Co., Ltd. Video/audio recorder/reproducer, video/audio recording method and reproducing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002259298A (en) * 2001-03-02 2002-09-13 Square Co Ltd Transmitting method for electronic mail, information processor, recording medium, and computer program
CN1402482A (en) * 2001-08-10 2003-03-12 旭联科技股份有限公司 Audio and video teaching material recording and playback system and method
CN1436001A (en) * 2002-01-28 2003-08-13 北京华诺信息技术有限公司 Method for synchronizing video with audio in decoding system
WO2004004330A2 (en) * 2002-06-27 2004-01-08 Koninklijke Philips Electronics N.V. Robust method for achieving audio/video synchronization in mpeg decoders in personal video recording applications
WO2005039175A1 (en) * 2003-10-16 2005-04-28 Matsushita Electric Industrial Co., Ltd. Video/audio recorder/reproducer, video/audio recording method and reproducing method

Also Published As

Publication number Publication date
CN1777265A (en) 2006-05-24

Similar Documents

Publication Publication Date Title
CN100409681C (en) Image-sound synchronous recording and playing method
EP2200290A3 (en) Video synthesis device and program
WO2004098193A3 (en) Recording medium, reproduction apparatus, recording method, reproducing method, program, and integrated circuit for recording a video stream and graphics with window information over graphics display
EP1492342A1 (en) Information recording medium and manufacturing method thereof
JP2003510626A (en) Subtitle MP3 player having subtitle information display function, subtitle MP3 information structure, and subtitle MP3 information reproducing method
TW200614173A (en) Recording device and method, reproducing device and method, recording medium, and program
US20070110408A1 (en) Device for displaying boot animation of optical disc player and method thereof
CN101715142A (en) Information recording/reproducing apparatus and video camera
CN101022523A (en) Mobile communication terminal video and audio file recording and broadcasting method and device
US20080076469A1 (en) Method and Mobile Communication Terminal for Playing Multimedia Content
JP4978765B2 (en) REPRODUCTION CONTROL DEVICE AND METHOD, AND PROGRAM
JP2004039138A5 (en)
TWI258126B (en) Method for controlling playback operation in an interactive optical disc device
US20050057545A1 (en) Device, system, method and program for data processing, recording medium storing the program, and player
US20080034277A1 (en) System and method of the same
CN102577413B (en) Method for adding voice content to video content and device for implementing said method
JP2919484B2 (en) Synchronous playback control method for still image and audio
EP1801809A3 (en) Additional images and audio recording/reproducing apparatus.
MXPA04010659A (en) Moving picture reproducing apparatus in which player mode information is set, reproducing method using the same, and storage medium.
KR102001314B1 (en) Method and apparatus of enhancing audio quality recorded in karaoke room
JPH11134814A (en) Audio recording medium and audio reproducing device
EP1605467A3 (en) Information playback apparatus and information playback method
KR19990068648A (en) MPEG audio decoding apparatus and processing method for MPEG data
JP3081310B2 (en) Video editing processor
US20070044124A1 (en) Mobile electronic device and data processing system utilizing the same

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
C56 Change in the name or address of the patentee

Owner name: SHANGHAI CHENXING SIM TECHNOLOGY ELECTRONIC TECHNO

Free format text: FORMER NAME: SHANGHAI CHENXING ELECTRONICS SCIENCE + TECHNOLOGY CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: No. 888 Shengli Road, Qingpu District, Shanghai

Patentee after: Shanghai Sunrise Simcom Electronic Technology Co., Ltd.

Address before: No. 888 Shengli Road, Qingpu District, Shanghai

Patentee before: Shanghai Chenxing Electronics Science & Technology Co., Ltd.

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: 20080806

Termination date: 20180819