CN115361581B - Media stream transmission method and device, storage medium and electronic device - Google Patents

Media stream transmission method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115361581B
CN115361581B CN202210989184.3A CN202210989184A CN115361581B CN 115361581 B CN115361581 B CN 115361581B CN 202210989184 A CN202210989184 A CN 202210989184A CN 115361581 B CN115361581 B CN 115361581B
Authority
CN
China
Prior art keywords
media stream
code rate
network camera
streaming
cloud server
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.)
Active
Application number
CN202210989184.3A
Other languages
Chinese (zh)
Other versions
CN115361581A (en
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.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software 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 Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202210989184.3A priority Critical patent/CN115361581B/en
Publication of CN115361581A publication Critical patent/CN115361581A/en
Application granted granted Critical
Publication of CN115361581B publication Critical patent/CN115361581B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • 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/439Processing of audio elementary streams
    • H04N21/4394Processing of audio elementary streams involving operations for analysing the audio stream, e.g. detecting features or characteristics in audio streams
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4627Rights management associated to the content

Abstract

The application provides a method and a device for transmitting a media stream, a storage medium and an electronic device, wherein the transmission method comprises the following steps: receiving a streaming message sent by a cloud server, wherein the streaming message comprises address information of a client, a streaming code rate and media stream parameters of network camera equipment, and the streaming code rate is used for representing the media stream code rate supported by the network camera equipment; analyzing the streaming message to obtain address information and media stream parameters of the client; determining a media stream corresponding to the media stream parameter; and sending the media stream to the client according to the address information and the streaming code rate. The application solves the problem of acquiring the media stream in the related technology and achieves the effect of quickly acquiring the media stream.

Description

Media stream transmission method and device, storage medium and electronic device
Technical Field
The embodiment of the application relates to the field of communication, in particular to a method and a device for transmitting media streams, a storage medium and an electronic device.
Background
With the development of information technology, network monitoring by the internet protocol (Internet Protocol, abbreviated as IP) has penetrated aspects of life. With the IP in the video monitoring field, more and more mobile phone monitoring is entering into daily life. However, when the network is abnormal, if video monitoring is performed, the problems that the mobile phone video has slower streaming, video is blocked, and even the monitoring video is opened fails are most likely to occur.
Disclosure of Invention
The embodiment of the application provides a method and a device for transmitting a media stream, a storage medium and an electronic device, which are used for at least solving the problem of acquiring the media stream in the related technology.
According to an embodiment of the present application, there is provided a transmission method of a media stream, including: receiving a streaming message sent by a cloud server, wherein the streaming message comprises address information of a client, a streaming code rate and media stream parameters of network camera equipment, and the streaming code rate is used for representing the media stream code rate supported by the network camera equipment; analyzing the streaming message to obtain the address information of the client and the media stream parameters; determining a media stream corresponding to the media stream parameters; and sending the media stream to the client according to the address information and the streaming code rate.
According to another embodiment of the present application, there is provided a transmission method of a media stream, including: receiving address information and a streaming code rate sent by a client, wherein the streaming code rate is used for representing a media streaming code rate supported by the network camera equipment; and sending a first concurrent message to the network camera device to instruct the network camera device to determine a media stream based on the first concurrent message, wherein the first concurrent message comprises the address information, the streaming code rate and media stream parameters of the network camera device.
According to another embodiment of the present application, there is provided a transmission method of a media stream, including: transmitting address information and a streaming code rate to a cloud server, wherein the streaming code rate is used for representing a media stream code rate supported by the network camera equipment; and receiving the media stream sent by the cloud server based on the address information and the streaming code rate.
According to another embodiment of the present application, there is provided a transmission apparatus for a media stream, including: the first receiving module is used for receiving a streaming message sent by the cloud server, wherein the streaming message comprises address information of a client, a streaming code rate and media stream parameters of the network camera equipment, and the streaming code rate is used for representing the media stream code rate supported by the network camera equipment; the first analysis module is used for analyzing the streaming message to obtain the address information of the client and the media stream parameters; a first determining module, configured to determine a media stream corresponding to the media stream parameter; and the first sending module is used for sending the media stream to the client according to the address information and the starting code rate.
In an exemplary embodiment, the above apparatus further includes: the first registration module is used for registering the cloud server before receiving the streaming message sent by the cloud server; the fourth sending module is configured to send the media stream parameters to the cloud server to instruct the cloud server to store the media stream parameters, where the media stream parameters include at least one of the following: the network camera equipment acquires the description session protocol SDP of the media stream, and the authentication mode of the media stream.
In an exemplary embodiment, the above apparatus further includes: and the fifth sending module is used for sending the changed media stream parameters to the cloud server under the condition that the media stream parameters are determined to be changed, so as to update the media stream parameters at the cloud server.
In an exemplary embodiment, the first determining module includes: a first determining unit configured to determine a media stream rate supported by the network camera device from the start stream rates;
and a second determining unit configured to determine the media stream corresponding to the media stream parameter according to a media stream code rate supported by the network camera device.
In an exemplary embodiment, the first sending module includes: the first sending unit is configured to send the media stream to the cloud server, so as to instruct the cloud server to send the media stream to the client according to the address information and the streaming start rate.
According to another embodiment of the present application, there is provided a transmission apparatus for a media stream, including: the second receiving module is used for receiving the address information and the streaming code rate sent by the client, wherein the streaming code rate is used for representing the media stream code rate supported by the network camera equipment;
and a second sending module, configured to send a first streaming message to a network camera device, to instruct the network camera device to determine a media stream based on the first streaming message, where the first streaming message includes the address information, the streaming code rate, and a media stream parameter of the network camera device.
In an exemplary embodiment, the above apparatus further includes: a fourth receiving module, configured to receive the media stream parameter sent by the network camera device before receiving the address information and the start stream code rate sent by the client; the first storage module is configured to store the media stream parameters, where the media stream parameters include at least one of the following: the network camera equipment acquires the description session protocol SDP of the media stream, and the authentication mode of the media stream.
In an exemplary embodiment, the above apparatus further includes: a fifth receiving module, configured to receive the changed media stream parameter sent by the network camera device before receiving the address information and the start stream code rate sent by the client; and the first updating module is used for updating the media stream parameters by using the changed media stream parameters.
In an exemplary embodiment, the above apparatus further includes: a sixth receiving module, configured to receive the media stream sent by the network camera device after sending the first streaming message to the network camera device; and a seventh sending module, configured to send the media stream to the client according to the address information and the start-up code rate.
According to another embodiment of the present application, there is provided a transmission apparatus for a media stream, including: the third sending module is used for sending the address information and the streaming code rate to the cloud server, wherein the streaming code rate is used for representing the media stream code rate supported by the network camera equipment; and the third receiving module is used for receiving the media stream sent by the cloud server based on the address information and the starting code rate.
In an exemplary embodiment, the apparatus further includes a playing module, configured to play the media stream according to the start-up code rate after receiving the media stream sent by the cloud server based on the address information and the start-up code rate.
According to a further embodiment of the application, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the application, the streaming message sent by the cloud server is received, wherein the streaming message comprises address information of a client, a streaming code rate and media stream parameters of the network camera equipment, and the streaming code rate is used for representing the media stream code rate supported by the network camera equipment; analyzing the streaming message to obtain address information and media stream parameters of the client; determining a media stream corresponding to the media stream parameter; and sending the media stream to the client according to the address information and the streaming code rate. The media stream parameters can be multiplexed, repeated acquisition of the media stream parameters is not needed, and the interaction process is reduced. Therefore, the method and the device can solve the problem of acquiring the media stream in the related technology, and achieve the effect of quickly acquiring the media stream.
Drawings
Fig. 1 is a block diagram of a hardware structure of a mobile terminal of a media stream transmission method according to an embodiment of the present application;
FIG. 2 is a flow chart (one) of a method of transmitting a media stream according to an embodiment of the present application;
FIG. 3 is a flow chart of networking interactions of APP-cloud server-IPC in accordance with an embodiment of the present application;
FIG. 4 is a schematic diagram of interactions between a client and a server according to an embodiment of the application;
FIG. 5 is a flow chart (II) of a method of transmitting a media stream according to an embodiment of the present application;
fig. 6 is a flowchart (iii) of a transmission method of a media stream according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a conventional media streaming session according to an embodiment of the present application;
fig. 8 is a block diagram (a) of a transmission apparatus of a media stream according to an embodiment of the present application;
fig. 9 is a block diagram (two) of a transmission apparatus of a media stream according to an embodiment of the present application;
fig. 10 is a block diagram (iii) of a transmission apparatus of a media stream according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal according to a method for transmitting a media stream according to an embodiment of the present application. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for transmitting a media stream in an embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a method for transmitting a media stream is provided, fig. 2 is a flowchart (a) of a method for transmitting a media stream according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S202, receiving a streaming message sent by a cloud server, wherein the streaming message comprises address information of a client, a streaming code rate and media stream parameters of network camera equipment, and the streaming code rate is used for representing the media stream code rate supported by the network camera equipment; the media stream code rate comprises an audio/video code rate;
step S204, analyzing the streaming message to obtain the address information and media stream parameters of the client;
step S206, determining the media stream corresponding to the media stream parameter;
and step S208, the media stream is sent to the client according to the address information and the streaming code rate.
The main body of execution of the above steps may be a terminal (e.g., a network image capturing apparatus IPC), but is not limited thereto.
In this embodiment, after the network camera device registers to the cloud server, the media stream parameters are sent to the cloud server to instruct the cloud server to store the media stream parameters, where the media stream parameters include at least one of the following: description session protocol (Session Description Protocol, abbreviated as SDP) of media stream acquired by network camera device, authentication mode of media stream.
In this embodiment, the address information of the client is used to indicate the address where the media stream is to be transmitted. The start code rate is the number of data bits transmitted per unit time during data transmission. The code rate can be many, for example 128k-16M, and the code rate value can be set at will.
In the present embodiment, the manner in which the network image capturing apparatus parses the streaming message is not limited.
In the embodiment, interaction is performed in a networking mode of APP-cloud server-IPC. As shown in fig. 3, the method comprises the following steps:
s301, when the IPC registers in the cloud server, media stream parameters are reported to the cloud server for storage, (the media stream is an audio/video stream for example), and the media stream parameters comprise SDP information, authentication type modes and the like.
S302, if the IPC SDP and the authentication information are updated, the update is timely reported to a cloud server, and the cloud server performs information update synchronization.
S303, when the APP of the client initiates the media stream to the IPC, a media stream message is initiated through the cloud server, and the information required by the received media stream, such as IP and port for receiving the media stream, is carried.
S304, the cloud server can initiate media stream transmission required parameters to the IPC once because the cloud server stores the information for initiating media stream to the IPC.
S305, after the IPC receives the message sent by the cloud, the message is analyzed, and a media stream is sent to the IP address.
S306-S309, the information can also be directly uploaded to the mobile terminal for storage, and when a user needs to open video monitoring, the user can open the media stream only by 1 interaction, as shown in FIG. 4, so that the speed of media stream creation can be improved.
As shown in fig. 4, this embodiment can be represented by the following procedure: c represents an rtsp client, S represents an rtsp server;
step0: the method of online push stream media session support of the// IPC, SDP, authentication, etc.;
when a user APP opens video monitoring, if fast streaming is supported, streaming is performed, and the method is named FastRTSP for easy understanding:
step1:
c- > S: fasttsp request// initiate a streaming media establishment request to s;
s- > C: fastRtsp response// S receives the processing request information and sends a video stream;
s- > C: and sending the streaming media parameters.
S7, the user can set the high-definition code rate and the ultra-definition code rate. If the network environment is poor at this time, when the current user opens the monitoring, if the network environment is poor, the APP end judges and selects the proper ultra-low code rate to start. The successful monitoring of the live opening is ensured, and the live opening is smooth as much as possible. And judging that the network environment is recovered in the APP keep-alive process, and sending a message to the IPC.
S8, IPC sends streaming media.
Through the steps, the streaming message sent by the cloud server is received, wherein the streaming message comprises address information of a client, a streaming code rate and media stream parameters of the network camera equipment, and the streaming code rate is used for representing the media stream code rate supported by the network camera equipment; analyzing the streaming message to obtain address information and media stream parameters of the client; determining a media stream corresponding to the media stream parameter; and sending the media stream to the client according to the address information and the streaming code rate. The media stream parameters can be multiplexed, repeated acquisition of the media stream parameters is not needed, and the interaction process is reduced. Therefore, the problem of acquiring the media stream under the condition of poor network in the related technology can be solved, and the effect of quickly acquiring the media stream is achieved.
In one exemplary embodiment, the method further comprises:
and under the condition that the media stream parameters are determined to change, sending the changed media stream to the cloud server so as to update the media stream at the cloud server.
In one exemplary embodiment, determining a media stream corresponding to a media stream parameter includes:
determining a media stream code rate supported by the network camera equipment from the start stream code rate;
and determining the media stream corresponding to the media stream parameters according to the media stream code rate supported by the network camera equipment.
In this embodiment, for example, the media stream code rate supported by the network camera device may be determined according to factors such as the network environment x, the current code rate configuration y, the video coding format z, the I-frame interval w, the current configuration of the streaming estimation effect q (streaming failure (1)/stuck (2)/lost video (3)/fluency (4)/very fluency (5)), and the like.
The formula can be expressed as: streambitrate=f (xyzwq) selects an appropriate code rate. The APP sends the parameter to the IPC, and after the IPC receives the message, the parameter can be sent to flow, so that a better video effect is achieved.
Invoking the function streambitrate=f (xyzwq) to calculate the predicted desired effect requires changing parameters of IPC. If the current code rate is 4M, H264 and I frame interval 25, the current streaming effect is to play the predicted effect (1), then APP sends 0.5M, H265 and I frame interval 200 to IPC, then streaming is performed, and the current streaming effect is to play the predicted effect (4). If the network q recovers, the APP recovers the streaming by using parameters configured by the user.
In one exemplary embodiment, transmitting the media stream to the client according to the address information and the start-up code rate includes:
and sending the media stream to the cloud server to instruct the cloud server to send the media stream to the client according to the address information and the streaming code rate.
In this embodiment, a method for transmitting a media stream is provided, and fig. 5 is a flowchart (two) of a method for transmitting a media stream according to an embodiment of the present application, as shown in fig. 5, where the flowchart includes the following steps:
step S502, receiving address information and a streaming code rate sent by a client, wherein the streaming code rate is used for representing a media stream code rate supported by network camera equipment;
step S504, a first streaming message is sent to the network camera device to instruct the network camera device to determine a media stream based on the first streaming message, where the first streaming message includes address information, a streaming rate, and media stream parameters of the network camera device.
The execution subject of the above steps may be a cloud server, but is not limited thereto.
In this embodiment, after the network camera device registers to the cloud server, the cloud server receives and stores the media stream parameters, where the media stream parameters include at least one of the following: description session protocol (Session Description Protocol, abbreviated as SDP) of media stream acquired by network camera device, authentication mode of media stream.
In this embodiment, the address information of the client is used to indicate the address where the media stream is to be transmitted. The streaming code rate is used to represent the media streaming code rate supported by the network camera device.
In an exemplary embodiment, before receiving the address information and the start-up code rate sent by the client, the method further includes:
s1, receiving media stream parameters sent by network camera equipment;
s2, saving media stream parameters, wherein the media stream parameters comprise at least one of the following: the network camera equipment acquires the description session protocol SDP of the media stream and the authentication mode of the media stream.
In an exemplary embodiment, before receiving the address information and the start-up code rate sent by the client, the method further includes:
s1, receiving a changed media stream sent by a network camera device;
s2, updating the media stream by using the changed media stream.
In one exemplary embodiment, after the first concurrent message is sent to the network camera device, the method further includes:
s1, receiving a media stream sent by a network camera device;
and S2, sending the media stream to the client according to the address information and the streaming code rate.
In this embodiment, a method for transmitting a media stream is provided, fig. 6 is a flowchart (iii) of a method for transmitting a media stream according to an embodiment of the present application, and as shown in fig. 6, the flowchart includes the following steps:
step S602, address information and a streaming code rate are sent to a cloud server, wherein the streaming code rate is used for representing a media stream code rate supported by network camera equipment;
step S604, receiving the media stream sent by the cloud server based on the address information and the streaming code rate.
The main execution body of the above steps may be a terminal side or the like, but is not limited thereto.
In this embodiment, after the network camera device registers to the cloud server, the cloud server receives and stores the media stream parameters, where the media stream parameters include at least one of the following: description session protocol (Session Description Protocol, abbreviated as SDP) of media stream acquired by network camera device, authentication mode of media stream.
In this embodiment, the address information of the client is used to indicate the address where the media stream is to be transmitted. The streaming code rate is used to represent the media streaming code rate supported by the network camera device.
In an exemplary embodiment, after receiving the media stream sent by the cloud server based on the address information and the streaming rate, the method further includes: and playing the media stream according to the streaming code rate.
The application is illustrated below with reference to specific examples:
creation of a conventional media streaming session as shown in fig. 7, the interactive process is relatively long. And, home monitoring networking, if the network speed difference occurs and the current configuration exceeds Gao Qingma flow, the situation that the video is not opened and blocked or even the mobile phone monitoring video is not failed easily occurs. For example, in the RTSP streaming method, various interactions are performed every time of streaming, and if the network environment is poor, more interactions are performed, on the one hand, the streaming is slow, and on the other hand, the streaming is likely to be lost or blocked. In the embodiment, parameters required by streaming are acquired before streaming of a user, so that less interaction is caused during streaming, and the video output speed is greatly improved. The method comprises the following steps:
c represents an rtsp client, S represents an rtsp server:
step1:
c- > S: the OPTIONs request// query S which methods are available;
s- > C: all available methods provided are included in the OPTION response// S response message;
step2:
c- > S: DESCRIBE request// request get media initialization descriptive information that S provides;
s- > C: DESCRIBE response// S responds to the media initialization description information, mainly SDP;
step3:
c- > S: setting up the attribute of the session, and the transmission mode, reminding S of establishing the session;
s- > C: the SETUP response// S establishes a session, returns a session identifier and session related information;
step4:
c- > S: PLAY request// C request PLAY;
s- > C: PLAY response// S responds to the requested information;
s- > C: transmitting stream media parameters;
step5:
c- > S: the TEARDOWN request// C requests to close the session;
s- > C: TEARDOWN response// S responds to the request.
The specific steps of this embodiment are shown in fig. 3, and the above embodiments are described and will not be repeated here.
In summary, the embodiment can make the video monitoring faster when the user monitors the video under the condition of good or bad network environment. Under the condition of poor network, streaming media video optimization can be performed, the code rate is reduced, the bandwidth is reduced, on one hand, video monitoring can be normally opened, on the other hand, video smoothness can be achieved, and user experience is improved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
In this embodiment, a device for transmitting a media stream is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, which are not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 8 is a block diagram (a) of a transmission apparatus of a media stream according to an embodiment of the present application, and as shown in fig. 8, the apparatus includes:
the first receiving module 82 is configured to receive a streaming message sent by the cloud server, where the streaming message includes address information of a client, a streaming code rate, and media stream parameters of the network camera device, and the streaming code rate is used to represent a media stream code rate supported by the network camera device;
a first parsing module 84, configured to parse the streaming message to obtain address information and media stream parameters of the client;
a first determining module 86, configured to determine a media stream corresponding to the media stream parameter;
a first sending module 88, configured to send the media stream to the client according to the address information and the streaming code rate.
In an exemplary embodiment, the above apparatus further includes:
the first registration module is used for registering the cloud server before receiving the streaming message sent by the cloud server;
the fourth sending module is configured to send the media stream parameters to the cloud server to instruct the cloud server to store the media stream parameters, where the media stream parameters include at least one of the following: the network camera equipment acquires the description session protocol SDP of the media stream, and the authentication mode of the media stream.
In an exemplary embodiment, the above apparatus further includes:
and the fifth sending module is used for sending the changed media stream to the cloud server under the condition that the media stream parameters are determined to be changed, so as to update the media stream at the cloud server.
In an exemplary embodiment, the first determining module includes:
a first determining unit configured to determine a media stream rate supported by the network camera device from the start stream rates;
and a second determining unit configured to determine the media stream corresponding to the media stream parameter according to a media stream code rate supported by the network camera device.
In an exemplary embodiment, the first sending module includes:
the first sending unit is configured to send the media stream to the cloud server, so as to instruct the cloud server to send the media stream to the client according to the address information and the streaming start rate.
Fig. 9 is a block diagram (two) of a transmission apparatus of a media stream according to an embodiment of the present application, and as shown in fig. 9, the apparatus includes:
a second receiving module 92, configured to receive address information and a streaming rate sent by the client, where the streaming rate is used to represent a media streaming rate supported by the network camera device;
the second sending module 94 is configured to send a first streaming message to the network camera device, so as to instruct the network camera device to determine a media stream based on the first streaming message, where the first streaming message includes address information, a streaming rate, and media stream parameters of the network camera device.
In an exemplary embodiment, the above apparatus further includes:
a fourth receiving module, configured to receive the media stream parameter sent by the network camera device before receiving the address information and the start stream code rate sent by the client;
the first storage module is configured to store the media stream parameters, where the media stream parameters include at least one of the following: the network camera equipment acquires the description session protocol SDP of the media stream, and the authentication mode of the media stream.
In an exemplary embodiment, the above apparatus further includes:
a fifth receiving module, configured to receive the changed media stream parameter sent by the network camera device before receiving the address information and the start stream code rate sent by the client;
and the first updating module is used for updating the media stream parameters by using the changed media stream parameters.
In an exemplary embodiment, the above apparatus further includes:
a sixth receiving module, configured to receive the media stream sent by the network camera device after sending the first streaming message to the network camera device;
and a seventh sending module, configured to send the media stream to the client according to the address information and the start-up code rate.
Fig. 10 is a block diagram (iii) of a transmission apparatus of a media stream according to an embodiment of the present application, and as shown in fig. 10, the apparatus includes:
a third sending module 1002, configured to send address information and a streaming rate to a cloud server, where the streaming rate is used to represent a media stream rate supported by the network camera device;
the third receiving module 1004 is configured to receive a media stream sent by the cloud server based on the address information and the streaming code rate.
In an exemplary embodiment, the apparatus further includes a playing module, configured to play the media stream according to the start-up code rate after receiving the media stream sent by the cloud server based on the address information and the start-up code rate.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the above steps.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
In an exemplary embodiment, the above processor may be arranged to perform the above steps by means of a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.

Claims (13)

1. A method for transmitting a media stream, comprising:
under the condition that a network abnormality occurs in a client, the client sends address information and a streaming code rate of the client to a cloud server, wherein the streaming code rate is used for representing a media streaming code rate supported by network camera equipment;
the cloud server sends a streaming message to the network camera device, wherein the streaming message comprises the address information, the streaming code rate and media stream parameters, and the media stream parameters are parameters sent to the cloud server in advance by the network camera device;
the network camera device determines a media stream corresponding to the media stream parameter, wherein the network camera device determines the media stream corresponding to the media stream parameter by: determining a media stream code rate supported by the network camera equipment from the start stream code rate, and determining a media stream corresponding to the media stream parameter according to the media stream code rate supported by the network camera equipment; the media stream code rate supported by the network camera equipment is determined according to the network environment of the client, the current code rate configuration, the video coding format, the interval between video frames and the current configuration streaming estimation effect;
the network camera equipment sends the media stream to the cloud server according to the address information and the streaming code rate;
and the cloud server sends the media stream to the client.
2. The method of claim 1, wherein before the client receives the streaming message sent by the cloud server, the method further comprises:
registering to the cloud server;
sending the media stream parameters to the cloud server to instruct the cloud server to store the media stream parameters, wherein the media stream parameters comprise at least one of the following: the network camera equipment acquires a description session protocol SDP of the media stream, and the authentication mode of the media stream.
3. The method according to claim 1, wherein the method further comprises:
and under the condition that the media stream parameters are determined to be changed, sending the changed media stream parameters to the cloud server so as to update the media stream parameters at the cloud server.
4. The method of claim 1, wherein the determining the media stream corresponding to the media stream parameter comprises:
determining a media stream code rate supported by the network camera device from the start stream code rate;
and determining the media stream corresponding to the media stream parameters according to the media stream code rate supported by the network camera equipment.
5. The method of claim 1, wherein said sending the media stream to the client according to the address information and the start-up code rate comprises:
and sending the media stream to the cloud server to instruct the cloud server to send the media stream to the client according to the address information and the streaming code rate.
6. A method for transmitting a media stream, comprising:
under the condition that a network abnormality occurs at a client, the cloud server receives address information and a streaming code rate sent by the client, wherein the streaming code rate is used for representing a media stream code rate supported by network camera equipment;
the cloud server sends a first concurrent message to a network camera device to instruct the network camera device to determine a media stream based on the first concurrent message, wherein the first concurrent message comprises the address information, the streaming code rate and media stream parameters of the network camera device, and the media stream parameters are parameters sent to the cloud server in advance by the network camera device;
the network camera device is used for determining a media stream corresponding to the media stream parameter, wherein the network camera device determines the media stream corresponding to the media stream parameter by the following modes: determining a media stream code rate supported by the network camera equipment from the start stream code rate, and determining a media stream corresponding to the media stream parameter according to the media stream code rate supported by the network camera equipment; the media stream code rate supported by the network camera equipment is determined according to the network environment of the client, the current code rate configuration, the video coding format, the interval between video frames and the current configuration streaming estimation effect.
7. The method of claim 6, wherein prior to receiving the address information and the start-up code rate sent by the client, the method further comprises:
receiving the media stream parameters sent by the network camera equipment;
saving the media stream parameters, wherein the media stream parameters include at least one of: the network camera equipment acquires a description session protocol SDP of the media stream, and the authentication mode of the media stream.
8. The method of claim 6, wherein prior to receiving the address information and the start-up code rate sent by the client, the method further comprises:
receiving the changed media stream parameters sent by the network camera equipment;
and updating the media stream parameters by using the changed media stream parameters.
9. The method according to claim 6, wherein after the first concurrent message is sent to the network camera device, the method further comprises:
receiving the media stream sent by the network camera equipment;
and sending the media stream to the client according to the address information and the streaming code rate.
10. A method for transmitting a media stream, comprising:
in the case that a network abnormality occurs in a client, the client sends address information and a streaming rate to a cloud server, wherein the streaming rate is used for representing a media stream rate supported by a network camera device, the network camera device is used for determining a media stream corresponding to a media stream parameter, and the media stream parameter is a parameter sent to the cloud server in advance by the network camera device, and the network camera device determines the media stream corresponding to the media stream parameter by the following modes: determining a media stream code rate supported by the network camera equipment from the start stream code rate, and determining a media stream corresponding to the media stream parameter according to the media stream code rate supported by the network camera equipment; the media stream code rate supported by the network camera equipment is determined according to the network environment of the client, the current code rate configuration, the video coding format, the interval between video frames and the current configuration streaming estimation effect;
and the client receives the media stream sent by the cloud server based on the address information and the streaming code rate.
11. The method of claim 10, wherein after receiving the media stream sent by the cloud server based on the address information and the start-up code rate, the method further comprises:
and playing the media stream according to the streaming code rate.
12. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program, when executed by a processor, implements the method of any one of claims 1 to 5, or implements the method of any one of claims 6 to 9, or implements the method of any one of claims 10 to 11.
13. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 5, or to perform the method of any of the claims 6-9, or to implement the method of any of the claims 10-11.
CN202210989184.3A 2022-08-17 2022-08-17 Media stream transmission method and device, storage medium and electronic device Active CN115361581B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210989184.3A CN115361581B (en) 2022-08-17 2022-08-17 Media stream transmission method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210989184.3A CN115361581B (en) 2022-08-17 2022-08-17 Media stream transmission method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115361581A CN115361581A (en) 2022-11-18
CN115361581B true CN115361581B (en) 2023-11-24

Family

ID=84002964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210989184.3A Active CN115361581B (en) 2022-08-17 2022-08-17 Media stream transmission method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115361581B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309203A (en) * 2007-05-17 2008-11-19 中兴通讯股份有限公司 Network media service method
CN101808233A (en) * 2009-02-18 2010-08-18 杭州海康威视数字技术股份有限公司 Universal system for realizing video monitoring of mobile phone and method thereof
CN104683734A (en) * 2013-11-26 2015-06-03 中兴通讯股份有限公司 Video surveillance content adaptation method, system, central server and device
WO2019080022A1 (en) * 2017-10-26 2019-05-02 天彩电子(深圳)有限公司 Method and device for network video stream transmission congestion control

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297666B (en) * 2012-02-24 2018-07-31 中兴通讯股份有限公司 The method, apparatus and system of video monitoring are realized based on universal plug and play
US20160088326A1 (en) * 2014-09-23 2016-03-24 Watchcorp Holdings LLC Distributed recording, managing, and accessing of surveillance data within a networked video surveillance system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309203A (en) * 2007-05-17 2008-11-19 中兴通讯股份有限公司 Network media service method
CN101808233A (en) * 2009-02-18 2010-08-18 杭州海康威视数字技术股份有限公司 Universal system for realizing video monitoring of mobile phone and method thereof
CN104683734A (en) * 2013-11-26 2015-06-03 中兴通讯股份有限公司 Video surveillance content adaptation method, system, central server and device
WO2019080022A1 (en) * 2017-10-26 2019-05-02 天彩电子(深圳)有限公司 Method and device for network video stream transmission congestion control

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Quality-of-content (QoC)-driven rate allocation for video analysis in mobile surveillance networks;Xiang Chen, Jenq-Neng Hwang, Kuan-Hui Lee, R. Queiroz;《2015 IEEE 17th International Workshop on Multimedia Signal Processing (MMSP)》;全文 *
基于 H.264的云端视频监控系统设计;艾博文;沈永良;张金富;《黑龙江大学工程学报》;第6卷(第4期);68-72 *
张志龙.《无线视频传输优化技术》.北京邮电大学出版社,2020,(第978-7-5635-6096-7版),47-54. *
网络摄像机IPC接入平台设计与实现;陈干;《中国优秀硕士学位论文全文数据库 信息科技辑》;全文 *

Also Published As

Publication number Publication date
CN115361581A (en) 2022-11-18

Similar Documents

Publication Publication Date Title
US10911506B2 (en) Methods for quality-aware adaptive streaming over hypertext transfer protocol and reporting quality of experience
CN107743698B (en) Method and apparatus for multi-path media delivery
CN105230029B (en) Establish and control Wi-Fi shows the audio connected and voice backward channel
US9826016B2 (en) Fair adaptive streaming
US11212334B2 (en) Mechanisms to support adaptive constrained application protocol (CoAP) streaming for Internet of Things (IoT) systems
US10516712B2 (en) Streaming media data transmission method, client and server
US8813160B2 (en) Method, system and user device for obtaining a key frame in a streaming media service
CN108696772B (en) Real-time video transmission method and device
EP3070935B1 (en) Apparatus, system, and method of controlling output of content data, and carrier means
WO2013017165A1 (en) Shaping media traffic based on manifest file in http adaptive streaming
US20200169774A1 (en) Control method and device
CN101179480B (en) Method for forwarding stream media
CN111512609A (en) Network assistance for uplink streaming
CN106658065B (en) Audio and video synchronization method, device and system
CN107294830B (en) A kind of data transmission method and system
EP2882191A1 (en) Synchronization of streaming data
JP2014131143A (en) Transmitter, transmitting method and program
CN115361581B (en) Media stream transmission method and device, storage medium and electronic device
CN114422866B (en) Video processing method and device, electronic equipment and storage medium
O'Sullivan et al. godash 2.0-the next evolution of HAS evaluation
US20220030300A1 (en) Quick streaming reconnect by preserving streaming context on app exit
CN104935571B (en) A kind of exchange method of video game server-side and client
JP6410423B2 (en) COMMUNICATION CONTROL DEVICE, COMMUNICATION CONTROL METHOD, AND PROGRAM
US20230370514A1 (en) Methods and apparatus for network assisted stream synchronization for media services using network slicing
CN113852842A (en) Video transcoding scheduling method based on education cloud platform and background server

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
GR01 Patent grant
GR01 Patent grant