CN103379364B - Processing method, device, video server and the system of video file - Google Patents
Processing method, device, video server and the system of video file Download PDFInfo
- Publication number
- CN103379364B CN103379364B CN201210126608.XA CN201210126608A CN103379364B CN 103379364 B CN103379364 B CN 103379364B CN 201210126608 A CN201210126608 A CN 201210126608A CN 103379364 B CN103379364 B CN 103379364B
- Authority
- CN
- China
- Prior art keywords
- transcoding
- video
- file
- subfile
- video file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a kind of processing method of video file, device, video server and systems, belong to field of communication technology.The method includes:Video file is obtained, the video file is divided at least two video subfiles;At least two videos subfile is sent on transcoding service unit and carries out transcoding respectively, obtains the video subfile after at least two transcoding service unit transcodings;The video file after transcoding is obtained according to the video subfile after at least two transcoding.The present invention carries out transcoding respectively by the way that entire video file is divided into multiple video subfiles, when a video subfile transcoding fails, the transcoding of other video subfiles is not interfered with, only need to the video subfile of transcoding failure be subjected to transcoding, transcoding need not be re-started to entire video file, substantially reduce the transcoding time of video file.
Description
Technical field
The present invention relates to field of communication technology, more particularly to a kind of processing method of video file, device, video server
And system.
Background technology
Video traffic is quite universal in internet at present, and many video websites can provide abundant regard to the user
Frequency resource, user can find the video file oneself liked in video website, click to play and be watched.But video website
The video file of upper storage is all stored with scheduled code, when playing video when the user clicks, is needed to video network
The video file stored on standing carries out encoding and decoding again.
It is that video file is sent to single service by terminal to accelerate the process of coding and decoding video, most of existing scheme
Transcoding is carried out on device, if there is mission failure or server failure in transcoding progress, which is transferred to it
Transcoding is re-started on its server, video file is returned after transcoding, to playing video file.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
One video file is sent on a transcoding service unit and carries out transcoding, if this video carried out completely
Transcoding, the transcoding time needed is long, and if transcoding progress in there is mission failure or server failure, need by
The video file, which is transferred on other servers, re-starts transcoding, but some has been carried out on first server
Video code conversion, which is transferred on other servers and re-starts transcoding, wastes regarding by transcoding
Frequency resource more wastes the time of transcoding, extends the transcoding stand-by period.
Invention content
In order to solve the problems, such as in the prior art the video code conversion used time it is long, an embodiment of the present invention provides a kind of videos
Processing method, device, video server and the system of file.The technical solution is as follows:
On the one hand, a kind of processing method of video file is provided, the method includes:
Video file is obtained, the video file is divided at least two video subfiles;
At least two videos subfile is sent on transcoding service unit and carries out transcoding respectively, described in acquisition at least
Video subfile after two transcoding service unit transcodings;
The video file after transcoding is obtained according to the video subfile after at least two transcoding.
The acquisition video file, including:
The request for receiving the playing video file that terminal is initiated, according to the request for the playing video file that the terminal is initiated
Obtain the video file;
After video file after the video subfile acquisition transcoding according to after at least two transcoding, also wrap
It includes:
Video file after returning to from the transcoding to the terminal keeps the video after transcoding described in the terminal plays literary
Part.
The acquisition video file, including:
The request for receiving the transcoded video file of video website server, regards according to the server transcoding of the video website
Video file described in the acquisition request of frequency file;
After video file after the video subfile acquisition transcoding according to after at least two transcoding, also wrap
It includes:
Video file after returning to from the transcoding to the server of the video website, makes the server of the video website
Preserve the video file after the transcoding.
It is described that the video file is divided at least two video subfiles, including:
K-V pairs of each frame in the video file is parsed, the K is the corresponding offset address of the frame, and the V is described
The corresponding data of K;
According to the K-V of each frame of the video file to the video file is divided into multiple video subfiles, institute
It includes one described K-V pairs to state each video subfile.
At least two videos subfile is sent on transcoding service unit and carries out transcoding respectively, described in acquisition at least
Video subfile after two transcoding service unit transcodings, including:
At least two videos subfile is sent on transcoding service unit and carries out transcoding respectively;
The transcoding information that the transcoding service unit returns is received, if the transcoding information is the video Ziwen after transcoding
Part then stores the video subfile after the transcoding, if the transcoding information is transcoding failure information, will not turned correctly
The video subfile of code is sent to other transcodings in addition to the transcoding service unit for sending the transcoding failure information and services list
Transcoding is carried out in member, obtains the video subfile after other transcoding service unit transcodings.
After the transcoding information for receiving the transcoding service unit return, further include:
If the transcoding information is the video subfile after transcoding, records the current transcoding service unit and be transcoded into
The information of work(records the current transcoding service unit transcoding failure if the transcoding information is transcoding failure information
Information.
On the other hand, a kind of processing unit of video file is additionally provided, described device includes:
The video file is divided at least two video subfiles by file division module for obtaining video file;
File transcoding module carries out respectively for at least two videos subfile to be sent on transcoding service unit
Transcoding obtains the video subfile after at least two transcoding service unit transcoding;
File acquisition module, for according to the video text after the video subfile acquisition transcoding after at least two transcoding
Part.
The file division module, including:
First acquisition unit, the request of the playing video file for receiving terminal initiation, is initiated according to the terminal
Video file described in the acquisition request of playing video file;
Described device further includes:
First returns to module, is obtained according to the video subfile after at least two transcoding for the file acquisition module
After obtaining the video file after transcoding, the video file after returning to the transcoding to the terminal makes described in the terminal plays
Video file after transcoding.
The file division module, including:
Second acquisition unit, the request of the transcoded video file for receiving video website server, according to the video
Video file described in the acquisition request of the server transcoded video file of website;
Described device further includes:
Second returns to module, is obtained according to the video subfile after at least two transcoding for the file acquisition module
After obtaining the video file after transcoding, the video file after returning to the transcoding to the server of the video website makes described
The server of video website preserves the video file after the transcoding.
The file division, including:
Document analysis unit, K-V pairs for parsing each frame in the video file, the K is that the frame is corresponding partially
Address is moved, the V is the corresponding data of the K;
File division unit, for according to the K-V of each frame of the video file to the video file is divided into
Multiple video subfiles, each video subfile include one described K-V pairs.
The file transcoding module includes:
File transmission unit carries out respectively for at least two videos subfile to be sent on transcoding service unit
Transcoding;
File obtaining unit, the transcoding information returned for receiving the transcoding service unit, if the transcoding information
For the video subfile after transcoding, then the video subfile after the transcoding is stored, if the transcoding information fails for transcoding
Information, then will by the video subfile of correct transcoding not be sent to except the transcoding service unit for sending the transcoding failure information with
Transcoding is carried out on outer other transcoding service units, obtains the video subfile after other transcoding service unit transcodings.
The file transcoding module further includes:
Recording unit, for the file obtaining unit receive transcoding information that the transcoding service unit returns it
Afterwards, if the transcoding information is the video subfile after transcoding, it is successful to record the current transcoding service unit transcoding
Information records the information of the current transcoding service unit transcoding failure if the transcoding information is transcoding failure information.
On the other hand, a kind of video server is additionally provided, the server includes:The place of video file as described above
Manage device.
On the other hand, a kind of processing system of video file is additionally provided, the system comprises:Video clothes as described above
Business device and at least two transcoding servers,
Each transcoding server, the video subfile sent for receiving the video server, and regarded to described
Frequency subfile carries out transcoding.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:Video file is obtained, by video text
Part is divided at least two video subfiles;At least two videos subfile is sent on transcoding service unit and is carried out respectively
Transcoding obtains the video subfile after at least two transcodings;It is obtained according to the video subfile after at least two transcoding
Obtain the video file after transcoding.Entire video file is divided into multiple video subfiles in this way and carries out transcoding respectively, is regarded when one
Frequency subfile transcoding fail when, do not interfere with the transcoding of other video subfiles, only need to by transcoding failure video subfile into
Row transcoding need not re-start transcoding to entire video file, substantially reduce the transcoding time of video file, solve
Transcoding takes long problem.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is a kind of flow chart of the processing method of the video file provided in the embodiment of the present invention 1;
Fig. 2 is a kind of flow chart of the processing method of the video file provided in the embodiment of the present invention 2;
Fig. 3 is a kind of flow chart of the processing method of the video file provided in the embodiment of the present invention 3;
Fig. 4 is a kind of schematic diagram of the processing unit of the video file provided in the embodiment of the present invention 4.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment 1
Referring to Fig. 1, a kind of processing method of video file is provided in the present embodiment, the method includes:
101, video file is obtained, the video file is divided at least two video subfiles;
102, at least two videos subfile is sent on transcoding service unit and carries out transcoding respectively, described in acquisition
Video subfile after at least two transcoding service unit transcodings;
103, the video file after transcoding is obtained according to the video subfile after at least two transcoding.
Optionally, the acquisition video file, including:
The request for receiving the playing video file that terminal is initiated, according to the request for the playing video file that the terminal is initiated
Obtain the video file;
Optionally, the video subfile according to after at least two transcoding obtain the video file after transcoding it
Afterwards, further include:
Video file after returning to from the transcoding to the terminal keeps the video after transcoding described in the terminal plays literary
Part.
Optionally, the acquisition video file, including:
The request for receiving the transcoded video file of video website server, regards according to the server transcoding of the video website
Video file described in the acquisition request of frequency file;
Optionally, the video subfile according to after at least two transcoding obtain the video file after transcoding it
Afterwards, further include:
Video file after returning to from the transcoding to the server of the video website, makes the server of the video website
Preserve the video file after the transcoding.
Preferably, described that the video file is divided at least two video subfiles, including:
K-V pairs of each frame in the video file is parsed, the K is the corresponding offset address of the frame, and the V is described
The corresponding data of K;
According to the K-V of each frame of the video file to the video file is divided at least two video Ziwens
Part, each video subfile include one described K-V pairs.
In the present embodiment, at least two videos subfile is sent on transcoding service unit and carries out transcoding respectively,
The video subfile after the described at least two transcoding service unit transcodings is obtained, including:
At least two videos subfile is sent on transcoding service unit and carries out transcoding respectively;
The transcoding information that the transcoding service unit returns is received, if the transcoding information is the video Ziwen after transcoding
Part then stores the video subfile after the transcoding, if the transcoding information is transcoding failure information, will not turned correctly
The video subfile of code is sent to other transcodings in addition to the transcoding service unit for sending the transcoding failure information and services list
Transcoding is carried out in member, obtains the video subfile after other transcoding service unit transcodings.
Optionally, after the transcoding information for receiving the transcoding service unit return, further include:
If the transcoding information is the video subfile after transcoding, records the current transcoding service unit and be transcoded into
The information of work(records the current transcoding service unit transcoding failure if the transcoding information is transcoding failure information
Information.
The advantageous effect of the present embodiment includes:Video file is obtained, the video file is divided at least two videos
File;At least two videos subfile is sent on transcoding service unit and carries out transcoding respectively;Obtain at least two institutes
The video subfile after transcoding is stated, the video file after transcoding is obtained according to the video subfile after at least two transcoding.
The transcoding of entire video file is worked in this way and is shared on multiple transcoding service units by a transcoding service unit, Mei Gezhuan
Code service unit only needs a part of subfile of the transcoding video file, more transcoding service units to work at the same time, contract significantly
The short transcoding time of video file, it is long to solve the problems, such as that transcoding takes.
Embodiment 2
A kind of processing method of video file is provided in the present embodiment, terminal is initiated to play the request of video, transcoding clothes
Unit be engaged in video progress transcoding, terminal plays the video after transcoding in real time.The place of the video file provided in the present embodiment
Reason method is based on a kind of distributed system, which includes the service for the video website that Video service is provided for terminal
Device, video server and multiple transcoding service units, each transcoding service unit can be communicated with video server.Its
In, the server receiving terminal of video website plays the request of video, and further sends the request to video server, depending on
The video file is further divided at least two video Ziwens according to receiving acquisition request video file by frequency server
Video subfile is sent on transcoding service unit and carries out transcoding by part.The present embodiment transit code service unit can be transcoding
One functional unit of server, it is specific to execute task of transcoding is carried out to video file.Referring to Fig. 2, this method specifically includes:
201, the request for receiving the playing video file that terminal is initiated, according to the playing video file of terminal initiation
Acquisition request video file.
In this step, when user browses video website, the request for playing video can be initiated at any time, when user initiates video
After playing request, terminal receives request, sends the request on the server for the video website of its service, the server
It further sends the request on video server, video server inquires the request on Internet resources according to the request
Seed file, and obtain video file.
Terminal in the present embodiment includes personal computer or mobile terminal, is not specifically limited to this present embodiment.
202, video file is divided at least two video subfiles.
What existing video file was stored with certain coded format, each video file includes N number of frame, each frame pair
One K-V pairs is answered, K is the corresponding offset address of the frame, and V is the corresponding data of the K.In order to shorten the time of transcoding, this step
In rapid, video file is divided at least two video subfiles, wherein the coded format based on video file, it is preferable that will
Video is divided at least two video subfiles:K-V pairs of each frame in the video file is parsed, according to the video
To the video file is divided into multiple video subfiles, each video subfile includes the K-V of each frame of file
One described K-V pairs.
Optionally, in the present embodiment, each video subfile can also include M K-V pairs, and M is less than predetermined threshold value, specifically
The setting of predetermined threshold value can be determined according to the speed of service of transcoding service unit or the size of video file, to this
Embodiment is not specifically limited.
203, at least two videos subfile is sent at least two transcoding service units and carries out transcoding respectively,
Obtain the video subfile after at least two transcoding service unit transcodings.
In this step, after obtaining at least two video subfiles, at least two video subfiles are sent to distribution
Transcoding is carried out on transcoding service unit in system respectively, transcoding service unit carries out transcoding to multiple video subfiles simultaneously,
Due to the very little of each video subfile, such transcoding will soon be completed, and greatly accelerate transcoding speed, shorten transcoding
Time used.In specific implementation process, it is therefore preferable to which raising transcoding speed, a video subfile occupy a transcoding clothes
Business unit carries out transcoding, i.e., each video subfile is sent on corresponding transcoding service unit and carries out transcoding, optionally,
Video subfile can also be divided into several groups, different groups is sent on corresponding transcoding service unit and carries out transcoding, or
It is that multiple video subfiles are sent on a transcoding service unit to carry out transcoding, which kind of mode transcoding is specifically carried out using,
This present embodiment is not specifically limited.
In this step, during transcoding service unit carries out transcoding, due to transcoding service unit failure or other
Factor, it is possible that the case where transcoding fails, at this point, the transcoding service unit can return to transcoding failure to video server
Information, after video server receives the request of transcoding failure, the video subfile by transcoding failure is sent to it immediately
Transcoding is carried out on its transcoding service unit.Specifically, at least two videos subfile is sent at least two transcodings clothes
Transcoding is carried out respectively on business unit, obtains the video subfile after at least two transcoding, including:
1) at least two videos subfile is sent on transcoding service unit and carries out transcoding respectively;
2) the transcoding information that the transcoding service unit returns is received, if the transcoding information is video after transcoding
File then stores the video subfile after the transcoding, will be incorrect if the transcoding information is transcoding failure information
The video subfile of transcoding is sent to other transcoding services in addition to the transcoding service unit for sending the transcoding failure information
Transcoding is carried out on unit, obtains the video subfile after the transcoding.
In this step, since multiple video subfiles carry out transcoding on multiple transcoding service units respectively, so even if
Video subfile transcoding failure will not influence the transcoding of other video subfiles, not will produce asking for video resource waste
Topic.Moreover, single video subfile is smaller, the transcoding used time is short, will not waste for a long time, when further shortening transcoding
Between.
In the present embodiment optionally, after receiving the transcoding information that the transcoding service unit returns, further include:If
The transcoding information is the video subfile after transcoding, then records the current successful information of transcoding service unit transcoding, such as
Transcoding information described in fruit is transcoding failure information, then records the information of the current transcoding service unit transcoding failure.Work as reception
To after the information of transcoding failure, can will be turned according to the information of the success of the transcoding service unit transcoding of record or transcoding failure
The video subfile of code failure is sent on the successful transcoding service unit of transcoding of record.For example, video server regards 5
Frequency subfile is separately sent to transcoding service unit 1, transcoding service unit 2, transcoding service unit 3, transcoding service unit 4 and turns
On code service unit 5, after these transcoding service units carry out transcoding to the video subfile received, by the letter after transcoding
Breath returns to video server, if the transcoding information that the transcoding service unit 1,2 and 3 that video server receives returns is to turn
Video subfile after code, then record transcoding service unit 1,2 and the successful information of 3 transcodings, if video server receives
Transcoding service unit 4 and 5 be transcoding failure information, then record transcoding service unit 4 and 5 transcodings failure information, and will
The video subfile of transcoding failure is sent to capable of successfully carrying out on the transcoding service unit of transcoding for record, is such as sent to transcoding
On service unit 1 or transcoding service unit 2 or transcoding service unit 3, this makes it possible to improve the successful probability of transcoding, to
The time for further increasing video playing improves the experience sense of user.
In this step, the process that transcoding is carried out to video file is the decoding process to video file, specific transcoding side
It is owned by France in the prior art, the present embodiment repeats no more this.
204, the video file after transcoding is obtained according at least two videos subfile.
In this step, after video subfile transcoding on transcoding service unit, after obtaining at least two transcodings
Video subfile, serial number when by the video subfile after transcoding according to segmentation connect into a complete video file, wherein
That serial number when segmentation refers to is exactly the corresponding offset address K of video subfile.
205, the video file after returning to the transcoding to terminal keeps the video after transcoding described in the terminal plays literary
Part.
In this step, receive terminal initiate request after, to video carry out transcoding, after transcoding by transcoding after
Video file returns to the server of video website, and video is returned to terminal again and played out by the server of video website, eventually
End plays the video file after transcoding in real time.
The advantageous effect of the present embodiment includes:Video file is obtained, the video file is divided at least two videos
File;At least two videos subfile is sent on transcoding service unit and carries out transcoding respectively;Obtain at least two institutes
The video subfile after transcoding is stated, the video file after transcoding is obtained according to the video subfile after at least two transcoding.
Entire video file is divided into multiple video subfiles in this way and carries out transcoding respectively, when a video subfile transcoding fails,
The transcoding of other video subfiles is not interfered with, only need to a video subfile for transcoding failure transcoding be subjected to, not needed pair
Entire video file re-starts transcoding, substantially reduces the transcoding time of video file, solve transcoding take it is long
Problem.And the transcoding of a video works and is shared on multiple transcoding service units by a transcoding service unit, Mei Gezhuan
Code service unit only needs a part of subfile of the transcoding video file, more transcoding service units to work at the same time, further
The transcoding efficiency of system is improved, the transcoding time is shortened.In the present embodiment, terminal plays the video after transcoding, Duo Gezhuan in real time
Code service unit carries out transcoding to multiple video subfiles of a video simultaneously, accelerates the reproduction time of video, further
Improve experience sense when terminal user watches video.
Embodiment 3
A kind of processing method of video file is provided in the present embodiment, providing method in the present embodiment is also based on reality
The distributed system described in example 2 is applied, this embodiment is not repeated to this.Terminal is not needed to initiate to play the request of video,
When having the video not by carry out transcoding in video website, the server of video website sends out video code conversion to transcoding service unit
Request carries out transcoding to video, and the server of video website preserves the video file after transcoding, the video is played in terminal request
When, so that it may directly to play the video file after transcoding, need not transcoding request be initiated to transcoding service unit again, in this way into one
Step reduces the time request of the video to be played such as terminal user, and due to by the complete transcoding of the video file, being broadcast in video
Be not in video buffer time long problem occur because video subfile transcoding fails during putting.
Referring to Fig. 3, specific this method includes:
301, the request for receiving the transcoded video file of the server initiation of video website, according to the clothes of the video website
The acquisition request video file for the transcoded video file that business device is initiated.
In this step, the information for the video file that the server inspection of video website is locally stored, if it find that in the presence of not
By the video file of transcoding, then the request of video code conversion is sent to video server, video server is according to the request to network
The seed file of the request is inquired in resource, and obtains video file.
Terminal in the present embodiment includes personal computer or mobile terminal, is not specifically limited to this present embodiment.
302, video file is divided at least two video subfiles.
What existing video file was stored with certain coded format, each video file includes N number of frame, each frame pair
One K-V pairs is answered, K is the corresponding offset address of the frame, and V is the corresponding data of the K.In order to shorten the time of transcoding, this step
In rapid, video file is divided at least two video subfiles, wherein the coded format based on video file, it is preferable that will
Video is divided at least two video subfiles:K-V pairs of each frame in the video file is parsed, according to the video
To the video file is divided into multiple video subfiles, each video subfile includes the K-V of each frame of file
One described K-V pairs.
Optionally, in the present embodiment, each video subfile can also include M K-V pairs, and M is less than predetermined threshold value, specifically
The setting of predetermined threshold value can be determined according to the speed of service of transcoding service unit or the size of video file, to this
Embodiment is not specifically limited.
303, at least two videos subfile is sent at least two transcoding service units and carries out transcoding respectively,
Obtain the video subfile after at least two transcoding service unit transcodings.
In this step, after obtaining at least two video subfiles, at least two video subfiles are sent to distribution
Transcoding is carried out on transcoding service unit in system respectively, transcoding service unit carries out transcoding to multiple video subfiles simultaneously,
Due to the very little of each video subfile, such transcoding will soon be completed, and greatly accelerate transcoding speed, shorten transcoding
Time used.In specific implementation process, it is therefore preferable to which raising transcoding speed, a video subfile occupy a transcoding clothes
Business unit carries out transcoding, i.e., each video subfile is sent on corresponding transcoding service unit and carries out transcoding, optionally,
Video subfile can also be divided into several groups, different groups is sent on corresponding transcoding service unit and carries out transcoding, or
It is that multiple video subfiles are sent on a transcoding service unit to carry out transcoding, which kind of mode transcoding is specifically carried out using,
This present embodiment is not specifically limited.
In this step, during transcoding service unit carries out transcoding, due to transcoding service unit failure or other
Factor, it is possible that the case where transcoding fails, at this point, the transcoding service unit can return to transcoding failure to video server
Information, after video server receives the request of transcoding failure, the video subfile by transcoding failure is sent to it immediately
Transcoding is carried out on its transcoding service unit.Specifically, at least two videos subfile is sent at least two transcodings clothes
Transcoding is carried out respectively on business unit, obtains the video subfile after at least two transcoding, including:
1) at least two videos subfile is sent on transcoding service unit and carries out transcoding respectively;
2) the transcoding information that the transcoding service unit returns is received, if the transcoding information is video after transcoding
File then stores the video subfile after the transcoding, will be incorrect if the transcoding information is transcoding failure information
The video subfile of transcoding is sent to other transcoding services in addition to the transcoding service unit for sending the transcoding failure information
Transcoding is carried out on unit, obtains the video subfile after the transcoding.
In this step, since multiple video subfiles carry out transcoding on multiple transcoding service units respectively, so even if
Video subfile transcoding failure will not influence the transcoding of other video subfiles, not will produce asking for video resource waste
Topic.Moreover, single video subfile is smaller, the transcoding used time is short, will not waste for a long time, when further shortening transcoding
Between.
In the present embodiment optionally, after receiving the transcoding information that the transcoding service unit returns, further include:If
The transcoding information is the video subfile after transcoding, then records the current successful information of transcoding service unit transcoding, such as
Transcoding information described in fruit is transcoding failure information, then records the information of the current transcoding service unit transcoding failure.Work as reception
To after the information of transcoding failure, can will be turned according to the information of the success of the transcoding service unit transcoding of record or transcoding failure
The video subfile of code failure is sent on the successful transcoding service unit of transcoding of record.For example, video server regards 5
Frequency subfile is separately sent to transcoding service unit 1, transcoding service unit 2, transcoding service unit 3, transcoding service unit 4 and turns
On code service unit 5, after these transcoding service units carry out transcoding to the video subfile received, by the letter after transcoding
Breath returns to video server, if the transcoding information that the transcoding service unit 1,2 and 3 that video server receives returns is to turn
Video subfile after code, then record transcoding service unit 1,2 and the successful information of 3 transcodings, if video server receives
Transcoding service unit 4 and 5 be transcoding failure information, then record transcoding service unit 4 and 5 transcodings failure information, and will
The video subfile of transcoding failure is sent to capable of successfully carrying out on the transcoding service unit of transcoding for record, is such as sent to transcoding
On service unit 1 or transcoding service unit 2 or transcoding service unit 3, this makes it possible to improve the successful probability of transcoding, to
The time for further increasing video playing improves the experience sense of user.
In this step, the process that transcoding is carried out to video file is the decoding process to video file, specific transcoding side
It is owned by France in the prior art, the present embodiment repeats no more this.
304, the video file after transcoding is obtained according at least two videos subfile.
In this step, after video subfile transcoding on transcoding service unit, after obtaining at least two transcodings
Video subfile, serial number when by the video subfile after transcoding according to segmentation connect into a complete video file, wherein
That serial number when segmentation refers to is exactly the corresponding offset address K of video subfile.
305, the video file after returning to the transcoding to the server of video website makes the server of video website preserve
Video file after transcoding.
In this step, after request is sent in the server initiation for receiving video website, transcoding is carried out to video, it is complete in transcoding
Video file after transcoding returns to the server of video website, the server of video website preserves regarding after the transcoding after finishing
Frequency file, when subsequent terminal request plays the video, which directly can be supplied to terminal to broadcast by the server of video website
It puts, transcoding need not carried out.
The advantageous effect of the present embodiment includes:Video file is obtained, the video file is divided at least two videos
File;At least two videos subfile is sent on transcoding service unit and carries out transcoding respectively;Obtain at least two institutes
The video subfile after transcoding is stated, the video file after transcoding is obtained according to the video subfile after at least two transcoding.
Entire video file is divided into multiple video subfiles in this way and carries out transcoding respectively, when a video subfile transcoding fails,
The transcoding of other video subfiles is not interfered with, only need to a video subfile for transcoding failure transcoding be subjected to, not needed pair
Entire video file re-starts transcoding, substantially reduces the transcoding time of video file, solve transcoding take it is long
Problem.And the transcoding of a video works and is shared on multiple transcoding service units by a transcoding service unit, Mei Gezhuan
Code service unit only needs a part of subfile of the transcoding video file, more transcoding service units to work at the same time, further
The transcoding efficiency of system is improved, the transcoding time is shortened.Have not by the video of carry out transcoding in video website in the present embodiment
When, the server of video website sends out the request of video code conversion to transcoding service unit, and transcoding is carried out to video, video website
Server preserves the video file after transcoding, when terminal request plays the video, so that it may directly to play the video after transcoding
File need not initiate transcoding request to transcoding service unit again, further reduce the video to be played such as terminal user in this way
Time request, and be not in because of video during video playing due to by the complete transcoding of the video file
File transcoding fails, and video buffer time long problem occurs.
Embodiment 4
Referring to Fig. 4, a kind of processing unit of video file is provided in the present embodiment, described device includes:File division
Module 401, file transcoding module 402 and file acquisition module 403.
The video file is divided at least two video Ziwens by file division module 401 for obtaining video file
Part;
File transcoding module 402, for at least two videos subfile to be sent on transcoding service unit respectively
Transcoding is carried out, the video subfile after at least two transcoding service unit transcoding is obtained;
File acquisition module 403, for according to regarding after the video subfile acquisition transcoding after at least two transcoding
Frequency file.
Optionally, the file division module 401, including:
First acquisition unit, the request of the playing video file for receiving terminal initiation, is initiated according to the terminal
Video file described in the acquisition request of playing video file;
Optionally, described device further includes:
First returns to module, for the file acquisition module 403 according to the video subfile after at least a transcoding
After obtaining the video file after transcoding, the video file after returning to the transcoding to the terminal makes the terminal plays institute
State the video file after transcoding.
Optionally, the file division module 401, including:
Second acquisition unit, the request of the server transcoded video file for receiving video website, according to the video
Video file described in the acquisition request of the server transcoded video file of website;
Optionally, described device further includes:
Second returns to module, for the file acquisition module 403 according to the video Ziwen after at least two transcoding
After video file after part acquisition transcoding, the video file after returning to the transcoding to the server of the video website makes
The server of the video website preserves the video file after the transcoding.
Preferably, the file division module 401, including:
Document analysis unit, K-V pairs for parsing each frame in the video file, the K is that the frame is corresponding partially
Address is moved, the V is the corresponding data of the K;
File division unit, for according to the K-V of each frame of the video file to the video file is divided into
Multiple video subfiles, each video subfile include one described K-V pairs.
Preferably, the file transcoding module 402 includes:
File transmission unit carries out respectively for at least two videos subfile to be sent on transcoding service unit
Transcoding;
File obtaining unit, the transcoding information returned for receiving the transcoding service unit, if the transcoding information
For the video subfile after transcoding, then the video subfile after the transcoding is stored, if the transcoding information fails for transcoding
Information, then will by the video subfile of correct transcoding not be sent to except the transcoding service unit for sending the transcoding failure information with
Transcoding is carried out on outer other transcoding service units, obtains the video Ziwen after other transcoding service unit transcodings
Part.
Optionally, the file transcoding module 402 further includes:
Recording unit, for the file obtaining unit receive transcoding information that the transcoding service unit returns it
Afterwards, if the transcoding information is the video subfile after transcoding, it is successful to record the current transcoding service unit transcoding
Information records the information of the current transcoding service unit transcoding failure if the transcoding information is transcoding failure information.
The present embodiment transit code service unit can be a functional unit of transcoding server, specific to execute to video text
Part carries out the task of transcoding.
On the other hand, a kind of video server is additionally provided in the present embodiment, the video server includes:As described above
Video file processing unit.
In the present embodiment, each transcoding service unit can be communicated with video server.
On the other hand, a kind of processing system of video file is additionally provided in the present embodiment, the system comprises:Institute as above
The video server and at least two transcoding servers stated,
Each transcoding server, the video subfile sent for receiving the video server, and regarded to described
Frequency subfile carries out transcoding.
Wherein, when the transcoding service unit in embodiment 2 is a functional unit of transcoding server, in the present embodiment
Video file processing system and embodiment 2 described in distributed system can be a system, not to this present embodiment
It repeats again.
The advantageous effect of the present embodiment includes:Video file is obtained, the video file is divided at least two videos
File;At least two videos subfile is sent at least two transcoding service units and carries out transcoding respectively, is obtained extremely
Video subfile after few two transcodings;According to regarding after the video subfile acquisition transcoding after at least two transcoding
Frequency file.Entire video file is divided into multiple video subfiles in this way and carries out transcoding respectively, when a video subfile transcoding
When failure, the transcoding of other video subfiles is not interfered with, only need to the video subfile of transcoding failure be subjected to transcoding, no
It needs to re-start transcoding to entire video file, substantially reduces the transcoding time of video file, solve transcoding and take ratio
Longer problem.
Device, video server and system provided in this embodiment specifically can belong to same design with embodiment of the method,
Its specific implementation process refers to embodiment of the method, and which is not described herein again.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (12)
1. a kind of processing method of video file, which is characterized in that the method includes:
Video file is obtained, the video file is divided by least two video subfiles according to the frame of the video file;Solution
Analyse each frame in the video file K-V pairs, the K are the corresponding offset address of the frame, and the V is the corresponding numbers of the K
According to;According to the K-V of each frame of the video file to the video file is divided at least two video subfiles, each
The video subfile includes M described K-V pairs, and M is less than predetermined threshold value, and the setting of the predetermined threshold value services list according to transcoding
Member the speed of service or video file size and determine;
Video subfile is divided into several groups, different groups is sent on corresponding transcoding service unit and carries out transcoding, is obtained
Video subfile after at least two transcoding service unit transcodings;
The video file after transcoding is obtained according to the video subfile after at least two transcodings.
2. according to the method described in claim 1, it is characterized in that, the acquisition video file, including:
The request for receiving the playing video file that terminal is initiated, according to the acquisition request for the playing video file that the terminal is initiated
The video file;
After video file after the video subfile acquisition transcoding according to after at least two transcodings, further include:
Video file after returning to from the transcoding to the terminal, makes the video file after transcoding described in the terminal plays.
3. according to the method described in claim 1, it is characterized in that, the acquisition video file, including:
The request for receiving the transcoded video file of video website server, according to the server transcoded video text of the video website
Video file described in the acquisition request of part;
After video file after the video subfile acquisition transcoding according to after at least two transcodings, further include:
Video file after returning to from the transcoding to the server of the video website makes the server of the video website preserve
Video file after the transcoding.
4. according to the method described in claim 1, it is characterized in that, described be divided into several groups by video subfile, by different groups
It is sent on corresponding transcoding service unit and carries out transcoding, obtain the video after at least two transcoding service unit transcodings
Subfile, including:
At least two videos subfile is sent on transcoding service unit and carries out transcoding respectively;
The transcoding information that the transcoding service unit returns is received, if the transcoding information is the video subfile after transcoding,
The video subfile after the transcoding is then stored, it, will be not by correct transcoding if the transcoding information is transcoding failure information
Video subfile be sent to other transcoding service units in addition to the transcoding service unit for sending the transcoding failure information
Upper carry out transcoding obtains the video subfile after other transcoding server unit transcodings.
5. according to the method described in claim 4, it is characterized in that, the transcoding letter for receiving the transcoding service unit and returning
After breath, further include:
If the transcoding information is the video subfile after transcoding, records current transcoding service unit transcoding and successfully believe
Breath records the information of the current transcoding service unit transcoding failure if the transcoding information is transcoding failure information.
6. a kind of processing unit of video file, which is characterized in that described device includes:
The video file is divided at least for obtaining video file according to the frame of the video file by file division module
Two video subfiles;The file division module, including document analysis unit, for parsing each frame in the video file
K-V pairs, the K be the corresponding offset address of the frame, the V be the corresponding data of the K;File division unit is used for root
According to the video file each frame K-V to the video file is divided at least two video subfiles, it is each described
Video subfile includes M described K-V pairs, and M is less than predetermined threshold value, and the setting of the predetermined threshold value is according to transcoding service unit
The speed of service or the size of video file and determine;
Different groups is sent to corresponding transcoding and services list by file transcoding module for video subfile to be divided into several groups
Transcoding is carried out in member, obtains the video subfile after at least two transcoding service unit transcoding;
File acquisition module, for according to the video file after the video subfile acquisition transcoding after at least two transcodings.
7. device according to claim 6, which is characterized in that the file division module, including:
First acquisition unit, the request of the playing video file for receiving terminal initiation, the broadcasting initiated according to the terminal
Video file described in the acquisition request of video file;
Described device further includes:
First returns to module, after obtaining transcoding according to the video subfile after at least two transcodings for the file acquisition module
Video file after, the video file after returning to the transcoding to the terminal, after making transcoding described in the terminal plays
Video file.
8. device according to claim 6, which is characterized in that the file division module, including:
Second acquisition unit, the request of the transcoded video file for receiving video website server, according to the video website
Server transcoded video file acquisition request described in video file;
Described device further includes:
Second returns to module, after obtaining transcoding according to the video subfile after at least two transcodings for the file acquisition module
Video file after, the video file after returning to the transcoding to the server of the video website makes the video website
Server preserve the video file after the transcoding.
9. device according to claim 6, which is characterized in that the file transcoding module includes:
File transmission unit is turned respectively for at least two videos subfile to be sent on transcoding service unit
Code;
File obtaining unit, the transcoding information returned for receiving the transcoding service unit, if the transcoding information is to turn
Video subfile after code, then store the video subfile after the transcoding, if the transcoding information is transcoding failure information,
It will be then sent in addition to the transcoding service unit for sending the transcoding failure information by the video subfile of correct transcoding
Transcoding is carried out on other transcoding service units, obtains the video subfile after other transcoding server transcodings.
10. device according to claim 9, which is characterized in that the file transcoding module further includes:
Recording unit, for after the transcoding information that the file obtaining unit receives that the transcoding service unit returns, such as
Transcoding information described in fruit is the video subfile after transcoding, then records the current successful information of transcoding service unit transcoding, if
The transcoding information is transcoding failure information, then records the information of the current transcoding service unit transcoding failure.
11. a kind of video server, which is characterized in that the server includes:As claim 6-10 any one of them regards
The device of frequency file processing.
12. a kind of processing system of video file, which is characterized in that the system comprises:Video as claimed in claim 11
Server and at least two transcoding servers,
Each transcoding server, the video subfile sent for receiving the video server, and to the video subfile
Carry out transcoding.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210126608.XA CN103379364B (en) | 2012-04-26 | 2012-04-26 | Processing method, device, video server and the system of video file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210126608.XA CN103379364B (en) | 2012-04-26 | 2012-04-26 | Processing method, device, video server and the system of video file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103379364A CN103379364A (en) | 2013-10-30 |
CN103379364B true CN103379364B (en) | 2018-08-03 |
Family
ID=49463848
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210126608.XA Active CN103379364B (en) | 2012-04-26 | 2012-04-26 | Processing method, device, video server and the system of video file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103379364B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103686204A (en) * | 2013-12-20 | 2014-03-26 | 乐视网信息技术(北京)股份有限公司 | Intelligent retry method and system based on transcoding failure |
CN105357593B (en) * | 2015-10-30 | 2019-06-07 | 努比亚技术有限公司 | A kind of methods, devices and systems of uploaded videos |
CN105451031B (en) * | 2015-11-18 | 2021-11-30 | 腾讯科技(深圳)有限公司 | Video transcoding method and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101945278A (en) * | 2010-09-15 | 2011-01-12 | 中国科学院深圳先进技术研究院 | Video self-adaptive transcoding method and system |
CN102024033A (en) * | 2010-12-01 | 2011-04-20 | 北京邮电大学 | Method for automatically detecting audio templates and chaptering videos |
CN102123279A (en) * | 2010-12-28 | 2011-07-13 | 乐视网信息技术(北京)股份有限公司 | Distributed real-time transcoding method and system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4165403B2 (en) * | 2004-01-13 | 2008-10-15 | ソニー株式会社 | Information processing apparatus and method, and program |
CN101459848B (en) * | 2008-12-26 | 2010-11-10 | 西安交通大学 | Distributed multi-format digital video transcoding construction design method |
-
2012
- 2012-04-26 CN CN201210126608.XA patent/CN103379364B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101945278A (en) * | 2010-09-15 | 2011-01-12 | 中国科学院深圳先进技术研究院 | Video self-adaptive transcoding method and system |
CN102024033A (en) * | 2010-12-01 | 2011-04-20 | 北京邮电大学 | Method for automatically detecting audio templates and chaptering videos |
CN102123279A (en) * | 2010-12-28 | 2011-07-13 | 乐视网信息技术(北京)股份有限公司 | Distributed real-time transcoding method and system |
Also Published As
Publication number | Publication date |
---|---|
CN103379364A (en) | 2013-10-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102036058B (en) | Method, server, terminal and system for switching videos in video monitoring system | |
CN102656857B (en) | Method and apparatus for acquiring and transmitting streaming media data in the process of initiation | |
CN101267589B (en) | System and method for realizing interactive service | |
EP2493191B1 (en) | Method, device and system for realizing hierarchically requesting content in http streaming system | |
CN101438592B (en) | Method and apparatus for re-constructing media from a media representation | |
CN104125229B (en) | The player method of Streaming Media and playing device | |
CN103416073B (en) | For providing the method and apparatus of the feedback about the process to video content | |
CN104135678A (en) | Method for realizing video advertisement putting in video on demand based on HLS protocol | |
CN104769951A (en) | Scalable robust live streaming system | |
CN103986966A (en) | System and method for pushing smart television image to mobile terminal for display | |
CN113742518B (en) | Methods, apparatus and computer program products for storing and providing video | |
US9390274B2 (en) | Media data processing method and apparatus | |
CN101662658A (en) | Program push method, set-top box and electronic program guide | |
CN102932681A (en) | Method and system for realizing recommendation of television program | |
CN104394601A (en) | WiFi (wireless fidelity) network access control method, device and router | |
CN101127780A (en) | Method for downloading, saving and replaying online video and construction of online video network | |
CN111726641A (en) | Live video playing processing method and device and server | |
CN103379364B (en) | Processing method, device, video server and the system of video file | |
CN103546771A (en) | Television program review processing method and system based on smart terminal | |
CN102571409B (en) | Service request management system and method for realizing service across-terminal application | |
CN111131843A (en) | Network live broadcast system and method | |
CN105227989A (en) | A kind of multimedia reorientation method based on VDI Technical Architecture and system | |
CN107801049A (en) | A kind of real-time video transmission, player method and device | |
CN104079975A (en) | Image processing device, image processing method, and computer program | |
CN106331763A (en) | Method of playing slicing media files seamlessly and device of realizing the method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |