CN1758772B - Method for synchronous playing video and audio of medium document and its system - Google Patents
Method for synchronous playing video and audio of medium document and its system Download PDFInfo
- Publication number
- CN1758772B CN1758772B CN 200510096299 CN200510096299A CN1758772B CN 1758772 B CN1758772 B CN 1758772B CN 200510096299 CN200510096299 CN 200510096299 CN 200510096299 A CN200510096299 A CN 200510096299A CN 1758772 B CN1758772 B CN 1758772B
- Authority
- CN
- China
- Prior art keywords
- audio
- file
- video
- coding
- module
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 15
- 230000001360 synchronised effect Effects 0.000 title claims description 24
- 238000012544 monitoring process Methods 0.000 claims description 8
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 238000004088 simulation Methods 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
A playing method of multimedia file audio-video synchronization includes presetting audio file storage unit and video file storage unit and setting volume of audio file storage unit and video file storage unit, fetching audio file and video file in multimedia file, processing audio file and processing video file.
Description
One, technical field
The present invention relates to synchronous player method of a kind of video and audio of medium document and system thereof.
Two, background technology
The daily life that the prosperity of the progress of manufacture of semiconductor and consumer electronics industry, Various types of data treatment facility are nowadays deeply popular.As individual desktop PC (Desktop Computer), mobile computer (Note book), PDA (Personal Digital Assistant) (Personal Digital Assist), Smart Phone (Smart Phone) and e-dictionary translating machine or the like, bring the digital multimedia amusement and recreation life that people enrich.
Be applied in the development of the multimedia video technology in the above-mentioned Various types of data treatment facility, also be subjected to the suitable attention of electronics and information industry.Multimedia video/audio archive has several formats to circulate in the market at present, wherein MPEG (Motion Picture Experts Group) is the work group of International Standards Organization (ISO), and its audio-visual coding standard of setting up of MPEG digital multimedia has become the main flow of current multimedia video/audio archive form.
The multimedia video/audio archive that meets MPEG all passes through the encoding compression of certain program, have the archives capacity little, be convenient to backup and store and be beneficial to advantages such as world-wide web spreads; And general multimedia file mainly can be divided into two major parts, is respectively video file and audio file.The multimedia file material is play after respectively video file and audio file being deciphered when playing again.More detailed says, in the broadcast operation of multimedia file, audio file is to play constantly, and video file then is to play one by one according to the regular time that timer interruption (Timer Interrupt) is produced.Yet in the actual play running of multimedia file, the time that timer interrupts being produced has a little error, can not be the interval of fixing.In addition, the broadcast operation of audio file is because data processing equipment also has nearmis when setting sampling frequency; So can just in time not equal the time of multimedia file actual play.For instance, when movie, the performer that will produce in the film does not lift up one's voice as yet, but sound just is played out; Or the performer lifts up one's voice, just is played but sound is delayed a period of time.Therefore, it is of a specified duration more that multimedia file is play, and error effects will be more and more obvious.
Three, summary of the invention
The present invention is for solving the above-mentioned technical problem that exists in the background technology, and the adjustment of comparing of a kind of audio frequency number of samples by audio file is provided, and makes method and system thereof that video file in the multimedia file and audio file can synchronous playing.
Technical solution of the present invention is: the present invention is the synchronous player method of a kind of video and audio of medium document, and its special character is: this method may further comprise the steps:
1) builds audio files storage unit and video file memory cell in advance, the capacity of setting audio file storage unit and video file memory cell;
2) read video file and audio file in the multimedia file then;
3) audio file;
3.1) carry out the decoding operation of audio file, and generate the audio coding file;
3.2) then the audio coding file is stored in the audio files storage unit;
3.3) audio plays decoding file;
4) handle video file;
4.1) carry out the decoding operation of video file, and generate the video coding file;
4.2) then the video coding file is stored in the video file memory cell;
4.3) then according to fiducial value break period that timer produced, carry out the broadcast operation of video coding file;
4.4) obtain the audio coding quantity of documents that has been played, and according to the variable quantity of the audio frequency number of samples of audio coding file, and generate the audio video synchronization corrected value;
4.5) then according to the audio video synchronization corrected value, the video file of video coding file was play a numerical value during comparison was play;
4.6) at last according to the result of comparison, adjust the broadcast operation of video coding file.
Above-mentioned steps 4.4) the audio video synchronization corrected value draws by formula P=S*F/ (S1*S2) in, wherein P is the audio video synchronization corrected value, S is the audio frequency number of samples of audio coding file, F is that the picture of video file shows the rate parameter value, S1 is the audio sample frequency parameter value of audio file, and S2 is the broadcast channel number of this audio file.
Above-mentioned demonstration rate parameter value F, audio sample frequency parameter value S1 and broadcast channel number S2 are the fixed value in the audio-visual coding standard of MPEG digital multimedia.
Above-mentioned steps 4.6) in, when a video file broadcast numerical value of video coding file equals the audio video synchronization corrected value, then reads next video coding file, and play this video coding file.
Above-mentioned steps 4.6) in, when the video file of video coding file is play a numerical value less than the audio video synchronization corrected value, the video coding file in the reading cells of Chi Xuing then, play that a numerical value equals or greater than the audio video synchronization corrected value up to video file, and then play selected before this video coding file.
Above-mentioned steps 4.6) in, when video file is play a numerical value greater than the audio video synchronization corrected value, then keeps a video coding file and do not change.
The amount of capacity of above-mentioned audio files storage unit and video file memory cell is system default value or is determined by the user.
A kind of system that realizes the player method that above-mentioned video and audio of medium document is synchronous, its special character is: this system comprises that the audio file that is used in the multimedia file deciphers operation, generate the audio coding module 1 of audio coding file, the audio files storage unit 2 of stored audio decoding file, be used for the audio playing module 3 of the audio coding file that displaying audio file memory cell 2 provided, be used for the video file in the multimedia file is deciphered operation, and the video coding module 4 of generation video coding file, can produce one break period fiducial value timer 5, be used for storing the video file memory cell 6 of video coding file, fiducial value break period that is provided according to timer 5, the video playback module 7 of the video coding file in the playing video file memory cell 6, according to the audio video synchronization corrected value, the audio-visual synchronous control module 8 and being used for of broadcast operation of adjusting the video coding file of video playback module 7 is monitored the voice playing monitoring unit 9 of the file amount that audio coding module 1 is played, audio coding module 1 accessing to audio file storage unit 2, audio files storage unit 2 accessing to audio playing modules 3, timer 5 inserts video coding module 4, video coding module 4 inserts video file memory cell 6, video file memory cell 6 inserts video playback module 7, voice playing monitoring unit 9 is accessing to audio playing module 3 and audio-visual synchronous control module 8 respectively, and audio-visual synchronous control module 8 inserts video playback module 7.
Above-mentioned audio playing module 3 comprises digital analog converter and plays loudspeaker that wherein digital analog converter is to be used for the audio coding file conversion is play signal for simulation, and plays this analog signal by playing loudspeaker.
The player method that video and audio of medium document of the present invention is synchronous, be at first to read video file and audio file, then carry out the decoding operation of audio file, generate the audio coding file, carry out the broadcast operation of audio coding file then. then video file is deciphered, generate the video coding file, and according to fiducial value break period, displaying video decoding file. then, calculate the variable quantity of the audio frequency number of samples (samples) of audio coding file, and generate the audio video synchronization corrected value, audio video synchronization corrected value according to this continues, the comparison video coding is play a numerical value (video count) as the video file of file, and adjusts the broadcast operation of video coding file.So realize the synchronous playing of audio file and video file, solved the phenomenon that the video and audio of medium document in the background technology can't be synchronous.
Four, description of drawings
Fig. 1 is a system block diagram of the present invention.
Five, embodiment
Specific implementation method of the present invention is as follows:
1) build audio files storage unit and video file memory cell in advance, the capacity of setting audio file storage unit and video file memory cell, amount of capacity is system default value or is determined by the user;
2) read video file and audio file in the multimedia file then, this moment, system can be divided into audio file of two multiple Threads (Multi-Thread), and another handles video file;
3) audio file;
3.1) carry out the decoding operation of audio file, and generate the audio coding file;
3.2) then the audio coding file is stored in the audio files storage unit;
3.3) audio plays decoding file;
4) handle video file;
4.1) carry out the decoding operation of video file, and generate the video coding file;
4.2) then the video coding file is stored in the video file memory cell;
4.3) then according to fiducial value break period that timer produced, carry out the broadcast operation of video coding file;
4.4) obtain the audio coding quantity of documents that has been played, and according to the variable quantity of the audio frequency number of samples of audio coding file, and generate the audio video synchronization corrected value;
4.5) then according to the audio video synchronization corrected value, the video file of video coding file was play a numerical value during comparison was play;
4.6) at last according to the result of comparison, adjust the broadcast operation of video coding file.
Step 4.4 wherein) the audio video synchronization corrected value draws by formula P=S*F/ (S1*S2) in, wherein P is the audio video synchronization corrected value, S is the audio frequency number of samples of audio coding file, F is that the picture of video file shows the rate parameter value, S1 is the audio sample frequency parameter value of audio file, S2 is the broadcast channel number of this audio file, show rate parameter value F, audio sample frequency parameter value S1 and broadcast channel number S2 are the fixed value in the audio-visual coding standard of MPEG digital multimedia, and audio frequency number of samples (S) then changes to some extent according to the current audio coding file of having play.
Step 4.6) in, plays number (image broadcast number) when value equals the audio video synchronization corrected value, then read next video coding file, and play this video coding file when the video file of video coding file; When the video file of video coding file is play a numerical value less than the audio video synchronization corrected value, the video coding file in the reading cells of Chi Xuing then, play that a numerical value equals or greater than the audio video synchronization corrected value up to video file, and then play selected before this video coding file; When video file is play a numerical value greater than the audio video synchronization corrected value, then keep a video coding file and do not change.
Referring to Fig. 1, system of the present invention is applicable to Various types of data treatment facilities such as desktop PC, mobile computer, PDA (Personal Digital Assistant), e-dictionary, mobile phones, and its structure comprises:
Audio coding module 1: be used for the audio file in the multimedia file is deciphered operation, generate the audio coding file.
Audio files storage unit 2: be used for stored audio decoding file.
Audio playing module 3: be used for the audio coding file that audio plays memory cell 2 provided.It includes digital analog converter (D/A converter) and plays loudspeaker (Speaker), and wherein digital analog converter is to be used for the audio coding file conversion is play signal for simulation, and plays this analog signal by playing loudspeaker.
Video coding module 4: be used for the video file in the multimedia file is deciphered operation, and generate the video coding file.
Timer 5: can produce one break period fiducial value.
Video file memory cell 6: be used for storing the video coding file.
Video playback module 7: according to fiducial value break period that timer 5 is provided, the video coding file in the playing video file memory cell 6.
Audio-visual synchronous control module 8:, adjust the broadcast operation of the video coding file of video playback module 7 according to the audio video synchronization corrected value.And the audio video synchronization corrected value is to finish by following formula:
P=S*F/S1*S2
Wherein P is this audio video synchronization corrected value, S be the audio coding file audio frequency number of samples (sample), F is that the picture of video file shows rate parameter value (Frame Rate), S1 is the audio sample frequency parameter value (Sample Rate) of audio file, and S2 is the broadcast channel number (channel) of this audio file.
Voice playing monitoring unit 9: be to be used for monitoring the file amount that the audio coding module is played.Audio-visual synchronous control module 8 can learn that what audio coding file is played by voice playing monitoring unit 9.
Audio coding module 1 accessing to audio file storage unit 2 wherein, audio files storage unit 2 accessing to audio playing modules 3, timer 5 inserts video coding module 4, video coding module 4 inserts video file memory cell 6, video file memory cell 6 inserts video playback module 7, voice playing monitoring unit 9 accessing to audio playing module 3 and audio-visual synchronous control module 8 respectively, and audio-visual synchronous control module 8 inserts video playback module 7.
Claims (5)
1. player method that video and audio of medium document is synchronous, it is characterized in that: this method may further comprise the steps:
1) builds audio files storage unit and video file memory cell in advance, the capacity of setting audio file storage unit and video file memory cell;
2) read video file and audio file in the multimedia file then;
3) audio file;
3.1) carry out the decoding operation of audio file, and generate the audio coding file;
3.2) then the audio coding file is stored in the audio files storage unit;
3.3) audio plays decoding file;
4) handle video file;
4.1) carry out the decoding operation of video file, and generate the video coding file;
4.2) then the video coding file is stored in the video file memory cell;
4.3) then according to fiducial value break period that timer produced, carry out the broadcast operation of video coding file;
4.4) obtain the audio coding quantity of documents that has been played, and according to the variable quantity of the audio frequency number of samples of audio coding file, and generate the audio video synchronization corrected value; Described audio video synchronization corrected value draws by formula P=S*F/ (S1*S2), wherein P is the audio video synchronization corrected value, S is the audio frequency number of samples of audio coding file, F is that the picture of video file shows the rate parameter value, S1 is the audio sample frequency parameter value of audio file, and S2 is the broadcast channel number of this audio file;
4.5) then according to the audio video synchronization corrected value, the video file of video coding file was play a numerical value during comparison was play;
4.6) at last according to the result of comparison, adjust the broadcast operation of video coding file; When a video file broadcast numerical value of video coding file equals the audio video synchronization corrected value, then read next video coding file, and play this video coding file; When the video file of video coding file is play a numerical value less than the audio video synchronization corrected value, the video coding file in the reading cells of Chi Xuing then, play that a numerical value equals or greater than the audio video synchronization corrected value up to video file, and then play selected before this video coding file; When video file is play a numerical value greater than the audio video synchronization corrected value, then keep a video coding file and do not change.
2. the synchronous player method of video and audio of medium document according to claim 1 is characterized in that: described demonstration rate parameter value F, audio sample frequency parameter value S1 and broadcast channel number S2 are the fixed value in the audio-visual coding standard of MPEG digital multimedia.
3. the synchronous player method of video and audio of medium document according to claim 1 is characterized in that: the amount of capacity of described audio files storage unit and video file memory cell is system default value or is determined by the user.
4. system that realizes the player method that the described video and audio of medium document of claim 1 is synchronous, it is characterized in that: this system comprises that the audio file that is used in the multimedia file deciphers operation, generate the audio coding module (1) of audio coding file, the audio files storage unit (2) of stored audio decoding file, be used for the audio playing module (3) of the audio coding file that displaying audio file memory cell (2) provided, be used for the video file in the multimedia file is deciphered operation, generate the video coding module (4) of video coding file, can produce one break period fiducial value timer (5), be used for storing the video file memory cell (6) of video coding file, fiducial value break period that is provided according to timer (5), the video playback module (7) of the video coding file in the playing video file memory cell (6), according to the audio video synchronization corrected value, the audio-visual synchronous control module (8) and being used for of broadcast operation of adjusting the video coding file of video playback module (7) is monitored the voice playing monitoring unit (9) of the file amount that audio coding module (1) is played, described audio coding module (1) accessing to audio file storage unit (2), described audio files storage unit (2) accessing to audio playing module (3), described timer (5) inserts video coding module (4), described video coding module (4) inserts video file memory cell (6), described video file memory cell (6) inserts video playback module (7), described voice playing monitoring unit (9) is accessing to audio playing module (3) and audio-visual synchronous control module (8) respectively, and described audio-visual synchronous control module (8) inserts video playback module (7).
5. the synchronous Play System of video and audio of medium document according to claim 4, it is characterized in that: described audio playing module (3) comprises digital analog converter and plays loudspeaker, wherein digital analog converter is to be used for the audio coding file conversion is play signal for simulation, and plays this analog signal by playing loudspeaker.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200510096299 CN1758772B (en) | 2005-11-04 | 2005-11-04 | Method for synchronous playing video and audio of medium document and its system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200510096299 CN1758772B (en) | 2005-11-04 | 2005-11-04 | Method for synchronous playing video and audio of medium document and its system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1758772A CN1758772A (en) | 2006-04-12 |
| CN1758772B true CN1758772B (en) | 2010-05-05 |
Family
ID=36703909
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200510096299 Expired - Fee Related CN1758772B (en) | 2005-11-04 | 2005-11-04 | Method for synchronous playing video and audio of medium document and its system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1758772B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012527007A (en) * | 2009-05-13 | 2012-11-01 | ドハン イ | Multimedia file playback method and multimedia playback device |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101119461B (en) * | 2006-08-02 | 2010-05-12 | 广达电脑股份有限公司 | System and method for keeping synchronous playing of video frame and audio frame |
| JP5071040B2 (en) * | 2007-10-22 | 2012-11-14 | ソニー株式会社 | Information processing apparatus, information processing method, program, and recording medium |
| CN100562122C (en) * | 2008-03-27 | 2009-11-18 | 凌阳科技股份有限公司 | System and method for synchronously playing audio and video of multimedia file |
| CN107371053B (en) * | 2017-08-31 | 2020-10-23 | 北京鹏润鸿途科技股份有限公司 | Audio and video stream contrast analysis method and device |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6124894A (en) * | 1996-04-02 | 2000-09-26 | Sony Corporation | Audio signal processor |
| US6393198B1 (en) * | 1997-03-20 | 2002-05-21 | Avid Technology, Inc. | Method and apparatus for synchronizing devices in an audio/video system |
| CN1477872A (en) * | 2002-08-21 | 2004-02-25 | 中山正音数字技术有限公司 | Compression encoding and decoding apparatus for multi-channel digital audio signal and method thereof |
| JP2005117400A (en) * | 2003-10-08 | 2005-04-28 | Sanyo Electric Co Ltd | Video camera |
-
2005
- 2005-11-04 CN CN 200510096299 patent/CN1758772B/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6124894A (en) * | 1996-04-02 | 2000-09-26 | Sony Corporation | Audio signal processor |
| US6393198B1 (en) * | 1997-03-20 | 2002-05-21 | Avid Technology, Inc. | Method and apparatus for synchronizing devices in an audio/video system |
| CN1477872A (en) * | 2002-08-21 | 2004-02-25 | 中山正音数字技术有限公司 | Compression encoding and decoding apparatus for multi-channel digital audio signal and method thereof |
| JP2005117400A (en) * | 2003-10-08 | 2005-04-28 | Sanyo Electric Co Ltd | Video camera |
Non-Patent Citations (1)
| Title |
|---|
| 同上. |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012527007A (en) * | 2009-05-13 | 2012-11-01 | ドハン イ | Multimedia file playback method and multimedia playback device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1758772A (en) | 2006-04-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TW556154B (en) | Real-time control of playback rates in presentations | |
| US8457322B2 (en) | Information processing apparatus, information processing method, and program | |
| CN101131816B (en) | Audio file generation method, device and digital player | |
| US9438876B2 (en) | Method for semantics based trick mode play in video system | |
| CN101656099A (en) | Audio and video production and play method used for MP3 player | |
| CN101409808A (en) | Method and apparatus for re-sampling audio, and digital television chip | |
| CN100562122C (en) | System and method for synchronously playing audio and video of multimedia file | |
| CN101753946A (en) | Merge method and system for video file and audio file | |
| CN1758772B (en) | Method for synchronous playing video and audio of medium document and its system | |
| EP1723794A2 (en) | Method, devices, system and software product for compressed-domain video editing | |
| KR20080099006A (en) | Apparatus and method for digital audio playback providing the ability to add multiple mixing and sound effects to audio data | |
| CN1941144B (en) | Data recording and reproducing apparatus and method therefor | |
| CN101119461A (en) | System and method for keeping synchronous playing of video frame and audio frame | |
| KR101246916B1 (en) | Method and apparatus for compensating of audio/video synchronization | |
| US20150104158A1 (en) | Digital signal reproduction device | |
| CN2768109Y (en) | Portable learning machine | |
| US20110022400A1 (en) | Audio resume playback device and audio resume playback method | |
| US9378750B2 (en) | Apparatus and method of reproducing audio data using low power | |
| TWI277346B (en) | Processing device switching time axis in video data stream and method thereof | |
| CN1794216A (en) | Method of synchronous playing voice frequency document and corresponding literal data | |
| KR100748370B1 (en) | How to sync video and audio data and video player | |
| US20040199564A1 (en) | Apparatus and method for multimedia data stream production | |
| CN100340115C (en) | Time axis switching processing device and method in audio-visual data stream | |
| JP2004101638A (en) | Signal processing device | |
| CN101188664A (en) | STB with voice prompt |
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: 20100505 Termination date: 20171104 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |