CN100444106C - Method for implementing positioning in MP3 file with variable bit rate format - Google Patents

Method for implementing positioning in MP3 file with variable bit rate format Download PDF

Info

Publication number
CN100444106C
CN100444106C CNB2005101150632A CN200510115063A CN100444106C CN 100444106 C CN100444106 C CN 100444106C CN B2005101150632 A CNB2005101150632 A CN B2005101150632A CN 200510115063 A CN200510115063 A CN 200510115063A CN 100444106 C CN100444106 C CN 100444106C
Authority
CN
China
Prior art keywords
file
parameter
bit rate
frames
frame
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
CNB2005101150632A
Other languages
Chinese (zh)
Other versions
CN1804788A (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.)
Vimicro Corp
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CNB2005101150632A priority Critical patent/CN100444106C/en
Publication of CN1804788A publication Critical patent/CN1804788A/en
Application granted granted Critical
Publication of CN100444106C publication Critical patent/CN100444106C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The present invention provides a method for implementing positioning in an MP3 file with a variable bit rate format, which comprises: a) a plurality of frames are selected from the MP3 file; b) at least one parameter of the frames is computed, and at least one parameter is the average frame length and/or the average bit rate; c) positioning is implemented in the MP3 file at least based on the one parameter. Selection in the step (a) is average selection or random selection. The present invention also provides an MP3 player, which comprises a device for selecting the frames from the MP3 file, a device for computing at least one parameter of the frames and a device implementing positioning in the MP3 file at least based on the one parameter, wherein at least one parameter is the average frame length and/or the average bit rate. The present invention is utilized to reduce the computational burden, to reduce the requirement on computation processing capacity and to shorten the required time for implementing positioning, while meeting the requirement on certain positioning accuracy.

Description

In the mp3 file of variable bit rate format, realize the method for location
Technical field
The present invention relates to the mp3 file of variable bit rate (VBR) form, more specifically, relate to a kind of method that in the mp3 file of VBR form, realizes the location.
Background technology
MP3 utilizes audio compression techniques, with sound with 10: 1-12: 1 compressibility is compressed into the less file of capacity, can keep better tone quality.Because the full name of this compress mode is MPEG Audio Layer 3, so people abbreviate it as MP3.Mp3 file is made up of series of frames (Frame), and every frame comprises frame head and solid data two parts, and the frame head of each frame comprises information such as the bit rate of this frame (Bitrate), sampling rate (SamplingRate), Paddingbit.Thereby, can calculate the length (unit is a byte, represents with FrameSize) of each frame according to following formula: FrameSize=144*Bitrate/SamplingRate+Padding bit.
Mp3 file can be divided into fixed bit rate (CBR) and VBR according to bit rate.When playing mp3 file, generally be to determine initial play position by the time, also to return to some information of user simultaneously, as total reproduction time, sampling rate, mean bit rate or the like about this MP3.In the mp3 file of CBR form, the data length of every frame is fixed, and only needs just can determine by the number of calculating frame with the frame head information of first frame target location and the required return message of required broadcast.And in the mp3 file of VBR form,, cause the data length of each frame fixing because bit rate can change, and have only the frame head information analysis of all frames in the file one time, just may realize accurately locating and returning accurate information.For example, for in the mp3 file of VBR form, realizing searching (Seek) function, generally realize at present: when being written into (Load) file by following manner, will be with whole browsing file one time, find the bit rate of every frame, by the position of bit rate and sampling rate location next frame, and so forth, calculate T.T., mean bit rate etc. and be returned as user profile; Carry out Seek when playing, still need browser document, every mistake one frame is calculated current time and with itself and Seek time ratio, if more than or equal to the Seek time, then shows and finds the Seek position.Although this method has the advantage of accurate positioning, Load file and Seek spended time are long.Than the long stand-by period, this was that the user is unacceptable before this can show as in the environment of computing poor-performing and play.
In addition, although there is the mp3 file of some VBR forms in first frame (first frame), to comprise frame number, file size, frame index table data such as (TOC); Say that according to reason these data can be used to simplify and quicken location in mp3 file, but very inaccurate usually as the totalframes that comprises in this mp3 file, file size, frame index table data such as (TOC), lack practicality.And in practice, the mp3 file of most of VBR form does not comprise such " firstframe ".
Summary of the invention
The object of the present invention is to provide a kind of method that in the mp3 file of VBR form, realizes the location,, alleviate computation burden, reduce requirement, shorten the time of realizing that the location is required the computing ability with when satisfying certain accurate positioning.
For achieving the above object, the present invention has adopted following technical scheme: choose some frames from mp3 file, calculate the average frame length and/or the mean bit rate of selected some frames, locate in mp3 file based on institute's parameters calculated then.
The present invention is by calculating average frame length and/or mean bit rate, can be when needs are located treats the mp3 file of VBR form in the mode of the mp3 file for the treatment of the CBR form, reduced simultaneously the requirement of hardware computing ability and the complexity of software.Calculate by from mp3 file, choosing some frames, further reduced requirement hardware computing ability with suitable manner.
Embodiment
To be described in greater detail by one embodiment of the invention below, only for exemplary purposes.
In this embodiment, in order to realize the location in the mp3 file of VBR form, the first step is to choose some frames from mp3 file.Need to prove that " location " here refers generally to by the position in definite mp3 file of time.The situation of actual needs location includes but not limited to: when playing when realizing the Seek function, under suspending (Pause) state etc.
Preferably, the mode of choosing of frame and quantity are determined according to the characteristic (as pop, jazz, classic or the like) of mp3 file.In a particular embodiment, the mode that can on average choose is chosen frame, for example will put in order first mp3 file and be divided into plurality of sections, and for example 8 sections or 16 sections, every section first frame that will find according to the frame format of MP3 is as choosing frame.In another specific embodiment, mode that can picked at random is chosen frame, for example, determines earlier the frame number that will choose to carry out picked at random by a randomizer then.
Second goes on foot, and calculates the average frame length and/or the mean bit rate of described some frames.
Specify the average frame calculation methods of length below.To some frames of choosing, calculate earlier the frame length of every frame in described some frames respectively.For mp3 file, when frame length was unit with the byte, its computing formula was FrameSize=144*Bitrate/SamplingRate+Padding bit.Can easily obtain described average frame length according to result of calculation.
Similarly, can easily calculate the mean bit rate of described some frames according to described some frames bit rate separately.
Two steps above-mentioned can be carried out when Load file for example, prepare for realizing the location.
At last, locate in mp3 file based on previous step institute parameters calculated.
In one embodiment, can in second step, calculate the average frame length of described some frames.When next locating, for example, when realizing the Seek function of MP3 broadcast, also need to use the reproduction time of every frame usually.Can determine the reproduction time (representing) of every frame according to sampling rate with FrameTime, when reproduction time is unit with the millisecond, its computing formula is FrameTime=SamplePerFrame/SamplingRate, wherein SamplePerFrame is the sample number of every frame, according under the MP3 being that MPEG1 or MPEG2 are respectively 1152 and 576; Perhaps, can calculate the mean bit rate of described some frames earlier with method above-mentioned, average frame length and mean bit rate by the described some frames reproduction time that calculates every frame again, when average frame length was unit with the byte, computing formula was: the reproduction time of every frame=average frame length * 8/ mean bit rate.The reproduction time of every frame can calculate at for example LOAD file, calls when the location.Then, according to the reproduction time of every frame and concrete positioning requirements,, can calculate frame number as the Seek time; Again according to described average frame length and the frame number that calculates, can determine the target location of locating, as the reproduction time * average frame length of the target location of the target location of Seek: Seek=Seek time/every frame.
In another embodiment, can in second step, calculate the mean bit rate of described some frames.Afterwards, when needing the location, for example, when realizing the Seek function of MP3 broadcast, can determine the target location by number of ways.For example, a kind of approach is to determine the target location (is unit with the byte) of Seek according to following formula: the target location of Seek=Seek time * mean bit rate/8; Another kind of approach is to calculate the average frame length of described some frames earlier according to the mean bit rate of sampling rate and described some frames, determines the target location with above-mentioned method then.What it should be appreciated by those skilled in the art is, also can make otherwise, does not enumerate one by one here.
In another embodiment, can in second step, calculate the average frame length and the mean bit rate of described some frames.During the location, can be in conjunction with concrete location condition, according to one or two the definite easily target location of locating in these two parameters, concrete mode can no longer describe in detail here with reference to aforementioned content.
Among superincumbent some embodiment, an attendant advantages calculating the mean bit rate of described some frames is to can be used as the user profile of returning to supply to show.
The present invention has utilized approximate processing, has alleviated computation burden when guaranteeing certain accuracy, and when being used for the limited equipment of those computing powers, this advantage is especially obvious.The present invention is suitable for the MP3 player and has in the portable set of MP3 playing function, as mobile phone etc.Less as this portable set volume, thereby the data-handling capacity that can provide is limited, often needs the long time when utilizing existing VBR disposal route to position, and utilizes the present invention can improve this point.In addition, in some other electronic equipment with MP3 playing function, as at those because of considering in the limited electronic equipment of cost computing power, also can use the present invention.
According to principle of the present invention and instruction, those skilled in the art can change and do not depart from the scope of the present invention embodiment disclosed herein and key element.Therefore, scope of the present invention should be definite by example embodiment, and should be determined by those claims that can be allowed to and their legal equivalents.

Claims (6)

1. method that realizes the location in the mp3 file of variable bit rate format comprises step:
(a) choose some frames in the described mp3 file;
(b) at least one parameter of the described some frames of calculating, described at least one parameter is average frame length and/or mean bit rate; And,
(c) locate in described mp3 file based on a parameter in described at least one parameter at least.
2. method according to claim 1 is characterized in that, described at least one parameter of step (b) is an average frame length, and step (c) is located in described mp3 file based on the reproduction time of average frame length and every frame.
3. method according to claim 1 is characterized in that, described at least one parameter of step (b) comprises mean bit rate, and step (c) is located in described mp3 file based on described at least one parameter.
4. according to the described method of arbitrary claim among the claim 1-3, it is characterized in that described being chosen for of step (a) on average chosen or picked at random.
5. MP3 playing device comprises:
Choose the device of the some frames in the mp3 file;
Calculate the device of at least one parameter of described some frames, described at least one parameter is average frame length and/or mean bit rate; With,
At least based on a device that parameter is located in described mp3 file in described at least one parameter.
6. the device that has the described MP3 playing device of claim 5.
CNB2005101150632A 2005-11-25 2005-11-25 Method for implementing positioning in MP3 file with variable bit rate format Expired - Fee Related CN100444106C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101150632A CN100444106C (en) 2005-11-25 2005-11-25 Method for implementing positioning in MP3 file with variable bit rate format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101150632A CN100444106C (en) 2005-11-25 2005-11-25 Method for implementing positioning in MP3 file with variable bit rate format

Publications (2)

Publication Number Publication Date
CN1804788A CN1804788A (en) 2006-07-19
CN100444106C true CN100444106C (en) 2008-12-17

Family

ID=36866828

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101150632A Expired - Fee Related CN100444106C (en) 2005-11-25 2005-11-25 Method for implementing positioning in MP3 file with variable bit rate format

Country Status (1)

Country Link
CN (1) CN100444106C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101136234B (en) * 2006-08-31 2010-06-23 广达电脑股份有限公司 Method and device for estimating audio length of audio file
CN101901622B (en) * 2009-05-27 2012-08-29 鸿富锦精密工业(深圳)有限公司 Audio data positioning method and electronic system using same
CN102215365B (en) * 2010-04-01 2013-11-06 鸿富锦精密工业(深圳)有限公司 Media data playing device and playback method thereof
CN102340658A (en) * 2010-07-16 2012-02-01 鸿富锦精密工业(深圳)有限公司 Method for accelerating file position search and electronic equipment thereof
CN102402509B (en) * 2010-09-07 2017-01-18 无锡中感微电子股份有限公司 Method and device for addressing audio file with variable bit rate (VBR)
KR101854469B1 (en) * 2011-11-30 2018-05-04 삼성전자주식회사 Device and method for determining bit-rate for audio contents
CN103745737B (en) * 2013-12-23 2017-12-08 乐视致新电子科技(天津)有限公司 A kind of method and apparatus for obtaining media file total duration
CN104934049B (en) * 2015-06-24 2018-03-16 深圳市九洲电器有限公司 A kind of variable bit rate MP3 reproduction times acquisition methods and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020196714A1 (en) * 2001-06-26 2002-12-26 Pioneer Corporation Method and apparatus for reproducing information
JP2003317391A (en) * 2002-04-26 2003-11-07 Sony Corp Reproducing apparatus and reproducing method
US20040249862A1 (en) * 2003-04-17 2004-12-09 Seung-Won Shin Sync signal insertion/detection method and apparatus for synchronization between audio file and text

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020196714A1 (en) * 2001-06-26 2002-12-26 Pioneer Corporation Method and apparatus for reproducing information
JP2003317391A (en) * 2002-04-26 2003-11-07 Sony Corp Reproducing apparatus and reproducing method
US20040249862A1 (en) * 2003-04-17 2004-12-09 Seung-Won Shin Sync signal insertion/detection method and apparatus for synchronization between audio file and text

Also Published As

Publication number Publication date
CN1804788A (en) 2006-07-19

Similar Documents

Publication Publication Date Title
CN100444106C (en) Method for implementing positioning in MP3 file with variable bit rate format
US10459943B2 (en) System and method for splicing media files
EP1949203B1 (en) Using historic load profiles to dynamically adjust operating frequency and available power to a handheld multimedia device processor core
CN100380441C (en) Estimating signal power in compressed audio
DE60224135T2 (en) System and method to jump at a time in an MPEG file
US8626323B2 (en) Method and apparatus for playing audio files
JP2005157390A (en) Method and apparatus for encoding/decoding mpeg-4 bsac audio bitstream having ancillary information
CN107210055B (en) Storage medium storing mixing instruction file for controlling music mixing and computer program product
JP2004126595A5 (en)
US8090458B2 (en) Method of calculating temporal information of frame-based audio stream data
US9183837B2 (en) Apparatus and method for determining bit rate for audio content
KR101838301B1 (en) Method and device for seeking a frame in multimedia contents
JP2006221714A (en) Encoded digital audio reproduction apparatus
KR20130129293A (en) Scene-based variable compression
KR100982880B1 (en) Contents upload system and method
CN107872716B (en) post-packaged streaming data analysis method and device and electronic equipment
JP2001053869A (en) Voice storing device and voice encoding device
TWI312962B (en) Method and apparatus for estimating audio length of audio file
CN105302352A (en) Method for realizing positioning in MP3 file in VBR format
JP2005512134A (en) Digital audio with parameters for real-time time scaling
US20120123787A1 (en) Audioaudio format converting apparatus and audioaudio format converting method
CN101136234B (en) Method and device for estimating audio length of audio file
CN102402509B (en) Method and device for addressing audio file with variable bit rate (VBR)
TW200511231A (en) Data recording device, data recording method, and recording control program
US20230239534A1 (en) Systems and methods for just in time transcoding of video on demand

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081217

Termination date: 20121125