CN116456125A - Online audio/video playing method, system and computer readable storage medium - Google Patents

Online audio/video playing method, system and computer readable storage medium Download PDF

Info

Publication number
CN116456125A
CN116456125A CN202310091835.1A CN202310091835A CN116456125A CN 116456125 A CN116456125 A CN 116456125A CN 202310091835 A CN202310091835 A CN 202310091835A CN 116456125 A CN116456125 A CN 116456125A
Authority
CN
China
Prior art keywords
audio
format
video
online
playing
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
CN202310091835.1A
Other languages
Chinese (zh)
Inventor
徐素
李珂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Haiyangwang Petroleum Lighting Technology Co ltd
Shenzhen Haiyangwang Power Grid Lighting Technology Co ltd
Shenzhen Haiyangwang Railway Lighting Technology Co ltd
Shenzhen Ocean King Green Lighting Technology Co ltd
Shenzhen Ocean King Metallurgical Lighting Technology Co ltd
Shenzhen Ocean King Petrochemical Lighting Technology Co ltd
Shenzhen Ocean King Ship Venue Lighting Technology Co ltd
Shenzhen Ocean Wanggongxiao Lighting Technology Co ltd
Oceans King Lighting Science and Technology Co Ltd
Oceans King Dongguan Lighting Technology Co Ltd
Shenzhen Oceans King Lighting Engineering Co Ltd
Original Assignee
Shenzhen Haiyangwang Petroleum Lighting Technology Co ltd
Shenzhen Haiyangwang Power Grid Lighting Technology Co ltd
Shenzhen Haiyangwang Railway Lighting Technology Co ltd
Shenzhen Ocean King Green Lighting Technology Co ltd
Shenzhen Ocean King Metallurgical Lighting Technology Co ltd
Shenzhen Ocean King Petrochemical Lighting Technology Co ltd
Shenzhen Ocean King Ship Venue Lighting Technology Co ltd
Shenzhen Ocean Wanggongxiao Lighting Technology Co ltd
Oceans King Lighting Science and Technology Co Ltd
Oceans King Dongguan Lighting Technology Co Ltd
Shenzhen Oceans King Lighting Engineering 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 Shenzhen Haiyangwang Petroleum Lighting Technology Co ltd, Shenzhen Haiyangwang Power Grid Lighting Technology Co ltd, Shenzhen Haiyangwang Railway Lighting Technology Co ltd, Shenzhen Ocean King Green Lighting Technology Co ltd, Shenzhen Ocean King Metallurgical Lighting Technology Co ltd, Shenzhen Ocean King Petrochemical Lighting Technology Co ltd, Shenzhen Ocean King Ship Venue Lighting Technology Co ltd, Shenzhen Ocean Wanggongxiao Lighting Technology Co ltd, Oceans King Lighting Science and Technology Co Ltd, Oceans King Dongguan Lighting Technology Co Ltd, Shenzhen Oceans King Lighting Engineering Co Ltd filed Critical Shenzhen Haiyangwang Petroleum Lighting Technology Co ltd
Priority to CN202310091835.1A priority Critical patent/CN116456125A/en
Publication of CN116456125A publication Critical patent/CN116456125A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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
    • H04N21/2335Processing of audio elementary streams involving reformatting operations of audio signals, e.g. by converting from one coding standard to another
    • 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/23424Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for inserting or substituting an advertisement
    • 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
    • H04N21/234309Processing 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 by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the application discloses an audio and video online playing method, an audio and video online playing system and a computer readable storage medium. The method applied to the back end comprises the following steps of: acquiring a recorded video file and a recorded audio file; the method comprises the steps of connecting with the front end, and determining an online playing format of which the front end can play audio and video files; combining the recorded video file and the recorded audio file into an audio-video file, wherein the format of the audio-video file corresponds to the online playable format; and sending the audio and video files to the front end so that the front end plays the audio and video files online. Therefore, the method and the device can determine the online playing format which can support online playing at the front end in advance, and then combine the audio and the video into the audio and video file with the corresponding format at the rear end to send the audio and video file to the front end for playing, so that users can play and view videos shot by the users or videos acquired by other devices online in real time.

Description

Online audio/video playing method, system and computer readable storage medium
Technical Field
The application belongs to the technical field of audio and video, and particularly relates to an audio and video online playing method, an audio and video online playing system and a computer readable storage medium.
Background
In the prior art, if a user wants to view a video shot by the user himself or acquire videos shot by other devices and play the videos online, the user often needs to go through the processes of audio transcoding, merging, pushing and playing. However, in the prior art, the above steps are all independently operated, and the two steps lack cooperation and collocation, so that the implementation process is complex and complicated, and the problem that the file format received by the user is not corresponding to the file format, so that the file cannot be played or the file is wrongly played is caused. Therefore, how to realize one-stop processing of audio and video to realize online playing is a technical problem to be solved urgently by those skilled in the art.
The foregoing description is provided for general background information and does not necessarily constitute prior art.
Disclosure of Invention
Based on this, it is necessary to provide an audio/video online playing method, an audio/video online playing system and a computer readable storage medium, which can merge recorded video files and audio files into a format that can be played online at the front end, so as to ensure that a user can play videos captured by shooting or other devices online in real time.
The technical problem that this application solved is realized by adopting following technical scheme:
the application provides an audio and video online playing method, which is applied to a back end and comprises the following steps: acquiring a recorded video file and a recorded audio file; the method comprises the steps of connecting with the front end, and determining an online playing format of which the front end can play audio and video files; combining the recorded video file and the recorded audio file into an audio-video file, wherein the format of the audio-video file corresponds to the online playable format; and sending the audio and video files to the front end so that the front end plays the audio and video files online.
In an alternative embodiment of the present application, the online playable format includes a first format and a second format, and determining the online playable format of the audio/video file that can be played by the front end includes: acquiring equipment information of the front end, and judging whether the front end can support playing of the audio and video files in the first format according to the equipment information; when the front end is determined to support playing of the audio and video files in the first format, determining that the online playable format is the first format; and when the front end is determined not to support playing the audio and video files in the first format, determining that the online playable format is the second format.
In an alternative embodiment of the present application, the recorded video file is in a national standard video format, the first format is in flv format, and the second format is in MP4 format.
In an alternative embodiment of the present application, merging a recorded video file and a recorded audio file into an audio-video file includes: transcoding the recorded audio file through a transcoder to obtain an audio stream file; and combining and transcoding the audio stream file and the recorded video file through a transcoder to obtain the audio and video file.
In an alternative embodiment of the present application, the format of the recorded audio file is a pulse code modulation format, and the format of the audio stream file is an advanced audio coding format; the transcoder is a ffmpeg plug-in.
The application also provides an audio and video online playing method which is applied to the front end and comprises the following steps: the method comprises the steps that the method is connected with the rear end, so that the rear end determines an online playing format of an audio and video file which can be played by the front end; acquiring an audio and video file sent by a rear end; the format of the audio and video file corresponds to the online playable format; and playing the audio and video files on line.
In an alternative embodiment of the present application, playing an audio/video file online includes: when the online playable format is the first format, matching the first playing plug-in, and online playing the audio and video file through the first playing plug-in; or when the online playable format is the second format, matching the second playing plug-in, and playing the audio and video file online through the second playing plug-in.
In an optional embodiment of the present application, the first format is flv format, the second format is MP4 format, the first playing plug-in is flv.js plug-in, and the second playing plug-in is h5 native api.
The application also provides an audio and video online playing system, which comprises a front end and a rear end; the front end is used for executing the steps of the audio/video online playing method applied to the front end, which are described above; the back end is used for executing the steps of the audio and video online playing method applied to the back end.
The present application also provides a computer readable storage medium storing a computer program which when executed by a processor implements a method as described above.
By adopting the embodiment of the application, the method has the following beneficial effects:
the method and the device can determine the online playing format which can support online playing by the front end in advance, and then realize that the audio and the video are combined into the audio and video file with the corresponding format at the rear end so as to be sent to the front end for playing. Therefore, the one-stop playing technical scheme of shooting, acquiring, transcoding, merging and playing is realized, the processing efficiency of real-time video playing is improved, users are ensured to play and view videos shot by themselves or videos acquired by other devices on line in real time, and the problems of delay and the like caused by the discomfort of the transcoding format are avoided.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification, so that the foregoing and other objects, features and advantages of the present application can be more clearly understood, and the following detailed description of the preferred embodiments is given with reference to the accompanying drawings. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
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 in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
fig. 1 is a flowchart of an audio/video online playing method applied to a back end according to an embodiment;
fig. 2 is a flowchart of an audio/video online playing method applied to a front end according to an embodiment;
fig. 3 is a block diagram of an audio/video online playing system according to an embodiment;
fig. 4 is a flowchart of an audio/video online playing method applied to an audio/video online playing system according to an embodiment;
fig. 5 is a schematic block diagram of a computer device according to an embodiment.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Example 1
In the prior art, if a user needs to view audio and video, three steps of transcoding audio in a PMCA (Pulse Code Modulation, pulse code coding modulation) format into an ACC format (Advanced Audio Coding, advanced audio coding format), merging an audio file and a video file into an audio and video file, and playing the audio and video file online are often needed. However, the three steps are often performed independently, the implementation process is complex, the shooting equipment and the playing equipment are not unified, and the problem of format incompatibility is often caused in the transcoding process. Therefore, a one-stop technical solution for realizing audio and video transcoding combination and online playing is provided. In this embodiment, the method is applied to the back end, and specifically includes steps S110 to S140, wherein for clarity of description of the method provided in this embodiment, please refer to fig. 1.
Step S110: a recorded video file and a recorded audio file are obtained.
In an implementation manner, the back end of the execution terminal of the present embodiment may specifically be a mobile terminal, a server, or the like, and specifically, the specific form of the mobile terminal may be, for example, but not limited to, a mobile phone, a tablet computer, a personal digital assistant (english: personal digital assistant, abbreviated: PDA), a mobile internet device (english: mobile Internet device, abbreviated: MID), a wearable device (e.g., smart watch), or the like. The mobile terminal can process and display corresponding information through an application program (such as APP) and execute corresponding operation, so that the use efficiency is improved. The obtained recorded video file and recorded audio file are respectively shot by the video recording device and recorded by the audio recording device, and the video recording device and the audio recording device can be the same equipment or different equipment. For example, in the implementation scenario of a web conference, a user of the participant usually uses his own smart phone or notebook computer to participate, and these devices belong to the back end at the same time and include a video recording device and a sound recording device, so that the recorded video file and the recorded audio file can be directly obtained from the local machine. In another embodiment, a plurality of monitors are connected to a single host computer for a monitoring image capturing implementation scene, and each monitor has a video recording device and an audio recording device. In this embodiment, the back-end is a device different from the recording device and the audio recording device, so that the host as the back-end can acquire the recorded video file and the recorded audio file through the connection with the monitor. It is to be understood that the above is a simplified illustration of one embodiment and is not a limitation on the technology.
Step S120: the method is connected with the front end, and determines an online playing format of the front end capable of playing the audio and video files.
In one embodiment, the online playable format includes a first format and a second format. In step S120: the method for determining the online playable format of the audio and video file capable of being played by the front end comprises the following steps: acquiring equipment information of the front end, and judging whether the front end can support playing of the audio and video files in the first format according to the equipment information; when the front end is determined to support playing of the audio and video files in the first format, determining that the online playable format is the first format; and when the front end is determined not to support playing the audio and video files in the first format, determining that the online playable format is the second format.
In an embodiment, the recorded video file is in a national standard video format, the first format is flv format, and the second format is MP4 format.
In one embodiment, the front end connected to the back end is another device with a function distinction, and the specific form may be a mobile terminal, a personal computer, or the like. The main difference between the two is the function, namely, the rear end is simply used for processing the recorded video file and the recorded audio file so as to obtain the audio/video file meeting the front end online playing format; the front end is mainly used for playing audio and video files. The front end must therefore include a display device in its specific form, while the back end is not so limited. Meanwhile, whether the back end and the front end are the same device is not limited. With the embodiment of the net lesson being described, for the teacher and the classmate on the net lesson, the devices need to acquire the recorded video files and the recorded audio files acquired by the teacher and the classmate at the same time, process the recorded video files into audio/video files, send the audio/video files to other devices, and acquire the audio/video files sent by the other devices at the same time for online playing, that is, the front end and the rear end in the embodiment can be the same device. In another embodiment, for example, in an implementation scenario of monitoring camera shooting management, the back end may be a host, specifically may be a server, and the back end acquires recorded video files and recorded audio files acquired by a plurality of monitoring devices, performs summarization processing, and processes the summarized recorded video files and recorded audio files into corresponding audio/video files; the front end is a playing device controlled by a monitoring person, for example, a smart phone or an MP4, and through connection with the back end, the audio/video file sent by the back end can be obtained at any time to realize online playing, so as to view the audio/video collected by the monitoring device, i.e., in this embodiment, the front end and the back end may not be the same device. And further, the connection mode of the front end and the back end can be realized by a wired or wireless communication technology. Among these, for wireless communication technologies, there may be, but are not limited to: global mobile communications devices (Global System for Mobile Communication, GSM), enhanced mobile communications technologies (Enhanced Data GSM Environment, EDGE), wideband code division multiple access technology (wideband code division multiple access, W-CDMA), code division multiple access technology (Code division access, CDMA), time division multiple access technology (time division multiple access, TDMA), bluetooth, wireless Fidelity (WiFi) (e.g., american society of electrical and electronic engineers standard IEEE 802.11a,IEEE802.11b,IEEE802.11g and/or IEEE802.11 n), internet telephony (Voice over internet protocal, voIP), worldwide interoperability for microwave access (Worldwide Interoperability for Microwave Access, wi-Max), other protocols for mail, instant messaging, and short messaging, and any other suitable communications protocol, even those not currently developed. Therefore, the rear end can be connected with the front end to determine the format of the front end capable of playing the audio and video files on line, and the recorded video files and the recorded audio files are processed subsequently to obtain the audio and video files meeting the corresponding formats.
In an embodiment, for determining the online playable format of the audio/video file that can be played by the front end, the device information of the front end may be acquired by the back end, where the online playable file format of the front end may be included. Specifically, in the preferred implementation manner of this embodiment, the video in flv format is preferable, that is, the first format. If the front end cannot play the flv format audio/video file online, the universal format MP4 is selected, so that the front end can play the audio/video file normally. The method provided by the application is used for realizing that the front end can smoothly play the audio and video files acquired by the back end on line, and in the general technical means of the market, the file formed by flv is smaller and the loading speed is very high, so that the network can watch the video files, the defects that the volume of the derived SWF file is huge and the derived SWF file cannot be used on the network well after the video files are imported into Flash are effectively overcome, and the method is more suitable for on-line playing compared with MP4. However, not all front-ends support online playing of flv, so that the most common format MP4 is reserved as the second format, and it is ensured that all front-end devices can strive for online playing of audio and video files. In addition, the above formats are described as descriptions of the preferred embodiment, and other formats are also possible in other cases, for example, the first format may include wmv, asf, 3GP, and the like. Therefore, the first format is not limited to flv, but is preferably flv in the present embodiment, and may be other streaming formats in other embodiments. The first format and the second format are relative concepts, wherein the first format is a streaming media format supporting online playing, and the second format is a universal format capable of being played by all front-end devices. Therefore, the back end actually judges whether the front end supports online playing of the audio and video files in the streaming media format, if yes, the audio and video files in the first format are generated in a subsequent merging mode, and if not, the audio and video files in the second format are generated in a merging mode.
Step S130: and combining the recorded video file and the recorded audio file into an audio-video file, wherein the format of the audio-video file corresponds to the online playable format.
In one embodiment, in step S130: combining the recorded video file and the recorded audio file into an audio-video file, comprising: transcoding the recorded audio file through a transcoder to obtain an audio stream file; and combining and transcoding the audio stream file and the recorded video file through a transcoder to obtain the audio and video file.
In one embodiment, the format of the recorded audio file is a pulse code modulation format, and the format of the audio stream file is an advanced audio coding format; the transcoder is a ffmpeg plug-in.
In an embodiment, taking flv as a first format as an example, a transcoder is disposed in the back end, so as to combine the recorded audio file and the recorded video file, and in a preferred embodiment, the transcoder may be a ffmpeg plug-in. The specific process can be that the ffmpeg plug-in at the back end transcodes the recorded audio file in PCMA format into the audio stream file in AAC format, and then the audio stream file in AAC format and the recorded video file are combined and transcoded into the audio and video file in flv format. If the back end determines that the front end cannot play the audio/video file in the first format, after the same processing is performed to obtain the audio stream file in the AAC format, the audio stream file in the AAC format and the recorded video file are combined and transcoded into the audio/video file in the second format, and in a preferred embodiment, the second format may be MP4, so that all front end devices can play the audio/video file.
Step S140: and sending the audio and video files to the front end so that the front end plays the audio and video files online.
In an embodiment, the front end and the rear end are connected according to a preset communication technology according to the foregoing description, and in order to ensure that the front end can realize online playing, the audio and video files can be transmitted through a communication plug-in, so that the front end can receive the audio and video files and play online, and in a preferred embodiment, the communication plug-in can be a webbook plug-in. Correspondingly, the communication plug-in may be provided in both the front end and the back end.
Therefore, the method and the device can determine the online playing format which can support online playing at the front end in advance, and then realize that the audio and the video are combined into the audio and video file with the corresponding format at the rear end so as to be sent to the front end for playing. Therefore, the one-stop playing technical scheme of shooting, acquiring, transcoding, merging and playing is realized, the processing efficiency of real-time video playing is improved, users are ensured to play and view videos shot by themselves or videos acquired by other devices on line in real time, and the problems of delay and the like caused by the discomfort of the transcoding format are avoided.
Example two
According to the foregoing description, it can be known that the front end is mainly used for merging the recorded video file and the recorded audio file, and the requirement of finally realizing online playing is the front end. For clarity of description of the audio/video online playing method provided in this embodiment, reference may be made to the flowchart shown in fig. 2.
Step S210: the method is connected with the back end so that the back end can determine the online playing format of the audio and video file which can be played by the front end.
In an embodiment, the details of the front end and the back end are described in the foregoing, and will not be described herein. Meanwhile, it is understood that the connection between the front end and the back end may include, but is not limited to, wired or wireless communication technology, and the foregoing also exemplifies specific technologies that may be employed, and will not be described herein. After the connection is established, the device information can be sent to the back end through the front end so that the back end can confirm whether the front end supports playing of the file in the online playable format. Wherein for the online playable format, i.e. the first format described above.
Step S220: acquiring an audio and video file sent by a rear end; the format of the audio and video file corresponds to the online playable format.
Step S230: and playing the audio and video files on line.
In one embodiment, in step S230: playing the audio and video files on line: when the online playable format is the first format, matching the first playing plug-in, and online playing the audio and video file through the first playing plug-in; or when the online playable format is the second format, matching the second playing plug-in, and playing the audio and video file online through the second playing plug-in.
In an embodiment, the first format is flv format, the second format is MP4 format, the first playing plug-in is flv.js plug-in, and the second playing plug-in is h5 native api.
In one embodiment, at least two plug-ins, a communication plug-in and a play plug-in, are installed in the front end. For the communication plug-in unit, the communication plug-in unit is used for transmitting the audio and video files at the front end and the rear end part, wherein the format of the audio and video files is an online playing format which can be played by the front end online; and the playing plug-in is used for realizing online playing of the audio and video files. As can be seen from the description of the embodiment, the audio/video file is not determined, but corresponds to the online playable format of the front end, and may specifically include a first format and a second format. The first format is a format capable of supporting online playing of streaming media, and in a preferred embodiment, the first format may be flv format; the second format is a common format that all front ends can play, and may specifically be MP4. It will be appreciated that different play plug-ins are required to enable play for different formats. Therefore, when the online playable format is the first format, the first playing plug-in is matched, and the online playing of the audio and video file is realized through the first playing plug-in; or when the online playable format is the second format, matching the second playing plug-in, and playing the audio and video file online through the second playing plug-in. Taking the first format as flv and the second format as MP4 as an embodiment, and the corresponding first playing plugin flv.js plugin; the second playing plug-in is the h5 native api. Therefore, the front end can be ensured to realize online playing according to the acquired audio and video files.
The method and the device can determine the online playing format which can support online playing at the front end in advance, and then combine the audio and the video into the audio and video file with the corresponding format at the rear end to send the audio and video file to the front end for playing, so that users can play and view videos shot by themselves or videos acquired by other devices online in real time.
Example III
Fig. 3 shows a block diagram of an audio/video online playing system according to an embodiment. The audio and video online playing system 30 comprises a front end 310 and a back end 320. The front end 310 is connected to the back end 320, where the front end 310 is configured to execute the audio/video online playing method of the application front end described in the second embodiment; the back end 320 is configured to perform the method for online playing audio and video of the application back end described in the first embodiment. Therefore, for the audio/video online playing system 30 provided in this embodiment, based on the cooperation of the front end 310 and the rear end 320, an audio/video online playing method applied to the audio/video online playing system 30 can be implemented, which includes steps S410 to S460. For a clear description of this method, please refer to fig. 4.
Step S410: the front end establishes a connection with the back end.
In one embodiment, the connection between the front end 310 and the back end 320 may be implemented by a wired or wireless communication technology. Among these, for wireless communication technologies, there may be, but are not limited to: global mobile communications devices (Global System for Mobile Communication, GSM), enhanced mobile communications technologies (Enhanced Data GSM Environment, EDGE), wideband code division multiple access technology (wideband code division multiple access, W-CDMA), code division multiple access technology (Code division access, CDMA), time division multiple access technology (time division multiple access, TDMA), bluetooth, wireless Fidelity, wiFi) (e.g., american society of electrical and electronic engineers standards IEEE802.11 a, IEEE802.11b, IEEE802.11g, and/or IEEE802.11 n), internet telephony (Voice over internet protocal, voIP), worldwide interoperability for microwave access (Worldwide Interoperability for Microwave Access, wi-Max), other protocols for mail, instant messaging, and short messages, and any other suitable communication protocols, even including those not currently developed. Examples of specific forms for the front end 310 include, but are not limited to, cell phones, tablet computers, personal digital assistants (English: personal digital assistant, abbreviated: PDA), mobile Internet devices (English: mobile Internet device, abbreviated: MID), and wearable devices (e.g., smart watches). The front end 310 may process and display corresponding information through an application program (e.g., APP) and perform corresponding operations, thereby improving the use efficiency. The backend 320 may also be a mobile device, a personal computer, a server, etc., without specific limitation. The main difference between the two is that the function, in short, the back end 320 is used for processing the recorded video file and the recorded audio file, so as to obtain the audio/video file meeting the online playing format of the front end 310; the front end 310 is mainly used for playing audio and video files. Thus, in particular aspects, front end 310 must include a display device, while back end 320 is not so limited.
Step S420: the front end acquires equipment information and sends the equipment information to the back end.
In one embodiment, after establishing the connection, the front end 310 sends device information to the back end 320 to cause the back end 320 to confirm whether the front end 310 supports playback of an online playable format file. Specifically, in the preferred implementation manner of this embodiment, the video in flv format is preferable, that is, the first format. If the front end 310 cannot play the flv format audio/video file online, the universal format MP4 is selected, so as to ensure that the front end 310 can play the flv format audio/video file normally, which corresponds to the second format. The first format is a streaming media format supporting online playing, and the second format is a common format that can be played by all front-end 310 devices. Therefore, the back end 320 actually determines whether the front end 310 supports online playing of the audio and video files in the streaming media format, if yes, then the audio and video files in the first format are generated by subsequent merging, and if not, the audio and video files in the second format are generated by merging.
Step S430: and the rear end acquires the recorded video file and the recorded audio file.
In an embodiment, the obtained recorded video file and the recorded audio file are respectively captured by the video recording device and the audio recording device, and the video recording device and the audio recording device may be unified equipment or may not be the same equipment. For example, in the implementation scenario of a web conference, the user personnel of the participant typically use their own smart phone or notebook computer to participate, and these devices belong to the back end 320 and include a video recording device and a sound recording device, so that the recorded video file and the recorded audio file can be directly obtained from the local machine. In another embodiment, a plurality of monitors are connected to a single host computer for a monitoring image capturing implementation scene, and each monitor has a video recording device and an audio recording device. In this embodiment, the back end 320 is a device different from the video recording device and the audio recording device, so that the recorded video file and the recorded audio file can be obtained by the host as the back end 320 through the connection with the monitor.
Step S440: the back end determines an online playing format of the front end capable of playing the audio and video file according to the equipment information.
In an embodiment, the back end 320 may determine, according to the device information, whether the front end 310 can support playing the audio/video file in the first format by acquiring the device information of the front end 310; when it is determined that the front end 310 supports playing the audio and video file in the first format, determining that the online playable format is the first format; when it is determined that the front end 310 does not support playing the audio/video file in the first format, it is determined that the online playable format is the second format.
Step S450: the back end combines the recorded video file and the recorded audio file into an audio-video file and sends the audio-video file to the front end, wherein the format of the audio-video file corresponds to the online playable format.
Step S460: the front end plays the audio and video files on line.
In one embodiment, communication plug-ins are provided in both the back end 320 and the front end 310 to enable exclusive use in transmitting audio and video files, and in a preferred embodiment, the communication plug-ins may be webcookie plug-ins. As can be seen from the foregoing description, the format of the audio and video file processed by the back end 320 corresponds to the online playable format of the front end 310, that is, may be different formats, and the corresponding requirements correspond to the corresponding playing plug-in to ensure that the audio and video file with the online playable format can be accurately played. Taking an embodiment in which the first format is flv format and the second format is MP4 format as an example, the corresponding first play plugin flv.js plugin; the second playing plug-in is the h5 native api. In other embodiments, the corresponding format corresponds to a playable plug-in, and the specific format and plug-in are difficult to be exhausted, and the description is only simple and is not limited further.
Therefore, the method and the device can determine the online playing format which can support online playing at the front end in advance, and then realize that the audio and the video are combined into the audio and video file with the corresponding format at the rear end so as to be sent to the front end for playing. Therefore, the one-stop playing technical scheme of shooting, acquiring, transcoding, merging and playing is realized, the processing efficiency of real-time video playing is improved, users are ensured to play and view videos shot by themselves or videos acquired by other devices on line in real time, and the problems of delay and the like caused by the discomfort of the transcoding format are avoided.
Example IV
FIG. 5 illustrates an internal block diagram of a computer device in one embodiment. The computer device may specifically be a terminal or a server. As shown in fig. 5, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program that, when executed by the processor, causes the processor to implement an audio/video online playing method. The internal memory may also have stored therein a computer program which, when executed by the processor, causes the processor to perform the age identification method. It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the present application also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method as described above.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. An audio and video online playing method is applied to a rear end and is characterized by comprising the following steps:
acquiring a recorded video file and a recorded audio file;
the method comprises the steps of connecting with a front end, and determining an online playing format of the front end capable of playing audio and video files;
combining the recorded video file and the recorded audio file into an audio-video file, wherein the format of the audio-video file corresponds to the online playable format;
and sending the audio and video file to the front end so that the front end plays the audio and video file online.
2. The method for online playback of an audio/video signal as set forth in claim 1, wherein the online playable format comprises a first format and a second format,
the determining the online playable format of the audio and video file that can be played by the front end includes:
acquiring equipment information of a front end, and judging whether the front end can support playing of an audio/video file in a first format according to the equipment information;
when the front end is determined to support playing of the audio and video files in the first format, determining that the online playable format is the first format;
and when the front end is determined not to support playing of the audio and video files in the first format, determining that the online playable format is the second format.
3. The method for online playing audio and video according to claim 2, wherein the recorded video file is in national standard video format, the first format is flv format, and the second format is MP4 format
4. The method for online playback of audio and video according to claim 1, wherein the merging the recorded video file and the recorded audio file into an audio and video file comprises:
transcoding the recorded audio file through a transcoder to obtain an audio stream file;
and combining and transcoding the audio stream file and the recorded video file through the transcoder to obtain the audio and video file.
5. The method for online playing audio and video according to claim 4, wherein the format of the recorded audio file is a pulse code modulation format, and the format of the audio stream file is an advanced audio coding format; the transcoder is a ffmpeg plug-in.
6. An audio and video online playing method is applied to a front end and is characterized by comprising the following steps:
the method comprises the steps that the method is connected with a rear end, so that the rear end can determine an online playing format of an audio and video file which can be played by the front end;
acquiring an audio and video file sent by the back end; the format of the audio and video file corresponds to the online playable format;
and playing the audio and video files on line.
7. The method for online playing audio and video according to claim 6, wherein the online playing the audio and video file comprises:
when the online playable format is a first format, matching a first playing plug-in, and online playing the audio and video file through the first playing plug-in; or alternatively, the first and second heat exchangers may be,
and when the online playable format is the second format, matching with a second playing plug-in, and online playing the audio and video file through the second playing plug-in.
8. The method for online playing audio and video according to claim 7, wherein the first format is flv format, the second format is MP4 format, the first playing plug-in is flv.js plug-in, and the second playing plug-in is h5 native api.
9. An audio and video online playing system is characterized by comprising a front end and a rear end;
the back end is used for executing the steps of the audio/video online playing method according to any one of claims 1 to 5;
the front end is configured to perform the steps of the audio/video online playing method as claimed in any one of claims 6 to 8.
10. A computer readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 5, or any one of claims 6 to 8.
CN202310091835.1A 2023-01-15 2023-01-15 Online audio/video playing method, system and computer readable storage medium Pending CN116456125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310091835.1A CN116456125A (en) 2023-01-15 2023-01-15 Online audio/video playing method, system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310091835.1A CN116456125A (en) 2023-01-15 2023-01-15 Online audio/video playing method, system and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116456125A true CN116456125A (en) 2023-07-18

Family

ID=87122640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310091835.1A Pending CN116456125A (en) 2023-01-15 2023-01-15 Online audio/video playing method, system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116456125A (en)

Similar Documents

Publication Publication Date Title
US11871088B2 (en) Systems, apparatus, and methods for providing event video streams and synchronized event information via multiple Internet channels
US10187668B2 (en) Method, system and server for live streaming audio-video file
US9882951B2 (en) Method and device for playing streaming media, and non-transitory storage medium
WO2016049987A1 (en) Data processing method and apparatus, and related servers
US20220286718A1 (en) Method for playing back live-streaming video, and device thereof
US9860206B2 (en) Method and apparatus for distributing content
US20080201451A1 (en) Systems and methods for real-time media communications
EP2924998A1 (en) Method, apparatus and system for acquiring playback data stream of real-time video communication
US20190110091A1 (en) Method and device for synchronously performing an operation on contents
TWI501609B (en) System and method for storing multi-source multimedia presentations
US20220256205A1 (en) Video processing method and apparatus, computer device, and storage medium
US20170078678A1 (en) Method for decreasing the bit rate needed to transmit videos over a network by dropping video frames
US20190245945A1 (en) Rapid optimization of media stream bitrate
CN112866727B (en) Streaming media live broadcast method and system capable of receiving third party push stream
US20240196024A1 (en) Live Video Playback
CN111356023B (en) Playing mode determining method and device
EP2405649B1 (en) Method and terminal for synchronously recording sounds and images of opposite ends based on circuit domain video telephone
WO2021017958A1 (en) Video transcoding method and apparatus
CN116456125A (en) Online audio/video playing method, system and computer readable storage medium
CN114363303B (en) Streaming media transcoding method for realizing rapid playing of surveillance video
US20170055006A1 (en) Receiver, transmitter, data communication method, and data processing method
US20140064695A1 (en) Apparatus and method for controlling a video
CN112866745B (en) Streaming video data processing method, device, computer equipment and storage medium
US10853439B2 (en) Systems and methods for fast play back of recorded data
KR20130077246A (en) Method and system for reducing excessive process of panorama moving picture by cpu on smart-tv

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