CN114245179A - Audio and video conversion method and device and electronic equipment - Google Patents

Audio and video conversion method and device and electronic equipment Download PDF

Info

Publication number
CN114245179A
CN114245179A CN202111604717.3A CN202111604717A CN114245179A CN 114245179 A CN114245179 A CN 114245179A CN 202111604717 A CN202111604717 A CN 202111604717A CN 114245179 A CN114245179 A CN 114245179A
Authority
CN
China
Prior art keywords
rtmp
stream
code stream
openresty
submodule
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
CN202111604717.3A
Other languages
Chinese (zh)
Inventor
戴林
米松
韩远国
齐东伟
刘乐
魏云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tiandy Technologies Co Ltd
Original Assignee
Tiandy Technologies 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 Tiandy Technologies Co Ltd filed Critical Tiandy Technologies Co Ltd
Priority to CN202111604717.3A priority Critical patent/CN114245179A/en
Publication of CN114245179A publication Critical patent/CN114245179A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/233Processing of audio elementary 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/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
    • 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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols

Landscapes

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

Abstract

The invention provides an audio and video conversion method, an audio and video conversion device and electronic equipment, belongs to the technical field of audio and video, and solves the problem that a private audio and video cannot be played in an existing video player. The method comprises the following steps: the OpenResty submodule receives a pull flow request from a client; the OpenResty submodule creates an RTMP session corresponding to the pull flow request; sending a stream pulling request to a stream pushing terminal module through the Lua; the stream pushing terminal module pulls a private code stream from the streaming media server according to a stream pulling parameter of the stream pulling request; the stream pushing terminal module encodes the private code stream into an RTMP code stream through FFMPEG and sends the RTMP code stream to the OpenResty submodule; the OpenResty submodule searches for an RTMP session corresponding to the RTMP code stream and distributes the RTMP code stream to the RTMP session; the RTMP session packages the RTMP code stream into an HTTP form and sends the HTTP form to the client through the HTTP long link.

Description

Audio and video conversion method and device and electronic equipment
Technical Field
The invention relates to the technical field of audio and video, in particular to an audio and video conversion method, an audio and video conversion device and electronic equipment.
Background
As FLASH memory (FLASH memory) plug-ins are gradually eliminated from the market, a low-latency Real Time Messaging Protocol (RTMP) is no longer available, and the RTMP requires a dedicated Transmission Control Protocol (TCP) port, which may be blocked by a firewall and cannot be opened in some network environments.
The plug-ins provided by manufacturers not only require users to install plug-ins of different versions in different browsers, but also cannot be viewed on a mobile phone or a tablet personal computer (PAD), so that the user operation is increased, potential safety hazards are possibly introduced, and meanwhile, manufacturers also need to maintain a plurality of proprietary video plug-in versions for different browsers, even the same browser. Therefore, the existing video player has the problem that private audio and video cannot be played.
Disclosure of Invention
The invention aims to provide an audio and video conversion method, an audio and video conversion device and electronic equipment, and solves the problem that a private audio and video cannot be played in an existing video player.
In a first aspect, the present invention provides an audio/video conversion method applied to an SMPS (symmetric multi-processor system) transcoding service, the method including:
the OpenResty submodule receives a pull flow request from a client;
the OpenResty submodule creates an RTMP session corresponding to the pull flow request;
sending a stream pulling request to a stream pushing terminal module through the Lua;
the stream pushing terminal module pulls a private code stream from the streaming media server according to a stream pulling parameter of the stream pulling request;
the stream pushing terminal module encodes the private code stream into an RTMP code stream through FFMPEG (fast Forward mpeg), and sends the RTMP code stream to the OpenResty submodule;
the OpenResty submodule searches for an RTMP session corresponding to the RTMP code stream and distributes the RTMP code stream to the RTMP session;
the RTMP session encapsulates the RTMP code stream into an HTTP (Hyper Text Transfer Protocol) form and sends the HTTP code stream to the client through the HTTP long link.
Further, after the step of receiving the pull request from the client by the OpenResty sub-module, the method further includes:
checking the legality of the client parameter of the pull flow request;
if the client is illegal, the client replies the pull loss information;
and if the RTMP session is legal, the OpenResty submodule creates the RTMP session corresponding to the pull flow request.
Further, before the step of sending the pull flow request to the push flow terminal module through the Lua, the method further includes:
judging whether the same pull flow request exists or not;
if so, adding the RTMP session into an RTMP distribution list;
and if not, sending the pull flow request to the push flow terminal module through the Lua.
Further, before the step of pulling the private code stream from the streaming media server according to the stream pulling parameter of the stream pulling request, the stream pushing terminal module further includes:
the push flow terminal module judges whether the same pull flow request exists or not;
if yes, restoring the pull loss information of the OpenResty submodule;
if not, the step that the stream pushing terminal module pulls the private code stream from the streaming media server according to the stream pulling parameter of the stream pulling request is carried out.
Further, before the step of encoding the private code stream into an RTMP code stream by the stream pushing terminal module through FFMPEG and sending the RTMP code stream to the OpenResty sub-module, the method further includes:
judging whether the format of the private code stream meets the coding requirement or not;
if not, replying the pull loss failure information of the OpenResty submodule;
and if so, encoding the private code stream into an RTMP code stream by the stream pushing terminal module through FFMPEG, and sending the RTMP code stream to the OpenResty submodule.
Further, the step of encoding the private code stream into the RTMP code stream by the stream pushing terminal module through FFMPEG includes:
the stream pushing terminal module extracts H264 bare stream and AAC frame data from the private code stream;
the H264 bare stream and the AAC frame data are encoded into an RTMP code stream by FFMPEG.
In a second aspect, the present invention further provides an audio/video conversion apparatus, which is applied to SMPS transcoding services, and the apparatus includes an OpenResty sub-module and a stream pushing terminal module;
the OpenResty submodule is used for receiving a pull flow request from a client; creating an RTMP session corresponding to the pull flow request; sending a stream pulling request to a stream pushing terminal module through the Lua;
the stream pushing terminal module is used for pulling a private code stream from the streaming media server according to a stream pulling parameter of the stream pulling request; encoding the private code stream into an RTMP code stream through FFMPEG, and sending the RTMP code stream to the OpenResty submodule;
the OpenResty submodule is also used for searching the RTMP session corresponding to the RTMP code stream and distributing the RTMP code stream to the RTMP session; the RTMP session packages the RTMP code stream into an HTTP form and sends the HTTP form to the client through the HTTP long link.
In a third aspect, the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program operable on the processor, and the processor implements the steps of the above method when executing the computer program.
In a fourth aspect, the present invention also provides a computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to carry out the method described above.
The audio and video conversion method provided by the invention has the advantages that the OpenResty submodule of the SMPS can receive the pull flow request in the form of HTTP from the client, the OpenResty submodule creates RTMP conversation corresponding to the pull flow request, and then the pull flow request is sent to the push flow terminal (SMPS _ pusher) submodule through Lua. The stream pushing terminal module pulls the private code stream from the streaming media server according to the stream pulling parameter of the stream pulling request, codes the private code stream into an RTMP code stream through FFMPEG, and sends the RTMP code stream to the OpenResty submodule. The OpenResty submodule searches for an RTMP session corresponding to the RTMP code stream, and the RTMP session packages the RTMP code stream into an HTTP form and sends the HTTP form to the client through an HTTP long link. The client can realize taking out the FLV code stream from the HTTP long link by virtue of the flv.js open source player, decode the FLV code stream, package the FLV code stream into an mp4 format, and send the MP4 format to a standard HTML5 MSE (media source extensions) interface for playing, thereby realizing the playing of private videos and solving the problem that the existing video player cannot play the private videos and audios.
Accordingly, the audio/video conversion device, the electronic device and the computer-readable storage medium provided by the embodiment of the invention also have the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of an audio/video conversion method according to embodiment 1 of the present invention;
fig. 2 is a flowchart of an audio/video conversion method according to embodiment 2 of the present invention;
fig. 3 is a schematic diagram of an audio/video conversion device provided in embodiment 3 of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "comprising" and "having," and any variations thereof, as referred to in embodiments of the present invention, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1:
an embodiment of the present invention provides an audio/video conversion method, which can be applied to SMPS transcoding services, and as shown in fig. 1, the method includes the following steps:
s1: the OpenResty submodule receives a pull request from a client.
S2: the OpenResty submodule creates an RTMP session corresponding to the pull request.
S3: and sending the pull flow request to the push flow terminal module through the Lua.
S4: and the stream pushing terminal module pulls the private code stream from the streaming media server according to the stream pulling parameter of the stream pulling request.
S5: the stream pushing terminal module encodes the private code stream into an RTMP code stream through FFMPEG and sends the RTMP code stream to the OpenResty submodule.
S6: and the OpenResty submodule searches for the RTMP session corresponding to the RTMP code stream and distributes the RTMP code stream to the RTMP session.
S7: the RTMP session packages the RTMP code stream into an HTTP form and sends the HTTP form to the client through the HTTP long link.
The audio and video conversion method provided by the invention utilizes the OpenResty submodule of the SMPS to be capable of receiving the pull stream request in the form of HTTP from the client, then pulls the private code stream from the streaming media server through the push stream terminal module according to the pull stream parameter of the pull stream request, codes the private code stream into the RTMP code stream, and then sends the RTMP code stream to the client through the long HTTP chain by the OpenResty submodule. The client can realize taking out the FLV code stream from the HTTP long link by virtue of the flv.js open source player, decode the FLV code stream, package the FLV code stream into an mp4 format, and send the MP4 format to a standard HTML5 MSE (media source extensions) interface for playing, thereby realizing the playing of private videos and solving the problem that the existing video player cannot play the private videos and audios.
Example 2:
an embodiment of the present invention provides another implementation manner of an audio/video conversion method, and as shown in fig. 2, the method includes the following steps:
s201: the OpenResty submodule receives a pull request from a client.
The OpenResty submodule of the SMPS is based on the Lua extension of the standard Nginx, so that the SMPS can accept an HTTP request, and the pull flow request in the embodiment is an HTTP-FLV request initiated by a client FLV.
S202: and checking the legality of the client parameter of the pull flow request.
The OpenResty submodule checks whether a Uniform Resource Locator (URL) parameter of the pull request is legal. If the client is illegal, replying pull loss information (400bad) of the client; if it is legal, the process proceeds to step S203.
S203: the OpenResty submodule creates an RTMP session corresponding to the pull request.
S204: it is determined whether the same pull request already exists.
The OpenResty submodule informs the Lua through a notification mechanism of the nginx-HTTP-FLV-module, the Lua analyzes the HTTP URL of the pull request to extract the pull parameters, and judges whether the same HTTP-FLV request exists before. If the RTMP code stream exists, adding the RTMP session created by the OpenResty sub-module into an RTMP distribution list, adding one to the reference count, receiving the RTMP code stream, distributing the RTMP session, and then performing step S211; if not, step S205 is performed.
S205: and sending the pull flow request to the push flow terminal module through the Lua.
And the Lua sends the stream pulling request to a stream pushing terminal module of the SMPS transcoding service, and further informs the stream pushing terminal module to pull the private format code stream.
S206: the push flow terminal module judges whether the same pull flow request exists.
And after receiving the pull request sent by the OPENTESTY sub-module, the push terminal module judges whether the pull request exists before. If the client side is existed, the OpenResty submodule replies the loss information of the OpenResty submodule, and then the OpenResty submodule replies the loss information of the client side; if not, step S207 is performed.
S207: and the stream pushing terminal module pulls the private code stream from the streaming media server according to the stream pulling parameter of the stream pulling request.
S208: and judging whether the format of the private code stream meets the coding requirement.
And after the stream pushing terminal module pulls the private code stream, judging whether the video format of the private code stream is in an H264 format or not and whether the audio format is in an AAC format or not. If not, the OpenResty submodule replies the loss information of the client, and then the OpenResty submodule replies the loss information of the client; if yes, go to step S209.
S209: the stream pushing terminal module encodes the private code stream into an RTMP code stream through FFMPEG and sends the RTMP code stream to the OpenResty submodule.
The stream pushing terminal module extracts H264 bare stream and AAC frame data from the private code stream, then transfers the H264 bare stream and AAC frame data to FFMPEG, encodes standard H264(AVC) data and standard AAC data into RTMP code stream through FFMPEG, and the FFMPEG plays a role of RTMP publishing in the step.
And then the stream pushing terminal module pushes the RTMP code stream to the nginx-http-flv-module of the OpenResty submodule in the form of an RTMP protocol.
S210: and the OpenResty submodule searches for the RTMP session corresponding to the RTMP code stream and distributes the RTMP code stream to the RTMP session.
And the nginx-http-flv-module of the OpenResty submodule distributes the RTMP code stream to a corresponding subscriber RTMP session according to the RTMP distribution list according to the description of the RTMP protocol.
S211: the RTMP session packages the RTMP code stream into an HTTP form and sends the HTTP form to the client through the HTTP long link.
Because the nginx-HTTP-FLV-module is based on the extension of the nginx-RTMP-module, the RTMP code stream received by the nginx-RTMP-module can be encapsulated into the HTTP long link and sent to the client flv.js, the client can take out the FLV code stream from the HTTP long link by virtue of a flv.js open-source player, the FLV decoding and the mp4 re-encoding are carried out, and the mp4 is handed to the HTML MSE interface for playing.
The embodiment of the invention receives the pull stream request through the HTTP-FLV, realizes the playing of the private video and solves the problem that the existing video player can not play the private audio and video. Compared with RTMP, the HTTP-FLV is the same as the transport format of the code stream, and is the FLV format. RTMP requires a dedicated TCP port that may not be opened by a firewall in some network environments while HTTP-FLV uses the HTTP generic 80 port, which is typically open. Compared with the HLS (HTTP Live streaming) protocol which can play the video without any plug-in, the HTTP-FLV does not need slicing to generate the M3U8 file, and the low-delay effect same as that of RTMP can be achieved.
Example 3:
the embodiment of the invention provides an audio and video conversion device which is applied to SMPS transcoding service. As shown in fig. 3, the apparatus includes an openreserve sub-module 1 and a push terminal module 2.
The OpenResty submodule 1 is configured to receive a pull request from the client 3; creating an RTMP session corresponding to the pull flow request; the pull request is sent to the push terminal module 2 via the Lua.
The stream pushing terminal module 2 is used for pulling a private code stream from the streaming media server 4 according to a stream pulling parameter of the stream pulling request; and encoding the private code stream into an RTMP code stream through FFMPEG, and sending the RTMP code stream to the OpenResty submodule 1.
The OpenResty submodule 1 is also used for searching an RTMP session corresponding to the RTMP code stream and distributing the RTMP code stream to the RTMP session; the RTMP session encapsulates the RTMP code stream into an HTTP form and sends the HTTP form to the client 3 through the HTTP long link.
The audio/video conversion device provided by the embodiment of the invention has the same technical characteristics as the audio/video conversion method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program that can be run on the processor, and the processor implements the steps of the method when executing the computer program.
In accordance with the above method, embodiments of the present invention also provide a computer readable storage medium storing machine executable instructions, which when invoked and executed by a processor, cause the processor to perform the steps of the above method.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; and the modifications, changes or substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. An audio/video conversion method applied to an SMPS transcoding service, the method comprising:
the OpenResty submodule receives a pull flow request from a client;
the OpenResty submodule creates an RTMP session corresponding to the pull flow request;
sending a stream pulling request to a stream pushing terminal module through the Lua;
the stream pushing terminal module pulls a private code stream from the streaming media server according to a stream pulling parameter of the stream pulling request;
the stream pushing terminal module encodes the private code stream into an RTMP code stream through FFMPEG and sends the RTMP code stream to the OpenResty submodule;
the OpenResty submodule searches for an RTMP session corresponding to the RTMP code stream and distributes the RTMP code stream to the RTMP session;
the RTMP session packages the RTMP code stream into an HTTP form and sends the HTTP form to the client through the HTTP long link.
2. The method of claim 1, wherein after the step of the OpenResty submodule receiving a pull request from a client, the method further comprises:
checking the legality of the client parameter of the pull flow request;
if the client is illegal, the client replies the pull loss information;
and if the RTMP session is legal, the OpenResty submodule creates the RTMP session corresponding to the pull flow request.
3. The method of claim 1, wherein prior to the step of sending a pull request to a push terminal module via Lua, further comprising:
judging whether the same pull flow request exists or not;
if so, adding the RTMP session into an RTMP distribution list;
and if not, sending the pull flow request to the push flow terminal module through the Lua.
4. The method according to claim 1, wherein before the step of pulling the private codestream from the streaming media server by the stream pushing terminal module according to the stream pulling parameter of the stream pulling request, the method further comprises:
the push flow terminal module judges whether the same pull flow request exists or not;
if yes, restoring the pull loss information of the OpenResty submodule;
if not, the step that the stream pushing terminal module pulls the private code stream from the streaming media server according to the stream pulling parameter of the stream pulling request is carried out.
5. The method of claim 1, wherein before the step of encoding the private code stream into the RTMP code stream by the stream pushing terminal module through FFMPEG and sending the RTMP code stream to the OpenResty sub-module, the method further comprises:
judging whether the format of the private code stream meets the coding requirement or not;
if not, replying the pull loss failure information of the OpenResty submodule;
and if so, encoding the private code stream into an RTMP code stream by the stream pushing terminal module through FFMPEG, and sending the RTMP code stream to the OpenResty submodule.
6. The method of claim 1, wherein the step of the stream pushing terminal module encoding the private code stream into the RTMP code stream by FFMPEG comprises:
the stream pushing terminal module extracts H264 bare stream and AAC frame data from the private code stream;
the H264 bare stream and the AAC frame data are encoded into an RTMP code stream by FFMPEG.
7. An audio/video conversion device is applied to SMPS transcoding service, and comprises an OpenResty sub-module and a plug flow terminal module;
the OpenResty submodule is used for receiving a pull flow request from a client; creating an RTMP session corresponding to the pull flow request; sending a stream pulling request to a stream pushing terminal module through the Lua;
the stream pushing terminal module is used for pulling a private code stream from the streaming media server according to a stream pulling parameter of the stream pulling request; encoding the private code stream into an RTMP code stream through FFMPEG, and sending the RTMP code stream to the OpenResty submodule;
the OpenResty submodule is also used for searching the RTMP session corresponding to the RTMP code stream and distributing the RTMP code stream to the RTMP session; the RTMP session packages the RTMP code stream into an HTTP form and sends the HTTP form to the client through the HTTP long link.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and wherein the processor implements the steps of the method of any of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 6.
CN202111604717.3A 2021-12-24 2021-12-24 Audio and video conversion method and device and electronic equipment Pending CN114245179A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111604717.3A CN114245179A (en) 2021-12-24 2021-12-24 Audio and video conversion method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111604717.3A CN114245179A (en) 2021-12-24 2021-12-24 Audio and video conversion method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114245179A true CN114245179A (en) 2022-03-25

Family

ID=80762942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111604717.3A Pending CN114245179A (en) 2021-12-24 2021-12-24 Audio and video conversion method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114245179A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120265901A1 (en) * 2011-04-15 2012-10-18 Skyfire Labs, Inc. Real-Time Video Optimizer
CN106791931A (en) * 2017-01-05 2017-05-31 上海浦东软件园汇智软件发展有限公司 A kind of method and apparatus of data flow transcoding
CN109495505A (en) * 2018-12-21 2019-03-19 北京金山云网络技术有限公司 Stream media protocol conversion method, device, system and computer-readable medium
CN111225222A (en) * 2018-11-26 2020-06-02 北京奇虎科技有限公司 Video stream playing method, device and system based on screen data of RTMP (real time Messaging protocol)
CN112995714A (en) * 2021-04-08 2021-06-18 天津天地伟业智能安全防范科技有限公司 Method and device for converting private video stream into RTMP standard stream

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120265901A1 (en) * 2011-04-15 2012-10-18 Skyfire Labs, Inc. Real-Time Video Optimizer
CN106791931A (en) * 2017-01-05 2017-05-31 上海浦东软件园汇智软件发展有限公司 A kind of method and apparatus of data flow transcoding
CN111225222A (en) * 2018-11-26 2020-06-02 北京奇虎科技有限公司 Video stream playing method, device and system based on screen data of RTMP (real time Messaging protocol)
CN109495505A (en) * 2018-12-21 2019-03-19 北京金山云网络技术有限公司 Stream media protocol conversion method, device, system and computer-readable medium
CN112995714A (en) * 2021-04-08 2021-06-18 天津天地伟业智能安全防范科技有限公司 Method and device for converting private video stream into RTMP standard stream

Similar Documents

Publication Publication Date Title
US20130042100A1 (en) Method and apparatus for forced playback in http streaming
US9882951B2 (en) Method and device for playing streaming media, and non-transitory storage medium
KR102321859B1 (en) Method and apparatus for streaming media data using java script
CN112738644B (en) Video stream transmission method and device based on WebRTC
WO2020211731A1 (en) Video playing method and related device
US8997199B2 (en) Token-based security for links to media streams
CN109587514B (en) Video playing method, medium and related device
CA3041699A1 (en) Base linear stream creater for personalized channels
CN105516736B (en) Video file processing method and device
US9047482B2 (en) Token-based security for links to media streams
WO2015192683A1 (en) Content distribution method, device and system based on adaptive streaming technology
CN112954457A (en) Video playing and displaying method, device and system
US20160373498A1 (en) Media-timed web interactions
CN112995698A (en) Video playing method, client, service platform and intelligent conference system
US10750248B1 (en) Method and apparatus for server-side content delivery network switching
CN108737355B (en) Streaming media playback based on user bandwidth
US20140201368A1 (en) Method and apparatus for enforcing behavior of dash or other clients
US10531135B2 (en) Network recording apparatus
CN114245179A (en) Audio and video conversion method and device and electronic equipment
US11425433B2 (en) Content delivery control apparatus, content delivery control method, program, and content delivery control system
WO2019193991A1 (en) Distribution device, distribution method and program
US10547878B2 (en) Hybrid transmission protocol
CN107707966B (en) Multimedia data playing method and device
CN115134664A (en) Real-time video stream playing method and system and nonvolatile storage medium
CN111787417B (en) Audio and video transmission control method based on artificial intelligence AI and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220325