CN113630604A - Video data encoding method, device, equipment and storage medium - Google Patents

Video data encoding method, device, equipment and storage medium Download PDF

Info

Publication number
CN113630604A
CN113630604A CN202010390002.1A CN202010390002A CN113630604A CN 113630604 A CN113630604 A CN 113630604A CN 202010390002 A CN202010390002 A CN 202010390002A CN 113630604 A CN113630604 A CN 113630604A
Authority
CN
China
Prior art keywords
video
encoding
coding
coded
video data
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
CN202010390002.1A
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 Mijinghefeng Technology Co ltd
Original Assignee
Beijing Mijinghefeng 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 Mijinghefeng Technology Co ltd filed Critical Beijing Mijinghefeng Technology Co ltd
Priority to CN202010390002.1A priority Critical patent/CN113630604A/en
Publication of CN113630604A publication Critical patent/CN113630604A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to the technical field of network live broadcast, and discloses a video data encoding method, a device, equipment and a storage medium, wherein the method comprises the following steps: detecting the performance of equipment and the current network state; determining a corresponding target coding strategy according to the equipment performance and the current network state; when the target coding strategy is a multi-channel coding strategy, coding video data to be coded according to different coding formats to obtain multi-channel coded videos; and pushing the multi-path coded video to a video receiving device. Therefore, under the condition that the equipment performance and the current network state meet the conditions, the video data to be coded are coded into multiple paths of coded videos according to different coding formats and are pushed to the video receiving equipment, and the video receiving equipment selects one of the coded videos to play, so that the equipment performance of the main broadcasting equipment is effectively utilized, and the transcoding cost of a server side is saved.

Description

Video data encoding method, device, equipment and storage medium
Technical Field
The present invention relates to the field of live broadcast technologies, and in particular, to a video data encoding method, apparatus, device, and storage medium.
Background
The traditional scheme of the current live broadcast software is that a main broadcast device pushes single-channel video data in an H.264 coding format or an H.265 coding format, a client pulls a video in a corresponding coding format to play, if the client does not support a certain coding format, a server is required to perform transcoding service, however, the server needs to consume a large number of servers for transcoding, cost pressure is caused, and the device performance of the main broadcast device cannot be effectively utilized through the scheme.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a video data encoding method, a video data encoding device, video data encoding equipment and a video data encoding storage medium, and aims to effectively utilize the equipment performance of anchor equipment and save transcoding cost of a server.
To achieve the above object, the present invention provides a video data encoding method, including the steps of:
detecting the performance of equipment and the current network state;
determining a corresponding target coding strategy according to the equipment performance and the current network state;
when the target coding strategy is a multi-channel coding strategy, coding video data to be coded according to different coding formats to obtain multi-channel coded videos;
and pushing the multi-path coded video to a video receiving device.
Optionally, the determining a corresponding target coding policy according to the device performance and the current network state specifically includes:
judging whether a preset coding format is supported or not according to the equipment performance;
if the preset coding format is supported, acquiring anchor account information, and determining an anchor grade according to the anchor account information;
and determining a corresponding target coding strategy according to the anchor grade, the equipment performance and the current network state.
Optionally, the determining a corresponding target coding policy according to the anchor level, the device performance, and the current network state specifically includes:
judging whether the anchor grade is greater than a preset grade or not;
if the anchor grade is greater than the preset grade, judging whether the equipment performance exceeds the preset performance;
if the equipment performance exceeds the preset performance, judging whether the current network state is a mobile network;
and if the current network state is not the mobile network, selecting a multi-channel video coding strategy from preset coding strategies as a target coding strategy.
Optionally, after determining whether the anchor level is greater than a preset level, the method further includes:
if the anchor level is smaller than the preset level, acquiring the current number of people watching;
judging whether the current number of people is larger than a preset number of people or not;
and if the current number of people watching the equipment is greater than the preset number of people, executing the step of judging whether the equipment performance exceeds the preset performance.
Optionally, the preset encoding format is an h.265 encoding format.
Optionally, when the target encoding policy is a multi-channel encoding policy, the encoding the video data to be encoded according to different encoding formats to obtain a multi-channel encoded video includes:
when the target coding strategy is a multi-path coding strategy, determining a target coding format corresponding to the multi-path coding strategy;
and coding the video data to be coded according to the target coding format to obtain a plurality of paths of coded videos.
Optionally, the target encoding format comprises a first encoding format and a second encoding format;
the encoding the video data to be encoded according to the target encoding format to obtain a multi-channel encoded video specifically includes:
coding video data to be coded according to the first coding format to obtain a first coded video;
coding the video data to be coded according to the second coding format to obtain a second coded video;
the first encoded video and the second encoded video are treated as multiple encoded videos.
Optionally, the encoding the video data to be encoded according to the first encoding format to obtain a first encoded video specifically includes:
searching first code rate information and first frame rate information corresponding to the first coding format, and extracting audio stream data and video stream data from the video data to be coded;
generating first audio/video stream data according to the first code rate information, the first frame rate information, the audio stream data and the video stream data;
and packaging the first audio/video stream data to obtain a first coded video.
Optionally, the generating first audio/video stream data according to the first code rate information, the first frame rate information, the audio stream data, and the video stream data specifically includes:
searching a first encoder corresponding to the first encoding format;
sending the first code rate information, the first frame rate information, audio stream data and video stream data to the first encoder so that the first encoder generates first audio and video stream data and feeds back the first audio and video stream data;
and receiving the first audio and video stream data fed back by the first encoder.
Optionally, the encoding the video data to be encoded according to the second encoding format to obtain a second encoded video specifically includes:
searching second code rate information and second frame rate information corresponding to the second coding format, and extracting audio stream data and video stream data from the video data to be coded;
generating second audio/video stream data according to the second code rate information, the second frame rate information, the audio stream data and the video stream data;
and packaging the second audio and video stream data to obtain a second coded video.
Optionally, the first encoding format is an h.265 encoding format, and the second encoding format is an h.264 encoding format.
Optionally, the pushing the multiple channels of encoded videos to a video receiving device specifically includes:
packaging the multi-path coded video to obtain a multi-path coded video packet;
and uploading the multi-path coded video packets to a server so that the video receiving equipment selects the coded video with the corresponding coding format to download according to the multi-path coded video packets in the server.
Optionally, after determining the corresponding target coding policy according to the device performance and the current network state, the method further includes:
when the target coding strategy is a one-way coding strategy, searching a one-way coding format corresponding to the one-way coding strategy;
coding the video data to be coded according to the single-channel coding format to obtain a single-channel coded video;
and pushing the single-channel coded video to a video receiving device.
Further, to achieve the above object, the present invention also proposes a video data encoding device comprising:
the information detection module is used for detecting the performance of the equipment and the current network state;
the strategy determining module is used for determining a corresponding target coding strategy according to the equipment performance and the current network state;
the video coding module is used for coding the video data to be coded according to different coding formats to obtain a multi-channel coded video when the target coding strategy is a multi-channel coding strategy;
and the video pushing module is used for pushing the multi-channel coded video to video receiving equipment.
Optionally, the policy determining module is further configured to determine whether a preset encoding format is supported according to the device performance;
the strategy determining module is further configured to acquire anchor account information if the preset coding format is supported, and determine an anchor level according to the anchor account information;
the policy determination module is further configured to determine a corresponding target coding policy according to the anchor level, the device performance, and the current network state.
Optionally, the policy determining module is further configured to determine whether the anchor level is greater than a preset level;
the policy determining module is further configured to determine whether the device performance exceeds a preset performance if the anchor level is greater than the preset level;
the policy determining module is further configured to determine whether the current network state is a mobile network if the device performance exceeds the preset performance;
the policy determination module is further configured to select a multi-channel video coding policy from preset coding policies as a target coding policy if the current network state is not a mobile network.
Optionally, the video encoding module is further configured to determine, when the target encoding policy is a multi-path encoding policy, a target encoding format corresponding to the multi-path encoding policy;
and the video coding module is also used for coding the video data to be coded according to the target coding format to obtain a plurality of paths of coded videos.
Optionally, the video encoding module is further configured to encode video data to be encoded according to the first encoding format to obtain a first encoded video;
the video coding module is further configured to code the video data to be coded according to the second coding format to obtain a second coded video;
the video coding module is further configured to use the first coded video and the second coded video as multiple paths of coded videos.
Optionally, the video data encoding apparatus further includes a single-pass encoding module, configured to search a single-pass encoding format corresponding to the single-pass encoding policy when the target encoding policy is the single-pass encoding policy;
the single-channel coding module is further configured to code the video data to be coded according to the single-channel coding format to obtain a single-channel coded video;
the single-channel coding module is further configured to push the single-channel coded video to a video receiving device.
Further, to achieve the above object, the present invention also proposes a video data encoding apparatus comprising: a memory, a processor and a video data encoding program stored on the memory and executable on the processor, the video data encoding program being configured with steps implementing a video data encoding method as described above.
Furthermore, to achieve the above object, the present invention also proposes a storage medium having stored thereon a video data encoding program which, when executed by a processor, implements the steps of the video data encoding method as described above.
The video data coding method provided by the invention detects the performance of the equipment and the current network state; determining a corresponding target coding strategy according to the equipment performance and the current network state; when the target coding strategy is a multi-channel coding strategy, coding video data to be coded according to different coding formats to obtain multi-channel coded videos; and pushing the multi-path coded video to a video receiving device. Therefore, under the condition that the equipment performance and the current network state meet the conditions, the video data to be coded are coded into multiple paths of coded videos according to different coding formats and are pushed to the video receiving equipment, and the video receiving equipment selects one of the coded videos to play, so that the equipment performance of the main broadcasting equipment is effectively utilized, and the transcoding cost of a server side is saved.
Drawings
Fig. 1 is a schematic structural diagram of a video data encoding apparatus according to a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a video data encoding method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a video data encoding method according to a second embodiment of the present invention;
FIG. 4 is a logic diagram of a second embodiment of a method for encoding video data according to the present invention;
FIG. 5 is a flowchart illustrating a video data encoding method according to a third embodiment of the present invention;
FIG. 6 is a block diagram illustrating functional blocks of a video data encoding apparatus according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a video data encoding apparatus in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the video data encoding apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may comprise a Display screen (Display), an input unit such as keys, and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The Memory 1005 may be a Random Access Memory (RAM) Memory or a non-volatile Memory (e.g., a magnetic disk Memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
It will be appreciated by a person skilled in the art that the device structure shown in fig. 1 does not constitute a limitation of the video data encoding device and may comprise more or less components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a video data encoding program.
In the video data encoding apparatus shown in fig. 1, the network interface 1004 is mainly used for connecting an external network and performing data communication with other network apparatuses; the user interface 1003 is mainly used for connecting to a user equipment and performing data communication with the user equipment; the apparatus of the present invention calls a video data encoding program stored in the memory 1005 through the processor 1001 and performs the video data encoding method provided by the embodiment of the present invention.
Based on the above hardware structure, an embodiment of the video data encoding method of the present invention is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a video data encoding method according to a first embodiment of the invention.
In a first embodiment, the video data encoding method comprises the steps of:
step S10, device performance and current network status are detected.
It should be noted that, the execution main body of this embodiment may be a video data encoding device, and may also be other devices that can implement the same or similar functions, which is not limited in this embodiment, and the video data encoding device may be a main broadcasting device, for example, a terminal device that can be used for live broadcasting, such as a mobile phone, a tablet, a computer, and the like, and may also be other devices, which is not limited in this embodiment.
It should be understood that the mode of detecting the device performance by the anchor device may be to acquire device information, determine the device performance according to the device information, or may be other modes, which is not limited in this embodiment.
It should be understood that the current network status includes the status of a mobile network, a wireless network, a wired network, etc., and since the anchor obviously needs to connect to the network during the live broadcast, the status without network connection is not considered in this embodiment.
It can be understood that, when the live broadcast device used by the anchor is a mobile terminal device such as a mobile phone and a tablet, the current network state of the mobile terminal may be a wireless network or a mobile network; when the live broadcast device used by the anchor is a computer, the current network state of the computer can be a wireless network or a wired network.
It should be noted that, because the live broadcast is a continuous process, and the current network state may change in the live broadcast process, the detection process is also a continuous detection process, and may be periodic detection according to a preset period or timing detection, so as to determine an appropriate target encoding policy according to the device state of the current live broadcast device.
Step S20, determining a corresponding target coding policy according to the device performance and the current network state.
It should be noted that, a corresponding target coding policy may be determined according to the device performance and the current network state, where the target coding policy includes a multi-path coding policy and a single-path coding policy, the multi-path coding policy is to code a video to be coded into videos of different coding formats, and the single-path coding policy is to code a video to be coded into a video of a single coding format, specifically, the multi-path coding policy may code a video to be coded into videos of an h.265 coding format and an h.264 coding format, and the single-path coding policy is to code a video to be coded into a video of an h.265 coding format or an h.264 coding format.
It should be understood that the one-way encoding strategy includes a first one-way encoding strategy corresponding to the h.265 encoding format and a second one-way encoding strategy corresponding to the h.264 encoding format.
And step S30, when the target coding strategy is a multi-channel coding strategy, coding the video data to be coded according to different coding formats to obtain multi-channel coded video.
It should be understood that, when the target encoding strategy is a multi-path encoding strategy, the video data to be encoded is encoded according to the h.265 encoding format and the h.264 encoding format, so as to obtain encoded videos of the two encoding formats, and the encoded videos according to the two encoding formats form a multi-path encoded video.
Further, after the step S20, the method further includes:
when the target coding strategy is a one-way coding strategy, searching a one-way coding format corresponding to the one-way coding strategy; coding the video data to be coded according to the single-channel coding format to obtain a single-channel coded video; and pushing the single-path coded video to a video receiving device.
It should be noted that the target encoding strategy may be a multi-path encoding strategy, but also a single-path encoding strategy, and only when the device performance and the current network state cannot satisfy the multi-path encoding strategy, the single-path encoding strategy is adopted for video encoding, that is, the multi-path encoding strategy is preferentially selected, and when the multi-path encoding strategy cannot be used, the single-path encoding strategy is adopted.
It should be understood that the one-way encoding strategy is further divided into a first one-way encoding strategy and a second one-way encoding strategy, wherein the encoding format corresponding to the first one-way encoding strategy is the h.265 encoding format, and the encoding format corresponding to the second one-way encoding strategy is the h.264 encoding format.
It should be understood that, when the target encoding strategy is the first one-way encoding format, encoding the video data to be encoded according to the h.265 encoding format to obtain a one-way encoded video; and when the target coding strategy is in the second one-way coding format, coding the video data to be coded according to the H.264 coding format to obtain the one-way coded video.
It can be understood that, under the condition of the one-way encoding policy, only the video data to be encoded is encoded according to one encoding format, and the generated one-way encoded video is an encoded video with a single format, so that when the one-way encoded video is pushed to the video receiving device, the video receiving device cannot select and can only receive the one-way encoded video with the encoding format.
In a specific implementation, for example, when the target encoding policy is the first one-way encoding policy, encoding video data to be encoded according to the h.265 encoding format to obtain a one-way encoded video in the h.265 encoding format, and pushing the video to the video receiving device for playing, whereas if the video receiving device does not support playing of the video in the h.265 encoding format, or the user does not want to watch the video in the h.265 encoding format, the server needs to transcode the one-way encoded video into the video in the h.264 encoding format, and then push the video to the video receiving device for playing.
And step S40, pushing the multi-channel coded video to a video receiving device.
It should be noted that, multiple paths of encoded videos with different encoding formats are pushed to the video receiving device, and the video receiving device may select an encoded video with one encoding format from the multiple paths of encoded videos to play, for example, the multiple paths of encoded videos include an encoded video with an h.265 encoding format and an encoded video with an h.264 encoding format, and the video receiving device may select the encoded video with the h.265 encoding format to play and also select the encoded video with the h.264 encoding format to play, so that the selectivity of a user in watching a live broadcast is increased, and the comfort of the user in watching the live broadcast is further improved.
Further, the step S40 includes:
packaging the multi-path coded video to obtain a multi-path coded video packet; and uploading the multi-path coded video packets to a server so that the video receiving equipment selects the coded video with the corresponding coding format to download according to the multi-path coded video packets in the server.
It can be understood that the multiple paths of coded videos include coded videos of two coding formats, the multiple paths of coded videos are packaged into multiple paths of coded video packages, and the multiple paths of coded video packages are uploaded to a server, when a user watches live broadcasting through a video receiving device, the user can select to watch coded videos of an H.265 coding format or coded videos of an H.264 coding format, the video receiving device can select coded videos of a coding format corresponding to user requirements from the multiple paths of coded video packages to download and play, and therefore the watching requirements of the user can be met under the condition that transcoding is not carried out through the server.
In the embodiment, the performance of the equipment and the current network state are detected; determining a corresponding target coding strategy according to the equipment performance and the current network state; when the target coding strategy is a multi-channel coding strategy, coding video data to be coded according to different coding formats to obtain multi-channel coded videos; and pushing the multi-path coded video to a video receiving device. Therefore, under the condition that the equipment performance and the current network state meet the conditions, the video data to be coded are coded into multiple paths of coded videos according to different coding formats and are pushed to the video receiving equipment, and the video receiving equipment selects one of the coded videos to play, so that the equipment performance of the main broadcasting equipment is effectively utilized, and the transcoding cost of a server side is saved.
In an embodiment, as shown in fig. 3, based on the first embodiment, a second embodiment of the video data encoding method of the present invention is provided, where the video data to be encoded is anchor video data, and the step S20 includes:
step S201, determining whether a preset encoding format is supported according to the device performance.
It should be noted that the video data to be encoded is anchor video data, and the anchor video data may be screen interface video data and/or camera video data, for example, when the anchor device is a mobile phone, the anchor video data may be mobile phone screen interface data, camera video data of a front camera, camera video data of a rear camera, and other video data, which is not limited in this embodiment.
It should be noted that the preset encoding format is an h.265 encoding format, because the multi-path encoding policy in this embodiment encodes the video data to be encoded according to the h.265 encoding format and the h.264 encoding format to obtain the multi-path encoded video, and the h.264 encoding format is a relatively mature encoding format, which can basically be supported by the terminal, it needs to be determined whether the h.265 encoding format is supported, which is a preliminary determination, and only when the preset encoding format is supported, a subsequent further determination is performed, if the preset encoding format is not supported, it is determined that the multi-path encoding policy cannot be used for encoding, and the second single-path encoding policy is used as the target encoding policy.
Step S202, if the preset coding format is supported, acquiring anchor account information, and determining the anchor level according to the anchor account information.
It should be understood that, if the preset encoding format is supported, the anchor account information is obtained, and the anchor level is determined according to the anchor account information, in this embodiment, the anchor account level may be divided into an a-anchor and an a + anchor, and a audience group of the a-anchor is not large as an audience group of the a + anchor, so that it is necessary to further determine whether the audience number reaches the standard for the a-anchor, and it is not necessary to determine the audience number for the a + anchor, and other level divisions may also be performed, which is not limited in this embodiment.
Step S203, determining a corresponding target coding strategy according to the anchor grade, the equipment performance and the current network state.
Further, the step S203 includes:
judging whether the anchor grade is greater than a preset grade or not; if the anchor grade is greater than the preset grade, judging whether the equipment performance exceeds the preset performance; if the equipment performance exceeds the preset performance, judging whether the current network state is a mobile network; and if the current network state is not the mobile network, selecting a multi-channel video coding strategy from preset coding strategies as a target coding strategy.
In a specific implementation, when the anchor level is divided into a-anchor and a + anchor, the preset level may be set to a, and if greater than the preset level, the a + anchor is determined, and if less than the preset level, the a-anchor is determined.
It should be understood that if the anchor level is greater than the preset level, it is determined whether the device performance exceeds the preset performance, the preset performance may be set by a technician according to an actual situation, a performance standard is set, and when the performance standard is exceeded, a multi-path coding strategy is adopted; when the performance standard is not met, a one-way coding strategy is adopted.
It can be understood that if the device performance exceeds the preset performance, it is further necessary to determine whether the current network state is a mobile network, if the current network state is a mobile network, a one-way encoding policy is adopted, and if the current network state is not a mobile network, that is, a wired network or a wireless network, a target encoding policy is selected from the multi-way video encoding policies.
It can be understood that, when the current network state is a wired network or a wireless network, the current network strength can also be acquired, and when the network strength is poor, the one-way video coding strategy is used as the target coding strategy.
It should be noted that the preset encoding strategy includes a multi-channel video encoding strategy and a single-channel video encoding strategy, where the single-channel encoding strategy is further divided into a first single-channel encoding strategy and a second single-channel encoding strategy.
Further, after determining whether the anchor level is greater than a preset level, the method further includes:
if the anchor level is smaller than the preset level, acquiring the current number of people watching; judging whether the current number of people is larger than a preset number of people or not; and if the current number of people watching the equipment is greater than the preset number of people, executing the step of judging whether the equipment performance exceeds the preset performance.
It should be noted that, if the anchor level is less than the preset level, that is, when the anchor level is an a-anchor, the current number of people watching is also required to be obtained, and when the current number of people watching is greater than the preset number of people, the step of judging whether the performance of the equipment exceeds the preset performance is executed, and whether a multi-path coding strategy is adopted is further judged, and when the current number of people watching is less than the preset number of people, a single-path coding strategy is adopted.
In a specific implementation, a live device is taken as an iPhone mobile phone for explanation, as shown in fig. 4, fig. 4 is a logic determination diagram of this embodiment, an iPhone x + mobile phone is a type of mobile phone whose device performance exceeds a preset performance, and an iPhone x-mobile phone is a type of mobile phone whose device performance does not exceed the preset performance, where the iPhone x + mobile phone is a device above the iPhone x.
It can be understood that whether the h.265 coding format is supported or not is judged, if the h.265 coding format is not supported, the h.264 coding format is adopted, if the h.265 coding format is supported, whether the anchor level is an a-anchor or an a + anchor is judged, if the anchor level is an a + anchor, whether the mobile phone is an iPhoneX + mobile phone or an iPhoneX-mobile phone is judged according to the mobile phone performance, if the mobile phone is an iPhoneX-mobile phone, the h.265 coding format is adopted, if the mobile phone is an iPhoneX + mobile phone, the current network state is 4G or Wifi is judged, if the current network state is 4G, the h.265 coding format is adopted, and if the current network state is Wifi, the h.265 coding format and the h.264 coding format are adopted.
And when the number of the audiences reaches the standard, the number of the current audiences is obtained, the number of the current audiences is compared with the preset number of the audiences to judge whether the number of the audiences reaches the standard, the step of judging whether the mobile phone is an iPhone X + mobile phone or an iPhone X-mobile phone according to the performance of the mobile phone is executed, and when the number of the audiences does not reach the standard, an H.264 coding format is adopted.
In the embodiment, whether a preset coding format is supported or not is judged according to the equipment performance; if the preset coding format is supported, acquiring anchor account information, and determining an anchor grade according to the anchor account information; and determining a corresponding target coding strategy according to the anchor level, the equipment performance and the current network state, thereby determining the corresponding target coding strategy through various information, and selecting the most appropriate target coding strategy on the premise of not wasting the equipment performance and not influencing the live broadcast effect.
In an embodiment, as shown in fig. 5, a third embodiment of the video data encoding method according to the present invention is proposed based on the first embodiment or the second embodiment, and in this embodiment, the step S30 includes:
step S301, when the target coding strategy is a multi-path coding strategy, determining a target coding format corresponding to the multi-path coding strategy.
It should be noted that, when the target encoding policy is the multi-path encoding policy, the target encoding format corresponding to the multi-path encoding policy is determined, where the target encoding format includes a first encoding format and a second encoding format, where the first encoding format is an h.265 encoding format, and the second encoding format is an h.264 encoding format.
Step S302, coding the video data to be coded according to the target coding format to obtain a plurality of paths of coded videos.
Further, the step S302 includes:
coding video data to be coded according to the first coding format to obtain a first coded video; coding the video data to be coded according to the second coding format to obtain a second coded video; the first encoded video and the second encoded video are treated as multiple encoded videos.
It should be noted that, the first encoded video and the second encoded video may be obtained by encoding the video data to be encoded in the first encoding format and the second encoding format, respectively, and the encoded videos in the two encoding formats are used as the multi-path encoded video.
It should be understood that, encoding the video data to be encoded according to the first encoding format, and obtaining the first encoded video specifically includes: searching first code rate information and first frame rate information corresponding to the first coding format, and extracting audio stream data and video stream data from the video data to be coded; generating first audio/video stream data according to the first code rate information, the first frame rate information, the audio stream data and the video stream data; and packaging the first audio/video stream data to obtain a first coded video.
It can be understood that, in the process of video encoding, the code rate and the frame rate of encoding need to be considered, and the code rate and the frame rate of each encoding format are different, so that first encoding information and first frame rate information corresponding to the first encoding format need to be searched, and when video is encoded, audio stream data and video stream data can be extracted from video data to be encoded, and are respectively encoded, so as to achieve a better encoding effect, and the first encoding information and the first frame rate information can be set in advance for a user, which is not limited in this embodiment.
It can be understood that after the encoded first audio/video stream data is obtained, the first audio/video stream data needs to be encapsulated to obtain the first encoded video, so that the encapsulation is performed to facilitate transmission and identification.
It should be understood that the specific steps of generating the first audio/video stream data according to the first code rate information, the first frame rate information, the audio stream data and the video stream data are as follows: searching a first encoder corresponding to the first encoding format; sending the first code rate information, the first frame rate information, audio stream data and video stream data to the first encoder so that the first encoder generates first audio and video stream data and feeds back the first audio and video stream data; and receiving the first audio and video stream data fed back by the first encoder.
It can be understood that an encoder is required to be used in the encoding process, the first encoder corresponding to the first encoding format is an h.265 encoder, the first code rate information, the first frame rate information, the audio stream data and the video stream data are sent to the first encoder, the first encoder generates the first audio/video stream data according to the information data and feeds back the first audio/video stream data, so that the first encoder encodes the video data to be encoded, and obtains the encoded video data.
It should be understood that, the specific steps of encoding the video data to be encoded according to the second encoding format to obtain a second encoded video are as follows: searching second code rate information and second frame rate information corresponding to the second coding format, and extracting audio stream data and video stream data from the video data to be coded; generating second audio/video stream data according to the second code rate information, the second frame rate information, the audio stream data and the video stream data; and packaging the second audio and video stream data to obtain a second coded video.
It can be understood that the second encoding information and the first frame rate information corresponding to the second encoding format need to be searched, and when the video is encoded, the audio stream data and the video stream data can be extracted from the video data to be encoded, and the audio stream data and the video stream data are encoded respectively, so that a better encoding effect can be achieved, and the second encoding information and the second frame rate information can be set in advance for a user, which is not limited in this embodiment.
It can be understood that after the encoded second audio/video stream data is obtained, the second audio/video stream data needs to be encapsulated to obtain a second encoded video, so that the encapsulation is performed to facilitate transmission and identification.
It should be understood that the specific steps of generating the second audio/video stream data according to the second code rate information, the second frame rate information, the audio stream data and the video stream data are as follows: searching a second encoder corresponding to the second encoding format; sending the second code rate information, the second frame rate information, the audio stream data and the video stream data to the second encoder so that the second encoder generates second audio and video stream data and feeds back the second audio and video stream data; and receiving the second audio and video stream data fed back by the second encoder.
It can be understood that the second encoder corresponding to the second encoding format is an h.265 encoder, the second code rate information, the second frame rate information, the audio stream data and the video stream data are sent to the second encoder, the second encoder generates the second audio/video stream data according to the information data and feeds back the second audio/video stream data, so that the video data to be encoded is encoded by the second encoder, and the encoded video data is obtained.
In this embodiment, when the target encoding policy is a multi-path encoding policy, a target encoding format corresponding to the multi-path encoding policy is determined; and coding the video data to be coded according to the target coding format to obtain a plurality of paths of coded videos, so that the video to be coded is coded according to the target coding format corresponding to the plurality of paths of coding strategies to obtain a plurality of paths of coded videos in various coding formats, the performance of the anchor equipment is fully utilized, and the videos in various coding formats are provided for users.
Furthermore, an embodiment of the present invention further provides a storage medium, on which a video data encoding program is stored, and the video data encoding program, when executed by a processor, implements the steps of the video data encoding method as described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
Furthermore, referring to fig. 6, an embodiment of the present invention further provides a video data encoding apparatus, including:
and the information detection module 10 is used for detecting the performance of the equipment and the current network state.
It should be understood that the mode of detecting the device performance by the anchor device may be to acquire device information, determine the device performance according to the device information, or may be other modes, which is not limited in this embodiment.
It should be understood that the current network status includes the status of a mobile network, a wireless network, a wired network, etc., and since the anchor obviously needs to connect to the network during the live broadcast, the status without network connection is not considered in this embodiment.
It can be understood that, when the live broadcast device used by the anchor is a mobile terminal device such as a mobile phone and a tablet, the current network state of the mobile terminal may be a wireless network or a mobile network; when the live broadcast device used by the anchor is a computer, the current network state of the computer can be a wireless network or a wired network.
It should be noted that, because the live broadcast is a continuous process, and the current network state may change in the live broadcast process, the detection process is also a continuous detection process, and may be periodic detection according to a preset period or timing detection, so as to determine an appropriate target encoding policy according to the device state of the current live broadcast device.
And a policy determining module 20, configured to determine a corresponding target coding policy according to the device performance and the current network state.
It should be noted that, a corresponding target coding policy may be determined according to the device performance and the current network state, where the target coding policy includes a multi-path coding policy and a single-path coding policy, the multi-path coding policy is to code a video to be coded into videos of different coding formats, and the single-path coding policy is to code a video to be coded into a video of a single coding format, specifically, the multi-path coding policy may code a video to be coded into videos of an h.265 coding format and an h.264 coding format, and the single-path coding policy is to code a video to be coded into a video of an h.265 coding format or an h.264 coding format.
It should be understood that the one-way encoding strategy includes a first one-way encoding strategy corresponding to the h.265 encoding format and a second one-way encoding strategy corresponding to the h.264 encoding format.
And the video coding module 30 is configured to, when the target coding strategy is a multi-channel coding strategy, code video data to be coded according to different coding formats to obtain a multi-channel coded video.
It should be understood that, when the target encoding strategy is a multi-path encoding strategy, the video data to be encoded is encoded according to the h.265 encoding format and the h.264 encoding format, so as to obtain encoded videos of the two encoding formats, and the encoded videos according to the two encoding formats form a multi-path encoded video.
Further, after determining the corresponding target coding policy according to the device performance and the current network state, the method further includes:
when the target coding strategy is a one-way coding strategy, searching a one-way coding format corresponding to the one-way coding strategy; coding the video data to be coded according to the single-channel coding format to obtain a single-channel coded video; and pushing the single-path coded video to a video receiving device.
It should be noted that the target encoding strategy may be a multi-path encoding strategy, but also a single-path encoding strategy, and only when the device performance and the current network state cannot satisfy the multi-path encoding strategy, the single-path encoding strategy is adopted for video encoding, that is, the multi-path encoding strategy is preferentially selected, and when the multi-path encoding strategy cannot be used, the single-path encoding strategy is adopted.
It should be understood that the one-way encoding strategy is further divided into a first one-way encoding strategy and a second one-way encoding strategy, wherein the encoding format corresponding to the first one-way encoding strategy is the h.265 encoding format, and the encoding format corresponding to the second one-way encoding strategy is the h.264 encoding format.
It should be understood that, when the target encoding strategy is the first one-way encoding format, encoding the video data to be encoded according to the h.265 encoding format to obtain a one-way encoded video; and when the target coding strategy is in the second one-way coding format, coding the video data to be coded according to the H.264 coding format to obtain the one-way coded video.
It can be understood that, under the condition of the one-way encoding policy, only the video data to be encoded is encoded according to one encoding format, and the generated one-way encoded video is an encoded video with a single format, so that when the one-way encoded video is pushed to the video receiving device, the video receiving device cannot select and can only receive the one-way encoded video with the encoding format.
In a specific implementation, for example, when the target encoding policy is the first one-way encoding policy, encoding video data to be encoded according to the h.265 encoding format to obtain a one-way encoded video in the h.265 encoding format, and pushing the video to the video receiving device for playing, whereas if the video receiving device does not support playing of the video in the h.265 encoding format, or the user does not want to watch the video in the h.265 encoding format, the server needs to transcode the one-way encoded video into the video in the h.264 encoding format, and then push the video to the video receiving device for playing.
And the video pushing module 40 is used for pushing the multi-channel coded video to a video receiving device.
It should be noted that, multiple paths of encoded videos with different encoding formats are pushed to the video receiving device, and the video receiving device may select an encoded video with one encoding format from the multiple paths of encoded videos to play, for example, the multiple paths of encoded videos include an encoded video with an h.265 encoding format and an encoded video with an h.264 encoding format, and the video receiving device may select the encoded video with the h.265 encoding format to play and also select the encoded video with the h.264 encoding format to play, so that the selectivity of a user in watching a live broadcast is increased, and the comfort of the user in watching the live broadcast is further improved.
Further, the pushing the multi-channel encoded video to a video receiving device comprises:
packaging the multi-path coded video to obtain a multi-path coded video packet; and uploading the multi-path coded video packets to a server so that the video receiving equipment selects the coded video with the corresponding coding format to download according to the multi-path coded video packets in the server.
It can be understood that the multiple paths of coded videos include coded videos of two coding formats, the multiple paths of coded videos are packaged into multiple paths of coded video packages, and the multiple paths of coded video packages are uploaded to a server, when a user watches live broadcasting through a video receiving device, the user can select to watch coded videos of an H.265 coding format or coded videos of an H.264 coding format, the video receiving device can select coded videos of a coding format corresponding to user requirements from the multiple paths of coded video packages to download and play, and therefore the watching requirements of the user can be met under the condition that transcoding is not carried out through the server.
In the embodiment, the performance of the equipment and the current network state are detected; determining a corresponding target coding strategy according to the equipment performance and the current network state; when the target coding strategy is a multi-channel coding strategy, coding video data to be coded according to different coding formats to obtain multi-channel coded videos; and pushing the multi-path coded video to a video receiving device. Therefore, under the condition that the equipment performance and the current network state meet the conditions, the video data to be coded are coded into multiple paths of coded videos according to different coding formats and are pushed to the video receiving equipment, and the video receiving equipment selects one of the coded videos to play, so that the equipment performance of the main broadcasting equipment is effectively utilized, and the transcoding cost of a server side is saved.
In an embodiment, the policy determining module 20 is further configured to determine whether a preset encoding format is supported according to the device performance; if the preset coding format is supported, acquiring anchor account information, and determining an anchor grade according to the anchor account information; and determining a corresponding target coding strategy according to the anchor grade, the equipment performance and the current network state.
In an embodiment, the policy determining module 20 is further configured to determine whether the anchor level is greater than a preset level; if the anchor grade is greater than the preset grade, judging whether the equipment performance exceeds the preset performance; if the equipment performance exceeds the preset performance, judging whether the current network state is a mobile network; and if the current network state is not the mobile network, selecting a multi-channel video coding strategy from preset coding strategies as a target coding strategy.
In an embodiment, the policy determining module 20 is further configured to obtain the current number of people watching if the anchor level is less than the preset level; judging whether the current number of people is larger than a preset number of people or not; and if the current number of people watching the equipment is greater than the preset number of people, executing the step of judging whether the equipment performance exceeds the preset performance.
In an embodiment, the video encoding module 30 is further configured to determine, when the target encoding policy is a multi-path encoding policy, a target encoding format corresponding to the multi-path encoding policy; and coding the video data to be coded according to the target coding format to obtain a plurality of paths of coded videos.
In an embodiment, the video encoding module 30 is further configured to encode video data to be encoded according to the first encoding format to obtain a first encoded video; coding the video data to be coded according to the second coding format to obtain a second coded video; the first encoded video and the second encoded video are treated as multiple encoded videos.
In an embodiment, the video encoding module 30 is further configured to search first code rate information and first frame rate information corresponding to the first encoding format, and extract audio stream data and video stream data from the video data to be encoded; generating first audio/video stream data according to the first code rate information, the first frame rate information, the audio stream data and the video stream data; and packaging the first audio/video stream data to obtain a first coded video.
In an embodiment, the video encoding module 30 is further configured to find a first encoder corresponding to the first encoding format; sending the first code rate information, the first frame rate information, audio stream data and video stream data to the first encoder so that the first encoder generates first audio and video stream data and feeds back the first audio and video stream data; and receiving the first audio and video stream data fed back by the first encoder.
In an embodiment, the video encoding module 30 is further configured to search for second code rate information and second frame rate information corresponding to the second encoding format, and extract audio stream data and video stream data from the video data to be encoded; generating second audio/video stream data according to the second code rate information, the second frame rate information, the audio stream data and the video stream data; and packaging the second audio and video stream data to obtain a second coded video.
In an embodiment, the video pushing module 40 is further configured to pack the multiple channels of encoded video to obtain multiple channels of encoded video packets; and uploading the multi-path coded video packets to a server so that the video receiving equipment selects the coded video with the corresponding coding format to download according to the multi-path coded video packets in the server.
In an embodiment, the video data encoding apparatus further includes a single-pass encoding module, configured to search a single-pass encoding format corresponding to the single-pass encoding policy when the target encoding policy is the single-pass encoding policy; coding the video data to be coded according to the single-channel coding format to obtain a single-channel coded video; and pushing the single-channel coded video to a video receiving device.
In other embodiments or specific implementation methods of the video data encoding apparatus according to the present invention, reference may be made to the above embodiments, and details are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes instructions for enabling an intelligent device (such as a mobile phone, an estimator, a video data encoding device, an air conditioner, or a network video data encoding device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
The invention discloses A1, a video data coding method, which comprises the following steps:
detecting the performance of equipment and the current network state;
determining a corresponding target coding strategy according to the equipment performance and the current network state;
when the target coding strategy is a multi-channel coding strategy, coding video data to be coded according to different coding formats to obtain multi-channel coded videos;
and pushing the multi-path coded video to a video receiving device.
A2, the video data encoding method of A1, wherein the video data to be encoded is anchor video data;
the determining a corresponding target coding policy according to the device performance and the current network state specifically includes:
judging whether a preset coding format is supported or not according to the equipment performance;
if the preset coding format is supported, acquiring anchor account information, and determining an anchor grade according to the anchor account information;
and determining a corresponding target coding strategy according to the anchor grade, the equipment performance and the current network state.
A3, the method for encoding video data as defined in a2, wherein the determining a corresponding target encoding policy according to the anchor level, the device performance and the current network status specifically includes:
judging whether the anchor grade is greater than a preset grade or not;
if the anchor grade is greater than the preset grade, judging whether the equipment performance exceeds the preset performance;
if the equipment performance exceeds the preset performance, judging whether the current network state is a mobile network;
and if the current network state is not the mobile network, selecting a multi-channel video coding strategy from preset coding strategies as a target coding strategy.
A4, the method for encoding video data according to A3, wherein the determining whether the anchor level is greater than a preset level further comprises:
if the anchor level is smaller than the preset level, acquiring the current number of people watching;
judging whether the current number of people is larger than a preset number of people or not;
and if the current number of people watching the equipment is greater than the preset number of people, executing the step of judging whether the equipment performance exceeds the preset performance.
A5, the video data encoding method according to a4, wherein the preset encoding format is h.265 encoding format.
A6, the video data encoding method as defined in a1, wherein when the target encoding policy is a multi-channel encoding policy, the encoding method encodes video data to be encoded according to different encoding formats to obtain multi-channel encoded videos, and specifically includes:
when the target coding strategy is a multi-path coding strategy, determining a target coding format corresponding to the multi-path coding strategy;
and coding the video data to be coded according to the target coding format to obtain a plurality of paths of coded videos.
A7, the video data encoding method of a6, the target encoding format comprising a first encoding format and a second encoding format;
the encoding the video data to be encoded according to the target encoding format to obtain a multi-channel encoded video specifically includes:
coding video data to be coded according to the first coding format to obtain a first coded video;
coding the video data to be coded according to the second coding format to obtain a second coded video;
the first encoded video and the second encoded video are treated as multiple encoded videos.
A8, the video data encoding method according to a7, wherein the encoding the video data to be encoded according to the first encoding format to obtain a first encoded video specifically includes:
searching first code rate information and first frame rate information corresponding to the first coding format, and extracting audio stream data and video stream data from the video data to be coded;
generating first audio/video stream data according to the first code rate information, the first frame rate information, the audio stream data and the video stream data;
and packaging the first audio/video stream data to obtain a first coded video.
A9, the video data encoding method as in A8, where generating first audio/video stream data according to the first bitrate information, the first frame rate information, the audio stream data, and the video stream data specifically includes:
searching a first encoder corresponding to the first encoding format;
sending the first code rate information, the first frame rate information, audio stream data and video stream data to the first encoder so that the first encoder generates first audio and video stream data and feeds back the first audio and video stream data;
and receiving the first audio and video stream data fed back by the first encoder.
A10, the video data encoding method according to a7, wherein the encoding the video data to be encoded according to the second encoding format to obtain a second encoded video specifically includes:
searching second code rate information and second frame rate information corresponding to the second coding format, and extracting audio stream data and video stream data from the video data to be coded;
generating second audio/video stream data according to the second code rate information, the second frame rate information, the audio stream data and the video stream data;
and packaging the second audio and video stream data to obtain a second coded video.
A11, the video data encoding method of a7, the first encoding format being h.265 encoding format and the second encoding format being h.264 encoding format.
A12, the method for encoding video data according to any one of a1 to a11, wherein the pushing the multiple channels of encoded video to a video receiving device specifically includes:
packaging the multi-path coded video to obtain a multi-path coded video packet;
and uploading the multi-path coded video packets to a server so that the video receiving equipment selects the coded video with the corresponding coding format to download according to the multi-path coded video packets in the server.
A13, the method for encoding video data according to any of a 1-a 11, further comprising, after determining a corresponding target encoding policy according to the device performance and the current network status:
when the target coding strategy is a one-way coding strategy, searching a one-way coding format corresponding to the one-way coding strategy;
coding the video data to be coded according to the single-channel coding format to obtain a single-channel coded video;
and pushing the single-channel coded video to a video receiving device.
The invention also discloses B14, a video data encoding device, the video data encoding device includes:
the information detection module is used for detecting the performance of the equipment and the current network state;
the strategy determining module is used for determining a corresponding target coding strategy according to the equipment performance and the current network state;
the video coding module is used for coding the video data to be coded according to different coding formats to obtain a multi-channel coded video when the target coding strategy is a multi-channel coding strategy;
and the video pushing module is used for pushing the multi-channel coded video to video receiving equipment.
B15, the video data encoding apparatus as defined in B14, the policy determining module being further configured to determine whether a preset encoding format is supported according to the device performance;
the strategy determining module is further configured to acquire anchor account information if the preset coding format is supported, and determine an anchor level according to the anchor account information;
the policy determination module is further configured to determine a corresponding target coding policy according to the anchor level, the device performance, and the current network state.
B16, the video data encoding apparatus as defined in B15, the policy determining module further configured to determine whether the anchor rating is greater than a preset rating;
the policy determining module is further configured to determine whether the device performance exceeds a preset performance if the anchor level is greater than the preset level;
the policy determining module is further configured to determine whether the current network state is a mobile network if the device performance exceeds the preset performance;
the policy determination module is further configured to select a multi-channel video coding policy from preset coding policies as a target coding policy if the current network state is not a mobile network.
B17, the video data encoding apparatus as described in B14, the video encoding module further configured to determine a target encoding format corresponding to the multi-pass encoding scheme when the target encoding scheme is the multi-pass encoding scheme;
and the video coding module is also used for coding the video data to be coded according to the target coding format to obtain a plurality of paths of coded videos.
B18, the video data encoding apparatus as defined in B17, the video encoding module being further configured to encode the video data to be encoded according to the first encoding format to obtain a first encoded video;
the video coding module is further configured to code the video data to be coded according to the second coding format to obtain a second coded video;
the video coding module is further configured to use the first coded video and the second coded video as multiple paths of coded videos.
The present invention also discloses C19, a video data encoding apparatus, comprising: a memory, a processor and a video data encoding program stored on the memory and executable on the processor, the video data encoding program being configured with steps implementing a video data encoding method as described above.
The invention also discloses C20, a storage medium, wherein the storage medium stores a video data coding program, and the video data coding program realizes the steps of the video data coding method when being executed by a processor.

Claims (10)

1. A video data encoding method, comprising:
detecting the performance of equipment and the current network state;
determining a corresponding target coding strategy according to the equipment performance and the current network state;
when the target coding strategy is a multi-channel coding strategy, coding video data to be coded according to different coding formats to obtain multi-channel coded videos;
and pushing the multi-path coded video to a video receiving device.
2. The video data encoding method of claim 1, wherein the video data to be encoded is anchor video data;
the determining a corresponding target coding policy according to the device performance and the current network state specifically includes:
judging whether a preset coding format is supported or not according to the equipment performance;
if the preset coding format is supported, acquiring anchor account information, and determining an anchor grade according to the anchor account information;
and determining a corresponding target coding strategy according to the anchor grade, the equipment performance and the current network state.
3. The method for encoding video data according to claim 2, wherein the determining a corresponding target encoding policy according to the anchor level, the device performance, and the current network state specifically includes:
judging whether the anchor grade is greater than a preset grade or not;
if the anchor grade is greater than the preset grade, judging whether the equipment performance exceeds the preset performance;
if the equipment performance exceeds the preset performance, judging whether the current network state is a mobile network;
and if the current network state is not the mobile network, selecting a multi-channel video coding strategy from preset coding strategies as a target coding strategy.
4. The method for encoding video data according to claim 1, wherein when the target encoding policy is a multi-channel encoding policy, the encoding of the video data to be encoded according to different encoding formats to obtain multi-channel encoded video includes:
when the target coding strategy is a multi-path coding strategy, determining a target coding format corresponding to the multi-path coding strategy;
and coding the video data to be coded according to the target coding format to obtain a plurality of paths of coded videos.
5. The video data encoding method of claim 4, wherein the target encoding format includes a first encoding format and a second encoding format;
the encoding the video data to be encoded according to the target encoding format to obtain a multi-channel encoded video specifically includes:
coding video data to be coded according to the first coding format to obtain a first coded video;
coding the video data to be coded according to the second coding format to obtain a second coded video;
the first encoded video and the second encoded video are treated as multiple encoded videos.
6. The method for encoding video data according to claim 5, wherein the encoding the video data to be encoded according to the first encoding format to obtain a first encoded video specifically comprises:
searching first code rate information and first frame rate information corresponding to the first coding format, and extracting audio stream data and video stream data from the video data to be coded;
generating first audio/video stream data according to the first code rate information, the first frame rate information, the audio stream data and the video stream data;
and packaging the first audio/video stream data to obtain a first coded video.
7. The method of encoding video data according to claim 1, wherein after determining the corresponding target encoding strategy based on the device capabilities and the current network state, further comprising:
when the target coding strategy is a one-way coding strategy, searching a one-way coding format corresponding to the one-way coding strategy;
coding the video data to be coded according to the single-channel coding format to obtain a single-channel coded video;
and pushing the single-channel coded video to a video receiving device.
8. An apparatus for encoding video data, the apparatus comprising:
the information detection module is used for detecting the performance of the equipment and the current network state;
the strategy determining module is used for determining a corresponding target coding strategy according to the equipment performance and the current network state;
the video coding module is used for coding the video data to be coded according to different coding formats to obtain a multi-channel coded video when the target coding strategy is a multi-channel coding strategy;
and the video pushing module is used for pushing the multi-channel coded video to video receiving equipment.
9. A video data encoding apparatus, characterized in that the video data encoding apparatus comprises: memory, processor and a video data encoding program stored on the memory and executable on the processor, the video data encoding program being configured with steps implementing a video data encoding method as claimed in any one of claims 1 to 7.
10. A storage medium having stored thereon a video data encoding program which, when executed by a processor, implements the steps of the video data encoding method according to any one of claims 1 to 7.
CN202010390002.1A 2020-05-09 2020-05-09 Video data encoding method, device, equipment and storage medium Pending CN113630604A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010390002.1A CN113630604A (en) 2020-05-09 2020-05-09 Video data encoding method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010390002.1A CN113630604A (en) 2020-05-09 2020-05-09 Video data encoding method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113630604A true CN113630604A (en) 2021-11-09

Family

ID=78377641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010390002.1A Pending CN113630604A (en) 2020-05-09 2020-05-09 Video data encoding method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113630604A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023174254A1 (en) * 2022-03-14 2023-09-21 百果园技术(新加坡)有限公司 Video posting method and apparatus, and device and storage medium
WO2024082770A1 (en) * 2022-10-19 2024-04-25 抖音视界有限公司 Video transcoding method and apparatus, and device, storage medium and video on-demand system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023174254A1 (en) * 2022-03-14 2023-09-21 百果园技术(新加坡)有限公司 Video posting method and apparatus, and device and storage medium
WO2024082770A1 (en) * 2022-10-19 2024-04-25 抖音视界有限公司 Video transcoding method and apparatus, and device, storage medium and video on-demand system

Similar Documents

Publication Publication Date Title
US9014277B2 (en) Adaptation of encoding and transmission parameters in pictures that follow scene changes
US20080268770A1 (en) Content reproduction in telecommunications systems
MX2013015115A (en) Technique for managing streaming media traffic at a network entity.
JP2006510310A (en) Method and system for multimedia message processing service
EP3624453A1 (en) A transcoding task allocation method, scheduling device and transcoding device
CN113630604A (en) Video data encoding method, device, equipment and storage medium
US20100070574A1 (en) Method, apparatus for processing a control message and system thereof
EP2934007A1 (en) Method for switching coding mode, sending end and receiving end
CN111093094A (en) Video transcoding method, device and system, electronic equipment and readable storage medium
US20130111528A1 (en) Dynamic provisioning of closed captioning to user devices
US9781487B2 (en) Streaming multicast content to a television via a mobile device
CN107276990B (en) Streaming media live broadcasting method and device
CN111182302B (en) Video image encoding method, terminal device, and storage medium
US8621107B2 (en) State-mediated data signaling used for compression in telecommunication services
US8681860B2 (en) Moving picture compression apparatus and method of controlling operation of same
CN113852866B (en) Media stream processing method, device and system
CN104780392A (en) Transcoding method and device for video files
CN105592082B (en) Content sharing system, content and content share method
US20140143824A1 (en) Multicast-based content transmitting system and method, and device and method for estimating high-speed movement
US20150271530A1 (en) Video quality enhancement method and apparatus
CN103313093A (en) Method and index system for distributed video on demand
US10341704B2 (en) Multicast-based content transmitting system and method, and device and method for estimating high-speed movement
CN114374859B (en) Video color ring playing method, platform and terminal
CN111030985A (en) Data packet sending method and device
CN111182309B (en) Video decoding processing method and device

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