CN110996164A - Video distribution method and device, electronic equipment and computer readable medium - Google Patents

Video distribution method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN110996164A
CN110996164A CN202010003136.3A CN202010003136A CN110996164A CN 110996164 A CN110996164 A CN 110996164A CN 202010003136 A CN202010003136 A CN 202010003136A CN 110996164 A CN110996164 A CN 110996164A
Authority
CN
China
Prior art keywords
link
parameters
target
preset
target 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.)
Pending
Application number
CN202010003136.3A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010003136.3A priority Critical patent/CN110996164A/en
Publication of CN110996164A publication Critical patent/CN110996164A/en
Pending legal-status Critical Current

Links

Images

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/437Interfacing the upstream path of the transmission network, e.g. for transmitting client requests to a VOD server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/70Media network packetisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/762Media network packet handling at the source 

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The disclosure provides a video publishing method, a video publishing device, electronic equipment and a computer readable medium, and relates to the technical field of videos. The method comprises the following steps: acquiring link parameters of a target link, wherein the target link is used for transmitting a target file; configuring the coding parameters of the target file according to the link parameters; and coding the target file according to the coding parameters to generate a data packet, and transmitting the data packet through the target link. According to the video distribution method and device, under different environments, when the link parameters of different target links are obtained, different coding parameters are configured for the target file according to the different link parameters, the video distribution method and device are beneficial to being suitable for the different coding parameters according to different conditions when the video is distributed, and the video distribution time length is dynamically adjusted.

Description

Video distribution method and device, electronic equipment and computer readable medium
Technical Field
The present disclosure relates to the field of video technologies, and in particular, to a video publishing method, apparatus, electronic device, and computer readable medium.
Background
With the development of network technology and video technology, more and more users join in use due to the fact that the network video social contact platform integrates the advantages of images, sounds and characters. Users can share their lives through software, and can realize more friends on the platform to learn various peculiar smells. However, in the prior art, when a user publishes a video through a platform, the enthusiasm of the user is greatly influenced by the overlong video publishing time, and the service of the video social platform is adversely affected.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect of the present disclosure, a video publishing method is provided, including: acquiring link parameters of a target link, wherein the target link is used for transmitting a target file; configuring the coding parameters of the target file according to the link parameters; and coding the target file according to the coding parameters to generate a data packet, and transmitting the data packet through the target link.
In a second aspect of the present disclosure, there is provided a video distribution apparatus, including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring link parameters of a target link, and the target link is used for transmitting a target file; the configuration module is used for configuring the coding parameters of the target file according to the link parameters; and the processing module is used for coding the target file according to the coding parameters to generate a data packet and transmitting the data packet through the target link.
In a third aspect of the present disclosure, an electronic device is provided, which includes: a memory and a processor; the memory has a computer program stored therein; a processor for performing the method of the first aspect when executing the computer program.
In a fourth aspect of the disclosure, a computer-readable medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the method of the first aspect.
The technical scheme provided by the disclosure has the following beneficial effects:
the method comprises the steps of obtaining link parameters of a target link, wherein the target link is used for transmitting a target file, configuring coding parameters of the target file according to the link parameters, and coding and transmitting the target file according to the configured coding parameters. The method and the device have the advantages that different coding parameters influence the synthesis time of the target file coding and the uploading time of the target file transmission, and under different environments, when different link parameters of the target link are obtained, different coding parameters can be configured for the target file according to the different link parameters, so that the method and the device are favorable for being suitable for different coding parameters according to different conditions when the video is released, and the video release time is dynamically adjusted.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a flowchart of a first video distribution method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a second video distribution method provided by the embodiment of the present disclosure;
fig. 3 is a flowchart of a third video distribution method provided by the embodiment of the present disclosure;
fig. 4 is a flowchart of a fourth video distribution method provided by the embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a video distribution apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing the devices, modules or units, and are not used for limiting the devices, modules or units to be different devices, modules or units, and also for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
Referring to fig. 1, the present disclosure provides a video distribution method, including:
s101, link parameters of a target link are obtained, wherein the target link is used for transmitting a target file;
s102, configuring the coding parameters of the target file according to the link parameters;
s103, encoding the target file according to the encoding parameters to generate a data packet, and transmitting the data packet through the target link.
In the embodiments of the present disclosure, the execution subject is taken as an example of the client, but the execution subject is not limited thereto.
In step S101, link parameters of a target link are obtained, where the target link is used to transmit a target file, and the method specifically includes: and acquiring the link parameters of a target link currently used for transmitting the target file so as to transmit the target file to the server. The target link is a link used by the client to transmit a target file to the server, and the target file can be an image file, an audio file and a video file. The link parameters include relevant parameters required for transmitting the target file, such as a node of transmission, a transmission speed and the like, wherein the transmission speed of the link parameters depends on the current environment of the client.
In step S102, configuring the encoding parameters of the target file according to the link parameters, specifically including: and configuring coding parameters for the target file according to the link parameters so that the client side is adaptive to adjust the coding parameters of the target file when acquiring different link parameters under the condition of adapting to different environments. The video is a continuous image sequence and is composed of continuous frames, and one frame is an image; video coding means that a file in an original video format is converted into a file in another video format by a compression technology; the encoding parameters are parameters that affect the video encoding process.
In step S103, encoding the target file according to the encoding parameter to generate a data packet, and transmitting the data packet through the target link, specifically including: and encoding the target file according to the encoding parameters, and transmitting the target file through the target link based on the encoding parameters. When a user publishes a video on any platform through a client, the user needs to go through two processes of video encoding and video transmission; in the embodiment of the present disclosure, the two encoding and transmission processes may be encoding to generate a data packet, and then uploading the data packet to the server, where in this case, the time length for releasing the video depends on the sum of the synthesis time length of the video encoding and the uploading time length of the video transmission; preferably, the encoding and transmission processes are performed simultaneously, i.e. the transmission is synchronized during the encoding process, in which case the duration of the release of the video depends on the longer duration of both the composition duration of the video encoding and the upload duration of the video transmission. When different encoding parameters are configured for the target file in step S102, the encoding parameters affect the synthesis duration of encoding the target file and the uploading duration of transmitting the target file.
In the embodiment of the present disclosure, by obtaining the link parameter of the target link, the target link is used to transmit the target file, and configures the encoding parameter of the target file according to the link parameter, so as to encode and transmit the target file according to the configured encoding parameter. The video publishing comprises a video coding synthesis process and a video transmission uploading process; according to the video distribution method and device, the link parameters of different target links are obtained in different environments, different coding parameters can be configured for the target file according to the different link parameters, the video distribution method and device are beneficial to being suitable for the different coding parameters according to the different environments when the video is distributed, and the video distribution time length is dynamically adjusted.
In this disclosure, optionally, referring to fig. 2, before obtaining the link parameter of the target link in step S101, the method includes:
s201, sending an access request to a preset server;
s202, receiving a reply message returned by the server end in response to the access request, wherein the reply message comprises address information of the access node distributed by the server end;
s203, establishing a target link for connecting the access node according to the address information.
In step S201, an access request is sent to a preset server, specifically, when a user publishes a video through a client, a publishing control on an interactive interface is triggered, and a processing logic of the access request includes sending the access request to the preset server to establish a target link for publishing the video.
In step S202, a reply message returned by the server in response to the access request is received, where the reply message includes address information of an access node allocated by the server, and specifically, when the client sends the access request to the server, the server returns a reply message including address information of an allocated access node in response to the access request, and the access node is allocated as client access.
In step S203, a target link connected to the access node is established according to the address information, specifically, the client extracts address information of the access node allocated by the server based on the reply message returned by the server, and establishes a target link connected to the access node allocated by the server according to the address information.
In the embodiment of the disclosure, the target link connected to the access node allocated by the server based on the access request is established before the client publishes the video through the platform, so as to perform data communication.
In this disclosure, optionally, referring to fig. 3, step S101 obtains a link parameter of a target link, where the step includes:
s301, acquiring a preset test file;
s302, sending the test file to the access node through the target link;
s303, acquiring the link parameters of the target link based on the data capacity and the transmission time of the test file.
In step S301, the client obtains a preset test file, specifically, the test file may be a preset video file having a preset file size. The test file can be obtained from a reply message returned by the server side, and can also be prestored in the client side.
In step S302, the client sends the test file to the access node allocated by the server via the target link, that is, the client preferably sends the test file to the server before issuing the target file.
In step S303, link parameters of the target link are obtained based on the data capacity and the transmission time of the test file, specifically, the data capacity of the test file represents the file size of the test file, the transmission time represents the upload time consumed by the upload server side of the test file, and the link parameter representing the transmission speed of the target link can be calculated and obtained by using the two parameters of the file size and the upload time of the test file. The server side can calculate the current transmission speed of the client side based on the file size and the uploading duration of the test file uploaded by the client side, and transmits the transmission speed back to the client side. Further, the client can know the file size of the test file when acquiring the test file, and can obtain the consumed uploading duration when transmitting the test file through the target link, that is, the client can also calculate and obtain the transmission speed according to the file size and the uploading duration.
In the embodiment of the present disclosure, before the client issues the video, the test file is transmitted to the server, so as to obtain the link parameter (specifically, the transmission speed) of the target link according to the file size and the uploading duration of the test file. The process of transmitting the test file can be understood as uploading a preheating behavior, that is, before the client issues the video transmission target file, the link parameter of the current target link is obtained by transmitting the test file, so as to adjust the corresponding parameter of the issued video according to the link parameter.
In this disclosure, optionally, referring to fig. 4, step S102 configures an encoding parameter of the target file according to the link parameter, including:
s401, matching the link parameters with a preset parameter list, wherein the preset parameter list comprises preset link parameters and preset coding parameters with mapping relations;
s402, determining a preset coding parameter corresponding to the link parameter, and configuring the preset coding parameter as a coding parameter of the target file.
In step S401, the link parameter is matched with a preset parameter list, where the preset parameter list includes a preset link parameter and a preset encoding parameter having a mapping relationship, and specifically, a preset parameter list is prestored in the client, where the preset parameter list includes the preset link parameter and the preset encoding parameter and is used to represent the mapping relationship between the preset link parameter and the preset encoding parameter. In the preset parameter list, the preset link parameters can be classified according to the numerical value range and are mapped with the preset coding parameters. That is, the preset link parameters in a certain range may correspond to a preset encoding parameter. The matching of the link parameter and the preset parameter list may be understood as finding a preset link parameter or a range level thereof corresponding to the link parameter of the target link from the preset link parameters included in the preset parameter list.
In step S402, a preset encoding parameter corresponding to the link parameter is determined, and the preset encoding parameter is configured as an encoding parameter of the target file, specifically, since the preset link parameter and the preset encoding parameter have a mutual mapping relationship, after the preset link parameter corresponding to the link parameter of the target link is matched in step S401, the corresponding preset encoding parameter can be obtained. After the preset encoding parameters are obtained, the encoding parameters of the target file are adjusted according to the preset encoding parameters. In an embodiment, when the client issues the video, the target file has default coding parameters, and after the current corresponding preset coding parameters are determined according to the link parameters of the target file, the coding parameters of the target file are adjusted based on the preset coding parameters.
In the embodiment of the present disclosure, a preset parameter list is stored in advance, specifically, the preset parameter list is configured to correspond to different encoding parameters at different transmission speeds, and after the link parameter of the target link is obtained in step S101, the link parameter of the target link is taken as a basis, and the preset parameter list is combined to match out the corresponding preset encoding parameter in the current environment, so as to configure the encoding parameter adapted to the current transmission speed for the target file.
In this embodiment of the present disclosure, optionally, the link parameter includes a transmission speed, where the transmission speed may be understood as a current uploading network speed of the client; step S102 configures the encoding parameters of the target file according to the link parameters, including:
step S501, when the transmission speed is lower than a preset transmission speed, configures the encoding parameter of the target file to be lower than a preset video bitrate.
Specifically, the encoding parameters of the configuration target file mainly include the following three factors influenced by adjusting different parameters to adjust the encoding parameters: video image quality, video code rate and video coding synthesis duration; under the condition of keeping one of the three factors unchanged, for example, keeping the video quality unchanged, adjusting the video code rate will affect the synthesis duration of the video coding. The adjustment of the video code rate influences the file size of the target file besides the condition of influencing video coding; when the target file is transferred, the upload time length will depend on the transfer speed and the file size, and when the transfer speed is constant, the file size is proportional to the upload time length. The video code rate can be adjusted through the following conditions: (1) adjusting the frame rate of coding, and achieving the purpose of controlling the code rate by adjusting the resolution of the sequence in time; (2) adjusting the size of the image, and achieving the purpose of controlling the code rate by adjusting the spatial resolution of the sequence; (3) and (4) adjusting the quantization parameter, wherein the quantization parameter of the coded residual error coefficient can directly influence the code rate. In the embodiment of the present disclosure, the adjustment method of the video bitrate is not limited.
In step S501, when the transmission speed of the target link is less than the preset transmission speed, the encoding parameter of the target file is configured to be lower than the preset video bitrate, that is, in the implementation of the present disclosure, the preset video bitrate, which is preferred in the case of the preset transmission speed, is preset. When the current transmission speed of the target link is lower than the preset transmission speed, namely the transmission speed does not reach an ideal value under the current environment, the encoding parameters are configured to enable the corresponding video code rate to be lower than the preset video code rate.
When the transmission speed is lower than the preset transmission speed in step S501, the uploading duration of the transmission target file is longer, and the video publishing duration is longer than the synthesizing duration of the lower video code; in response to the situation, the video release duration is optimized by reducing the video code rate in the embodiment of the disclosure. When the video code rate is reduced, the file size of the target file is reduced adaptively, and the uploading time required in the transmission process is reduced correspondingly; in this case, when the video quality is protected and the video code rate is reduced, the video coding synthesis time is prolonged, but the uploading time is optimized, and the video distribution time is finally optimized.
In an embodiment, the step of configuring the encoding parameter of the target file to be lower than the preset video bitrate may be a result of step S401 and step S402, that is, a preset parameter list pre-stored in the client is preset with a preferred preset transmission speed and a preset encoding parameter mapped thereto, and the preset encoding parameter is configured to adjust the preset video bitrate. When the transmission speed of the target link is less than the preset transmission speed, that is, the transmission speed is less than the preferred value, the preset encoding parameter mapped with the target link is configured to be lower than the preset video code rate. Conversely, it can be understood that when the transmission speed of the target link is less than the preset transmission speed, that is, the transmission speed is greater than the preferred value, the preset encoding parameter mapped thereto is configured to be higher than the preset video bitrate, and may also be configured to be the preset video bitrate (i.e., the default encoding parameter).
In the implementation of the present disclosure, the encoding parameters are dynamically adjusted according to the difference of the transmission speeds to configure different video code rates, so as to dynamically adjust the uploading duration of the transmission target file and the synthesis duration of video encoding on the target file, so that the video publishing duration is optimized, thereby improving the enthusiasm of users for publishing videos.
In this embodiment of the present disclosure, optionally, the video publishing method further includes:
s601, collecting link parameters of the target link at regular time;
s602, when the transmission speed is greater than or equal to a preset transmission speed, updating the coding parameters of the target file to the preset video code rate;
step S103 encodes the target file according to the encoding parameter to generate a data packet, including:
s603, the target file is coded according to the updated coding parameters to generate a data packet.
In step S601, link parameters of the target link are collected at regular time, and specifically, when the target file is transmitted according to the encoding parameters in step S103, current link parameters of the target link, such as a transmission speed, are monitored in real time. The timing acquisition can acquire link parameters of a target link once at preset time intervals.
In step S602, when the currently acquired transmission speed is greater than or equal to the preset transmission speed, the encoding parameter of the target file is updated to the preset video bitrate, which can be understood as that the encoding parameter of the target file is the default encoding parameter. In an embodiment, after the video bitrate of the target file is reduced through step S502, if the currently acquired transmission speed is greater than or equal to the preset transmission speed, the video bitrate is updated to a default value, that is, the preset video bitrate, and the default value can be understood as a preferred value. In an embodiment, when the currently acquired transmission speed is greater than the preset transmission speed, the encoding parameter of the target file may be configured to be higher than the preset video bitrate.
In step S603, the target file is encoded according to the updated encoding parameters to generate a data packet, and specifically, after the encoding parameters are updated in step S602, the target file is encoded with the updated encoding parameters and transmitted.
In an implementation, in step S602, the encoding parameter of the target file is updated and the update timestamp is identified at the same time, and the encoding module continues to encode the target file from the time node corresponding to the update timestamp after the encoding parameter is reconfigured according to the update timestamp, so as to prevent the encoding module from re-encoding the target file from the first frame after the encoding parameter is updated.
In this embodiment of the present disclosure, optionally, step S102 configures, according to the link parameter, an encoding parameter of the target file, including:
s701, configuring the coding parameters of the cover image frame of the target file into a preset video code rate.
The edge banding image frame of the target file is a cover when the target file is displayed after the client publishes the video, and if the user publishes the video on a certain platform, the user watches the first frame of image displayed on the interactive interface when the user does not click to watch the video. Since the cover image frame affects the click rate of the viewer for clicking and browsing the target file, in an embodiment, when the encoding parameter of the target file is configured according to different link parameters, the encoding parameter of the cover image frame is kept as a default value, that is, a preferred value, and the result is characterized in that the encoding parameter of the cover image frame of the target file is configured to be the preset video code rate.
Based on the embodiment of the present disclosure, a possible application scenario is provided below to better explain a video publishing method. After a user records a section of video, the user plans to release the video on an app of a certain platform, after triggering a release interface on an interactive interface of terminal equipment, optionally, the user switches to the steps of adding video background music, animation, mapping and the like, at the moment, processing is sent to a server end in a background, an access request is sent to the server end, a link for releasing the video is established according to an access node issued by the server end, when the establishment of the link is completed, a test video is uploaded to the server end so as to measure the uploading network speed of the current terminal equipment, and coding parameters required by the video are configured according to the uploading network speed. Compared with videos required to be issued by users, the data capacity of the test videos is very small, time consumption for completing measurement and calculation of uploading network speed is very short, and the user cannot perceive the process or perceives the process for a very short time. After configuring coding parameters for the video to be uploaded by a user at present, coding the video according to the coding parameters to generate a data packet, and transmitting the data packet through an established link; at the moment, the ' video uploading, please wait for words and/or progress bars ' later ' will be displayed on the interactive interface of the terminal equipment. After the video coding and transmission are completed, the terminal device displays words such as 'successful release', and displays the video currently released by the user in the sharing interface. In the video publishing process, the user perceives the whole video publishing duration, the synthesis duration of video coding and the uploading duration of video transmission, which are specifically related to the video publishing process, are not perceived, if the waiting duration required by video publishing is too long, the user is likely to give up publishing the video, and the behavior influences the video publishing rate and the user experience of a certain platform. In contrast, according to the embodiment of the present disclosure, the encoding parameters of the video are dynamically adjusted according to the current uploading network speed of the client, that is, the current transmission speed of the established link, so as to adjust the synthesis duration and the uploading duration, optimize the video publishing duration perceived by the user, and improve the positivity of the user for publishing the video. Preferably, when the uploading network speed is low, the uploading duration is favorably reduced by configuring the coding parameters to be low in video code rate; although the reduction of the video code rate may affect the video coding to prolong the synthesis duration, when the synthesis duration is compared with the uploading duration, it can be seen that the uploading duration is far longer than the synthesis duration under the condition of low uploading network speed, so that although the synthesis duration is prolonged, the video publishing duration corresponding to the uploading duration and the synthesis duration is optimized, and the purpose of dynamically adjusting the video publishing duration is achieved.
Referring to fig. 5, a schematic structural diagram of a video distribution apparatus according to another embodiment of the present disclosure is provided, where the video distribution apparatus 500 according to the embodiment of the present disclosure may include:
an obtaining module 501, configured to obtain a link parameter of a target link, where the target link is used to transmit a target file;
a configuration module 502, configured to configure the encoding parameters of the target file according to the link parameters;
the processing module 503 is configured to encode the target file according to the encoding parameter to generate a data packet, and transmit the data packet through the target link.
In one embodiment, the video distribution apparatus 500 further includes:
the sending module is used for sending an access request to a preset server side before the link parameters of the target link are obtained;
a receiving module, configured to receive a reply message returned by the server in response to the access request, where the reply message includes address information of an access node allocated by the server;
and the establishing module is used for establishing a target link connected with the access node according to the address information.
In one embodiment, the obtaining module 501 includes the following units:
the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring a preset test file;
a sending unit, configured to send the test file to the access node through the target link;
and the second acquisition unit is used for acquiring the link parameters of the target link based on the data capacity and the transmission time of the test file.
In one embodiment, the configuration module 502 includes the following elements:
the matching unit is used for matching the link parameters with a preset parameter list, and the preset parameter list comprises preset link parameters and preset coding parameters with mapping relations;
and the first configuration unit is used for determining preset encoding parameters corresponding to the link parameters and configuring the preset encoding parameters as the encoding parameters of the target file.
In one embodiment, the link parameter includes a transmission speed; the configuration module 502 comprises the following elements:
and the second configuration unit is used for configuring the coding parameters of the target file to be lower than a preset video code rate when the transmission speed is lower than a preset transmission speed.
In one embodiment, the video distribution apparatus 500 further includes the following modules:
the acquisition module is used for acquiring the link parameters of the target link at regular time;
the updating module is used for updating the coding parameters of the target file to the preset video code rate when the transmission speed is greater than or equal to a preset transmission speed;
the processing module 503 comprises the following units:
and the updating unit is used for encoding the target file according to the updated encoding parameters to generate a data packet.
In one embodiment, the configuration module 502 includes the following elements:
and the fourth configuration unit is used for configuring the coding parameters of the cover image frame of the target file into a preset video code rate.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., the terminal device of fig. 1) 600 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as the processing device 601 hereinafter, and the memory may include at least one of a Read Only Memory (ROM)602, a Random Access Memory (RAM)603 and a storage device 608 hereinafter, which are specifically shown as follows:
as shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable medium or any combination of the two. A computer readable medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the steps of: acquiring link parameters of a target link, wherein the target link is used for transmitting a target file; configuring the coding parameters of the target file according to the link parameters; and coding the target file according to the coding parameters to generate a data packet, and transmitting the data packet through the target link.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. The name of a module or a unit does not in some cases form a limitation of the unit itself, and for example, the acquiring module may also be described as a "module for acquiring link parameters of a target link".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a video distribution method including:
acquiring link parameters of a target link, wherein the target link is used for transmitting a target file;
configuring the coding parameters of the target file according to the link parameters;
and coding the target file according to the coding parameters to generate a data packet, and transmitting the data packet through the target link.
Optionally, before the obtaining the link parameter of the target link, the method includes:
sending an access request to a preset server;
receiving a reply message returned by the server end in response to the access request, wherein the reply message comprises address information of the access node distributed by the server end;
and establishing a target link for connecting the access node according to the address information.
Optionally, the obtaining the link parameter of the target link includes:
acquiring a preset test file;
sending the test file to the access node through the target link;
and acquiring the link parameters of the target link based on the data capacity and the transmission time of the test file.
Optionally, the configuring, according to the link parameter, an encoding parameter of the target file includes:
matching the link parameters with a preset parameter list, wherein the preset parameter list comprises preset link parameters and preset coding parameters with mapping relations;
and determining preset encoding parameters corresponding to the link parameters, and configuring the preset encoding parameters as the encoding parameters of the target file.
Optionally, the link parameter comprises a transmission speed; the configuring the encoding parameters of the target file according to the link parameters comprises:
and when the transmission speed is lower than a preset transmission speed, configuring the encoding parameters of the target file to be lower than a preset video code rate.
Optionally, the video distribution method further includes:
collecting link parameters of the target link at fixed time;
when the transmission speed is greater than or equal to a preset transmission speed, updating the coding parameters of the target file to the preset video code rate;
the encoding the target file according to the encoding parameters to generate a data packet includes:
and coding the target file according to the updated coding parameters to generate a data packet.
Optionally, the configuring, according to the link parameter, an encoding parameter of the target file includes:
and configuring the coding parameters of the cover image frame of the target file into a preset video code rate.
According to one or more embodiments of the present disclosure, there is provided a video distribution apparatus including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring link parameters of a target link, and the target link is used for transmitting a target file;
the configuration module is used for configuring the coding parameters of the target file according to the link parameters;
and the processing module is used for coding the target file according to the coding parameters to generate a data packet and transmitting the data packet through the target link.
Optionally, the video distribution apparatus further includes:
the sending module is used for sending an access request to a preset server side before the link parameters of the target link are obtained;
a receiving module, configured to receive a reply message returned by the server in response to the access request, where the reply message includes address information of an access node allocated by the server;
and the establishing module is used for establishing a target link connected with the access node according to the address information.
Optionally, the obtaining module includes the following units:
the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring a preset test file;
a sending unit, configured to send the test file to the access node through the target link;
and the second acquisition unit is used for acquiring the link parameters of the target link based on the data capacity and the transmission time of the test file.
Optionally, the configuration module comprises the following units:
the matching unit is used for matching the link parameters with a preset parameter list, and the preset parameter list comprises preset link parameters and preset coding parameters with mapping relations;
and the first configuration unit is used for determining preset encoding parameters corresponding to the link parameters and configuring the preset encoding parameters as the encoding parameters of the target file.
Optionally, the link parameter comprises a transmission speed; the configuration module comprises the following units:
and the second configuration unit is used for configuring the coding parameters of the target file to be lower than a preset video code rate when the transmission speed is lower than a preset transmission speed.
Optionally, the video distribution apparatus further includes the following modules:
the acquisition module is used for acquiring the link parameters of the target link at regular time;
the updating module is used for updating the coding parameters of the target file to the preset video code rate when the transmission speed is greater than or equal to a preset transmission speed;
the processing module comprises the following units:
and the updating unit is used for encoding the target file according to the updated encoding parameters to generate a data packet.
Optionally, the configuration module comprises the following units:
and the fourth configuration unit is used for configuring the coding parameters of the cover image frame of the target file into a preset video code rate.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for video distribution, comprising:
acquiring link parameters of a target link, wherein the target link is used for transmitting a target file;
configuring the coding parameters of the target file according to the link parameters;
and coding the target file according to the coding parameters to generate a data packet, and transmitting the data packet through the target link.
2. The video distribution method according to claim 1, wherein before obtaining the link parameter of the target link, the method includes:
sending an access request to a preset server;
receiving a reply message returned by the server end in response to the access request, wherein the reply message comprises address information of the access node distributed by the server end;
and establishing a target link for connecting the access node according to the address information.
3. The video distribution method according to claim 2, wherein the obtaining the link parameter of the target link includes:
acquiring a preset test file;
sending the test file to the access node through the target link;
and acquiring the link parameters of the target link based on the data capacity and the transmission time of the test file.
4. The video distribution method according to claim 1, wherein said configuring the encoding parameters of the target file according to the link parameters comprises:
matching the link parameters with a preset parameter list, wherein the preset parameter list comprises preset link parameters and preset coding parameters with mapping relations;
and determining preset encoding parameters corresponding to the link parameters, and configuring the preset encoding parameters as the encoding parameters of the target file.
5. The video distribution method according to claim 1, wherein the link parameter includes a transmission speed; the configuring the encoding parameters of the target file according to the link parameters comprises:
and when the transmission speed is lower than a preset transmission speed, configuring the encoding parameters of the target file to be lower than a preset video code rate.
6. The video distribution method according to claim 5, further comprising:
collecting link parameters of the target link at fixed time;
when the transmission speed is greater than or equal to a preset transmission speed, updating the coding parameters of the target file to the preset video code rate;
the encoding the target file according to the encoding parameters to generate a data packet includes:
and coding the target file according to the updated coding parameters to generate a data packet.
7. The video distribution method according to claim 5 or 6, wherein the configuring the encoding parameters of the target file according to the link parameters comprises:
and configuring the coding parameters of the cover image frame of the target file into a preset video code rate.
8. A video distribution apparatus, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring link parameters of a target link, and the target link is used for transmitting a target file;
the configuration module is used for configuring the coding parameters of the target file according to the link parameters;
and the processing module is used for coding the target file according to the coding parameters to generate a data packet and transmitting the data packet through the target link.
9. An electronic device, comprising:
the electronic device comprises a memory and a processor;
the memory has stored therein a computer program;
the processor, when executing the computer program, is configured to perform the method of any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
CN202010003136.3A 2020-01-02 2020-01-02 Video distribution method and device, electronic equipment and computer readable medium Pending CN110996164A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010003136.3A CN110996164A (en) 2020-01-02 2020-01-02 Video distribution method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010003136.3A CN110996164A (en) 2020-01-02 2020-01-02 Video distribution method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN110996164A true CN110996164A (en) 2020-04-10

Family

ID=70080720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010003136.3A Pending CN110996164A (en) 2020-01-02 2020-01-02 Video distribution method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN110996164A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650437A (en) * 2022-03-14 2022-06-21 百果园技术(新加坡)有限公司 Video publishing method, device, equipment and storage medium
CN114979757A (en) * 2022-06-02 2022-08-30 北京字跳网络技术有限公司 Video distribution method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098245A (en) * 2006-06-19 2008-01-02 株式会社Ntt都科摩 Base station, video distribution system, and distribution control method
CN102572590A (en) * 2010-12-30 2012-07-11 新奥特(北京)视频技术有限公司 Video release method and system
CN103686444A (en) * 2012-09-20 2014-03-26 中国科学院声学研究所 Video transmission scheme having end-to-end QoS guarantee in MIMO OFDM system
WO2014047208A1 (en) * 2012-09-18 2014-03-27 Squash Compression, LLC Methods and apparatus for increasing the efficiency of electronic data storage and transmission
CN106789886A (en) * 2016-11-16 2017-05-31 深圳市异度信息产业有限公司 The transmission method and device of data
CN107484019A (en) * 2017-08-03 2017-12-15 乐蜜有限公司 The dissemination method and device of a kind of video file
CN108696772A (en) * 2017-04-11 2018-10-23 上海谦问万答吧云计算科技有限公司 A kind of transmission method and device of real-time video
CN109167959A (en) * 2018-09-07 2019-01-08 浙江大华技术股份有限公司 A kind of video capture device, system and video-signal transmission method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098245A (en) * 2006-06-19 2008-01-02 株式会社Ntt都科摩 Base station, video distribution system, and distribution control method
CN102572590A (en) * 2010-12-30 2012-07-11 新奥特(北京)视频技术有限公司 Video release method and system
WO2014047208A1 (en) * 2012-09-18 2014-03-27 Squash Compression, LLC Methods and apparatus for increasing the efficiency of electronic data storage and transmission
CN103686444A (en) * 2012-09-20 2014-03-26 中国科学院声学研究所 Video transmission scheme having end-to-end QoS guarantee in MIMO OFDM system
CN106789886A (en) * 2016-11-16 2017-05-31 深圳市异度信息产业有限公司 The transmission method and device of data
CN108696772A (en) * 2017-04-11 2018-10-23 上海谦问万答吧云计算科技有限公司 A kind of transmission method and device of real-time video
CN107484019A (en) * 2017-08-03 2017-12-15 乐蜜有限公司 The dissemination method and device of a kind of video file
CN109167959A (en) * 2018-09-07 2019-01-08 浙江大华技术股份有限公司 A kind of video capture device, system and video-signal transmission method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650437A (en) * 2022-03-14 2022-06-21 百果园技术(新加坡)有限公司 Video publishing method, device, equipment and storage medium
CN114650437B (en) * 2022-03-14 2024-04-16 百果园技术(新加坡)有限公司 Video publishing method, device, equipment and storage medium
CN114979757A (en) * 2022-06-02 2022-08-30 北京字跳网络技术有限公司 Video distribution method, device, equipment and storage medium
CN114979757B (en) * 2022-06-02 2024-01-30 北京字跳网络技术有限公司 Video publishing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110795022B (en) Terminal testing method, system and storage medium
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN112019897A (en) Screen projection method and device, electronic equipment and computer readable medium
CN112272226B (en) Picture loading method and device and readable storage medium
CN111163329B (en) Live broadcast room gift list configuration method, device, medium and electronic equipment
CN110290398B (en) Video issuing method and device, storage medium and electronic equipment
CN110781150A (en) Data transmission method and device and electronic equipment
CN115665474A (en) Live broadcast method and device, electronic equipment and storage medium
CN110996164A (en) Video distribution method and device, electronic equipment and computer readable medium
CN112954354A (en) Video transcoding method, device, equipment and medium
CN110768861B (en) Method, device, medium and electronic equipment for obtaining overtime threshold
CN112965673A (en) Content printing method, device, equipment and storage medium
CN113891132A (en) Audio and video synchronization monitoring method and device, electronic equipment and storage medium
CN113542856B (en) Method, device, equipment and computer readable medium for reverse playing of online video
CN111478916B (en) Data transmission method, device and storage medium based on video stream
CN112929240A (en) Method, device, terminal and non-transitory storage medium for acquiring communication delay time
CN111857515A (en) Image processing method, image processing device, storage medium and electronic equipment
CN113965779A (en) Cloud game data transmission method, device and system and electronic equipment
CN114979762A (en) Video downloading and transmission method, device, terminal equipment, server and medium
CN111212296B (en) Live broadcast room gift list configuration method, device, medium and electronic equipment
CN112187943B (en) Data synchronization method and device and system using same
CN111444457B (en) Data release method and device, storage medium and electronic equipment
CN111367592B (en) Information processing method and device
CN111309685A (en) Method and server for online collaborative processing of model files
CN113868111B (en) Mutual access relation adjusting method and device based on service node and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200410

RJ01 Rejection of invention patent application after publication