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

Image-sound synchronous recording and playing method Download PDF

Info

Publication number
CN1777265A
CN1777265A CN 200510028967 CN200510028967A CN1777265A CN 1777265 A CN1777265 A CN 1777265A CN 200510028967 CN200510028967 CN 200510028967 CN 200510028967 A CN200510028967 A CN 200510028967A CN 1777265 A CN1777265 A CN 1777265A
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.)
Granted
Application number
CN 200510028967
Other languages
Chinese (zh)
Other versions
CN100409681C (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

This invention discloses a method for synchronized recording of image and sound. In this method, the video file and the audio file are recorded simultaneously, and time markers for each frame of video images are defined; after recording is finished, the video file and the audio file are merged into a single image-sound file. This invention also discloses a playing method for synchronized image and sound. In the method, first, read the video information and the sound data from the image-sound file, the one above; play the video images in the video information mentioned above and the audio data simultaneously, and set time markers during playing; contrast the time marker with the clock marker in the video information to determine which video image to be played. This invention adds the audio support to silent video and ensures the combination of image and sound, and the compatibility with the current 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 (14)

1, a kind of 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; Record finish after, with the synthetic audio/video file of this video file and 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, it is characterized in that, 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, form described audio/video file, this audio file of deletion after finishing.
5, image-sound synchronous recording method according to claim 4 is characterized in that, the file header information of this video file comprises: the frame number of video information, video data size.
6, image-sound synchronous recording method according to claim 5 is characterized in that, described video information comprises: the time tag of the video image of present frame, data length and present frame.
7, image-sound synchronous recording method according to claim 6 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.
8, image-sound synchronous recording method according to claim 7 is characterized in that, the unit of this time tag is second, and it upgraded once every one second.
9, a kind of 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 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.
10, audio-visual synchronous broadcast method according to claim 9 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.
11, audio-visual synchronous broadcast method according to claim 10 is characterized in that, the unit of described timing sign is second, and it upgraded once every one second.
12, audio-visual synchronous broadcast method according to claim 11 is characterized in that, 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.
13, audio-visual synchronous broadcast method according to claim 12 is characterized in that, carries out following steps in the display image operation:
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.
14, audio-visual synchronous broadcast method according to claim 13, 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 true CN1777265A (en) 2006-05-24
CN100409681C 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)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557474B (en) * 2008-05-28 2010-11-10 北京同步科技有限公司 Method for realizing time point alignment of video files recorded by multi-channel recording elements
CN101118776B (en) * 2007-08-21 2012-09-05 中国科学院计算技术研究所 Method, system and device for realizing audio and video data synchronizing
CN104219538A (en) * 2014-09-15 2014-12-17 深圳市云宙多媒体技术有限公司 Real-time acquiring and uploading and data processing method and system for audio and video
CN101645967B (en) * 2009-05-14 2015-03-04 上海闻泰电子科技有限公司 Mobile terminal for processing multimedia data in user-defined format and realization method thereof
CN104735412A (en) * 2015-03-11 2015-06-24 大连理工大学 Audio and video synthesizing and synchronous playing method for subway passenger emergency communication
CN105052163A (en) * 2014-01-20 2015-11-11 松下知识产权经营株式会社 Reproduction device and data reproduction method
CN111356003A (en) * 2020-03-11 2020-06-30 北京文香信息技术有限公司 Data writing method, system and terminal equipment
CN111354384A (en) * 2020-02-27 2020-06-30 北京奇艺世纪科技有限公司 GIF picture generation method, playing method and device and electronic equipment
CN112423103A (en) * 2020-09-02 2021-02-26 一可科技有限公司 Method for merging audio file and video file, playing method and device
CN112995720A (en) * 2019-12-16 2021-06-18 成都鼎桥通信技术有限公司 Audio and video synchronization method and device

Family Cites Families (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
CN1287554C (en) * 2001-08-10 2006-11-29 旭联科技股份有限公司 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
US7315622B2 (en) * 2002-06-27 2008-01-01 Nxp B.V. Robust method for achieving audio/video synchronization in MPEG decoders in personal video recording applications
JP4271195B2 (en) * 2003-10-16 2009-06-03 パナソニック株式会社 Video / audio recording / reproducing apparatus, video / audio recording method, and video / audio reproducing method

Cited By (14)

* 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
CN105052163A (en) * 2014-01-20 2015-11-11 松下知识产权经营株式会社 Reproduction device and data reproduction method
CN104219538A (en) * 2014-09-15 2014-12-17 深圳市云宙多媒体技术有限公司 Real-time acquiring and uploading and data processing method and system for audio and video
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
CN104735412A (en) * 2015-03-11 2015-06-24 大连理工大学 Audio and video synthesizing and synchronous playing method for subway passenger emergency communication
CN112995720A (en) * 2019-12-16 2021-06-18 成都鼎桥通信技术有限公司 Audio and video synchronization method and device
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
CN111356003A (en) * 2020-03-11 2020-06-30 北京文香信息技术有限公司 Data writing method, system and terminal 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

Also Published As

Publication number Publication date
CN100409681C (en) 2008-08-06

Similar Documents

Publication Publication Date Title
CN1777265A (en) Image-sound synchronous recording and playing method
CN1236445C (en) Caption MP3 player having caption display function, caption MP3 data format and method of reproducing caption MP3 data
CN1222946C (en) Optical recording medium and apparatus and method for playing said medium
CN1720579A (en) Portable media player with adaptive playback buffer control
CN1144216C (en) Recording medium recorded with data structure and recording / reproducing method and equipment
CN1922863A (en) Video trailer
EP1492342A1 (en) Information recording medium and manufacturing method thereof
CN101022523A (en) Mobile communication terminal video and audio file recording and broadcasting method and device
RU2006101290A (en) Information recording medium, an apparatus for recording INFORMATION AND METHOD FOR ITS IMPLEMENTATION DEVICE FOR PLAYBACK INFORMATION AND METHOD FOR ITS IMPLEMENTATION, an apparatus for reproducing the information record AND METHOD FOR ITS IMPLEMENTATION PROGRAM FOR RECORDING INFORMATION PROGRAM FOR PLAYBACK INFORMATION PROGRAM FOR the playback INFORMATION RECORDS AND DATA STRUCTURE, INCLUDING THE CONTROL SIGNAL
CN1798309A (en) Content reproduce system, reproduce device, and reproduce method and distribution server
CN101057295A (en) Method and apparatus for writing information on picture data sections in a data stream and for using the information
CN1402539A (en) Method and device for recording and reproducing video data, and information storage medium thereof
CN1276654C (en) Information recording medium, dynamic image voice recording regenerating equipment and dynamic image voice recording and regenerating method
CN1578443A (en) Moving image recording equipment and method thereof
EP1801809A3 (en) Additional images and audio recording/reproducing apparatus.
CN1230823C (en) Optical recording medium and apparatus and method for playing said medium
CN1905045A (en) Information playback method using information recording medium
CN1901614A (en) Audio/video device which controls synchronization of analog video and audio signal
CN1320822C (en) Method and relative system for cross detecting ad fragment using different detection principle
CN1805529A (en) Recording method and recording device
CN2750605Y (en) Coder and decoder for video information
CN1282959A (en) Method of store and draw back data toward/from tape recording medium through digital interface
CN2816926Y (en) Multimedia playing platform structure
CN1595519A (en) Information storage medium, method and apparatus for the information storage medium playback
CN1798267A (en) Device for matching image to words of a song in Kara-Ok system

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