CN116600067A - Audio and video stream data pushing method, device, equipment and storage medium - Google Patents

Audio and video stream data pushing method, device, equipment and storage medium Download PDF

Info

Publication number
CN116600067A
CN116600067A CN202310269315.5A CN202310269315A CN116600067A CN 116600067 A CN116600067 A CN 116600067A CN 202310269315 A CN202310269315 A CN 202310269315A CN 116600067 A CN116600067 A CN 116600067A
Authority
CN
China
Prior art keywords
audio
video stream
input source
stream data
preset delay
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
CN202310269315.5A
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.)
Hangzhou Yagu Technology Co ltd
Original Assignee
Hangzhou Yagu 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 Yagu Technology Co ltd filed Critical Hangzhou Yagu Technology Co ltd
Priority to CN202310269315.5A priority Critical patent/CN116600067A/en
Publication of CN116600067A publication Critical patent/CN116600067A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/268Signal distribution or switching
    • 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback

Landscapes

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

Abstract

The application discloses a method, a device, equipment and a storage medium for pushing audio and video stream data, which relate to the technical field of data processing and comprise the following steps: writing the audio and video stream data of the main input source into a preset delay buffer, and marking available after the total duration of the audio and video stream data in the preset delay buffer is not less than the preset delay time; if the current input source is the main input source, circularly acquiring audio and video stream data to be played from the marked available preset delay cache through a pusher, and playing the audio and video stream data; and if the current input source is a standby input source, acquiring audio and video stream data transmitted by the standby input source through a pusher for playing, and updating a preset delay buffer by utilizing the currently acquired audio and video stream data of the main input source. Therefore, the live broadcast source uses the standby input source and does not interrupt the delay buffer operation of the main input source, so that when the live broadcast source is switched back to the main input source, a viewer can timely see the picture of the main input source acquired from the preset delay buffer.

Description

Audio and video stream data pushing method, device, equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for pushing audio and video stream data.
Background
In the cloud broadcasting guide table, if the time delay function is started, after a broadcasting guide switches the picture for the first time, a viewer can immediately see a new live broadcast picture; however, after a period of time, when the director switches back again, the viewer cannot see the switched back picture in time, and a new picture can appear after the old picture is played for a period of time.
Some broadcasting stations in the market at present have no delay function, and the broadcasting stations with the delay function cannot see new pictures immediately after switching input source pictures.
It can be seen that how to allow the viewer to see the new screen after switching the input source in time is a problem to be solved in the art.
Disclosure of Invention
Accordingly, the present application is directed to a method, apparatus, device and storage medium for pushing audio/video stream data, which can timely display a picture of a main input source that is delayed and buffered to a viewer through a preset delay buffer when switching from a standby input source to the main input source. The specific scheme is as follows:
in a first aspect, the present application provides a method for pushing audio and video stream data, including:
writing audio and video stream data of a main input source into a preset delay buffer, and marking that the preset delay buffer is available after the total duration of the audio and video stream data in the preset delay buffer is not less than the preset delay time;
if the current input source is the main input source, circularly acquiring audio and video stream data to be played from the marked available preset delay buffer memory through a pusher, and pushing the audio and video stream data to be played to a corresponding live broadcast platform for playing;
and if the current input source is a standby input source, pushing the audio and video stream data transmitted by the standby input source to the live broadcast platform for playing through the pusher, and updating the data in the preset delay cache by utilizing the currently acquired audio and video stream data of the main input source.
Optionally, the step of circularly obtaining the audio and video stream data to be played from the preset delay buffer memory which is marked as available through a pusher, and pushing the audio and video stream data to be played to a corresponding live broadcast platform for playing includes:
the audio and video stream data to be played is circularly obtained from the preset delay buffer memory which is marked to be available through the impeller, and a time stamp is marked on the audio and video stream data to be played, so that marked audio and video stream data is obtained;
and pushing the marked audio and video data to the live broadcast platform for playing.
Optionally, the updating the data in the preset delay buffer by using the currently acquired audio and video stream data of the main input source includes:
and writing the currently acquired audio and video stream data of the main input source into the tail part of the preset delay buffer, and removing the corresponding audio and video stream data from the head part of the preset delay buffer based on the same writing speed.
Optionally, after the pushing, by the pusher, the audio and video stream data transmitted by the standby input source is pushed to the live platform for playing, the method further includes:
and adding a window for playing the audio and video stream data in the preset delay buffer memory in the picture of the guide table so that a worker can check the picture of the main input source and perform the switching operation of the input source.
Optionally, if the current input source is a standby input source, pushing, by the pusher, audio and video stream data transmitted by the standby input source to the live broadcast platform for playing, including:
when a current input source is switched from the main input source to the standby input source, recoding audio and video stream data of the standby input source by utilizing coding parameters corresponding to the main input source to obtain coded audio and video stream data;
and pushing the encoded audio and video stream data to the live broadcast platform for playing through the pusher.
Optionally, the method further comprises:
when a plurality of main input sources exist, audio and video stream data of a corresponding number of main input sources are written into corresponding preset delay buffers based on preset delay time, so that the audio and video stream data in the corresponding preset delay buffers are played when one main input source is switched to the other main input source.
Optionally, the method further comprises:
after the current main input source is abnormally cut off, the guide table triggers alarm information so as to prompt a worker to switch the input source.
In a second aspect, the present application provides an audio/video stream data pushing apparatus, including:
the data caching module is used for writing the audio and video stream data of the main input source into a preset delay cache, and marking the preset delay cache as available after the total duration of the audio and video stream data in the preset delay cache is not less than the preset delay time;
the first playing module is used for circularly acquiring audio and video stream data to be played from the preset delay buffer memory which is marked as available through a pusher and pushing the audio and video stream data to be played to a corresponding live platform for playing if the current input source is the main input source;
the second playing module is used for pushing the audio and video stream data transmitted by the standby input source to the live broadcast platform for playing through the pusher if the current input source is the standby input source;
and the buffer updating module is used for updating the data in the preset delay buffer by utilizing the currently acquired audio and video stream data of the main input source when the current input source is a standby input source.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the audio and video stream data pushing method.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program, which when executed by a processor implements an audio-video stream data pushing method as described above.
Therefore, the application can write the audio and video stream data of the main input source into the preset delay buffer, and mark that the preset delay buffer is available after the total duration of the audio and video stream data in the preset delay buffer is not less than the preset delay time; if the current input source is the main input source, circularly acquiring audio and video stream data to be played from the marked available preset delay buffer memory through a pusher, and pushing the audio and video stream data to be played to a corresponding live broadcast platform for playing; and if the current input source is a standby input source, pushing the audio and video stream data transmitted by the standby input source to the live broadcast platform for playing through the pusher, and updating the data in the preset delay cache by utilizing the currently acquired audio and video stream data of the main input source. In this way, when the standby input source is used for live broadcasting, the audio and video stream data in the preset delay buffer can be updated by utilizing the audio and video stream data of the main input source, so that when the standby input source is switched to the main input source, the audio and video stream data of the main input source in the preset delay buffer can be directly pushed to a corresponding live broadcasting platform, a viewer can see the picture of the main input source in time, the situation that the main input source which is not processed by the delay buffer is played can be avoided, and the probability of live broadcasting accidents can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an audio and video stream data pushing method disclosed by the application;
fig. 2 is a schematic structural diagram of a specific audio and video stream data pushing device disclosed in the present application;
FIG. 3 is a schematic view of a specific multicast table page according to the present disclosure;
fig. 4 is a flowchart of a specific audio and video stream data pushing method disclosed in the present application;
fig. 5 is a schematic structural diagram of a specific audio and video stream data pushing device disclosed in the present application;
fig. 6 is a schematic structural diagram of an audio/video stream data pushing device disclosed in the present application;
fig. 7 is a block diagram of an electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the conventional input source switching method for the broadcasting guide station, when a standby input source is switched to a main input source, a background is not directly switched to a picture of the main input source, but audio and video stream data of the main input source are written into a delay buffer, when the delay buffer reaches the time length required by delay, the output of the standby input source is stopped, and the audio and video stream data of the main input source in the delay buffer is started to be output. This can lead to a problem in that the viewer needs to wait x seconds before he can see the main stream picture after the director switches from the standby input source to the main input source; where x is the required length of the delay. Therefore, when the standby input source is used by the guide table, the audio and video stream data of the main input source are utilized to update the audio and video stream data in the delay buffer, so that the latest audio and video stream data of the main input source are buffered in the delay buffer at any time, and when the guide table is switched from the standby input source to the main input source, pictures of the main input source can be played in time, and the effect of the delay buffer can be ensured.
Referring to fig. 1, the embodiment of the application discloses a method for pushing audio and video stream data, which comprises the following steps:
and S11, writing the audio and video stream data of the main input source into a preset delay buffer, and marking that the preset delay buffer is available after the total duration of the audio and video stream data in the preset delay buffer is not less than the preset delay time.
In this embodiment, it should be noted first that, the main input source, the preset delay buffer, and the standby input source are all located in the same multicast table, as shown in fig. 2, where the main stream is the main input source, and the standby stream is the standby input source; in this case, the audio/video stream data of the main input source may be written into the preset delay buffer, and it may be understood that the preset delay buffer is a first-in first-out (FIFO) queue, where the audio/video stream data with the total duration being the same as the preset delay time may be stored, so that when a live broadcast accident occurs, the audio/video stream data may be timely switched to other live broadcast input sources within the preset delay time. In this embodiment, when the total duration of the audio and video stream data in the preset delay buffer is not less than the preset delay time, the preset delay buffer may be marked as an available state, so as to represent that the audio and video stream data in the preset delay buffer may be pushed to a corresponding live broadcast platform for live broadcast.
And step S12, if the current input source is the main input source, circularly acquiring audio and video stream data to be played from the marked available preset delay buffer memory through a pusher, and pushing the audio and video stream data to be played to a corresponding live broadcast platform for playing.
In this embodiment, if the current input source of the live platform is the main input source, the audio/video stream data to be played may be obtained from the preset delay buffer which is marked as available through the impeller, and it may be understood that the audio/video stream data to be played in the preset delay buffer which is marked as available is the audio/video stream data of the main input source which is subjected to delay processing; then the audio and video stream data to be played can be pushed to the live broadcast platform for playing; therefore, live broadcasting of the audio and video stream data subjected to delay processing can be realized, when a live broadcasting accident occurs, the live broadcasting input source can be switched in time, and further expansion of the live broadcasting accident can be avoided.
Further, the step of circularly obtaining the audio and video stream data to be played from the preset delay buffer memory which is marked as available through the impeller and pushing the audio and video stream data to be played to the corresponding live broadcast platform for playing may include: the audio and video stream data to be played is circularly obtained from the preset delay buffer memory which is marked to be available through the impeller, and a time stamp is marked on the audio and video stream data to be played, so that marked audio and video stream data is obtained; and pushing the marked audio and video data to the live broadcast platform for playing. Specifically, after the audio and video stream data to be played is obtained from the preset delay buffer, a timestamp can be marked on the audio and video stream data to be played, and then the marked audio and video data obtained after the timestamp is pushed to the live broadcast platform for playing. It should be noted that the time stamp of each audio-video frame must be reset and the original time stamp cannot be used. The audio and video are arranged in an interlaced manner, and the time stamps are continuously and monotonically increasing.
And S13, if the current input source is a standby input source, pushing the audio and video stream data transmitted by the standby input source to the live broadcast platform for playing through the pusher, and updating the data in the preset delay cache by utilizing the currently acquired audio and video stream data of the main input source.
In this embodiment, when the current input source of the live broadcast platform is the standby input source, the audio and video stream data of the standby input source may be pushed to the live broadcast platform by the pusher; it should be noted that, in this embodiment, when the standby input source is used for live broadcasting, the audio and video stream data in the preset delay buffer may be updated by using the audio and video stream data currently acquired through the main input source, and it may be understood that at this time, the main input source may be audio and video stream data related to a live broadcasting accident; in this way, the audio and video stream data of the main input source is used for updating the preset delay buffer, so that the audio and video stream data of the main input source which is subjected to delay processing is ensured to be always in the preset delay buffer, and the fact that the main input source or the standby input source is only selected by using a plug-in device to carry out plug-in the process of switching the current input source from the main input source to the standby input source or from the main input source to the standby input source is pointed out; it should be further noted that when the current input source is switched from the main input source to the standby input source, audio and video stream data in the preset delay buffer which is used for carrying out delay buffer processing on the main input source is not cleared, and when live broadcasting is carried out by using the standby input source, audio and video stream data in the preset delay buffer is updated by utilizing the audio and video stream data of the main input source which is currently acquired, so that when the current input source is switched to the main input source again, the audio and video stream data in the preset delay buffer can be pushed to a live broadcasting platform in time through a pusher, and a relevant picture of the main input source can be seen quickly by a viewer.
Further, in a specific embodiment, the step of pushing, by the pusher, the audio and video stream data transmitted by the standby input source to the live platform for playing may further include: and adding a window for playing the audio and video stream data in the preset delay buffer memory in the picture of the guide table so that a worker can check the picture of the main input source and perform the switching operation of the input source. Specifically, a window capable of playing the audio and video stream data in the preset delay cache can be added in the picture of the broadcasting guide table, and it can be understood that the picture of the main input source in the preset delay cache can be checked in real time through the window only capable of being seen by a broadcasting guide in the broadcasting guide table, and when the picture of the main input source in the preset delay cache returns to normal, that is, after the live broadcast accident of the main input source is processed, the audio and video stream data in the preset delay cache can be directly pushed to a corresponding live broadcast platform through a pusher for live broadcast; as shown in fig. 3, a page of a director can be viewed through different windows according to the picture conditions of different input sources. When the live broadcast input source is switched from the standby input source to the main input source, the audience can timely see the picture of the main input source, the delay capacity of the main input source can be ensured through the preset delay buffer, and the fault tolerance of the live broadcast can be improved.
Therefore, according to the embodiment of the application, the audio and video stream data of the main input source can be delayed in advance through the preset delay buffer, when a live broadcast accident occurs, the live broadcast input source can be switched from the main input source to the standby input source in time within the preset delay time, and the preset delay buffer is updated by utilizing the audio and video stream data of the main input source; therefore, when the live input source is switched from the standby input source to the main input source, the audio and video stream data subjected to the main input source delay processing can be timely obtained from the preset delay buffer, and when the live input source is switched to the main input source, the corresponding audio and video stream data can be immediately pushed by the pusher; and when the picture in the preset delay buffer is found to be normal, the live broadcast input source can be switched back to the main input source, so that a viewer can timely see the live broadcast picture of the main input source.
Referring to fig. 4, the embodiment of the application discloses a method for pushing audio and video stream data, which comprises the following steps:
and S21, writing the audio and video stream data of the main input source into a preset delay buffer, and marking that the preset delay buffer is available after the total duration of the audio and video stream data in the preset delay buffer is not less than the preset delay time.
And S22, if the current input source is the main input source, circularly acquiring audio and video stream data to be played from the marked available preset delay buffer memory through a pusher, and pushing the audio and video stream data to be played to a corresponding live broadcast platform for playing.
And S23, when the current input source is switched from the main input source to the standby input source, the audio and video stream data of the standby input source is recoded by utilizing coding parameters corresponding to the main input source, and the coded audio and video stream data is obtained.
In the embodiment of the present application, when the current input source is switched from the main input source to the standby input source, it is understood that parameters between the standby input source and the audio/video stream data of the main input source may be inconsistent, for example, different frame rates or different resolutions. In this case, the audio and video stream data of the standby input source may be re-encoded, wherein the encoding parameters used should be consistent with the primary input source.
And step S24, pushing the encoded audio and video stream data to the live broadcast platform for playing through the pusher.
In this embodiment, it should be noted that, before the encoded av stream data is pushed to the live platform for playing by the pusher, the timestamp of the av stream data in the standby input source may be reset, and should be consistent with the timestamp of the previous av stream data.
And step S25, writing the currently acquired audio and video stream data of the main input source into the tail part of the preset delay buffer, and removing the corresponding audio and video stream data from the head part of the preset delay buffer based on the same writing speed.
In this embodiment, when live broadcasting is performed by using a standby input source, audio and video stream data acquired through the main input source may be written into the tail of the preset delay buffer at the same time, and then audio and video stream data at the head of the preset delay buffer is removed based on the writing speed; in this way, the update of the audio and video stream data in the preset delay buffer can be realized, and the audio and video stream data of the main input source can be ensured to be subjected to delay processing in real time through the preset delay buffer; when the live broadcast input source is switched from the standby input source to the main input source, corresponding audio and video stream data can be directly pushed to a live broadcast platform for playing through the preset delay buffer.
For more specific processing procedures in the steps S21 and S22, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no detailed description is given here.
Therefore, in the embodiment of the application, when the standby input source is used for live broadcasting, the audio and video stream data acquired through the main input source can be simultaneously written into the tail part of the preset delay buffer, and then the corresponding audio and video stream data is removed from the head part of the preset delay buffer at the same speed as the writing speed; in this way, the audio and video stream data in the preset delay buffer can be updated in real time; it can be understood that the audio and video stream data of the main input source can be directly pushed to the live broadcast platform for playing through the pusher after being processed through the preset delay buffer; therefore, when the input source of the live broadcast platform is switched from the standby input source to the main input source, the audio and video stream data can be directly obtained from the preset delay buffer for live broadcast, the audio and video stream data of the main input source is not required to be subjected to delay processing through the preset delay buffer, so that a viewer can timely see the picture of the main input source, the live broadcast effect can be improved, and the fault tolerance of live broadcast can be ensured.
The embodiment of the present application will be described in detail with reference to the structural schematic diagram shown in fig. 5, including:
it will be appreciated that the director may have several primary input sources, such as primary stream 1 and primary stream 2 in the figure. In such a case, an embodiment of the present application may include: when a plurality of main input sources exist, audio and video stream data of a corresponding number of main input sources are written into corresponding preset delay buffers based on preset delay time, so that the audio and video stream data in the corresponding preset delay buffers are played when one main input source is switched to the other main input source. Specifically, delay buffering processing is needed to be performed on audio and video stream data of a main input source, and it should be noted that delay time can be set to be X seconds before live broadcasting begins, delay time of each guiding and broadcasting station is set independently, and can not be changed when running after setting, and time for buffering audio and video stream data of different main input sources is hard consistent with delay time of a corresponding guiding and broadcasting station. It can be understood that before the buffering time of the audio and video stream data in the preset delay buffer memory does not reach X seconds, the audio and video stream data in the preset delay buffer memory is not required to be pushed to the live broadcast platform, and at this time, the live broadcast platform is in a state of no live broadcast stream, namely no live broadcast. When switching from the first main input source to the second main input source, corresponding audio and video stream data can be directly obtained from a preset delay buffer corresponding to the second main input source through a pusher, and the corresponding audio and video stream data is pushed to a live broadcast platform for playing; when the main input sources are switched, the audio and video stream data required by live broadcasting can be switched seamlessly through the preset delay buffer memory, the used audio and video stream data can be ensured to be the audio and video stream data after delay processing, and the fault tolerance of the live broadcasting can be improved.
It should be noted that, when the live broadcast input source is switched from the main input source to the standby input source, the audio and video stream data of the standby input source can be obtained through the pusher and pushed to the live broadcast platform for live broadcast; meanwhile, the audio and video stream data updated currently by each main input source can be subjected to delay buffer processing, namely the audio and video stream data in the corresponding preset delay buffer memory are updated by utilizing the audio and video stream data updated currently by the main input source in time, so that the audio and video stream data consistent with the preset delay time can be ensured to be always in the preset delay buffer memory, when the live broadcast input source is switched from the standby input source to the main input source, the audio and video stream data in the corresponding preset delay buffer memory can be directly called, the live broadcast picture is not interrupted, and the situation of live broadcast picture interruption caused by the delay buffer memory after the live broadcast input source is switched is avoided.
Further, in a specific embodiment, the method may further include: after the current main input source is abnormally cut off, the guide table triggers alarm information so as to prompt a worker to switch the input source. Specifically, when the main input source is abnormal, the corresponding alarm can be triggered by the broadcasting guide table, including but not limited to, sound, characters, flashing and other modes, so that after the staff knows, the input source can be actively switched in time; it can be understood that under the condition of time-delay buffering, the condition that live broadcasting picture stops black screen can not appear in live broadcasting cutoff in a short time, and staff can follow up live broadcasting picture after timely switching input sources, so that the experience of audiences can not be influenced.
Therefore, in the embodiment of the application, when facing a plurality of main input sources, the audio and video stream data of the main input sources are cached by utilizing the corresponding number of preset delay caches, and when switching from one main input source to another main input source, the audio and video stream data can be timely obtained from the corresponding preset delay caches for live broadcasting; when the main input source is abnormal, an alarm can be triggered through the broadcasting guide table in time to remind a worker to switch the input source in time, and the main input source is delayed and cached, so that the live broadcast picture is not interrupted due to short-time abnormality of the main input source, and the watching experience of a spectator is not influenced; and when the standby input source is used for live broadcasting, the current updated audio and video stream data of the main input source can be subjected to delay processing at the same time, so that when the standby input source is switched to the main input source, the audio and video stream data of the main input source after delay processing can be ensured to be used, the situation of live broadcasting picture interruption caused by delay buffering after the standby input source is switched to the main input source is avoided, and the audience experience can be improved.
As shown in fig. 6, this embodiment discloses an audio/video stream data pushing device, including:
the data caching module 11 is configured to write audio and video stream data of a main input source into a preset delay cache, and mark that the preset delay cache is available after a total duration of the audio and video stream data in the preset delay cache is not less than a preset delay time;
the first playing module 12 is configured to obtain, if the current input source is the main input source, audio/video stream data to be played from the preset delay buffer that is marked as available through circulation of a pusher, and push the audio/video stream data to be played to a corresponding live platform for playing;
the second playing module 13 is configured to push, by using the pusher, audio and video stream data transmitted by the standby input source to the live broadcast platform for playing if the current input source is the standby input source;
and the buffer updating module 14 is configured to update the data in the preset delay buffer by using the currently acquired audio and video stream data of the main input source when the current input source is a standby input source.
Therefore, the application can update the audio and video stream data in the preset delay cache by utilizing the audio and video stream data of the main input source while using the standby input source; therefore, the audio and video stream data in the preset delay cache can be kept to be the latest part of audio and video stream data in the main input source at any time; when the standby input source is switched to the main input source, the audio and video stream data of the main input source in the preset delay buffer can be directly pushed to the live broadcast platform; therefore, a viewer can see the picture of the main input source in time, and pushing of audio and video stream data which is not subjected to delay cache processing can be avoided, so that the probability of live broadcast accidents can be reduced.
In a specific embodiment, the first playing module 12 may include:
the audio/video stream data to be played is acquired from the preset delay buffer which is marked as available through the impeller circulation;
the data marking unit is used for marking a time stamp on the audio and video stream data to be played to obtain marked audio and video stream data;
and the first data pushing unit is used for pushing the marked audio and video data to the live broadcast platform for playing.
In a specific embodiment, the cache update module 14 may include:
the data writing unit is used for writing the currently acquired audio and video stream data of the main input source into the tail part of the preset delay buffer;
and the data removing unit is used for removing corresponding audio and video stream data from the head of the preset delay buffer based on the same writing speed.
In a specific embodiment, the second playing module 13 may further include:
and the window playing unit is used for adding a window for playing the audio and video stream data in the preset delay cache in the picture of the guide table so that a worker can check the picture of the main input source and perform the switching operation of the input source.
In a specific embodiment, the second playing module 13 may include:
the data coding unit is used for re-coding the audio and video stream data of the standby input source by utilizing coding parameters corresponding to the main input source when the current input source is switched from the main input source to the standby input source, so as to obtain coded audio and video stream data;
and the second data pushing unit is used for pushing the encoded audio and video stream data to the live broadcast platform for playing through the pusher.
In a specific embodiment, the data buffering module 11 may further include:
and the data caching unit is used for writing the audio and video stream data of the corresponding main input sources into the corresponding preset delay caches based on the preset delay time when the main input sources exist, so that the audio and video stream data in the corresponding preset delay caches are played when one main input source is switched to the other main input source.
In a specific embodiment, the first playing module 12 may further include:
and the abnormal alarming unit is used for triggering alarming information through the broadcasting guide table after the current main input source is abnormally cut off so as to prompt a worker to switch the input source.
Further, the embodiment of the present application further discloses an electronic device, and fig. 7 is a block diagram of an electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 7 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, where the computer program is loaded and executed by the processor 21 to implement relevant steps in the audio/video stream data pushing method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and computer programs 222, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the audio-visual stream data pushing method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the application also discloses a computer readable storage medium for storing a computer program; the method for pushing the audio and video stream data is characterized in that the computer program is executed by a processor to realize the method for pushing the audio and video stream data. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing has outlined rather broadly the more detailed description of the application in order that the detailed description of the application that follows may be better understood, and in order that the present principles and embodiments may be better understood; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. The audio and video stream data pushing method is characterized by comprising the following steps of:
writing audio and video stream data of a main input source into a preset delay buffer, and marking that the preset delay buffer is available after the total duration of the audio and video stream data in the preset delay buffer is not less than the preset delay time;
if the current input source is the main input source, circularly acquiring audio and video stream data to be played from the marked available preset delay buffer memory through a pusher, and pushing the audio and video stream data to be played to a corresponding live broadcast platform for playing;
and if the current input source is a standby input source, pushing the audio and video stream data transmitted by the standby input source to the live broadcast platform for playing through the pusher, and updating the data in the preset delay cache by utilizing the currently acquired audio and video stream data of the main input source.
2. The method for pushing audio and video stream data according to claim 1, wherein the step of circularly obtaining audio and video stream data to be played from the preset delay buffer memory marked as available through a pusher and pushing the audio and video stream data to be played to a corresponding live platform for playing includes:
the audio and video stream data to be played is circularly obtained from the preset delay buffer memory which is marked to be available through the impeller, and a time stamp is marked on the audio and video stream data to be played, so that marked audio and video stream data is obtained;
and pushing the marked audio and video stream data to the live broadcast platform for playing.
3. The method for pushing audio and video stream data according to claim 1, wherein updating the data in the preset delay buffer by using the currently acquired audio and video stream data of the main input source comprises:
and writing the currently acquired audio and video stream data of the main input source into the tail part of the preset delay buffer, and removing the corresponding audio and video stream data from the head part of the preset delay buffer based on the same writing speed.
4. The method for pushing audio and video stream data according to claim 1, wherein after pushing the audio and video stream data transmitted by the standby input source to the live platform for playing by the pusher, the method further comprises:
and adding a window for playing the audio and video stream data in the preset delay buffer memory in the picture of the guide table so that a worker can check the picture of the main input source and perform the switching operation of the input source.
5. The method for pushing audio and video stream data according to claim 1, wherein if the current input source is a standby input source, pushing, by the pusher, the audio and video stream data transmitted by the standby input source to the live platform for playing, includes:
when a current input source is switched from the main input source to the standby input source, recoding audio and video stream data of the standby input source by utilizing coding parameters corresponding to the main input source to obtain coded audio and video stream data;
and pushing the encoded audio and video stream data to the live broadcast platform for playing through the pusher.
6. The audio-video stream data pushing method according to claim 1, further comprising:
when a plurality of main input sources exist, audio and video stream data of a corresponding number of main input sources are written into corresponding preset delay buffers based on preset delay time, so that the audio and video stream data in the corresponding preset delay buffers are played when one main input source is switched to the other main input source.
7. The audio-video stream data pushing method according to any one of claims 1 to 6, further comprising:
after the current main input source is abnormally cut off, the guide table triggers alarm information so as to prompt a worker to switch the input source.
8. An audio and video stream data pushing device, comprising:
the data caching module is used for writing the audio and video stream data of the main input source into a preset delay cache, and marking the preset delay cache as available after the total duration of the audio and video stream data in the preset delay cache is not less than the preset delay time;
the first playing module is used for circularly acquiring audio and video stream data to be played from the preset delay buffer memory which is marked as available through a pusher and pushing the audio and video stream data to be played to a corresponding live platform for playing if the current input source is the main input source;
the second playing module is used for pushing the audio and video stream data transmitted by the standby input source to the live broadcast platform for playing through the pusher if the current input source is the standby input source;
and the buffer updating module is used for updating the data in the preset delay buffer by utilizing the currently acquired audio and video stream data of the main input source when the current input source is a standby input source.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the audio-video stream data pushing method as claimed in any one of claims 1 to 7.
10. A computer readable storage medium for storing a computer program which, when executed by a processor, implements the audio video stream data pushing method according to any one of claims 1 to 7.
CN202310269315.5A 2023-03-16 2023-03-16 Audio and video stream data pushing method, device, equipment and storage medium Pending CN116600067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310269315.5A CN116600067A (en) 2023-03-16 2023-03-16 Audio and video stream data pushing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310269315.5A CN116600067A (en) 2023-03-16 2023-03-16 Audio and video stream data pushing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116600067A true CN116600067A (en) 2023-08-15

Family

ID=87603356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310269315.5A Pending CN116600067A (en) 2023-03-16 2023-03-16 Audio and video stream data pushing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116600067A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106454433A (en) * 2016-10-20 2017-02-22 央视国际网络无锡有限公司 Live broadcast signal delay processing method and apparatus
CN108012161A (en) * 2017-11-10 2018-05-08 广州华多网络科技有限公司 Net cast method, system and terminal device
CN108965918A (en) * 2018-07-19 2018-12-07 腾讯科技(深圳)有限公司 streaming media processing method, device, system and computer readable storage medium
CN111918096A (en) * 2020-07-21 2020-11-10 上海网达软件股份有限公司 Method, device and equipment for fast switching input source of cloud director and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106454433A (en) * 2016-10-20 2017-02-22 央视国际网络无锡有限公司 Live broadcast signal delay processing method and apparatus
CN108012161A (en) * 2017-11-10 2018-05-08 广州华多网络科技有限公司 Net cast method, system and terminal device
CN108965918A (en) * 2018-07-19 2018-12-07 腾讯科技(深圳)有限公司 streaming media processing method, device, system and computer readable storage medium
CN111918096A (en) * 2020-07-21 2020-11-10 上海网达软件股份有限公司 Method, device and equipment for fast switching input source of cloud director and storage medium

Similar Documents

Publication Publication Date Title
CN111918093B (en) Live broadcast data processing method and device, computer equipment and storage medium
US20210247883A1 (en) Digital Media Player Behavioral Parameter Modification
KR101548718B1 (en) Method and apparatus for masking signal loss
CN108769727B (en) Live video preloading method and device
CN111316659B (en) Dynamically reducing playout of alternate content to help align the end of alternate content with the end of replaced content
US10250917B1 (en) Inserting secondary content after pause in delivery
US10863247B2 (en) Receiving device and data processing method
AU2011221734B2 (en) Apparatus and method for recording and playing a media file, and a recording medium therefor
CN112822503B (en) Method, device and equipment for playing live video stream and storage medium
CN102077602A (en) Interval based ad insertion used for the delivery of video streams
CN112752109B (en) Video playing control method and system
WO2010151283A1 (en) Font data streaming
CN105704568A (en) Method and device for realizing live broadcast time shifting
CN112087642B (en) Cloud guide playing method, cloud guide server and remote management terminal
CN107690093B (en) Video playing method and device
CN105025344A (en) Inter-cut method and device
CN113225585A (en) Video definition switching method and device, electronic equipment and storage medium
CN114245153B (en) Slicing method, slicing device, slicing equipment and readable storage medium
CN109040018B (en) Data matching method and device, display terminal and readable storage medium
CA2969987C (en) Providing media data to a media player on board a vehicle
CN107306356A (en) Video information describes file acquisition method and content distributing server, set top box, system
CN116600067A (en) Audio and video stream data pushing method, device, equipment and storage medium
CN115484494B (en) Digital twin video stream processing method, device and equipment
CA3187273A1 (en) Systems and methods for content item insertion
CN113395531B (en) Play switching method and device, electronic equipment and computer readable storage medium

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