Embodiment
The embodiment of the invention provides the method and the portable terminal of displaying video on a kind of portable terminal, portable terminal is the synchronous playing video when playing back music, and the broadcasting speed of the FREQUENCY CONTROL video that changes according to volume of music, can allow the user go the omnibearing music of experiencing by the vision and the sense of hearing simultaneously.
Below be elaborated respectively by specific embodiment.
Embodiment one,
Referring to Fig. 1, be the method flow diagram of displaying video on a kind of portable terminal of providing of the embodiment of the invention one, specifically can comprise:
Step 110, obtain the frequency that current volume of music changes;
Can be the frequency that the current volume of music of obtaining of not timing changes, also can be periodically to obtain the frequency that current volume of music changes.
Step 120, playing video file, and according to the broadcasting speed of the described video file of FREQUENCY CONTROL of the current described volume change of obtaining.
Described video file can be an animation file, but is not limited to this, can also be other forms of video file.The video file of playing can be that the user selects, or player is selected at random.Can accelerate or slow down the broadcasting speed of video file according to the frequency of the current described volume change of obtaining, its quickening or to slow down the degree of broadcasting speed specifically relevant with the frequency size of the current described volume change of obtaining.
As can be seen, in the present embodiment, portable terminal is the synchronous playing video file when playing back music, and the broadcasting speed of the described video file of FREQUENCY CONTROL that changes according to volume of music, the broadcasting speed of video file can reflect the rhythm of music, can allow the user go the omnibearing music of experiencing by the sense of hearing and vision simultaneously.
Embodiment two,
Present embodiment is comprehensive embodiment, and present embodiment is that animation file is illustrated with the video file of playing, but is not limited to this.
Referring to Fig. 2, be the method flow diagram of displaying video on a kind of portable terminal of providing of the embodiment of the invention two, specifically can comprise:
Step 201, download and/or synthetic animation file;
If do not store animation file on the portable terminal, can download several animation files from network side, perhaps synthetic several animation files on terminal.The content that animation file represents can be arbitrarily, and preferably representing content is that the cartoon figure dances.
Be understandable that the portable terminal that present embodiment relates to can be a mobile phone, the personal digital assistant device, walkman or the like, and be not limited to this.
Animation can comprise personage's element and background element, and wherein, personage's element can comprise character, clothes, hair style etc.; Background element can comprise background patterns, backcolor etc.Can synthesize animation file according to personage's element and background element that the user selects.Can certainly download flash fragment, GIF (commutative image file, Graphic Interchange Format) picture etc. from network side earlier, then with several flash fragments and/or the synthetic animation file of GIF picture file.
The form of synthetic animation file can be the arbitrary format that the portable terminal support is play, flash form, the GIF picture format of the form of preferred animation file.The animation file of downloading and/or synthesizing can be stored on the portable terminal.
Step 202, obtain the frequency that current volume of music changes;
The frequency of volume change is used to characterize the speed of volume variation in a period of time, the relevant property with the rhythm of music in this time period of frequency that volume of music changes in certain time period.
The obtaining the mode of putting and can be of the frequency of volume change: in the time period of setting (for example, 100 milliseconds), the volume value of the current playing back music of sampling utilizes several volume values of sampling out can calculate the frequency of volume change in time period of this setting.The frequency that calculates can characterize the speed of volume change in this time period.
For example, setting the time period that is used to sample is 100 milliseconds, and 20 volume values of having sampled out in 100 milliseconds utilize 20 volume values of sampling out just can calculate the frequency of volume change in 100 milliseconds.
Further, sampling number can be as much as possible in the time period of setting, and sampling number is many more, and the sampled value of acquisition is also just many more, utilizes the frequency of the volume change that sampled value calculates also just accurate more.
Because music may be not quite similar in the frequency of each time period volume change, for making the frequency that gets access to volume change can characterize the speed of music volume change in current slot, can (for example obtain the cycle by setpoint frequency, 2 seconds), obtain the cycle every a frequency, obtain the frequency of a volume change.Since be the frequency of periodically obtaining current playing back music volume change, the speed of sign music volume change in current slot that the frequency of the current volume change of obtaining can be relatively accurate.
Further, can frequency be set specifically as required and obtain Cycle Length, tempo variation music faster for example, its frequency are obtained shorter relatively that the length in cycle can be provided with, the music that tempo variation is slower, its frequency are obtained longer relatively that the length in cycle can be provided with.
For example, the frequency cycle of obtaining of setting is 2 seconds, just just calculates by sampling every 2 seconds and obtains once the frequency that current volume of music changes.The speed of the sign music that the frequency of the current volume change that gets access to can comparatively be prepared volume change in current 2 seconds.
Step 203, playing video file, and according to the broadcasting speed of the described video file of FREQUENCY CONTROL of the described volume change of obtaining.
Can play corresponding animation file according to user's selection, perhaps the animation file that prestores on the picked at random portable terminal is play.If it is a plurality of that disposable animation file of calling in internal memory has, the broadcast order of each animation file can also be set.
Generally, the frame rate of animation file normal playback speed promptly is to play 30 frame pictures each second for being 30.According to the broadcasting speed of the described animation file of FREQUENCY CONTROL of volume change the time, the reference frequency of volume change can be set earlier, reference frequency can be provided with voluntarily by the user, perhaps is provided with automatically according to the average frequency that the normal rhythm volume of music that prestores changes by player.The normal playback speed of the corresponding animation file of reference frequency, promptly each seconds 30 frame.
Since be periodically to obtain the frequency that current volume of music changes, therefore more accurate with the FREQUENCY CONTROL animation file broadcasting speed of the current volume change of obtaining.After the frequency of obtaining volume change again, according to the FREQUENCY CONTROL animation file broadcasting speed of the current volume change that newly gets access to.If the frequency of the current volume change of obtaining is identical with the reference frequency of setting, then animation file is according to normal speed forward, promptly each seconds 30 frame; If the frequency of the current volume change of obtaining greater than the reference frequency of setting, is then accelerated the broadcasting speed of animation file; If the frequency of the current volume change of obtaining less than the reference frequency of setting, is then accelerated the broadcasting speed of animation file.
That is to say that the frame rate of the current broadcast of animation file is specifically determined by the ratio of the reference frequency of the frequency of the current volume change of obtaining and setting.The ratio of the frequency of the current volume change of obtaining and the reference frequency of setting is big more, and the frame rate of the current broadcast of animation file is also just big more, and the speed of the current broadcast of animation file is also just fast more; The ratio of the frequency of the current volume change of obtaining and the reference frequency of setting is more little, and the frame rate of the current broadcast of animation file is also just more little, and the speed of the current broadcast of animation file is also just slow more.
The frequency of the frame rate of the current broadcast of animation file, the current volume change of obtaining and reference frequency three's relation can specifically be determined and expression by functional relation.
Further, can also set the upper limit that animation file is play frame rate, and then guarantee can can't not watch because animation file plays too fast.
When the animation file of current broadcast plays, can select or select at random to play other animation files that prestore according to the user.
As can be seen, in the present embodiment, synchronous playing animation file when playing back music, and the broadcasting speed of the described animation file of FREQUENCY CONTROL that changes according to volume of music, the broadcasting speed of animation file can reflect the rhythm of music, can allow the user go the omnibearing music of experiencing by the sense of hearing and vision simultaneously.
Further, because the frequency that current volume of music changes is periodically to obtain, thereby the broadcasting speed of animation file can reflect the rhythm of current period music, better user experience more accurately; The user can be provided with reference frequency according to custom, and the broadcasting speed of animation file can be controlled flexibly.
Embodiment three,
Accordingly, the embodiment of the invention also provides a kind of portable terminal.Referring to Fig. 3, be a kind of portable terminal schematic diagram that the embodiment of the invention three provides, specifically can comprise: acquiring unit 310, playing control unit 320.
Wherein, acquiring unit 310 is used to obtain the frequency that current volume of music changes.
Described acquiring unit 310 can be the frequency that the current volume of music of obtaining of not timing changes, and also can be periodically to obtain the frequency that current volume of music changes.
Playing control unit 320 is used for playing video file, and according to the broadcasting speed of the described video file of FREQUENCY CONTROL of the described acquiring unit 310 current described volume change of obtaining.
The video file of playing can be that the user selects, or player is selected at random.Can accelerate or slow down the broadcasting speed of video file according to the frequency of the current described volume change of obtaining, its quickening or to slow down the degree of broadcasting speed specifically relevant with the frequency size of the current described volume change of obtaining.
Preferably, described video file is an animation file, but is not limited to this.
Described acquiring unit 310 specifically can be used for obtaining the cycle according to the frequency of setting, and periodically obtains the frequency that current volume of music changes.
Described playing control unit 320 can comprise: play subelement 321 and control sub unit 322.
Play subelement 321, be used for selecting or select at random to play the animation file that prestores according to the user.
Control sub unit 322 is used for the broadcasting speed according to the described animation file of FREQUENCY CONTROL of the described acquiring unit 310 current described volume change of obtaining.
Described control sub unit 322 specifically is used in the frequency of the described acquiring unit 310 current described volume change of obtaining during greater than the reference frequency set, accelerate the broadcasting speed of described animation file, during less than the reference frequency set, slow down the broadcasting speed of described animation file in the frequency of the described acquiring unit 310 current described volume change of obtaining; Or when the reference frequency that the frequency of the described acquiring unit 310 current described volume change of obtaining equals to set, control playing of described animation file according to normal output.
Be understandable that the described portable terminal of present embodiment can be mobile phone, personal digital assistant device, listen etc. at any time, and is not limited to this, the described function of each module of described portable terminal can be according to embodiment two described method specific implementations.
Need to prove, for aforesaid each method embodiment, for simple description, so it all is expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not subjected to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the specification all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, do not have the part that describes in detail among certain embodiment, can be referring to the associated description of other embodiment.
In sum, in the technical scheme that the embodiment of the invention provides, portable terminal is the synchronous playing video file when playing back music, and the broadcasting speed of the described video file of FREQUENCY CONTROL that changes according to volume of music, the broadcasting speed of video file can reflect the rhythm of music, can allow the user go the omnibearing music of experiencing by the sense of hearing and vision simultaneously.
Further, because the frequency that current volume of music changes is periodically to obtain, thereby the broadcasting speed of video file can reflect the rhythm of current period music, better user experience more accurately; The user can be provided with reference frequency according to custom, and the broadcasting speed of video file can be controlled flexibly; Can bring some video file downloading services for operator.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of the foregoing description is to instruct relevant hardware to finish by program, this program can be stored in the computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
More than the method and the portable terminal of displaying video on a kind of portable terminal that the embodiment of the invention provided is described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.