CN106713221A - Multimedia file download method and device - Google Patents

Multimedia file download method and device Download PDF

Info

Publication number
CN106713221A
CN106713221A CN201510454833.XA CN201510454833A CN106713221A CN 106713221 A CN106713221 A CN 106713221A CN 201510454833 A CN201510454833 A CN 201510454833A CN 106713221 A CN106713221 A CN 106713221A
Authority
CN
China
Prior art keywords
data section
url
url addresses
video
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
Application number
CN201510454833.XA
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510454833.XA priority Critical patent/CN106713221A/en
Priority to PCT/CN2016/082652 priority patent/WO2017016285A1/en
Publication of CN106713221A publication Critical patent/CN106713221A/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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • 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
    • 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/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot

Landscapes

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

Abstract

The invention provides a multimedia file download method. The method comprises the steps that the following operation is performed on all the multimedia data segments of a multimedia file: the uniform resource locator URL address of the current multimedia data segment is acquired; whether the URL address of the current multimedia data segment meets the preset conditions is judged; when URL address of the current multimedia data segment meets the preset conditions, the current multimedia data segment is switched to the end and then the URL address of the next multimedia data segment is acquired; and the URL addresses of all the multimedia data segments of the multimedia file are acquired and then the multimedia data segments corresponding to all the URL are downloaded. According to the scheme, the URL address of the next video segment can be acquired without waiting for completion of online playing of the current video segment, and the URL addresses of all the video segments can be acquired within a short period of time so that the user is enabled to automatically and completely obtain the required video file for offline viewing through multi-thread downloading and processing, and thus the user experience can be enhanced.

Description

The method and device that a kind of multimedia file is downloaded
Technical field
The present invention relates to Internet technology, and in particular to the method and device that multimedia file is downloaded.
Background technology
User will often find that on webpage when some videos, music site is browsed using mobile phone browser The video or music oneself liked can only be played online, and the media file can be downloaded without any Operation button, so as to these file downloads are played cannot offline at any time to local.And it is online The excessive network traffics of not only possible consumption are played, and interim card is often played by bandwidth contributions, caused very Bad Consumer's Experience.
The cardinal principle of existing browser sniff function is after the completion of web page resources loading, to each in webpage Individual label is detected.Their corresponding URL addresses are obtained if the labels such as video or audio are detected, Then it is prompted to whether user needs to download the media file.After user's selection prompting is downloaded, under browser Module is carried just to be played the locally downloading confession user of media file offline by the URL addresses.
Present substantial amounts of major video website be all using multistage video online broadcasting (mainly TV play, Film etc.), i.e., the complete TV play of one collection or a complete film are divided into multiple video-frequency bands to play, Wherein each video-frequency band corresponds to different URL addresses.After one section of video is played, terminal just can be to Video server request carries out continuation broadcasting to the URL addresses of next section of video.Therefore smelt according to conventional Spy method, can only get the URL addresses of current online broadcasting video, so as to can only download to work as The file of the last period video.Next section of video file is downloaded if desired, it is necessary to when this section is played Terminate next section and commence play out that the corresponding URL addresses of next section of video file could be obtained.So want sniff It is again time-consuming expense flow to download the complete TV play of a collection or a complete film, in addition it is also necessary to constantly carried Show that user chooses whether to download, bring very bad Consumer's Experience.
The content of the invention:
The present invention provides the method and device that a kind of multimedia file is downloaded, and realizes and obtains in a short time The URL addresses of each video-frequency band of video file.
In order to solve the above technical problems, the present invention provides a kind of method that multimedia file is downloaded, the side Method includes:
Following operation is carried out successively to each multi-medium data section of multimedia file:Obtain current multimedia data The uniform resource position mark URL address of section;Judging the URL addresses of the current multimedia data section is It is no to meet default condition;When the URL addresses of current multimedia data section meet default condition, Current multimedia data section is switched to the URL addresses that next multi-medium data section is obtained after ending up;
After the URL addresses of each multi-medium data section of the multimedia file are obtained, download described each The corresponding multi-medium data sections of URL.
Preferably,
The default condition is the URL addresses of the current multimedia data section not for sky and more than upper one The URL addresses of segment of media data differ.
Preferably,
The multimedia file is video file, and the multi-medium data section is video-frequency band;
The URL addresses for obtaining current multimedia data section include:
Travel through the video tab in the current multimedia data section;
Using the corresponding SRC attribute of the video tab as the URL addresses of current video section.
Preferably,
The corresponding multi-medium data sections of each URL of downloading include:
The corresponding multi-medium data section in each URL addresses of Parallel download.
Preferably,
The corresponding multimedia section in each URL addresses of Parallel download includes:
Corresponding thread is generated according to each URL addresses respectively;
The corresponding multi-medium data section in each URL addresses is downloaded by each thread parallel.
The present invention also provides the device that a kind of multimedia file is downloaded, it is characterised in that described device includes:
Data acquisition module, for carrying out following operation successively to each multi-medium data section of multimedia file: Obtain the uniform resource position mark URL address of current multimedia data section;Judge the present multimedia number Whether the URL addresses according to section meet default condition;When the URL ground of current multimedia data section When location meets default condition, next many matchmakers are obtained after current multimedia data section is switched into ending The URL addresses of volume data section;
Download module, for after the URL addresses of each multi-medium data of multimedia file section are obtained, Download the corresponding multi-medium data sections of each URL.
Preferably,
The default condition is the URL addresses of the current multimedia data section not for sky and more than upper one The URL addresses of segment of media data differ.
Preferably,
The multimedia file is video file, and the multi-medium data section is video-frequency band;
The URL addresses that the data acquisition module is used to obtain current multimedia data section specifically refer to:
Travel through the video tab in the current multimedia data section;
Using the corresponding SRC attribute of the video tab as the URL addresses of current video section.
Preferably,
The download module is specifically referred to for downloading the corresponding multi-medium data sections of each URL:
The corresponding multi-medium data section in each URL addresses of Parallel download.
Preferably,
The corresponding multimedia section in each URL addresses of Parallel download is specifically referred to:
Corresponding thread is generated according to each URL addresses respectively;
The corresponding multi-medium data section in each URL addresses is downloaded by each thread parallel.
Such scheme plays the URL that can obtain next video-frequency band without waiting for current video section online Address, but the URL addresses of each video-frequency band can be obtained in a short time, and then downloaded by multithreading Process respectively, user is intactly obtained desired video file automatically and watched offline, lifted Consumer's Experience.
Brief description of the drawings
Fig. 1 is the flow chart of the method that the multimedia file in embodiment one is downloaded;
Fig. 2 is the structural representation of the device that the multimedia file in embodiment one is downloaded.
Specific embodiment
For the purpose, technical scheme and advantage for making the application become more apparent, below in conjunction with accompanying drawing Embodiments herein is described in detail.It should be noted that in the case where not conflicting, this Shen Please in embodiment and the feature in embodiment can mutually be combined.
Embodiment one
As shown in figure 1, the present embodiment provides a kind of method that multimedia file is downloaded, methods described includes:
Step S11:Following operation is carried out successively to each multi-medium data section of multimedia file:
Obtain the uniform resource position mark URL address of current multimedia data section;Judge current many matchmakers Whether the URL addresses of volume data section meet default condition;As the URL of current multimedia data section When address meets default condition, obtain next many after current multimedia data section is switched into ending The URL addresses of segment of media data;
Preferably, default condition is:The URL addresses of current multimedia data section are for empty and with upper one The URL addresses of multi-medium data section differ.
In the present embodiment, multimedia file is video file, and multi-medium data section is video-frequency band.Certainly, The present invention can also be for multi-medium datas such as audios.
The URL addresses for obtaining current multimedia data section can be accomplished by the following way:
Travel through the video tab in the current multimedia data section;
Using the corresponding SRC attribute of the video tab as the URL addresses of current video section.
Step S12:After the URL addresses of each multi-medium data section of multimedia file are obtained, download each The corresponding multi-medium data sections of URL.
The corresponding multi-medium data section in each URL addresses can be downloaded using parallel mode.Specifically, according to each URL addresses generate corresponding thread respectively;The corresponding many matchmakers in each URL addresses are downloaded by each thread parallel Volume data section.
As shown in Fig. 2 the present embodiment also provides the device that a kind of multimedia file is downloaded, described device bag Include:
Data acquisition module 11, for carrying out following operation successively to each multi-medium data section of multimedia file: Obtain the uniform resource position mark URL address of current multimedia data section;Judge the present multimedia number Whether the URL addresses according to section meet default condition;When the URL ground of current multimedia data section When location meets default condition, next many matchmakers are obtained after current multimedia data section is switched into ending The URL addresses of volume data section;
Download module 12, for when the URL addresses for obtaining each multi-medium data section of the multimedia file Afterwards, the corresponding multi-medium data sections of each URL are downloaded.
Preferably,
The default condition is the URL addresses of the current multimedia data section not for sky and more than upper one The URL addresses of segment of media data differ.
Preferably,
The multimedia file is video file, and the multi-medium data section is video-frequency band;
The URL addresses that the data acquisition module 11 is used to obtain current multimedia data section specifically refer to:
Travel through the video tab in the current multimedia data section;
Using the corresponding SRC attribute of the video tab as the URL addresses of current video section.
Preferably,
The download module 12 is specifically referred to for downloading the corresponding multi-medium data sections of each URL:
The corresponding multi-medium data section in each URL addresses of Parallel download.
Preferably,
The corresponding multimedia section in each URL addresses of Parallel download is specifically referred to:
Corresponding thread is generated according to each URL addresses respectively;
The corresponding multi-medium data section in each URL addresses is downloaded by each thread parallel.
Embodiment two
Technical scheme is further illustrated with reference to specific scene.
In the present embodiment, can be original come adapter webpage by injecting self-defined JS scripts in a browser Video playback control flow, the JS script main tasks be obtain current video player interface from And the control that webpage current video section can be stopped and be played, positioned, for example, be switched to video appointing Meaning progress position is played, while video playback and the signal for stopping are intercepted in registration.
Step one:The URL addresses of detection current video section;
Specific practice be traversal search dom tree in be video labels, then obtain the corresponding src of the label Attribute, the attribute is the current online URL addresses for playing video-frequency band;
Generally, a webpage may have multiple video labels, and each video label includes a video Source, i.e. src attributes, this attribute are exactly the video-frequency band URL addresses of the label at that time, and this address can Can be change, the address of each change just corresponds to a video-frequency band.Such as change 5 times, this Video source just has 5 video-frequency bands.
Step 2:Check current video section URL addresses whether for it is empty and with the URL of a upper video-frequency band Address differs;
If the URL addresses of current video section are empty or identical with the URL addresses of a upper video-frequency band Exit, otherwise continued with into step 3;
Step 3:Multiple threads are given in the URL addresses of the current video section that will be detected in step one, A thread can be individually produced to process the corresponding downloading task in URL addresses;
Step 4:By video play controller, current video is played and is switched at the ending of progress, Start the broadcasting of next video-frequency band after broadcasting end signal is received, believe in the broadcasting for receiving new video-frequency band Step one is then transferred to after number again to continue with;
By the treatment of above step, so that it may obtain the corresponding URL ground of all video-frequency bands in video file Location, thus can intactly download to end automatically by the video file of the online many video-frequency bands played in webpage On end, there is provided watched offline to user.
Above-mentioned technical proposal to be finished go again and detects next video-frequency band online without waiting for current video section URL addresses, but inject customized JS scripts come in adapter video web-pages by browser Video playback control flow.When the URL addresses of first paragraph video are obtained, it is switched in time currently playing Ending at and start play next section of video immediately, so as to the URL ground of next section of video can be obtained moment Location, can just obtain the URL addresses of all video-frequency bands, then different within a very short time by that analogy Thread (or process) while be downloaded to these URL addresses, so as to obtain complete video file, It is greatly enhanced the experience of multistage video sniff.
The preferred embodiments of the present invention are the foregoing is only, is not intended to limit the invention, for this For the technical staff in field, the present invention can have various modifications and variations.It is all it is of the invention spirit and Within principle, any modification, equivalent substitution and improvements made etc. should be included in protection of the invention Within the scope of.One of ordinary skill in the art will appreciate that all or part of step in the above method can lead to Cross program to instruct related hardware to complete, described program can be stored in computer-readable recording medium, Such as read-only storage, disk or CD.Alternatively, all or part of step of above-described embodiment also may be used To be realized using one or more integrated circuits, correspondingly, each module/module in above-described embodiment can Realized with the form of hardware, it would however also be possible to employ the form of software function module is realized.The application is not limited It is formed on the combination of the hardware and software of any particular form.

Claims (10)

1. a kind of method that multimedia file is downloaded, it is characterised in that methods described includes:
Following operation is carried out successively to each multi-medium data section of multimedia file:Obtain current multimedia data The uniform resource position mark URL address of section;Judging the URL addresses of the current multimedia data section is It is no to meet default condition;When the URL addresses of current multimedia data section meet default condition When, current multimedia data section is switched to the URL that next multi-medium data section is obtained after ending up Address;
After the URL addresses of each multi-medium data section of the multimedia file are obtained, download described each The corresponding multi-medium data sections of URL.
2. the method for claim 1, it is characterised in that:
The default condition is the URL addresses of current multimedia data section for empty and with upper one The URL addresses of multi-medium data section differ.
3. the method for claim 1, it is characterised in that:
The multimedia file is video file, and the multi-medium data section is video-frequency band;
The URL addresses for obtaining current multimedia data section include:
Travel through the video tab in the current multimedia data section;
Using the corresponding SRC attribute of the video tab as the URL addresses of current video section.
4. the method as described in claims 1 to 3 is any, it is characterised in that:
The corresponding multi-medium data sections of each URL of downloading include:
The corresponding multi-medium data section in each URL addresses of Parallel download.
5. method as claimed in claim 4, it is characterised in that:
The corresponding multimedia section in each URL addresses of Parallel download includes:
Corresponding thread is generated according to each URL addresses respectively;
The corresponding multi-medium data section in each URL addresses is downloaded by each thread parallel.
6. the device that a kind of multimedia file is downloaded, it is characterised in that described device includes:
Data acquisition module, for carrying out following operation successively to each multi-medium data section of multimedia file: Obtain the uniform resource position mark URL address of current multimedia data section;Judge the present multimedia number Whether the URL addresses according to section meet default condition;When the URL ground of current multimedia data section When location meets default condition, next many matchmakers are obtained after current multimedia data section is switched into ending The URL addresses of volume data section;
Download module, for when the URL addresses for obtaining each multi-medium data section of the multimedia file Afterwards, the corresponding multi-medium data sections of each URL are downloaded.
7. device as claimed in claim 6, it is characterised in that:
The default condition is the URL addresses of current multimedia data section for empty and with upper one The URL addresses of multi-medium data section differ.
8. device as claimed in claim 6, it is characterised in that:
The multimedia file is video file, and the multi-medium data section is video-frequency band;
The URL addresses that the data acquisition module is used to obtain current multimedia data section specifically refer to:
Travel through the video tab in the current multimedia data section;
Using the corresponding SRC attribute of the video tab as the URL addresses of current video section.
9. the device as described in claim 6 to 8 is any, it is characterised in that:
The download module is specifically referred to for downloading the corresponding multi-medium data sections of each URL:
The corresponding multi-medium data section in each URL addresses of Parallel download.
10. device as claimed in claim 9, it is characterised in that:
The corresponding multimedia section in each URL addresses of Parallel download is specifically referred to:
Corresponding thread is generated according to each URL addresses respectively;
The corresponding multi-medium data section in each URL addresses is downloaded by each thread parallel.
CN201510454833.XA 2015-07-29 2015-07-29 Multimedia file download method and device Pending CN106713221A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510454833.XA CN106713221A (en) 2015-07-29 2015-07-29 Multimedia file download method and device
PCT/CN2016/082652 WO2017016285A1 (en) 2015-07-29 2016-05-19 Method and device for implementing download of multimedia file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510454833.XA CN106713221A (en) 2015-07-29 2015-07-29 Multimedia file download method and device

Publications (1)

Publication Number Publication Date
CN106713221A true CN106713221A (en) 2017-05-24

Family

ID=57884051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510454833.XA Pending CN106713221A (en) 2015-07-29 2015-07-29 Multimedia file download method and device

Country Status (2)

Country Link
CN (1) CN106713221A (en)
WO (1) WO2017016285A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650544A (en) * 2018-05-17 2018-10-12 上海七牛信息技术有限公司 A kind of media playing method, device and media play system
CN110247985A (en) * 2019-06-28 2019-09-17 北京奇艺世纪科技有限公司 A kind of resource downloading method, device, electronic equipment and medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112770144B (en) * 2020-12-22 2023-07-25 未来电视有限公司 Video file downloading method, video file playing method, device and terminal equipment
CN114338657B (en) * 2022-03-15 2022-07-12 北京搜狐新动力信息技术有限公司 Video file downloading method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581764A (en) * 2012-07-24 2014-02-12 武汉网幂科技有限公司 Downloading and storing method suitable for HLS video file and playing system for HLS video file
CN103648019A (en) * 2013-11-29 2014-03-19 乐视致新电子科技(天津)有限公司 Video downloading method and device based on HLS protocol
CN103702176A (en) * 2013-12-09 2014-04-02 乐视致新电子科技(天津)有限公司 HLS (http live streaming) protocol-based video downloading method and device
CN103826159A (en) * 2013-12-04 2014-05-28 Tcl集团股份有限公司 M3U8 format video local offline play method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8684748B1 (en) * 2005-11-30 2014-04-01 Saba Software, Inc. System and method for playing web-based training content on a client computer system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581764A (en) * 2012-07-24 2014-02-12 武汉网幂科技有限公司 Downloading and storing method suitable for HLS video file and playing system for HLS video file
CN103648019A (en) * 2013-11-29 2014-03-19 乐视致新电子科技(天津)有限公司 Video downloading method and device based on HLS protocol
CN103826159A (en) * 2013-12-04 2014-05-28 Tcl集团股份有限公司 M3U8 format video local offline play method and terminal
CN103702176A (en) * 2013-12-09 2014-04-02 乐视致新电子科技(天津)有限公司 HLS (http live streaming) protocol-based video downloading method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650544A (en) * 2018-05-17 2018-10-12 上海七牛信息技术有限公司 A kind of media playing method, device and media play system
CN108650544B (en) * 2018-05-17 2020-09-29 上海七牛信息技术有限公司 Media playing method, device and system
CN110247985A (en) * 2019-06-28 2019-09-17 北京奇艺世纪科技有限公司 A kind of resource downloading method, device, electronic equipment and medium
CN110247985B (en) * 2019-06-28 2022-06-03 北京奇艺世纪科技有限公司 Resource downloading method and device, electronic equipment and medium

Also Published As

Publication number Publication date
WO2017016285A1 (en) 2017-02-02

Similar Documents

Publication Publication Date Title
US10996921B2 (en) Audio file processing to reduce latencies in play start times for cloud served audio files
US9280844B2 (en) Animation
US10452250B2 (en) Method for associating media files with additional content
US11416538B1 (en) System and method for sharing trimmed versions of digital media items
WO2018071207A1 (en) Customizing media items for playback on alternative playback devices paired with a user device
US9674253B2 (en) Method for allocating a specific portion of multimedia file and skipping the specific portion automatically and electronic device thereof
US10554924B2 (en) Displaying content between loops of a looping media item
CN106713221A (en) Multimedia file download method and device
US8700650B2 (en) Search results comparison methods and systems
CN103607634A (en) Method for reducing network video ordering terminal user waiting time
EP2833280A2 (en) Method for automatically storing new media
CN106791988A (en) Multi-medium data carousel method and terminal
CN106713986A (en) Audio-video jump play method and device
EP3125541A1 (en) Data acquisition and interaction method, set top box, server and multimedia system
CN112449250A (en) Method, device, equipment and medium for downloading video resources
CN105635753B (en) The method for down loading and device of media data
CN103747280A (en) Method for creating a program and device thereof
CN106911656A (en) A kind of data download method and device
CN104954407A (en) Information push method and device
CN107484040A (en) A kind of method for realizing network acceleration
US20110314416A1 (en) Collected media content data
US20170034232A1 (en) Caching streaming media to user devices
WO2024051612A1 (en) Video content preview interaction method and apparatus, and electronic device and storage medium
US20200409984A1 (en) Providing media based on image analysis
CN105912705A (en) Acquisition method and device of multimedia file playing duration

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170524