CN106060679A - Video transmission method and device - Google Patents

Video transmission method and device Download PDF

Info

Publication number
CN106060679A
CN106060679A CN201610480538.6A CN201610480538A CN106060679A CN 106060679 A CN106060679 A CN 106060679A CN 201610480538 A CN201610480538 A CN 201610480538A CN 106060679 A CN106060679 A CN 106060679A
Authority
CN
China
Prior art keywords
file
fragment
video
network side
download
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
Application number
CN201610480538.6A
Other languages
Chinese (zh)
Inventor
安岗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuxi Tvmining Juyuan Media Technology Co Ltd
Original Assignee
Wuxi Tvmining Juyuan Media Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuxi Tvmining Juyuan Media Technology Co Ltd filed Critical Wuxi Tvmining Juyuan Media Technology Co Ltd
Priority to CN201610480538.6A priority Critical patent/CN106060679A/en
Publication of CN106060679A publication Critical patent/CN106060679A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a video transmission method and a video transmission device, used for improving a downloading speed of a ts file, and thus improving playing fluency of a video. The method comprises the steps of when a video acquisition request is received from a client, sending the request to a network side, wherein the network side is used for acquiring the ts file corresponding to the video according to the request; downloading the ts file from the network side in a multithreading manner, wherein each thread of multiple threads downloads different fragments of the ts file; and transmitting the ts file to the client for playing. According to the technical scheme of the method, the ts file can be divided into the different fragments for downloading, so that the downloading speed of the ts file is increased, and thus the video plays more fluently, and the watching experience of a user is improved.

Description

A kind of video transmission method and device
Technical field
The present invention relates to multimedia technology field, particularly relate to a kind of video transmission method and device.
Background technology
Along with the fast development of the Internet, increasing user habit watches stream video on the internet, flows video Broadcast mode bring conveniently to user, but wherein still suffer from being unfavorable for the factor of the smooth and easy viewing of user, such as buffered video Time be limited to the network bandwidth, video file size etc. so that caching speed does not catches up with the broadcasting speed of video, thus occurs that card pauses Situation.
In prior art, during client terminal playing stream video, can be frequently to the fringe node request video of stream video, limit When edge node receives request, send the request to background server with foradownloaded video, but current fringe node and backstage clothes Being single-threaded transmission means between business device, transmission speed is very slow, for especially the biggest to ts fragment file HD video, under Carry speed slower.
Summary of the invention
The embodiment of the present invention provides a kind of video transmission method and device, for improving the speed of download of ts file, and then Improve the fluency of video playback.
A kind of video transmission method, comprises the following steps:
When the video acquisition receiving client is asked, sending described request to network side, described network side is used for According to the ts file that video described in described acquisition request is corresponding;
Using multithreading to download described ts file from described network side, wherein, each thread in described multithreading divides Do not download the different fragments of described ts file;
Described ts file is transferred to described client play out.
Some beneficial effects of the embodiment of the present invention may include that
Use the technical scheme that the embodiment of the present invention provides, it is possible to use multithreading corresponding from network side foradownloaded video Ts file, for compared in prior art, single-threaded mode downloads the mode of ts file, this technical scheme can by ts literary composition Part is divided into different fragments and is downloaded respectively, thus accelerates the speed of download of ts file, and then makes video playback more Smoothness, improves the viewing experience of user.
In one embodiment, described employing multithreading downloads described ts file from described network side, including:
Described ts file is divided at least two ts fragment;
Each thread that described at least two ts fragment is respectively allocated in described multithreading is downloaded.
In this embodiment, by ts file being divided into multiple ts fragment, and multiple ts fragments are respectively allocated to each line Journey is downloaded so that each fragment in ts file can be simultaneously downloaded, thus accelerates the speed of download of ts file, enters And make the more smooth of video playback, improve the viewing experience of user.
In one embodiment, described described ts file is transferred to before described client plays out, described method Also include:
At least two ts fragment of described download is merged into described ts file.
In this embodiment, by the ts fragment of download is merged into ts file so that can be according to correctly during video playback Played in order ts file, thus avoid the broadcasting mess that causes when downloading multiple ts fragment.
In one embodiment, each ts fragment includes that each self-corresponding starting position mark and end position identify;
Described at least two ts fragment of described download is merged into described ts file, including:
Identify according to described each ts fragment each self-corresponding starting position mark and end position, determine described each ts Fragment position in described ts file;
According to described each ts fragment position in described ts file, described at least two ts fragment is merged into described Ts file.
In this embodiment, it is possible to come really according to each ts fragment each self-corresponding starting position mark and end position mark Fixed each ts fragment position in ts file, and then merge ts fragment according to this position so that multiple ts fragments can be accurate Really inerrably merge into ts file, so that ts file can be play during video playback in the correct order, it is to avoid download is many The broadcasting mess caused during individual ts fragment.
A kind of video frequency transmitter, including:
Sending module, during for asking when the video acquisition receiving client, sends described request to network side, institute State network side for the ts file corresponding according to video described in described acquisition request;
Download module, is used for using multithreading to download described ts file, wherein, described multithreading from described network side In each thread download the different fragments of described ts file respectively;
Transport module, plays out for described ts file is transferred to described client.
In one embodiment, described download module includes:
Division unit, for being divided at least two ts fragment by described ts file;
Allocation unit, under carrying out each thread that described at least two ts fragment is respectively allocated in described multithreading Carry.
In one embodiment, described device also includes:
Merge module, for being transferred to by described ts file before described client plays out, by described download extremely Few two ts fragments are merged into described ts file.
In one embodiment, each ts fragment includes that each self-corresponding starting position mark and end position identify;Institute State merging module to include:
Determine unit, for identifying according to described each ts fragment each self-corresponding starting position mark and end position, Determine described each ts fragment position in described ts file;
Combining unit, for according to described each ts fragment position in described ts file, by described at least two ts Fragment is merged into described ts file.
Other features and advantages of the present invention will illustrate in the following description, and, partly become from description Obtain it is clear that or understand by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations write Structure specifically noted in book, claims and accompanying drawing realizes and obtains.
Below by drawings and Examples, technical scheme is described in further detail.
Accompanying drawing explanation
Accompanying drawing is for providing a further understanding of the present invention, and constitutes a part for description, with the reality of the present invention Execute example together for explaining the present invention, be not intended that limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of a kind of video transmission method in the embodiment of the present invention;
Fig. 2 is the flow chart of a kind of video transmission method in the present invention one specific embodiment;
Fig. 3 is the block diagram of a kind of video frequency transmitter in the embodiment of the present invention;
Fig. 4 is the block diagram of download module in a kind of video frequency transmitter in the embodiment of the present invention;
Fig. 5 is the block diagram of a kind of video frequency transmitter in the embodiment of the present invention;
Fig. 6 is the block diagram merging module in the embodiment of the present invention in a kind of video frequency transmitter.
Detailed description of the invention
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are illustrated, it will be appreciated that preferred reality described herein Execute example be merely to illustrate and explain the present invention, be not intended to limit the present invention.
Fig. 1 is the flow chart of a kind of video transmission method in the embodiment of the present invention, and this video transmission method is applied to terminal On client-side, wherein, terminal can be mobile phone, computer, digital broadcast terminal, messaging devices, game control Platform processed, tablet device, armarium, body-building equipment, personal digital assistant etc..As described in Figure 1, the method comprises the following steps S11-S13:
Step S11, when the video acquisition receiving client is asked, sends the request to network side, and network side is used for According to the ts file that acquisition request video is corresponding.
Step S12, use multithreading from network side download ts file, wherein, each thread in multithreading respectively under Carry the different fragments of ts file.
In one embodiment, this step can perform according to following steps: first, and ts file is divided at least two ts Fragment;Secondly, each thread at least two ts fragment being respectively allocated in multithreading is downloaded.Wherein, the line of multithreading Number of passes can preset, and the number of the ts fragment being divided into should be not more than Thread Count, so can make each ts sheet of ts file Section can be simultaneously downloaded.When concrete division ts file, ts file averagely can be divided into the ts fragment of formed objects, example As, current task has 5 threads, then ts file can be divided into 5 ts fragments of formed objects;Certainly, also can at random by Ts file is divided into multiple ts fragment, and differ a citing at this.
Step S13, is transferred to client by ts file and plays out.
In one embodiment, before performing step S13, said method is further comprising the steps of: at least two will downloaded Individual ts fragment is merged into ts file.After being merged into ts file, then the ts file of merging is transferred to client plays out.
In one embodiment, each ts fragment includes that each self-corresponding starting position mark and end position identify.Its In, starting position mark and end position mark can identify in different ways, including: mark with the video playback time Note starting position identifies and end position identifies, or comes labelling starting position mark and end position mark with video frame number. When identifying with video playback time labelling starting position mark and end position, such as, the start bit of some ts fragment Putting and be designated 10 minutes, end position is designated 10 points 30 seconds, then illustrate the 10th point of the video that this ts fragment is its correspondence extremely 10 points of fragments between 30 seconds.When coming labelling starting position mark and end position mark with video frame number, such as, some ts The starting position of fragment is designated 1 frame, and end position is designated 500 frames, then illustrate the 1st of the video that this ts fragment is its correspondence the Frame is to the video between the 500th frame.
Based on above-described embodiment, ts fragment can be merged in such a way: according to each self-corresponding beginning of each ts fragment Station location marker and end position mark, determine each ts fragment position in ts file;According to each ts fragment at ts file In position, at least two ts fragment is merged into ts file.In this embodiment, by the ts fragment of download being merged into ts literary composition Part so that ts file can be play during video playback in the correct order, thus cause when avoiding the multiple ts fragment of download Broadcasting mess.
Fig. 2 is the flow chart of a kind of video transmission method in the present invention one specific embodiment, as in figure 2 it is shown, the method should For client, comprise the following steps S21-S26:
Step S21, when the video acquisition receiving client is asked, sends the request to network side, and network side is used for According to the ts file that this acquisition request video is corresponding.
Step S22, is divided at least two ts fragment by ts file.Wherein, each ts fragment includes each self-corresponding open Beginning station location marker and end position mark.
Step S23, is downloaded each thread that at least two ts fragment of division is respectively allocated in multithreading.
Step S24, each ts fragment each self-corresponding starting position mark and end position according to downloading identify, and determine Each ts fragment position in ts file.
Step S25, according to each ts fragment position in ts file, is merged into ts file by least two ts fragment.
Step S26, the ts file after merging is transferred to client and plays out.
The video transmission method provided according to any of the above-described embodiment at least can obtain following beneficial effect:
Use the technical scheme that the embodiment of the present invention provides, it is possible to use multithreading corresponding from network side foradownloaded video Ts file, for compared in prior art, single-threaded mode downloads the mode of ts file, this technical scheme can by ts literary composition Part is divided into different fragments and is downloaded respectively, thus accelerates the speed of download of ts file, and then makes video playback more Smoothness, improves the viewing experience of user.
Fig. 3 is the block diagram of a kind of video frequency transmitter in the embodiment of the present invention.As it is shown on figure 3, this device includes:
Sending module 31, during for asking when the video acquisition receiving client, sends the request to network side, network Side is for the ts file corresponding according to acquisition request video;
Download module 32, is used for using multithreading to download ts file, wherein, each thread in multithreading from network side Download the different fragments of ts file respectively;
Transport module 33, plays out for ts file is transferred to client.
In one embodiment, as shown in Figure 4, download module 32 includes:
Division unit 321, for being divided at least two ts fragment by ts file;
Allocation unit 322, is downloaded for each thread at least two ts fragment being respectively allocated in multithreading.
In one embodiment, as it is shown in figure 5, said apparatus also includes: merge module 34, for ts file is transferred to Before client plays out, at least two ts fragment of download is merged into ts file.
In one embodiment, each ts fragment includes that each self-corresponding starting position mark and end position identify;As Shown in Fig. 6, merge module 34 and include:
Determine unit 341, for identifying, really according to each ts fragment each self-corresponding starting position mark and end position Fixed each ts fragment position in ts file;
Combining unit 342, for according to each ts fragment position in ts file, being merged at least two ts fragment Ts file.
About the device in above-described embodiment, wherein modules performs the concrete mode of operation in relevant the method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program Product.Therefore, the reality in terms of the present invention can use complete hardware embodiment, complete software implementation or combine software and hardware Execute the form of example.And, the present invention can use at one or more computers wherein including computer usable program code The shape of the upper computer program implemented of usable storage medium (including but not limited to disk memory and optical memory etc.) Formula.
The present invention is with reference to method, equipment (system) and the flow process of computer program according to embodiments of the present invention Figure and/or block diagram describe.It should be understood that can the most first-class by computer program instructions flowchart and/or block diagram Flow process in journey and/or square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided Instruction arrives the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce A raw machine so that the instruction performed by the processor of computer or other programmable data processing device is produced for real The device of the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame now.
These computer program instructions may be alternatively stored in and computer or other programmable data processing device can be guided with spy Determine in the computer-readable memory that mode works so that the instruction being stored in this computer-readable memory produces and includes referring to Make the manufacture of device, this command device realize at one flow process of flow chart or multiple flow process and/or one square frame of block diagram or The function specified in multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing device so that at meter Perform sequence of operations step on calculation machine or other programmable devices to produce computer implemented process, thus at computer or The instruction performed on other programmable devices provides for realizing at one flow process of flow chart or multiple flow process and/or block diagram one The step of the function specified in individual square frame or multiple square frame.
Obviously, those skilled in the art can carry out various change and the modification essence without deviating from the present invention to the present invention God and scope.So, if these amendments of the present invention and modification belong to the scope of the claims in the present invention and equivalent technologies thereof Within, then the present invention is also intended to comprise these change and modification.

Claims (8)

1. a video transmission method, it is characterised in that including:
When the video acquisition receiving client is asked, sending described request to network side, described network side is used for basis The ts file that video described in described acquisition request is corresponding;
Use multithreading from described network side download described ts file, wherein, each thread in described multithreading respectively under Carry the different fragments of described ts file;
Described ts file is transferred to described client play out.
Method the most according to claim 1, it is characterised in that described employing multithreading downloads institute from described network side State ts file, including:
Described ts file is divided at least two ts fragment;
Each thread that described at least two ts fragment is respectively allocated in described multithreading is downloaded.
Method the most according to claim 2, it is characterised in that described described ts file is transferred to described client carries out Before broadcasting, described method also includes:
At least two ts fragment of described download is merged into described ts file.
Method the most according to claim 3, it is characterised in that each ts fragment includes that each self-corresponding starting position identifies Identify with end position;
Described at least two ts fragment of described download is merged into described ts file, including:
Identify according to described each ts fragment each self-corresponding starting position mark and end position, determine described each ts fragment Position in described ts file;
According to described each ts fragment position in described ts file, described at least two ts fragment is merged into described ts literary composition Part.
5. a video frequency transmitter, it is characterised in that including:
Sending module, during for asking when the video acquisition receiving client, sends described request to network side, described net Network side is for the ts file corresponding according to video described in described acquisition request;
Download module, is used for using multithreading to download described ts file from described network side, wherein, in described multithreading Each thread downloads the different fragments of described ts file respectively;
Transport module, plays out for described ts file is transferred to described client.
Device the most according to claim 5, it is characterised in that described download module includes:
Division unit, for being divided at least two ts fragment by described ts file;
Allocation unit, for being downloaded each thread that described at least two ts fragment is respectively allocated in described multithreading.
Device the most according to claim 6, it is characterised in that described device also includes:
Merge module, for being transferred to by described ts file before described client plays out, by least the two of described download Individual ts fragment is merged into described ts file.
Device the most according to claim 7, it is characterised in that each ts fragment includes that each self-corresponding starting position identifies Identify with end position;Described merging module includes:
Determine unit, for identifying according to described each ts fragment each self-corresponding starting position mark and end position, determine Described each ts fragment position in described ts file;
Combining unit, for according to described each ts fragment position in described ts file, by described at least two ts fragment It is merged into described ts file.
CN201610480538.6A 2016-06-27 2016-06-27 Video transmission method and device Pending CN106060679A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610480538.6A CN106060679A (en) 2016-06-27 2016-06-27 Video transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610480538.6A CN106060679A (en) 2016-06-27 2016-06-27 Video transmission method and device

Publications (1)

Publication Number Publication Date
CN106060679A true CN106060679A (en) 2016-10-26

Family

ID=57166448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610480538.6A Pending CN106060679A (en) 2016-06-27 2016-06-27 Video transmission method and device

Country Status (1)

Country Link
CN (1) CN106060679A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110430285A (en) * 2019-08-27 2019-11-08 佛山职业技术学院 A kind of playback method of Baffle Box of Bluetooth and its online audio file

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060179153A1 (en) * 2004-03-22 2006-08-10 Nam-Yul Lee Streaming based contents distribution network system and methods for splitting, merging and retrieving files
CN102143121A (en) * 2010-01-29 2011-08-03 北京搜狗科技发展有限公司 Video downloading method and device
CN103716719A (en) * 2013-12-02 2014-04-09 乐视网信息技术(北京)股份有限公司 Multimedia file downloading method and user terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060179153A1 (en) * 2004-03-22 2006-08-10 Nam-Yul Lee Streaming based contents distribution network system and methods for splitting, merging and retrieving files
CN102143121A (en) * 2010-01-29 2011-08-03 北京搜狗科技发展有限公司 Video downloading method and device
CN103716719A (en) * 2013-12-02 2014-04-09 乐视网信息技术(北京)股份有限公司 Multimedia file downloading method and user terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110430285A (en) * 2019-08-27 2019-11-08 佛山职业技术学院 A kind of playback method of Baffle Box of Bluetooth and its online audio file

Similar Documents

Publication Publication Date Title
CN105072462B (en) Video ads inserting method and device
CN103391454B (en) A kind of multithreading method for down loading and device
CN105025351A (en) Streaming media player buffering method and apparatus
CN111418215B (en) Media client, method, non-transitory data storage device
CN103929427A (en) Dynamic multi-thread downloading device and method
US9313084B2 (en) Systems and methods for client-side media chunking
CN103686245A (en) Video-on-demand and live broadcasting switching method and device based on HLS protocol
WO2019114330A1 (en) Video playback method and apparatus, and terminal device
CN107333163A (en) A kind of method for processing video frequency and device, a kind of terminal and storage medium
WO2017201980A1 (en) Video recording method, apparatus and system
CN105933741A (en) Advertisement playing method and device, and advertisement putting method, device and system
CN102364905A (en) Data representation method and apparatus, and mobile terminal
CN107690093B (en) Video playing method and device
CN106686083A (en) Video file downloading method and device
CN103648011A (en) Audio and video synchronization device and method based on HLS protocol
CN106454393A (en) Video caching method and device
CN106303754A (en) A kind of audio data play method and device
CN106162311A (en) A kind of method playing Internet video and terminal unit
CN104641655A (en) Terminal cache method, terminal and server
WO2017071642A1 (en) Media playback method, device and computer storage medium
CN105392028B (en) A kind of transmission method and device of data
CN106060679A (en) Video transmission method and device
CN106231344A (en) A kind of video break-point continuous playing method and display device
US11503354B2 (en) Methods and apparatus for streaming data
CN106254929A (en) A kind of processing method and processing device of video data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161026