Invention content
A kind of method for broadcasting multimedia file of the embodiment of the present application offer and device, think to solve user in the prior art
Continuously to play problem not convenient caused by the different fragments for the multiple videos being locally stored.
The embodiment of the present application provides a kind of method for broadcasting multimedia file, including:
According to current play time, fragment objects are determined in the orbiting object being pre-created, wherein the segment
Object includes start time point, the mark of multimedia file, multimedia text of the fragment objects on the timeline of orbiting object
The playing duration for playing start time point and multimedia file of part;
According to the mark for the multimedia file for including in the fragment objects, multimedia file is determined;
According to start time point, the current reproduction time of the fragment objects on the timeline of orbiting object
The playing duration for playing start time point and the multimedia file of point, the multimedia file, play determine it is more
Media file.
Preferably, before determining fragment objects in the orbiting object being pre-created, multimedia file is obtained, creates program
Object creates the corresponding orbiting object of the program object, according to what is got according to the type of the multimedia file got
Each multimedia file creates the fragment objects of the multimedia file, is located at orbiting object according to the fragment objects created
The fragment objects created are added to corresponding orbiting object by the start time point on timeline.
Preferably, in the orbiting object being pre-created, it is located at according to the fragment objects on the timeline of orbiting object
Start time point and the playing duration determine the time interval where the fragment objects, according to current reproduction time
Point determines the fragment objects corresponding to the time interval comprising current play time.
Preferably, the start time point according to the fragment objects on the timeline of orbiting object, described current broadcast
The playing duration for putting time point and the multimedia file determines the duration to be played of the multimedia file, according to determination
The duration to be played of the multimedia file gone out, the broadcasting start time point of the multimedia file and multimedia text
The playing duration of part determines the multimedia file segment to be played of the multimedia file, plays the multimedia file segment.
Preferably, the multimedia file segment is decoded, number corresponding to decoded multimedia file segment
According to synchronizing, the corresponding data of multimedia file segment after synchronizing are played.
Preferably, the multimedia file includes video multimedia file, background music multimedia file and dubs more
At least one of media file.
Preferably, this method further includes:According to start time point of the fragment objects on the timeline of orbiting object,
The playing duration for playing start time point and the multimedia file of the multimedia file, synthesizes the video multimedia
File, background music multimedia file and at least one of dub multimedia file.
The embodiment of the present application provides a kind of multimedia file playing device, including:
Fragment objects determining module, for according to current play time, being determined in the orbiting object being pre-created
Fragment objects, wherein the fragment objects include start time point of the fragment objects on the timeline of orbiting object, more matchmakers
The mark of body file, the playing duration for playing start time point and multimedia file of multimedia file;
Multimedia file determining module is determined for the mark according to the multimedia file for including in the fragment objects
Multimedia file;
Playing module, for according to start time point of the fragment objects on the timeline of orbiting object, described work as
The playing duration for playing start time point and the multimedia file of preceding play time, the multimedia file, broadcasts
Put the multimedia file determined.
Preferably, described device further includes:Creation module, for the fragment objects determining module in the rail being pre-created
Before determining fragment objects in road object, multimedia file is obtained, program object is created, according to the multimedia file got
Type creates the corresponding orbiting object of the program object, according to each multimedia file got, creates multimedia text
The fragment objects of part, start time point on the timeline of orbiting object is located at according to the fragment objects created to be created
Fragment objects are added to corresponding orbiting object.
Preferably, the fragment objects determining module is specifically used for, in the orbiting object being pre-created, according to described
Section object is located at start time point on the timeline of orbiting object and the playing duration determines the fragment objects place
Time interval the piece corresponding to the time interval comprising current play time is determined according to current play time
Section object.
Preferably, the playing module is specifically used for, according to the fragment objects rising on the timeline of orbiting object
Begin time point, the current play time and the multimedia file playing duration, determine the multimedia file
Duration to be played, according to the broadcasting of the duration to be played for the multimedia file determined, the multimedia file originate
The playing duration of time point and the multimedia file determines the multimedia file segment to be played of the multimedia file,
Play the multimedia file segment.
Preferably, the playing module is additionally operable to, and is decoded to the multimedia file segment, to decoded more matchmakers
The corresponding data of body file fragment synchronize, and play the corresponding data of multimedia file segment after synchronizing.
Preferably, the multimedia file includes video multimedia file, background music multimedia file and dubs more
At least one of media file.
Preferably, which further includes:Synthesis module is used for the timeline in orbiting object according to the fragment objects
Start time point, the multimedia file the playing duration for playing start time point and the multimedia file, synthesis
The video multimedia file, background music multimedia file and at least one of dub multimedia file.
A kind of method for broadcasting multimedia file of the embodiment of the present application offer and device, this method include:It is broadcast according to current
Time point is put, fragment objects are determined in the orbiting object being pre-created, wherein the fragment objects include that fragment objects are in-orbit
The mark of start time point, multimedia file on the timeline of road object, the broadcasting start time point of multimedia file and
The playing duration of multimedia file determines multimedia file according to the mark for the multimedia file for including in the fragment objects,
According to start time point of the fragment objects on the timeline of orbiting object, the current play time, more matchmakers
The playing duration for playing start time point and the multimedia file of body file, plays the multimedia file determined.It is logical
The above method is crossed, by creating needing to play and carrying initial time of the fragment objects on the timeline of orbiting object
More matchmakers of point, the mark of multimedia file, the playing duration for playing start time point and multimedia file of multimedia file
The fragment objects of body file can simply and effectively realize that the splicing for the segment being arbitrarily designated in multiple multimedia files plays,
Improve convenience when user wants continuously to play the different fragments for the multiple multimedia files being locally stored.
Specific implementation mode
To keep the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one
Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Go out the every other embodiment obtained under the premise of creative work, shall fall in the protection scope of this application.
Fig. 1 is multimedia file playing process provided by the embodiments of the present application, specifically includes following steps:
S101:According to current play time, fragment objects are determined in the orbiting object being pre-created.
Since in practical applications, user is possible to want continuously to play at least two multimedia files being locally stored
The different fragments of (e.g., audio file or video file), in this application, it is necessary first to which user is wanted into the multimedia played text
Part carries out front and back splicing according to playing sequence.
Further, multimedia file to be spliced is managed and added for convenience, in this application, is wanted by user
During the multimedia file of broadcasting carries out front and back splicing according to playing sequence, it is necessary first to create the rail of multiple and different types
Road object, for managing and adding multimedia file.
Further, due to multimedia file be have it is different types of, e.g., video file, audio file etc., and inhomogeneity
The composition of the multimedia file of type is also differentiated, it may also be said to, the type of multimedia file determines multimedia file
Constitute, e.g., for video file, be made of video pictures and video original sound, and for audio file, only by
What audio original sound was constituted, therefore, in this application, the orbiting object for creating multiple and different types is specifically as follows:If more matchmakers
The composition of body file includes video pictures and video original sound, then is directed to video pictures and creates video pictures orbiting object, be used for
Management and addition multimedia file video pictures, and for video original sound create video original sound orbiting object, for manage and
The video original sound of multimedia file is added, as shown in Figure 2, wherein orbiting object refers to one be present in a program
Or a plurality of data flow, and the quantity of orbiting object can be one or more, the number amount and type of orbiting object are depending on more
The composition of media file or the type of multimedia file.
In addition, orbiting object includes this attribute of timeline, the timeline refer to since zero moment to
Sometime put the time interval of end, timeline can indicate multi-medium data each moment operating condition, that is, play
What sound of what picture, e.g., if video file is added on timeline, each moment on timeline corresponds to video
Specific picture and specific sound in file.
Further, in this application, program object can be created, the program object is for managing created track pair
As, wherein the program object refers to the object of editable multimedia file, can have a plurality of rail in a program object
Road object.
Further, since multimedia file is usually all that capacity is prodigious, and multimedia file is directly appended to rail
The capacity of orbiting object can be increased in road object, therefore, in this application, each multimedia file got, wound can be directed to
The fragment objects for building the multimedia file, in the fragment objects carried out position multimedia file using fragment objects, and created
Preserve the mark (e.g., the storage address of multimedia file) of multimedia file.If multimedia file is video file, create
Build the video clip of video file, if multimedia file is to dub file, create dub file dub segment, wherein
The fragment objects refer to that the object of one or more material file resource on a track, fragment objects can be regarded
Frequency object can be audio object, it might even be possible to be the object etc. with parameter definition.
Further, in this application, the fragment objects created also preserve multimedia file broadcasting starting point (
That is, it is desirable to multimedia file is played which since multimedia file at time point) and multimedia file broadcasting when
Long (it is desirable that how long play), e.g., the total duration of multimedia file A is 30 seconds, needs to play arriving for 10 seconds for multimedia file A
The broadcasting starting point of content between 25 seconds, the then multimedia file preserved in the fragment objects of multimedia file A is 10 seconds,
The playing duration of multimedia file is 15 seconds, i.e. 25-10=15, as shown in Figure 3.
Broadcasting for multiple multimedia files, it is thus necessary to determine that the playing sequence of multimedia file, that is to say, that broadcasting
When putting spliced multimedia file, need to know which multimedia file which plays at time point, therefore, in this application,
The fragment objects created also need to preserve its position in orbit.
Since orbiting object includes this attribute of timeline, in this application, fragment objects are in orbit
Position be used to determine its position on the time line, that is, the start time point on the timeline of orbiting object, this
Application shows in particular the mode of position of the fragment objects for determining each multimedia file on the timeline of orbiting object:It is right
It is played in the splicing of multiple multimedia files, for each orbiting object, is located at the first multimedia file on orbiting object
Fragment objects start time point on the timeline of orbiting object is zero, and the fragment objects of second multimedia file are in track pair
Start time point is the broadcasting starting in the fragment objects of previous (namely first) multimedia file on the timeline of elephant
The sum of point and playing duration, and so on, all it is added on orbiting object until by the fragment objects of all multimedia files,
Such as, it is assumed that only multimedia file A and multimedia file B, between user wants 10 seconds to 25 seconds of first broadcasting multimedia file A
Content, wherein playing duration is 15 seconds, then and then plays the content between 5 seconds to 30 seconds of multimedia file B, wherein
Playing duration is 25 seconds, then during the fragment objects of establishment multimedia file A and the fragment objects of multimedia file B,
It needs to be determined that the fragment objects for going out multimedia file A are located at the start time point on the timeline of orbiting object, that is, the 0th second, with
And the fragment objects of multimedia file B are located at the start time point on the timeline of orbiting object, that is, the 15th second, such as Fig. 4 institutes
Show, wherein clipA indicates that the fragment objects of multimedia file A, clipB indicate that the fragment objects of multimedia file B, clipA rise
Initial point indicates that the fragment objects of multimedia file A are located at the start time point on the timeline of orbiting object, clipB starting point tables
Show that the fragment objects of multimedia file B are located at the start time point on the timeline of orbiting object, subsequently in broadcasting of starting from scratch
During multimedia file as shown in Figure 4, start the content for playing multimedia file A after playing first, until 15 seconds, then
And then the content of multimedia file B is played.
Starting broadcasting the at regular intervals when playing it should be noted that there may be user and wish to start
One multimedia file, or after playing a multimedia file, broadcasting next multimedia file at regular intervals
The case where, for such case, during creating fragment objects, the splicing of multiple multimedia files is played, is located at
Start time point is previous multimedia file to the fragment objects of the latter multimedia file on orbiting object on the time line
Fragment objects the sum of start time point, playing duration and preset interval duration on the time line, such as, it is assumed that user wishes
Multimedia file A is played at the very start, and playing duration is 15 seconds, and interval plays multimedia file B in N seconds again, then multimedia file B
Time point of the fragment objects on orbiting object be multimedia file A fragment objects on the time line start time point 0 second,
The sum of playing duration 15 seconds and N seconds (that is, preset interval duration), that is, 0+15+N=15+N, as shown in Figure 5, wherein
ClipA indicates that the fragment objects of multimedia file A, clipB indicate that the fragment objects of multimedia file B, clipA starting points indicate
The fragment objects of multimedia file A are located at the start time point on the timeline of orbiting object, and clipB starting points indicate multimedia
The fragment objects of file B are located at the start time point on the timeline of orbiting object, subsequently as shown in Figure 5 in broadcasting of starting from scratch
Multimedia file during, start and play the content of multimedia file A after playing first, until (15+N) second, then play
The content of multimedia file B.
For another example, if, it is assumed that user wishes to start play 10s after play multimedia file A again, playing duration is 15 seconds,
And then playing multimedia file B again, (that is, a length of 0) when preset interval, then the fragment objects of multimedia file B are in track pair
As fragment objects that upper time point is multimedia file A start time point 10 seconds, playing duration 15 seconds and 0 on the time line
The sum of second (that is, preset interval duration), that is, 10+15+0=25, as shown in Figure 6, wherein clipA indicates multimedia file A
Fragment objects, clipB indicates that the fragment objects of multimedia file B, clipA starting points indicate the segment pair of multimedia file A
As the start time point on the timeline of orbiting object, clipB starting points indicate that the fragment objects of multimedia file B are located at
Start time point on the timeline of orbiting object, subsequently in the process for playing multimedia file as shown in FIG. 6 of starting from scratch
In, start after playing the content for just starting to play multimedia file A until 10 seconds, until 25 seconds, then and then plays multimedia
The content of file B.
Further, when for each multimedia file, after creating the fragment objects for completing the multimedia file, Ke Yizhi
The start time point according to the fragment objects created being located on the timeline of orbiting object is connect to add the fragment objects created
It is added on corresponding orbiting object, that is, for the fragment objects of any created multimedia file, by the fragment objects
It is added on the orbiting object created according to the type of the multimedia file, e.g., if multimedia file dubs type
File then creates and dubs fragment objects, and this is dubbed segment and needs to be added to what the type for dubbing file according to this was created
It dubs on orbiting object, if multimedia file is the file of video type, video clip object is created, due to according to video
The file of type establishes video pictures orbiting object and video original sound orbiting object, and therefore, which needs
It is respectively added on the video pictures orbiting object created according to the type of the video file and video original sound orbiting object.
In conclusion user is wanted the multimedia file played carries out the front and back process spliced according to playing sequence,
That is, the orbiting object added with fragment objects is created, and it is specific as follows, multimedia file is obtained, program object is created, according to acquisition
The type of the multimedia file arrived creates the corresponding orbiting object of the program object, according to each multimedia text got
Part creates the fragment objects of the multimedia file, and rising on the timeline of orbiting object is located at according to the fragment objects created
The fragment objects created are added to corresponding orbiting object by time point beginning.
In addition, since the same multimedia file may create the orbiting object of multiple and different types, in the application
In, when the fragment objects of the same multimedia file are added to the orbiting object of the multiple and different types created, need to add
The same position being added on the timeline of different types of orbiting object.
Further, user is being wanted to splicing completion before and after the multimedia file played is carried out according to playing sequence
Afterwards, subsequently, spliced multimedia file can be played out.
And during being played out to spliced multimedia file, it is necessary first to according to current play time,
Fragment objects are determined in the orbiting object being pre-created, wherein current play time refers to that multimedia file is broadcast
Time point on the timeline for the orbiting object being presently in when putting, and fragment objects include fragment objects in orbiting object
Timeline on start time point, the mark of multimedia file, the broadcasting start time point of multimedia file and multimedia
The playing duration of file.
Further, the different positions on the timeline of orbiting object are respectively positioned on due to spliced each multimedia file
It sets, that is to say, that the time zone of different multimedia files on the time line is different, therefore, in this application, according to
Current play time determines fragment objects in the orbiting object added with fragment objects being pre-created, specifically can be with
It is as follows:
In the orbiting object being pre-created, the start time point that is located at according to fragment objects on the timeline of orbiting object
And playing duration determines the time interval where the fragment objects, according to current play time, determines comprising current
Play time time interval corresponding to fragment objects.
It should be noted that 1 second amplification of the timeline of orbiting object and 1 second amplification of lane terminal system time are
It is consistent, that is to say, that timeline amplification 1 second, then lane terminal system time also amplification 1 second.
For example, will be illustrated by video file of multimedia file in this example, it is assumed that user wishes to play video text
Content between 10 seconds to 25 seconds of part A, and then the content between 5 seconds to 30 seconds of playing video file B again, therefore, first
A program object A is first created, video pictures orbiting object and video original sound orbiting object are created under program object A,
And the fragment objects of video file A and the fragment objects of video file B are created, by the fragment objects and video of video file A
The fragment objects of file B are added on video pictures orbiting object, that is, on the timeline of video pictures orbiting object are zero
The fragment objects of point addition video file A, playing duration are 15 seconds, and are 15 seconds on the timeline of video pictures orbiting object
Point addition video file B fragment objects, playing duration is 25 seconds, the fragment objects and video text of addition video file A
The timeline of video pictures orbiting object after the fragment objects of part B is from zero to 40 second, and by video file A and video file
B is added on video original sound orbiting object, that is, the point for being zero on the timeline of video original sound orbiting object adds video file
The fragment objects of A, playing duration are 15 seconds, and add video text on the timeline of video original sound orbiting object for 15 seconds points
The fragment objects of part B, playing duration are 25 seconds, after the fragment objects of addition video file A and the fragment objects of video file B
The timeline of video original sound orbiting object be from zero to 40 second, as shown in Figure 7, wherein clipA indicates the piece of video file A
Section object, clipB indicate that the fragment objects of video file B, clipA starting points indicate that the fragment objects of video file A are located at rail
Start time point on the timeline of road object, clipB starting points indicate that the fragment objects of video file B are located at orbiting object
Start time point on timeline;
Assuming that spliced multimedia file is currently played, for any created orbiting object, created in advance
In the orbiting object built, the start time point and the playing duration that fragment objects are located on the timeline of orbiting object are determined
The time interval constituted, that is, video pictures orbiting object is directed to, in the segment pair added with video file A being pre-created
As and the video pictures orbiting object of video file B fragment objects in, determine the fragment objects of video file A be located at video picture
The time interval that start time point and playing duration on the timeline of face orbiting object are constituted is [0,15], determines video
The fragment objects of file B are located at start time point on the timeline of video pictures orbiting object and playing duration constituted
Time interval be (15,40], similarly, determine that the fragment objects of video file A are located on the timeline of video original sound orbiting object
Start time point and the time interval that is constituted of playing duration be [0,15], determine that the fragment objects of video file B are located at
The time interval that start time point and playing duration on the timeline of video original sound orbiting object are constituted be (15,40];
Assuming that current play time is 0, then according to current play time 0, on video pictures orbiting object
Determine comprising current play time time interval corresponding to fragment objects be video file A fragment objects, regarding
Determine that the fragment objects corresponding to the time interval comprising current play time are video file A on the former sound orbiting object of frequency
Fragment objects.
S102:According to the mark for the multimedia file for including in the fragment objects, multimedia file is determined.
Since what is added in orbiting object is the fragment objects created according to multimedia file, and to spliced more
It during media file plays out, needs to parse the multimedia file of storage, therefore, in the addition being pre-created
Have after determining fragment objects in the orbiting object of fragment objects, needs the mark according to the multimedia file for including in fragment objects
Know, determines multimedia file, in this application, the mark of multimedia file can be storage address.
S103:According to start time point of the fragment objects on the timeline of orbiting object, the current broadcasting
Time point, the broadcasting start time point of the multimedia file and the playing duration of the multimedia file, broadcasting are determined
Multimedia file.
Since a multimedia file is global storage when storage, and it is possible to play in the multimedia file
A part of content, therefore, in this application, it is thus necessary to determine that go out any partial content needed to play in the multimedia file.
Further, and due in practical applications, user may directly by play frame drag to orbiting object when
Between some time point on line, that is to say, that directly proceed by broadcasting from the time point, therefore, the application need it is true
It, can be directly according to the fragment objects in track during making any partial content for needing to play in the multimedia file
The playing duration of start time point, the current play time and the multimedia file on the timeline of object,
The duration to be played for determining the multimedia file, according to the duration to be played for the multimedia file determined, described more
The playing duration for playing start time point and the multimedia file of media file determines that the multimedia file waits broadcasting
Multimedia file segment is put, the multimedia file segment is played.
For example, it is assumed that spliced video overall length is 30 seconds, and the segment of the video A added in orbiting object in advance
It is 0 that object, which is located at the start time point on the timeline of orbiting object, and playing duration is 15 seconds, and when the broadcasting starting of video A
Between point be 5 seconds, it is, itself for video A, the content that can be effectively played is the interior of 5s to the 20s of video
To hold, other parts will not be played to, and for timeline, when playing from startup, start to play video A, that is, startup is broadcast
It puts, plays the picture of 5s to the 20s of video A;
User wishes the picture of 10s on reproduction time line, and therefore, user currently drags the video frame of spliced video
It moves to the 10th second (that is, current play time), rising on the timeline of orbiting object is located at according to the fragment objects of video A
Begin time point, current play time and video A playing duration, determine the duration to be played of video A, that is, when broadcasting
Length-(current play time-fragment objects are located at the start time point on the timeline of orbiting object)=15- (10-0)=
5 seconds (that is, duration to be played), further according to the duration to be played of the video A determined, the broadcasting start time point of video A and
The playing duration of video A determines the video clip to be played of video A, that is, plays start time point+playing duration-and determines
Duration=5+15-5=15 seconds to be played of video A, if it is, being played since 10s, what is played is the of video A
15s pictures.
It should be noted that since video A itself is effectively partly 5s to 20s, then the 10s on timeline is arrived
The picture of 15s can correspond to 15 Dao the 20s picture of video A, and picture later timeline 15s will not then correspond to video A's again
Picture.
In addition, it should also be noted that, if current play time and multimedia file be located at orbiting object when
Between start time point on line it is identical, then the broadcasting start time point for the multimedia file for directly including according to fragment objects is i.e.
It can.
Further, the multi-media segment to determining in the process of processing, it is necessary first to it is more to what is determined
Media file fragments are decoded, and the corresponding data of multimedia file segment are generated with this.If in addition, due to multiple tracks pair
Fragment objects are added with as in, then the multiple multimedia file segments that be can determine that out according to current play time, and
What multiple multimedia file segments belonged to play simultaneously required for current play time, therefore, subsequently, need to decoding
The corresponding data of multimedia file segment afterwards synchronize, and play the corresponding data of multimedia file segment after synchronizing.
In practical applications, user may wish to spliced multimedia file segment and directly generate completely new multimedia
File, therefore, in this application, start time point that can be directly according to fragment objects on the timeline of orbiting object, more matchmakers
The playing duration for playing start time point and multimedia file of body file, determines multimedia file segment to be synthesized, and
Multimedia file segment to be synthesized is decoded, the corresponding data of multimedia file segment are generated with this, it will be decoded
The corresponding data of multimedia file segment synchronize, then the corresponding data of multimedia file segment after synchronizing are sent to volume
Code device, a completely new multimedia file is generated after coding.
It should be noted that in this application, multimedia file can be video multimedia file, audio multimedia
File dubs multimedia file, background music multimedia file, naturally it is also possible to be other kinds of multimedia file.
By the above method, by creating needing to play and carrying fragment objects on the timeline of orbiting object
Start time point, the mark of multimedia file, multimedia file the broadcasting for playing start time point and multimedia file when
The fragment objects of long multimedia file can simply and effectively realize the spelling for the segment being arbitrarily designated in multiple multimedia files
Broadcasting is connect, convenience when user wants continuously to play the different fragments for the multiple multimedia files being locally stored is improved.
In practical applications, user can dub video file, i.e., with the original for dubbing substitution video for the person of dubbing
Sound.When being dubbed, video file primary sound is eliminated, background music can be added as needed on, person is not finally dubbed and combines video
Picture, subtitle etc. are dubbed.
Further, it does not need to dub in a certain period of time due to that during video is dubbed, can deposit
Situation, e.g., personage speak between be only picture or background music for some time, and what nobody spoke, therefore, in the application
In, the mode that multistage is discontinuously dubbed can be used to be dubbed, that is to say, that the period only dubbed to needs just matches
Sound.
It carries out dubbing in such a way that multistage is discontinuously dubbed specific as follows:During being dubbed to video,
For each paragraph for needing to dub, when starting to dub, the position of current video frame timestamp on the time line is recorded, i.e., this is matched
The position of sound file on the time line, that is, dub the starting position of file on the time line.
It should be noted that during being dubbed to video, a control recording may provide the user with
Interface, have startup record button on the interface, stop record button, user can need in video the period dubbed by
Lower startup record button starts to dub, and records the position of current video frame timestamp on the time line, which terminates
When pressing stop record button stop recording.Certainly, specifically want to dub in that period, it is desirable to which user oneself is according to reality
Border situation is determined, if the user desired that once entire video has all been matched, then can directly when video starts to play by
The lower button for starting recording, presses the button for stopping recording again when video terminates.
Further, due to being to need the corresponding background music of video pictures and user when playing the video after dubbing
Dub, such as, it is assumed that the video dubbed includes the video pictures of the video pictures and video B of video A, then needs to obtain video A
The corresponding background music of video pictures and user dub and the corresponding background music of the video pictures of video B and user
Dub, therefore, in this application, need to obtain background music multimedia file and dub file.
After getting background music multimedia file and dubbing file, further according to the background music multimedia got
Document creation background music orbiting object dubs orbiting object according to the document creation of dubbing got.
After creating completion background music orbiting object and dubbing orbiting object, then background music multimedia file
Fragment objects, dub the fragment objects of multimedia file creating, wherein the fragment objects of background music multimedia file exist
Setting is needed when establishment and preserves the broadcasting starting of the mark of background music multimedia file, background music multimedia file
Time point, the playing duration of background music multimedia file and background music multimedia file fragment objects are located at background music
Start time point on the timeline of orbiting object, in addition, dubbing the fragment objects of multimedia file in the same in time of establishment
Sample needs to set and preserve dub the mark of multimedia file, the broadcasting start time point of dubbing multimedia file, dub more matchmakers
It the playing duration of body file and dubs multimedia file fragment objects and is located at when dubbing the starting on the timeline of orbiting object
Between point, and the fragment objects for dubbing multimedia file are set and preserve dub multimedia file fragment objects be located at dub track
Start time point on the timeline of object can specifically be recorded according to user when dubbing this dub multimedia file
Initial position obtains, in addition, to play a whole for dubbing multimedia file due to being, and to any multimedia file and
Speech, itself oneself having time stamp arrive the duration of file itself since 0, therefore, dub the broadcasting starting of multimedia file
Point and the playing duration for dubbing file can be obtained according to the timestamp for dubbing multimedia file oneself itself.
Further, then by the fragment objects of the background music multimedia file created it is added to background music track pair
As upper, the fragment objects for dubbing multimedia file created are added to and are dubbed on orbiting object.
Further, according to current play time, in the video pictures rail added with fragment objects being pre-created
The fragment objects of video pictures multimedia file are determined in road object, and according in the fragment objects of video pictures multimedia file
Including video pictures multimedia file mark, determine video pictures multimedia file;It is added with segment what is be pre-created
The fragment objects of background music multimedia file are determined in the background music orbiting object of object, and according to background music multimedia
The mark for the background music multimedia file for including in the fragment objects of file determines background music multimedia file;Advance
What is created dubs the fragment objects for being determined in orbiting object and dubbing multimedia file added with fragment objects, and more according to dubbing
Include in the fragment objects of media file dubs the mark of multimedia file, and multimedia file is dubbed in determination;
Subsequently, the start time point according to the fragment objects of multimedia file on the timeline of orbiting object, current
Play time, the playing duration for playing start time point and multimedia file of multimedia file, determine multimedia file
In multimedia file segment, that is, determine video pictures multimedia file segment, background music multimedia file segment and dub
Multimedia file segment.
Further, by the video pictures multimedia file segment determined, background music multimedia file segment and
It dubs multimedia file segment and is sent to decoder and be decoded, the corresponding number of video pictures multimedia file segment is obtained with this
According to, corresponding data of background music multimedia file segment and dub multimedia file segment corresponding data, and to decoding
The corresponding data of background music multimedia file segment afterwards are carried out with the corresponding data of multimedia file segment of dubbing recorded
Stereo process generates audio data with this, while can also be into being about to dub the audio effect processings such as sound amplification, while needing to solve
The audio data after video pictures and audio mixing after code does synchronization process, ensures that sound is synchronous with picture with this, finally carries out
It plays.
In addition, if user is not intended to play, and be desirable to generate the video file that a completely new band is dubbed, then it can be with
Give the video data after synchronizing and audio data to encoder, make encoder carry out coding ultimately generate it is new with dubbing
Video file.
Finally, it should be noted that the scheme involved by the application can be used in mobile terminal, e.g., mobile phone also may be used
In fixed terminal, e.g., computer.
It is method for broadcasting multimedia file provided by the embodiments of the present application above, is based on same thinking, the application is implemented
Example also provides a kind of multimedia file playing device.
As shown in figure 8, a kind of multimedia file playing device provided by the embodiments of the present application, including:
Fragment objects determining module 801 is used for according to current play time, in the orbiting object being pre-created really
Determine fragment objects, wherein the fragment objects include start time point of the fragment objects on the timeline of orbiting object, more
The mark of media file, the playing duration for playing start time point and multimedia file of multimedia file;
Multimedia file determining module 802, for the mark according to the multimedia file for including in the fragment objects, really
Determine multimedia file;
Playing module 803, for according to start time point of the fragment objects on the timeline of orbiting object, described
The playing duration for playing start time point and the multimedia file of current play time, the multimedia file,
Play the multimedia file determined.
Described device further includes:
Creation module 804 determines segment pair for the fragment objects determining module in the orbiting object being pre-created
As before, obtaining multimedia file, creates program object and the program is created according to the type of the multimedia file got
The corresponding orbiting object of object creates the fragment objects of the multimedia file according to each multimedia file got, according to
The fragment objects created are located at the start time point on the timeline of orbiting object and are added to the fragment objects created pair
The orbiting object answered.
The fragment objects determining module 801 is specifically used for, in the orbiting object being pre-created, according to the segment pair
As on the timeline of orbiting object start time point and the playing duration determine the fragment objects where when
Between section the segment pair corresponding to the time interval comprising current play time is determined according to current play time
As.
The playing module 803 is specifically used for, according to the fragment objects in the starting on the timeline of orbiting object
Between put and the current play time, the played duration of the multimedia file is determined, according to determining
The broadcasting for playing start time point and the multimedia file of the played duration, the multimedia file of multimedia file
Duration determines the multimedia file segment in the multimedia file, plays the multimedia file segment.
The playing module 803 is additionally operable to, and is decoded to the multimedia file segment, to decoded multimedia text
The corresponding data of part segment synchronize, and play the corresponding data of multimedia file segment after synchronizing.
The multimedia file includes video multimedia file, background music multimedia file and dubs multimedia file
At least one of.
The device further includes:
Synthesis module 805, for according to start time point of the fragment objects on the timeline of orbiting object, described
The playing duration for playing start time point and the multimedia file of multimedia file synthesizes the video multimedia text
Part, background music multimedia file and at least one of dub multimedia file.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus
Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described
There is also other identical elements in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
Above is only an example of the present application, it is not intended to limit this application.For those skilled in the art
For, the application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent
Replace, improve etc., it should be included within the scope of claims hereof.