CN106791929A - A kind of video file real-time transcoding method - Google Patents
A kind of video file real-time transcoding method Download PDFInfo
- Publication number
- CN106791929A CN106791929A CN201611271876.5A CN201611271876A CN106791929A CN 106791929 A CN106791929 A CN 106791929A CN 201611271876 A CN201611271876 A CN 201611271876A CN 106791929 A CN106791929 A CN 106791929A
- Authority
- CN
- China
- Prior art keywords
- files
- real
- time
- file
- section
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 15
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
- H04N21/234309—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/75—Media network packet handling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440218—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a kind of video file real-time transcoding method, front-end proxy agent is when client receives real-time VOD m3u8 file requests, when m3u8 files do not exist, create a session, m3u8 files are generated according to original document duration in the session, the m3u8 files of generation return to the client, and each corresponding start time point of described TS section file and end time point are preserved in the session, this video file real-time transcoding method, because m3u8 and TS section files are the generations in real time in program request, real-time transcoding generates the order video of hls forms, so that real-time transcoding can arbitrarily SEEK, client has preferably experience.
Description
Technical field
The present invention relates to a kind of video file real-time transcoding method.
Background technology
The explosive growth of current video file, video format is more and more, and the variation of playback terminal, for compatibility
Various playback terminals, the instant viewing demand for saving memory space and user, real-time transcoding program request turn into urgent demand.
In current industry using substantially broadcast when turning by the way of, but common problem is in real-time transcoding process
In, player cannot SEEK to the position without transcoding, while player interface duration long can be continually changing, customer experience is very
Difference.
The content of the invention
A kind of video file real-time transcoding method is provided it is an object of the invention to overcome of the prior art not enough.
To achieve the above object, on the one hand, a kind of video file real-time transcoding method that the present invention is provided, including walk as follows
Suddenly:
Front-end proxy agent, when m3u8 files do not exist, creates one when client receives real-time VOD m3u8 file requests
Individual session, m3u8 files are generated in the session according to original document duration,
Comprising the TS section files for not actually existing in the m3u8 files of generation, and all TS sections files
Total duration is identical with the duration of the original document,
The m3u8 files of generation return to the client, and each described TS sections file pair is preserved in the session
The start time point answered and end time point.
According to a kind of video file real-time transcoding method that the present invention is provided, because m3u8 and TS section files are in program request
When generation in real time, real-time transcoding generates the order video of hls forms so that real-time transcoding can arbitrarily SEEK, client has preferably
Experience.
Specific embodiment
Embodiments of the invention are described below in detail.
One embodiment of the invention provides a kind of video file real-time transcoding method, supports that video of the invention is compiled comprising one
A kind of system of code algorithm, wherein system includes front-end proxy module, memory module, m3u8 generation modules and real-time transcoding mould
Block.
Specifically, front-end proxy module is used for curstomer-oriented end, receives the request of m3u8 files and TS section files, safeguards
Real-time transcoding session, by after other resume modules, video information or video flowing being returned into client;
Memory module is used to preserve the m3u8 files and TS section files generated in real time after real-time transcoding;
M3u8 generation modules are used to generate m3u8 files according to original document duration, are included in m3u8 files and not actually existed
TS section files, the duration summation of all TS section files is identical with the duration of original document in m3u8 files, additionally, in order to
Allowing has preferably experience when playing, generally, the duration of several sections of beginning can set slightly shorter, lower detailed description.
Real-time transcoding module is used to process TS section file real-time transcoding requests, and original video files middle finger is fixed time section
Video content transcoding and generate TS section file, the TS section file implement transcoding request include original video files road
The parameters such as footpath, time started, end time.
A kind of video file real-time transcoding method of one embodiment of the invention, relies on said system, and implementation procedure is specifically
Comprise the following steps:
Step 1, front-end proxy module receive client terminal playing request, usually, that is, ask m3u8 files;
Step 2.1, if it find that existing m3u8 files in memory module, then directly return to m3u8 file contents
Client;
If step 2.2, the m3u8 files do not exist, first searching the corresponding real-time transcoding session of the m3u8 files is
No presence, if it does not exist, then creating a session;
Step 3, in a session, according to original document duration, generation m3u8 files in real time, in m3u8 files comprising reality not
The TS section files of presence, the duration summation of all TS sections files is identical with the duration of original document in m3u8 files, m3u8
Preserved in a storage module after file generated, and return to client, each TS section files are preserved in simultaneous session corresponding
Start time point and end time point;
Step 4, can quickly start for follow-up play, session sends first transcoding request of TS section files immediately
Real-time transcoding module is given, the transcoding request of first TS section file includes that session sends file, first TS section file
It is 00 between at the beginning of the parameter such as time started and first TS section end of file time, such as first TS section file:
00:00, first TS section end of file time is a duration (being traditionally arranged to be 3~5 seconds or so) for section.Generally open
The begin duration of several TS section files can set shorter to shorten the transcoding time, enable the client to quickly play so as to change
Kind experience;
After step 5, real-time transcoding module receive first transcoding request of TS section files, to first TS section file
Carry out transcoding, and synchronous returning real-time data stream;
After step 6, front-end proxy module receive the real-time stream, the real-time stream is saved in memory module;
Step 7, after client receives m3u8 files, the content in m3u8 files is read, from first TS section file
Start the address successively to server request TS section files;
Step 8, front-end proxy module first search corresponding session behind the address for receiving TS section files;
If step 8.1, corresponding session do not exist, a session is created, m3u8 files are first searched in a storage module
Whether there is, if it is present directly returning.Due to beginning to transcoding, and file ratio before first TS section file
It is shorter, then in most cases, client can be directly returned to;
If step 8.2, TS section file are not generated also, the transcoding of TS section files is immediately begun to, and returned
Real-time stream, and memory module is saved in simultaneously;
Step 9, session may proceed to 2 follow-up sections of transcoding successively, can be hurried up when request comes so as to next time and take TS
Section file;
Step 10, client either SEEK or played in order, all can repeat step 8 to step 9 action, Zhi Daobo
Put end or stop playing;
Step 11, when client it is interior for a period of time all it is not requested come, then session can terminate automatically.
In above-mentioned steps, the mode for generating m3u8 is specific as follows:
Assuming that a length of 23.4 seconds during former video, then if each TS section files are set to 3 seconds, then the m3u8 of generation
File content may be as follows:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:3
#EXTINF:3.000,
TS_1_03000.TS
#EXTINF:3.000,
TS_2_3000_6000.TS
#EXTINF:3.000,
TS_3_6000_9000.TS
#EXTINF:3.000,
TS_4_9000_12000.TS
#EXTINF:3.000,
TS_5_12000_15000.TS
#EXTINF:3.000,
TS_6_15000_18000.TS
#EXTINF:3.000,
TS_7_18000_21000.TS
#EXTINF:2.400,
TS_8_21000_23400.TS
#EXT-X-ENDLIST
What deserves to be explained is, TS section filenames can be named according to actual conditions, the section duration of TS section files
Can also be adjusted according to actual conditions, above-mentioned simply one embodiment of the invention example.
To sum up, a kind of video file real-time transcoding method for being provided according to the present invention, because m3u8 and TS section files are
The generation in real time in program request, real-time transcoding generates the order video of hls forms so that real-time transcoding can arbitrarily SEEK, client
There is preferably experience.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means that the specific features or feature that are described with reference to the embodiment or example are contained in this
In at least one embodiment or example of invention.In this manual, the schematic representation to above-mentioned term is not necessarily referring to
Identical embodiment or example.Although embodiments of the invention have been shown and described above, it is to be understood that above-mentioned reality
It is exemplary to apply example, it is impossible to be interpreted as limitation of the present invention, one of ordinary skill in the art do not depart from it is of the invention
Above-described embodiment can be changed within the scope of the invention in the case of principle and objective, changed, replaced and modification.
Claims (1)
1. a kind of video file real-time transcoding method, it is characterised in that comprise the following steps:
Front-end proxy agent, when m3u8 files do not exist, creates a meeting when client receives real-time VOD m3u8 file requests
Words, m3u8 files are generated in the session according to original document duration,
Comprising the TS section files for not actually existing in the m3u8 files of generation, and all TS section files it is total when
Length is identical with the duration of the original document,
The m3u8 files of generation return to the client, and it is corresponding that each described TS sections file is preserved in the session
Start time point and end time point.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611271876.5A CN106791929A (en) | 2016-12-30 | 2016-12-30 | A kind of video file real-time transcoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611271876.5A CN106791929A (en) | 2016-12-30 | 2016-12-30 | A kind of video file real-time transcoding method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106791929A true CN106791929A (en) | 2017-05-31 |
Family
ID=58952255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611271876.5A Pending CN106791929A (en) | 2016-12-30 | 2016-12-30 | A kind of video file real-time transcoding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106791929A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110213616A (en) * | 2018-05-15 | 2019-09-06 | 腾讯科技(深圳)有限公司 | Video providing method, acquisition methods, device and equipment |
CN111741338A (en) * | 2020-07-22 | 2020-10-02 | 深圳力维智联技术有限公司 | HLS streaming media playing method, system, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120207225A1 (en) * | 2011-02-10 | 2012-08-16 | Media Excel Korea Co., Ltd. | Audio and video synchronizing method in transcoding system |
CN104469401A (en) * | 2014-12-25 | 2015-03-25 | 武汉市烽视威科技有限公司 | HLS based on-demand playing system and method |
CN105872807A (en) * | 2016-05-16 | 2016-08-17 | 乐视控股(北京)有限公司 | Video playing method and system |
CN105979404A (en) * | 2015-12-01 | 2016-09-28 | 乐视致新电子科技(天津)有限公司 | Streaming media processing method and device |
-
2016
- 2016-12-30 CN CN201611271876.5A patent/CN106791929A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120207225A1 (en) * | 2011-02-10 | 2012-08-16 | Media Excel Korea Co., Ltd. | Audio and video synchronizing method in transcoding system |
CN104469401A (en) * | 2014-12-25 | 2015-03-25 | 武汉市烽视威科技有限公司 | HLS based on-demand playing system and method |
CN105979404A (en) * | 2015-12-01 | 2016-09-28 | 乐视致新电子科技(天津)有限公司 | Streaming media processing method and device |
CN105872807A (en) * | 2016-05-16 | 2016-08-17 | 乐视控股(北京)有限公司 | Video playing method and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110213616A (en) * | 2018-05-15 | 2019-09-06 | 腾讯科技(深圳)有限公司 | Video providing method, acquisition methods, device and equipment |
CN110213616B (en) * | 2018-05-15 | 2021-12-28 | 腾讯科技(深圳)有限公司 | Video providing method, video obtaining method, video providing device, video obtaining device and video providing equipment |
CN111741338A (en) * | 2020-07-22 | 2020-10-02 | 深圳力维智联技术有限公司 | HLS streaming media playing method, system, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108124202B (en) | Method for making stream media server support H L S protocol | |
JP5499314B2 (en) | Video stream encoding for adaptive video streaming | |
CN103385008B (en) | Content delivery method and system | |
CN106210768B (en) | Audio segmentation with codec-enforced frame size | |
CN104125516B (en) | Media file reception, media file sending method and apparatus and system | |
US20110145370A1 (en) | Methods and systems to personalize content streams | |
EP3996382A1 (en) | Gapless video looping | |
KR20180108879A (en) | Systems and methods for automatically generating top level index files | |
CN105376612A (en) | Video playing method, media equipment, playing equipment and multimedia system | |
US10681431B2 (en) | Real-time interstitial content resolution and trick mode restrictions | |
CN103517157A (en) | Method and system for achieving HLS channel time-shifting playing | |
EP3618450A1 (en) | Systems, devices, and methods for streaming haptic effects | |
CN110198494B (en) | Video playing method, device, equipment and storage medium | |
CN109587514A (en) | A kind of video broadcasting method, medium and relevant apparatus | |
JP2022526004A (en) | Methods, devices and computer programs for dynamic adaptive streaming on HTTP | |
CN106791929A (en) | A kind of video file real-time transcoding method | |
US10679667B2 (en) | Virtual video editing | |
JP2017069636A (en) | Information processing device, distribution method and program | |
US20240171797A1 (en) | Techniques for providing a content stream based on a delivered stream of content | |
KR101666918B1 (en) | Method and apparatus for skip and seek processing in streaming service | |
JP2004040502A (en) | Information-reproducing apparatus, information-reproducing method, and information reproducing system | |
US9813462B2 (en) | Unified dynamic executable media playlists across connected endpoints | |
WO2015180305A1 (en) | Content acquisition method, mobile terminal and computer storage medium | |
CN111869225B (en) | Information processing apparatus, information processing method, and non-transitory computer readable storage medium | |
US20230262292A1 (en) | Content playing method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 310000 E, 16 floor, A block, Paradise software garden, 3 West Gate Road, Xihu District, Hangzhou, Zhejiang. Applicant after: Hangzhou Dang Hong Polytron Technologies Inc Address before: 310000 E, 16 floor, A block, Paradise software garden, 3 West Gate Road, Xihu District, Hangzhou, Zhejiang. Applicant before: HANGZHOU DANGHONG TECHNOLOGY CO., LTD. |
|
CB02 | Change of applicant information | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170531 |
|
RJ01 | Rejection of invention patent application after publication |