Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the invention discloses picture switching method when a kind of picture video is play and picture switching device shifter, the switching mode of picture when picture video is play can be enriched, improving picture in picture video when switching and the degree of correlation of background music.Below be described in detail respectively.
Refer to Fig. 1, Fig. 1 is the schematic flow sheet of picture switching method when a kind of picture video is play disclosed in the embodiment of the present invention.Wherein, method shown in Fig. 1 can be applied to smart mobile phone (as Android phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MobileInternetDevices, MID), the terminal such as personal digital assistant (PersonalDigitalAssistant, PDA), media player, intelligent television, intelligent watch, intelligent glasses, Intelligent bracelet.As shown in Figure 1, picture switching method when this picture video is play can comprise the following steps:
S101, picture switching device shifter obtain the background music of Target Photo video, and obtain the playing pictures that this Target Photo video packets contains.
In the embodiment of the present invention, when making the picture video with background music, first picture switching device shifter needs to determine to make the background music of Target Photo video and all playing pictures of composition Target Photo video, and then control all playing pictures according to certain playing sequence and specific broadcasting interval broadcasting, thus the broadcasting of realize target picture video.
Therefore, first this picture switching device shifter can obtain the background music of Target Photo video, and obtains all playing pictures of this Target Photo video of composition.Wherein, this background music can be the system default music that picture switching device shifter this locality stores, and also can be the snatch of music that user intercepts as required from certain a piece of music, the embodiment of the present invention limit.The playing pictures that this Target Photo video packets contains can be the system default picture of this picture switching device shifter, and also can be the photo that user chooses from local data base, can also be the photo that user is taken immediately by camera, the embodiment of the present invention be not construed as limiting.
Wherein, the duration of this background music is less than or equal to the playing duration of this Target Photo video, and the quantity of the playing pictures that this Target Photo video packets contains is N, wherein N be more than or equal to 2 integer.
As the optional execution mode of one, this picture switching device shifter can obtain background music and its playing pictures comprised of this Target Photo video simultaneously, can also be in background extraction music and after determining the feature moment, obtain the playing pictures of this Target Photo video again, can also be the playing pictures of this Target Photo video obtained before background extraction music, the embodiment of the present invention limit.
S102, this picture switching device shifter determine according to the characteristic information of this background music the feature moment that this background music comprises.
In the embodiment of the present invention, after the background music getting this Target Photo video, this picture switching device shifter can be analyzed the characteristic information of this background music, thus determines the feature moment of this background music.Wherein, the quantity in feature moment that background music comprises is more than or equal to the quantity of the playing pictures that this Target Photo video packets contains.
It should be noted that, the characteristic information of this background music can be decibel, frequency, tone, rhythm etc. that music comprises, and the embodiment of the present invention does not limit.Therefore, this picture switching device shifter can be the moment that decibel value is positioned at default decibel interval according to the feature moment that the characteristic information of this background music is determined; Also it can be the moment that each rhythm point is corresponding; It can also be the moment etc. of frequency in predeterminated frequency interval.
S103, this picture switching device shifter choose (N-1) individual feature moment as the switching instant switching this playing pictures in this Target Photo video from the feature moment that this background music comprises.
In the embodiment of the present invention, in order to multiple playing pictures are made into picture video, needs often will be opened playing pictures and arrange according to specific playing sequence, and then the reproduction time of playing pictures is often opened in setting, namely current playing pictures will be switched to the moment of next playing pictures after playing the duration of specifying.Therefore, the switching instant switching this playing pictures in Target Photo video can be understood as: trigger the moment that adjacent two playing pictures carry out switching.
Concrete, after this picture switching device shifter selects multiple feature moment according to the characteristic information of this background music, this picture switching device shifter will choose the feature moment of 1 quantity fewer than playing pictures quantity from these feature moment.That is, if this Target Photo video packets contains N and opens playing pictures, the feature moment that so this picture switching device shifter will comprise from this background music, select (N-1) individual feature moment as the switching instant switching this playing pictures in this Target Photo video.
Further, after determining switching instant, playing pictures just according to the rule of the corresponding switching instant of a playing pictures, can be combined with background music, thus is made into the Target Photo video comprising background music by this picture switching device shifter.
It should be noted that, often open all corresponding switching instant of playing pictures, so current playing pictures is after the switching instant of correspondence cuts out (disappearance), can be cut (display) next playing pictures at once, also can be slowly cutting out current playing pictures while, slowly cut next playing pictures, can be set with switching animation in handoff procedure, the embodiment of the present invention does not limit.
That is, in order to the interest of Target Photo video when playing can be increased, this picture switching device shifter can also arrange certain switching animation (also referred to as switching effect or effect steering effect), so can cut out according to the switching animation preset when current playing pictures plays to switching instant, then next playing pictures also can according to the switching animation incision preset.
S104, this picture switching device shifter carry out the switching of this playing pictures according to switching instant when playing this Target Photo video.
In the embodiment of the present invention, after the switching instant selecting this Target Photo video switch playing pictures, this picture switching device shifter just can be made into Target Photo video according to this background music and playing pictures according to the switching instant chosen.Therefore, this picture switching device shifter is when playing this Target Photo video, and each playing pictures will switch to next playing pictures at the switching instant of its correspondence.
It should be noted that, the duration of the Target Photo video of making can be consistent with the duration of background music, and also can be the acquiescence duration of this picture switching device shifter when generating pictures video, can also be the duration that user sets, the embodiment of the present invention limit.
For example, suppose that this Target Photo video packets contains 6 playing pictures, and the feature moment in background music is respectively the 2nd second, the 7th second, the 13rd second, the 20th second, the 28th second, the 33rd second, the 37th second, the 42nd second, the 44th second, the 52nd second, the 56th second, the 63rd second, the 67th second, the 71st second, the 78th second, so this picture switching device shifter just can according to the quantity of playing pictures, 5 switching instants are chosen, as the 13rd second, the 28th second, the 42nd second, the 56th second, the 71st second from the feature moment.Therefore, first playing pictures will cut out when playing to 13 seconds, and second playing pictures was also cut simultaneously 13 seconds time, and when playing to 28 seconds, the second pictures will cut out, the like.
Visible, in the method described by Fig. 1, this picture switching device shifter determines by the characteristic information of the background music of Target Photo video the feature moment that this background music comprises, and from the feature moment that this background music comprises, choose (N-1) individual feature moment as the switching instant switching playing pictures in this Target Photo video, then carry out the switching of playing pictures according to the switching instant determined when playing this Target Photo video.Pass through the embodiment of the present invention, picture switching device shifter can determine its switching time according to the feature moment of background music, picture when picture video is play switches and can be combined with the background music degree of depth, enhance the degree of correlation that background music and picture switch, and picture video is when playing, picture switching mode is also no longer single, thus promotes Consumer's Experience.
Refer to Fig. 2, Fig. 2 is the schematic flow sheet of picture switching method when another kind of picture video is play disclosed in the embodiment of the present invention.Wherein, method shown in Fig. 2 can be applied to the terminal such as smart mobile phone (as Android phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device, personal digital assistant, media player, intelligent television, intelligent watch, intelligent glasses, Intelligent bracelet.As shown in Figure 2, picture switching method when this picture video is play can comprise the following steps:
S201, picture switching device shifter obtain the background music of Target Photo video, and obtain the playing pictures that this Target Photo video packets contains.
S202, this picture switching device shifter determine according to the characteristic information of this background music the feature moment that this background music comprises.
In the embodiment of the present invention, according to the characteristic information of this background music, this picture switching device shifter determines that the concrete mode in the feature moment that this background music comprises can comprise the following steps:
Step 11) resolve the rhythm point that this background music comprises;
Step 12) is defined as feature moment of this background music the moment corresponding for each rhythm point.
In specific implementation, this picture switching device shifter is after the background music getting Target Photo video, all rhythm points that this background music comprises and moment corresponding to each rhythm point can be parsed, is then all defined as the feature moment of this background music the moment corresponding for each rhythm point.That is, the feature moment that this background music comprises is the moment that its each rhythm point is corresponding.
The total duration T of broadcasting that S203, this picture switching device shifter obtain this Target Photo video, and determine the object time set T' in the total duration of this broadcasting.
In the embodiment of the present invention, the total duration T of broadcasting of this Target Photo video can be system default duration, and also can be the duration that user sets, can also be total duration of this background music, the embodiment of the present invention limit.Therefore, when the total duration of broadcasting that this picture switching device shifter obtains Target Photo video is T, multiple object time will be determined, each object time t' from the total duration of broadcasting
krepresent, t'
k=(T/N) * k, wherein, 1≤k≤N-1, and k is integer, N is the quantity of the playing pictures that Target Photo video packets contains.That is, the total duration T of broadcasting can be divided into N part by this picture switching device shifter, and every part represents an object time, total (N-1) individual object time, and this (N-1) individual object time is the element in object time set T'.That is, in object time set T', the first aim moment is T/N, the second target moment is (T/N) * 2,3rd object time is (T/N) * 3, and (N-1) individual namely last object time is (T/N) * (N-1).
For example, suppose that this Target Photo video packets is containing 8 playing pictures, and the total duration of the broadcasting of this Target Photo video is 24 seconds, so this picture switching device shifter will will determine object time set T'=[3 in the total duration of broadcasting, 6,9,12,15,18,21].
It should be noted that, this picture switching device shifter determines object time set from the total duration of the broadcasting of Target Photo video, can be performed before the feature moment determining background music, also can be perform after the feature moment determining background music, can also be and determine that the feature moment of background music performs simultaneously, the embodiment of the present invention limit.Wherein, the quantity of the object time comprised in the number ratio object time set T' in feature moment that background music comprises wants many.
S204, this picture switching device shifter are chosen and this object time t' from the feature moment that this background music comprises
kthe nearest feature moment opens the switching instant t of playing pictures as kth
k.
In the embodiment of the present invention, after determining the feature moment that object time set T' and this background music comprise, this picture switching device shifter can choose the immediate feature moment with each object time respectively from these feature moment, thus obtains the switching instant of (N-1) individual feature moment as a playing pictures from first playing pictures to (N-1).That is, the switching instant t of playing pictures chosen kth and opening by this picture switching device shifter
ktime, be from multiple feature moment that this background music comprises from selecting apart from object time t'
kthe nearest feature moment.
Further, switching instant t is being determined
kafterwards, this picture switching device shifter just can make according to the rule of the corresponding switching instant of playing pictures and open by background music and N the Target Photo video that playing pictures forms.
For example, suppose that the total duration of the broadcasting of this Target Photo video is 24 seconds, total duration of background music is also 24 seconds, wherein, the set of all feature moment compositions that this background music comprises is [2,3,5,8,11,12,14,17,18,20,21,23,, and this picture switching device shifter is T'=[3,6,9 from playing the object time set determined 24 seconds of total duration 24], 12,15,18,21].Therefore, this picture switching device shifter will to choose with object time the immediate feature moment [3,5,8,12,14,18,21] respectively as the switching instant of each playing pictures during Target Photo video playback from the feature moment.
S205, this picture switching device shifter play this Target Photo video time according to switching instant t
kcarry out the switching that kth opens playing pictures.
In the embodiment of the present invention, from the feature moment, selecting kth respectively opening the switching instant t of playing pictures
kafterwards, the switching instant of first playing pictures of Target Photo video is just t
1, the switching instant of second playing pictures is just t
2, and the switching instant of (N-1) playing pictures is just t
n-1.That is, this picture switching device shifter play Target Photo video time, when first playing pictures plays to t
1t
kwill cut out during the moment, and second playing pictures incision, when second playing pictures plays to t
2also can cut out during the moment, thus the 3rd playing pictures incision, until (N-1) playing pictures plays to t
n-1n is switched to open playing pictures during the moment.
Visible, in the method described by Fig. 2, total for the broadcasting of Target Photo video duration can be equally divided into N part by picture switching device shifter, (N-1) individual object time before therefrom choosing, then from the feature moment determined, the immediate feature moment is chosen with each object time respectively, as the switching instant of this Target Photo video when carrying out playing pictures and switching.So both can ensure that the playing duration of each playing pictures was close, there will not be the reproduction time of part playing pictures too short, and the situation that the reproduction time of part playing pictures is long, can allow again and often open playing pictures and switch according to the rhythm of background music, thus be combined with the background music degree of depth, improve when playing pictures switches and the degree of correlation of background music, enriched playing pictures switching mode when picture video is play.
Refer to Fig. 3, Fig. 3 is the schematic flow sheet of picture switching method when another picture video is play disclosed in the embodiment of the present invention.Wherein, method shown in Fig. 3 can be applied to the terminal such as smart mobile phone (as Android phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device, personal digital assistant, media player, intelligent television, intelligent watch, intelligent glasses, Intelligent bracelet.As shown in Figure 3, picture switching method when this picture video is play can comprise the following steps:
S301, picture switching device shifter obtain the background music of Target Photo video, and obtain the playing pictures that this Target Photo video packets contains.
S302, this picture switching device shifter determine according to the characteristic information of this background music the feature moment that this background music comprises.
The total duration T of broadcasting that S303, this picture switching device shifter obtain this Target Photo video, and determine the object time set T' in the total duration of this broadcasting.
S304, this picture switching device shifter are chosen and this object time t' from the feature moment that this background music comprises
kthe nearest feature moment opens the switching instant t of playing pictures as kth
k.
S305, this picture switching device shifter, according to the switching instant often opening playing pictures, determine that this playing pictures switches to the playing duration s of the switching animation between next playing pictures
k.
In the embodiment of the present invention, between adjacent two playing pictures, switching animation can be set, when current playing pictures cuts out, first play and switch animation, and then cut next playing pictures.Therefore, after determining and often opening switching instant corresponding to playing pictures, this picture switching device shifter can determine the playing duration s of the switching animation often opened between playing pictures and next playing pictures
k.
Concrete, this picture switching device shifter, according to the switching instant often opening playing pictures, determines that this playing pictures switches to the playing duration s of the switching animation between next playing pictures
kconcrete mode can comprise the following steps:
Step 21) the rhythm point that comprised by this background music sorts according to the broadcasting sequential of this background music, obtains the arrangement sequence number of each rhythm point.
In specific implementation, this picture switching device shifter can according to the broadcasting sequential of this background music, the rhythm point that this background music comprises is sorted, thus obtain the arrangement sequence number of each rhythm point, as first rhythm point, second rhythm point, a y rhythm point, the arrangement sequence number of M its correspondence of rhythm point is respectively 1,2, y, M.
Step 22) determine switching instant t
kthe corresponding arrangement sequence number a of rhythm point in this rhythm point
k.
In specific implementation, due to switching instant t
kalso be the rhythm point characteristic of correspondence moment that background music comprises, therefore, this picture switching device shifter, after the arrangement sequence number determining each rhythm point, just can be determined the arrangement sequence number of the rhythm point that each switching instant is corresponding, thus determine switching instant t
kthe arrangement sequence number of corresponding rhythm point, is designated as a
k.That is, switching instant t
1the arrangement sequence number a of corresponding rhythm point
1represent, switching instant t
2the arrangement sequence number a of corresponding rhythm point
2represent, switching instant t
n-1the arrangement sequence number a of corresponding rhythm point
n-1represent.
For example, the switching instant that picture switching device shifter is determined is respectively [4,7,11,16,21,24], arrangement sequence number in all rhythm points that rhythm point corresponding to first switching instant comprises at background music may be 10, and the arrangement sequence number in all rhythm points of comprising at background music of rhythm point corresponding to second switching instant may be 21.As k=2, so switching instant t
2the arrangement sequence number of corresponding rhythm point is just a
2=21.
Step 23) obtain (a
k+ m) the individual rhythm point characteristic of correspondence moment, and calculate (a
k+ m) individual rhythm point and a
ktarget duration between individual rhythm point.
In specific implementation, m is the maximum rhythm point amount threshold that the playing duration switching animation comprises, and this rhythm point amount threshold can be that user sets, and also can be this picture switching device shifter system default, the embodiment of the present invention limit.Therefore, when determining the arrangement sequence number of the rhythm point that each switching instant is corresponding, this picture switching device shifter will according to the playing duration of often opening switching instant corresponding to playing pictures and determine the switching animation that this playing pictures is corresponding.That is, open playing pictures for kth, this picture switching device shifter is determining that the switching instant of its correspondence is t
ktime, just can determine this switching instant t
kthe arrangement sequence number of corresponding rhythm point is a
k.Therefore, this picture switching device shifter will with a
kindividual rhythm point is starting point, from this background music, search (a
k+ m) the individual rhythm point characteristic of correspondence moment, then calculate (a
k+ m) individual rhythm point characteristic of correspondence moment and switching instant be t
kbetween time difference, be the target duration between these two rhythm points.
It should be noted that, in same first background music, the situation that the interval time between the rhythm point that may there is various piece is inconsistent, the switching animation between so adjacent two playing pictures is by (a
k+ m) feature moment of individual rhythm point and a
kthe target duration that the feature moment of individual rhythm point is determined also may be also different.If the mode only by obtaining the interval moment between arbitrary neighborhood two rhythm points determining the playing duration switching animation, may will there is some playing pictures and may not mate with the rhythm point of background music when cutting.Therefore, a is calculated in this way
kindividual rhythm point and (a
k+ m) target duration between individual rhythm point is more accurate.Certainly, if the interval time between arbitrary neighborhood two rhythm points that this background music determined by this picture switching device shifter is identical, also the interval time between adjacent rhythm point can first be obtained, then interval time is multiplied with m and just can obtains the playing duration of each switching animation, thus the playing duration of switching animation between arbitrary neighborhood two playing pictures obtained is identical.
For example, suppose within 5 seconds, to be the switching instant of first playing pictures, it within 12 seconds, is the switching instant of second playing pictures, it within 18 seconds, is the switching instant of the 3rd playing pictures, the playing duration of the switching animation of setting comprises at most 5 rhythm points, the feature moment of the 5th rhythm point after the rhythm point that first switching instant is corresponding is 7 seconds, the feature moment of the 5th rhythm point after the rhythm point that second switching instant is corresponding is 13 seconds, the feature moment of the 5th rhythm point after the 3rd rhythm that switching instant is corresponding point is 19.2 seconds, therefore, the target duration obtained is respectively 2 seconds, 1 second, 1.2 second.
Step 24) from the default playing duration threshold value t switching animation
maxand choose minimum duration in this target duration and open as kth the playing duration s that playing pictures switches to the switching animation between (k+1) playing pictures
k.
In specific implementation, t
maxfor the maximum playing duration of each switching animation that picture switching device shifter or user set, namely preset playing duration threshold value.Therefore, at acquisition (a
k+ m) the individual rhythm point characteristic of correspondence moment, and calculate (a
k+ m) individual rhythm point and a
kafter target duration between individual rhythm point, this picture switching device shifter can for often opening playing pictures, from target duration and the default playing duration threshold value t of the switching animation calculated
maxbetween choose the playing duration s of minimum duration as switching animation corresponding to this playing pictures
k.That is, when determining that kth opens the playing duration of switching animation corresponding to playing pictures, first this picture switching device shifter can calculate its switching instant t
kcorresponding a
kindividual rhythm point and (a
k+ m) target duration between individual rhythm point, then from target duration and switch animation default playing duration threshold value choose minimum duration to open switching animation corresponding to playing pictures playing duration s as kth
k.
For example, if Target Photo video does not set switching animation when carrying out playing pictures switching, so this picture switching device shifter is after determining according to the feature moment of background music and often opening switching instant corresponding to playing pictures, the reproduction time often opening playing pictures in this Target Photo video is: the reproduction time 0 ~ 3 second being first playing pictures, within 3rd ~ 7 seconds, be the reproduction time of second playing pictures, and within 7 ~ 12 seconds, be the reproduction time of the 3rd playing pictures.
Again for example, if Target Photo video is set with switching animation when carrying out playing pictures switching, and the playing duration of the switching animation of setting comprises at most 4 rhythm points, and the default playing duration switching animation is 1.5 seconds.The switching instant that so can obtain first playing pictures according to the reproduction time of above-mentioned playing pictures is 3 seconds, and the switching instant of second playing pictures is 7 seconds.If the 4th the rhythm point characteristic of correspondence moment after the rhythm point that the switching instant of first playing pictures is corresponding is 4 seconds, the 4th the rhythm point characteristic of correspondence moment after the rhythm point that the switching instant of second playing pictures is corresponding is 8.9 seconds, so just can obtain first aim duration is 1 second, second target duration is 1.9 seconds, be compared with 1.5 seconds with switching the default playing duration of animation, this picture switching device shifter just can determine that the playing duration of the switching animation that first playing pictures is corresponding is 1 second, and the playing duration of switching animation corresponding to second playing pictures is 1.5 seconds.
S306, this picture switching device shifter control kth and open playing pictures opens playing pictures switching instant t in kth
kswitch to switching animation, and control this switching animation at (t
k+ s
k) moment switches to (k+1) playing pictures.
In the embodiment of the present invention, determining the playing duration s often opening switching animation corresponding to playing pictures respectively
kafterwards, this picture switching device shifter just can control kth and opens playing pictures at t
kmoment cuts out, and switches animation, and play s at switching animation in synchronization incision
kduring duration, will at (t
k+ s
k) moment cuts out, thus (k+1) playing pictures is cut at synchronization.
For example, the switching instant of first playing pictures is 3 seconds, the broadcasting moment of the switching animation of its correspondence is 1.2 seconds, the switching instant of second playing pictures is 7 seconds, the broadcasting moment of the switching animation of its correspondence is 0.9 second, so when playing this Target Photo video, first playing pictures switches to the switching animation of setting when playing to 3 seconds, switch when animation plays to 4.2 seconds and switch to second playing pictures, accordingly, the switching animation of setting is switched to when second playing pictures plays to 7 seconds, and the 3rd playing pictures is switched to when this switching animation plays to 7.9 seconds.
Visible, in the method described by Fig. 3, this picture switching device shifter can set often opens the switching animation that playing pictures plays setting in handoff procedure, thus increases picture video in the interest of carrying out playing pictures switching.Further, the playing duration switching animation is the switching instant that basis often opens playing pictures, and each rhythm point characteristic of correspondence moment determine, can avoid like this reproduction time of each playing pictures due to the interval time of background music each several part rhythm point and difference far away, that is, the playing duration of animation can be switched by adjustment and adjust the reproduction time often opening playing pictures, thus enhance picture video when carrying out picture and switching and the degree of correlation of background music.
Refer to Fig. 4, Fig. 4 is the structural representation of a kind of picture switching device shifter disclosed in the embodiment of the present invention.Wherein, the picture switching device shifter 400 shown in Fig. 4 can be applied to the terminal such as smart mobile phone (as Android phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device, personal digital assistant, media player, intelligent television, intelligent watch, intelligent glasses, Intelligent bracelet.As shown in Figure 4, this picture switching device shifter 400 can comprise with lower unit:
Acquiring unit 401, for obtaining the background music of Target Photo video, and obtains the playing pictures that this Target Photo video packets contains.
In the embodiment of the present invention, when making the picture video with background music, first picture switching device shifter 400 needs to determine to make the background music of Target Photo video and all playing pictures of composition Target Photo video, and then control all playing pictures according to certain playing sequence and specific broadcasting interval broadcasting, thus the broadcasting of realize target picture video.
Therefore, first acquiring unit 401 can obtain the background music of Target Photo video, and obtains all playing pictures of this Target Photo video of composition.Wherein, this background music can be the system default music that picture switching device shifter this locality stores, and also can be the snatch of music that user intercepts as required from certain a piece of music, the embodiment of the present invention limit.The playing pictures that this Target Photo video packets contains can be the system default picture of this picture switching device shifter 400, also can be the photo that user chooses from local data base, can also be the photo that user is taken immediately by camera, the embodiment of the present invention be not construed as limiting.
Wherein, the duration of this background music is less than or equal to the playing duration of this Target Photo video, and the quantity of the playing pictures that this Target Photo video packets contains is N, wherein N be more than or equal to 2 integer.
As the optional execution mode of one, acquiring unit 401 can obtain background music and its playing pictures comprised of this Target Photo video simultaneously, can also be in background extraction music and after determining the feature moment, obtain the playing pictures of this Target Photo video again, can also be the playing pictures of this Target Photo video obtained before background extraction music, the embodiment of the present invention limit.
First determining unit 402, for determining the feature moment that this background music comprises according to the characteristic information of this background music.
In the embodiment of the present invention, after acquiring unit 401 gets the background music of this Target Photo video, the first determining unit 402 can be analyzed the characteristic information of this background music, thus determines the feature moment of this background music.Wherein, the quantity in feature moment that background music comprises is more than or equal to the quantity of the playing pictures that this Target Photo video packets contains.
It should be noted that, the characteristic information of this background music can be decibel, frequency, tone, rhythm etc. that music comprises, and the embodiment of the present invention does not limit.Therefore, the first determining unit 402 can be the moment that decibel value is positioned at default decibel interval according to the feature moment that the characteristic information of this background music is determined; Also it can be the moment that each rhythm point is corresponding; It can also be the moment etc. of frequency in predeterminated frequency interval.
Choose unit 403, choose (N-1) individual feature moment as the switching instant switching this playing pictures in this Target Photo video in feature moment of comprising from this background music.
In the embodiment of the present invention, in order to multiple playing pictures are made into picture video, needs often will be opened playing pictures and arrange according to specific playing sequence, and then the reproduction time of playing pictures is often opened in setting, namely current playing pictures will be switched to the moment of next playing pictures after playing the duration of specifying.Therefore, the switching instant switching this playing pictures in Target Photo video can be understood as: trigger the moment that adjacent two playing pictures carry out switching.
Concrete, after the first determining unit 402 selects multiple feature moment according to the characteristic information of this background music, choose the feature moment that unit 403 will choose 1 quantity fewer than playing pictures quantity from these feature moment.That is, if this Target Photo video packets contains N and opens playing pictures, so choose the feature moment that unit 403 will comprise from this background music, select (N-1) individual feature moment as the switching instant switching this playing pictures in this Target Photo video.
Further, after choosing unit 403 and determining switching instant, playing pictures just according to the rule of the corresponding switching instant of a playing pictures, can be combined with background music, thus is made into the Target Photo video comprising background music by this picture switching device shifter 400.
It should be noted that, often open all corresponding switching instant of playing pictures, so current playing pictures is after the switching instant of correspondence cuts out (disappearance), can be cut (display) next playing pictures at once, also can be slowly cutting out current playing pictures while, slowly cut next playing pictures, can be set with switching animation in handoff procedure, the embodiment of the present invention does not limit.
That is, in order to the interest of Target Photo video when playing can be increased, this picture switching device shifter 400 can also arrange certain switching animation (also referred to as switching effect or effect steering effect), so can cut out according to the switching animation preset when current playing pictures plays to switching instant, then next playing pictures also can according to the switching animation incision preset.
Switch unit 404, for choosing according to above-mentioned the switching that switching instant that unit 403 chooses carries out this playing pictures when playing this Target Photo video.
In the embodiment of the present invention, after choosing unit 403 and selecting the switching instant of this Target Photo video switch playing pictures, this picture switching device shifter 400 just can be made into Target Photo video according to this background music and playing pictures according to the switching instant chosen.Therefore, switch unit 404 is when playing this Target Photo video, and each playing pictures will switch to next playing pictures at the switching instant of its correspondence.
It should be noted that, the duration of the Target Photo video of making can be consistent with the duration of background music, and also can be the acquiescence duration of this picture switching device shifter 400 when generating pictures video, can also be the duration that user sets, the embodiment of the present invention limit.
For example, suppose that this Target Photo video packets contains 6 playing pictures, and the feature moment in background music is respectively the 2nd second, the 7th second, the 13rd second, the 20th second, the 28th second, the 33rd second, the 37th second, the 42nd second, the 44th second, the 52nd second, the 56th second, the 63rd second, the 67th second, the 71st second, the 78th second, so choosing unit 403 just can according to the quantity of playing pictures, 5 switching instants are chosen, as the 13rd second, the 28th second, the 42nd second, the 56th second, the 71st second from the feature moment.Therefore, switch unit 404 will control first playing pictures respectively and will cut out when playing to 13 seconds, and second playing pictures was also cut simultaneously 13 seconds time, and when playing to 28 seconds, the second pictures will cut out, the like.
Visible, in the picture switching device shifter described by Fig. 4, this picture switching device shifter determines by the characteristic information of the background music of Target Photo video the feature moment that this background music comprises, and from the feature moment that this background music comprises, choose (N-1) individual feature moment as the switching instant switching playing pictures in this Target Photo video, then carry out the switching of playing pictures according to the switching instant determined when playing this Target Photo video.Pass through the embodiment of the present invention, picture switching device shifter can determine its switching time according to the feature moment of background music, picture when picture video is play switches and can be combined with the background music degree of depth, enhance the degree of correlation that background music and picture switch, and picture video is when playing, picture switching mode is also no longer single, thus promotes Consumer's Experience.
Refer to Fig. 5, Fig. 5 is the structural representation of another kind of picture switching device shifter disclosed in the embodiment of the present invention.Wherein, the picture switching device shifter 400 shown in Fig. 5 optimizes to obtain on the basis of the picture switching device shifter 400 shown in Fig. 4.As shown in Figure 5, this picture switching device shifter 400 can comprise:
Second determines subelement 405, for according to the switching instant often opening playing pictures, determines that this playing pictures switches to the playing duration s of the switching animation between next playing pictures
k.
In the embodiment of the present invention, between adjacent two playing pictures, switching animation can be set, when current playing pictures cuts out, first play and switch animation, and then cut next playing pictures.Therefore, after choosing unit 403 and determining and often open switching instant corresponding to playing pictures, second determines that subelement 405 can determine the playing duration s of the switching animation often opened between playing pictures and next playing pictures
k.
In the embodiment of the present invention, above-mentioned first determining unit 402 can comprise parsing subelement 4021 and first and determine subelement 4022, wherein:
Resolve subelement 4021, for resolving the rhythm point that this background music comprises.
First determines subelement 4022, for being defined as the feature moment of this background music the moment corresponding for each rhythm point.
In specific implementation, after acquiring unit 401 gets the background music of Target Photo video, resolve subelement 4021 and can parse all rhythm points that this background music comprises and moment corresponding to each rhythm point, first determines that then the moment corresponding for each rhythm point is all defined as the feature moment of this background music by subelement 4022.That is, the feature moment that this background music comprises is the moment that its each rhythm point is corresponding.
In the embodiment of the present invention, above-mentioned unit 403 of choosing can comprise the first acquisition subelement 4031 and first and chooses subelement 4032, wherein:
First obtains subelement 4031, the total duration T of the broadcasting for obtaining this Target Photo video, and determines the object time set T' in the total duration of this broadcasting.
In specific implementation, the total duration T of broadcasting of this Target Photo video can be system default duration, and also can be the duration that user sets, can also be total duration of this background music, the embodiment of the present invention limit.Therefore, when the total duration of broadcasting that the first acquisition subelement 4031 obtains Target Photo video is T, multiple object time will be determined, each object time t' from the total duration of broadcasting
krepresent, t'
k=(T/N) * k, wherein, 1≤k≤N-1, and k is integer, N is the quantity of the playing pictures that Target Photo video packets contains.That is, first obtains subelement 4031 can be divided into N part by total for broadcasting duration T, every part represents an object time, total (N-1) individual object time, and this (N-1) individual object time is the element in object time set T'.That is, in object time set T', the first aim moment is T/N, the second target moment is (T/N) * 2,3rd object time is (T/N) * 3, and (N-1) individual namely last object time is (T/N) * (N-1).
For example, suppose that this Target Photo video packets is containing 8 playing pictures, and the total duration of the broadcasting of this Target Photo video is 24 seconds, so the first acquisition subelement 4031 will determine object time set T'=[3 in the total duration of broadcasting, 6,9,12,15,18,21].
It should be noted that, first obtains subelement 4031 determines object time set from the total duration of the broadcasting of Target Photo video, can be performed before the feature moment that the first determining unit 402 determines background music, also can be perform after the feature moment that the first determining unit 402 determines background music, can also be determine that the feature moment of background music performs simultaneously with the first determining unit 402, the embodiment of the present invention limit.Wherein, the quantity of the object time comprised in the number ratio object time set T' in feature moment that background music comprises wants many.
First chooses subelement 4032, chooses and this object time t' in feature moment of comprising from this background music
kthe nearest feature moment opens the switching instant t of playing pictures as kth
k.
In specific implementation, after the first acquisition subelement 4031 determines that object time set T' and the first determining unit 402 determine the feature moment that this background music comprises, first chooses subelement 4032 can choose with each object time the immediate feature moment respectively from these feature moment, thus obtains the switching instant of (N-1) individual feature moment as a playing pictures from first playing pictures to (N-1).That is, first choose subelement 4032 and choosing kth and open the switching instant t of playing pictures
ktime, be from multiple feature moment that this background music comprises from selecting apart from object time t'
kthe nearest feature moment.
Further, obtain subelement 4031 first and determine switching instant t
kafterwards, first choose subelement 4032 and just can make according to the rule of the corresponding switching instant of playing pictures and open by background music and N the Target Photo video that playing pictures forms.
For example, suppose that the total duration of the broadcasting of this Target Photo video is 24 seconds, total duration of background music is also 24 seconds, wherein, the set of all feature moment compositions that this background music comprises is [2,3,5,8,11,12,14,17,18,20,21,23,, and first to obtain subelement 4031 from playing the object time set determined 24 seconds of total duration be T '=[3,6,9 24], 12,15,18,2].Therefore, first choose subelement 4032 and from the feature moment, the immediate feature moment [3,5,8,12,14,18,21] will to be chosen with object time respectively as the switching instant of each playing pictures during Target Photo video playback.
As a kind of feasible execution mode, above-mentioned second determines that subelement 405 can comprise sequence subelement 4051, second and determine that subelement 4052, second obtains subelement 4053 and second and chooses subelement 4054, wherein:
Sequence subelement 4051, sorts according to the broadcasting sequential of this background music for the rhythm point comprised by this background music, obtains the arrangement sequence number of each rhythm point.
In specific implementation, sequence subelement 4051 can according to the broadcasting sequential of this background music, the rhythm point that this background music comprises is sorted, thus obtain the arrangement sequence number of each rhythm point, as first rhythm point, second rhythm point, a y rhythm point, the arrangement sequence number of M its correspondence of rhythm point is respectively 1,2, y, M.
Second determines subelement 4052, for determining switching instant t
kthe corresponding arrangement sequence number a of rhythm point in this rhythm point
k.
In specific implementation, due to switching instant t
kalso it is the rhythm point characteristic of correspondence moment that background music comprises, therefore, second determines that subelement 4052 is after the arrangement sequence number determining each rhythm point, just can determine the arrangement sequence number of the rhythm point that each switching instant is corresponding, thus determine switching instant t
kthe arrangement sequence number of corresponding rhythm point, is designated as a
k.That is, switching instant t
1the arrangement sequence number a of corresponding rhythm point
1represent, switching instant t
2the arrangement sequence number a of corresponding rhythm point
2represent, switching instant t
n-1the arrangement sequence number a of corresponding rhythm point
n-1represent.
For example, choose the switching instant that unit 403 determines and be respectively [4,7,11,16,21,24], arrangement sequence number in all rhythm points that rhythm point corresponding to first switching instant obtaining of subelement 4051 that so sort comprises at background music may be 10, and the arrangement sequence number in all rhythm points that rhythm point corresponding to second switching instant comprises at background music may be 21.As k=2, second determines the switching instant t that subelement 4052 is determined
2the arrangement sequence number of corresponding rhythm point is just a
2=21.
Second obtains subelement 4053, for obtaining (a
k+ m) the individual rhythm point characteristic of correspondence moment, and calculate (a
k+ m) individual rhythm point and a
ktarget duration between individual rhythm point.
In specific implementation, m is the maximum rhythm point amount threshold that the playing duration switching animation comprises, and this rhythm point amount threshold can be that user sets, and also can be this picture switching device shifter 400 system default, the embodiment of the present invention limit.Therefore, when second determines that the arrangement sequence number of the rhythm point that each switching instant is corresponding determined by subelement 4052, second obtains subelement 4053 will according to the playing duration of often opening switching instant corresponding to playing pictures and determine the switching animation that this playing pictures is corresponding.That is, playing pictures is opened for kth, determine that the switching instant of its correspondence is t choosing unit 403
ktime, second obtains subelement 4053 just can determine this switching instant t
kthe arrangement sequence number of corresponding rhythm point is a
k.Therefore, the second acquisition subelement 4053 will with a
kindividual rhythm point is starting point, from this background music, search (a
k+ m) the individual rhythm point characteristic of correspondence moment, then calculate (a
k+ m) individual rhythm point characteristic of correspondence moment and switching instant be t
kbetween time difference, be the target duration between these two rhythm points.
It should be noted that, in same first background music, the situation that the interval time between the rhythm point that may there is various piece is inconsistent, the switching animation between so adjacent two playing pictures is by (a
k+ m) feature moment of individual rhythm point and a
kthe target duration that the feature moment of individual rhythm point is determined also may be also different.If the mode only by obtaining the interval moment between arbitrary neighborhood two rhythm points determining the playing duration switching animation, may will there is some playing pictures and may not mate with the rhythm point of background music when cutting.Therefore, a is calculated in this way
kindividual rhythm point and (a
k+ m) target duration between individual rhythm point is more accurate.Certainly, if second determines that the interval time between arbitrary neighborhood two rhythm points that this background music determined by subelement 4052 is identical, second acquisition subelement 4053 also first can obtain the interval time between adjacent rhythm point, then interval time is multiplied with m and just can obtains the playing duration of each switching animation, thus the playing duration of switching animation between arbitrary neighborhood two playing pictures obtained is identical.
For example, suppose within 5 seconds, to be the switching instant of first playing pictures, it within 12 seconds, is the switching instant of second playing pictures, it within 18 seconds, is the switching instant of the 3rd playing pictures, the playing duration of the switching animation of setting comprises at most 5 rhythm points, the feature moment of the 5th rhythm point after the rhythm point that first switching instant is corresponding is 7 seconds, the feature moment of the 5th rhythm point after the rhythm point that second switching instant is corresponding is 13 seconds, the feature moment of the 5th rhythm point after the 3rd rhythm that switching instant is corresponding point is 19.2 seconds, therefore, the target duration obtained is respectively 2 seconds, 1 second, 1.2 second.
Second chooses subelement 4054, for the default playing duration threshold value t from switching animation
maxand choose minimum duration in this target duration and open as kth the playing duration s that playing pictures switches to the switching animation between (k+1) playing pictures
k.
In specific implementation, t
maxfor the maximum playing duration of each switching animation that picture switching device shifter 400 or user set, namely preset playing duration threshold value.Therefore, obtain subelement 4053 second and obtain (a
k+ m) the individual rhythm point characteristic of correspondence moment, and calculate (a
k+ m) individual rhythm point and a
kafter target duration between individual rhythm point, second chooses subelement 4054 meeting for often opening playing pictures, from target duration and the default playing duration threshold value t of the switching animation calculated
maxbetween choose the playing duration s of minimum duration as switching animation corresponding to this playing pictures
k.That is, when determining that kth opens the playing duration of switching animation corresponding to playing pictures, first second obtains subelement 4053 can calculate its switching instant t
kcorresponding a
kindividual rhythm point and (a
k+ m) target duration between individual rhythm point, then second choose subelement 4054 from target duration and switch animation default playing duration threshold value choose minimum duration to open switching animation corresponding to playing pictures playing duration s as kth
k.
For example, if Target Photo video does not set switching animation when carrying out playing pictures switching, so choosing after the feature moment of unit 403 according to background music determine and often open switching instant corresponding to playing pictures, the reproduction time often opening playing pictures in this Target Photo video is: the reproduction time 0 ~ 3 second being first playing pictures, within 3rd ~ 7 seconds, be the reproduction time of second playing pictures, and within 7 ~ 12 seconds, be the reproduction time of the 3rd playing pictures.
Again for example, if Target Photo video is set with switching animation when carrying out playing pictures switching, and the playing duration of the switching animation of setting comprises at most 4 rhythm points, and the default playing duration switching animation is 1.5 seconds.The switching instant that so can obtain first playing pictures according to the reproduction time of above-mentioned playing pictures is 3 seconds, and the switching instant of second playing pictures is 7 seconds.If the 4th the rhythm point characteristic of correspondence moment after the rhythm point that the switching instant of first playing pictures is corresponding is 4 seconds, the 4th the rhythm point characteristic of correspondence moment after the rhythm point that the switching instant of second playing pictures is corresponding is 8.9 seconds, so just can obtain first aim duration is 1 second, second target duration is 1.9 seconds, be compared with 1.5 seconds with switching the default playing duration of animation, second chooses subelement 4054 just can determine that the playing duration of the switching animation that first playing pictures is corresponding is 1 second, and the playing duration of switching animation corresponding to second playing pictures is 1.5 seconds.
In the embodiment of the present invention, above-mentioned switch unit 404 when playing this Target Photo video according to the concrete mode choosing switching instant that unit 403 chooses and carry out the switching of playing pictures can be:
Control kth and open playing pictures opens playing pictures switching instant t in kth
kswitch to switching animation, and control this switching animation at (t
k+ s
k) moment switches to (k+1) playing pictures.
In specific implementation, determine the playing duration s often opening switching animation corresponding to playing pictures respectively in the second determining unit 405
kafterwards, switch unit 404 just can control kth and opens playing pictures at t
kmoment cuts out, and switches animation, and play s at switching animation in synchronization incision
kduring duration, will at (t
k+ s
k) moment cuts out, thus (k+1) playing pictures is cut at synchronization.
For example, the switching instant of first playing pictures is 3 seconds, the broadcasting moment of the switching animation of its correspondence is 1.2 seconds, the switching instant of second playing pictures is 7 seconds, the broadcasting moment of the switching animation of its correspondence is 0.9 second, so when playing this Target Photo video, first playing pictures switches to the switching animation of setting when playing to 3 seconds, switch when animation plays to 4.2 seconds and switch to second playing pictures, accordingly, the switching animation of setting is switched to when second playing pictures plays to 7 seconds, and the 3rd playing pictures is switched to when this switching animation plays to 7.9 seconds.
Visible, in the picture switching device shifter described by Fig. 5, total for the broadcasting of Target Photo video duration can be equally divided into N part by picture switching device shifter, (N-1) individual object time before therefrom choosing, then from the feature moment determined, the immediate feature moment is chosen with each object time respectively, as the switching instant of this Target Photo video when carrying out playing pictures and switching.So both can ensure that the playing duration of each playing pictures was close, there will not be the reproduction time of part playing pictures too short, and the situation that the reproduction time of part playing pictures is long, can allow again and often open playing pictures and switch according to the rhythm of background music, thus be combined with the background music degree of depth, enrich playing pictures switching mode when picture video is play.Further, this picture switching device shifter can also set often opens the switching animation that playing pictures plays setting in handoff procedure, thus increases picture video in the interest of carrying out playing pictures switching.Meanwhile, this picture switching device shifter can switch the playing duration of animation by adjustment adjust the reproduction time often opening playing pictures, thus enhances picture video when carrying out picture and switching and the degree of correlation of background music.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (RandomAccessMemory, RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.