CN115988234A - Audio and video processing method and system - Google Patents

Audio and video processing method and system Download PDF

Info

Publication number
CN115988234A
CN115988234A CN202211577730.9A CN202211577730A CN115988234A CN 115988234 A CN115988234 A CN 115988234A CN 202211577730 A CN202211577730 A CN 202211577730A CN 115988234 A CN115988234 A CN 115988234A
Authority
CN
China
Prior art keywords
stream data
audio
browser
server
video stream
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
CN202211577730.9A
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.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp 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 China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202211577730.9A priority Critical patent/CN115988234A/en
Publication of CN115988234A publication Critical patent/CN115988234A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本发明涉及一种音视频处理方法,所述方法包括:浏览器接收到触发操作后,发送消息至服务器,所述服务器与移动终端建立连接;所述服务器接收并处理所述移动终端发送的视频流和音频流数据,并将所述视频流数据和所述音频流数据发送至所述浏览器;所述浏览器将所述视频流数据存储至缓存中,从所述服务器获取网页解码脚本和网页绘制脚本对所述视频流数据进行解析,实时展示所述视频流数据;所述浏览器通过音频解码器实时播放所述音频流数据。该方法可实现iOS设备的高帧率视频传输,并支持音频同步。

Figure 202211577730

The invention relates to an audio and video processing method. The method includes: after the browser receives a trigger operation, sends a message to a server, and the server establishes a connection with a mobile terminal; the server receives and processes the video sent by the mobile terminal. stream and audio stream data, and send the video stream data and the audio stream data to the browser; the browser stores the video stream data in the cache, and obtains the web page decoding script and The webpage rendering script analyzes the video stream data and displays the video stream data in real time; the browser plays the audio stream data in real time through an audio decoder. The method can realize high frame rate video transmission of iOS devices, and supports audio synchronization.

Figure 202211577730

Description

一种音视频处理方法及系统Audio and video processing method and system

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种音视频处理方法及系统。The present invention relates to the field of computer technology, in particular to an audio and video processing method and system.

背景技术Background technique

云真机平台,可以将移动设备远程共享使用,通过集中管理资源,合理调度分配,提升资源利用率,平衡成本与需求,提升研发效率。在音视频处理及传输上,现有云真机平台针对iOS设备支持并不完善,屏幕图像获取主要是通过在设备上安装驱动软件,例如webdriveragent,再获取设备屏幕截图,然后传输到客户端浏览器上,且大多数云真机平台不支持音频同步,因此给测试任务带来了很大的不便。The cloud real machine platform can remotely share and use mobile devices. Through centralized management of resources, reasonable scheduling and allocation, resource utilization can be improved, cost and demand can be balanced, and research and development efficiency can be improved. In terms of audio and video processing and transmission, the existing cloud real machine platform does not have perfect support for iOS devices. The screen image acquisition is mainly through installing driver software on the device, such as webdriveragent, and then taking screenshots of the device, and then transmitting them to the client for browsing On the server, and most cloud real machine platforms do not support audio synchronization, which brings great inconvenience to the test task.

发明内容Contents of the invention

为解决现有技术的不足,本发明提出一种音视频处理方法及系统,拟实现iOS设备的高帧率视频传输,并支持音频同步。In order to solve the deficiencies of the prior art, the present invention proposes an audio and video processing method and system, which intends to realize high frame rate video transmission of iOS devices and support audio synchronization.

为实现以上目的,本发明所采用的技术方案包括:For realizing the above object, the technical scheme adopted in the present invention comprises:

本发明第一方面公开了一种音视频处理方法,包括:The first aspect of the present invention discloses an audio and video processing method, including:

浏览器接收到触发操作后,发送消息至服务器,所述服务器与移动终端建立连接;After the browser receives the trigger operation, it sends a message to the server, and the server establishes a connection with the mobile terminal;

所述服务器接收并处理所述移动终端发送的视频流和音频流数据,并将所述视频流数据和所述音频流数据发送至所述浏览器;The server receives and processes the video stream and audio stream data sent by the mobile terminal, and sends the video stream data and the audio stream data to the browser;

所述浏览器将所述视频流数据存储至缓存中,从所述服务器获取网页解码脚本和网页绘制脚本对所述视频流数据进行解析,实时展示所述视频流数据;所述浏览器通过音频解码器实时播放所述音频流数据。The browser stores the video stream data in the cache, obtains the webpage decoding script and the webpage rendering script from the server to analyze the video stream data, and displays the video stream data in real time; The decoder plays the audio stream data in real time.

进一步地,所述移动终端为iOS设备。Further, the mobile terminal is an iOS device.

进一步地,所述浏览器接收到触发操作后,发送websocket消息至服务器,所述服务器通过向所述移动终端发送NEED数据包建立连接。Further, after receiving the trigger operation, the browser sends a websocket message to the server, and the server establishes a connection by sending a NEED data packet to the mobile terminal.

进一步地,所述音频流数据的处理方法包括以下步骤:Further, the processing method of the audio stream data includes the following steps:

所述服务器采用Waveform Audio File Format处理所述音频流数据;The server adopts Waveform Audio File Format to process the audio stream data;

将处理后的数据输入到ffmpeg中进行解析;Input the processed data into ffmpeg for parsing;

将ffmpeg输出的音频流数据,切分为音频块并打包成blob发送至所述浏览器。The audio stream data output by ffmpeg is divided into audio blocks and packaged into blobs and sent to the browser.

进一步地,所述视频流数据的处理方法包括以下步骤:Further, the processing method of the video stream data includes the following steps:

所述服务器采用H.264网络抽象层单元处理有效载荷数据;The server uses H.264 network abstraction layer unit to process payload data;

将处理后的数据输入到ffmpeg中进行解析,并对视频分辨率、帧率和码率进行控制;Input the processed data into ffmpeg for analysis, and control the video resolution, frame rate and bit rate;

将ffmpeg输出的视频流数据发送至所述浏览器。Send the video stream data output by ffmpeg to the browser.

本发明第二方面公开了一种音视频处理系统,包括:The second aspect of the present invention discloses an audio and video processing system, comprising:

数据连接模块,浏览器接收到触发操作后,发送消息至服务器,所述服务器与移动终端建立连接;The data connection module, after the browser receives the trigger operation, sends a message to the server, and the server establishes a connection with the mobile terminal;

数据处理模块,所述服务器接收并处理所述移动终端发送的视频流和音频流数据,并将所述视频流数据和所述音频流数据发送至所述浏览器;A data processing module, the server receives and processes the video stream and audio stream data sent by the mobile terminal, and sends the video stream data and the audio stream data to the browser;

数据解码模块,所述浏览器将所述视频流数据存储至缓存中,从所述服务器获取网页解码脚本和网页绘制脚本对所述视频流数据进行解析,实时展示所述视频流数据;所述浏览器通过音频解码器实时播放所述音频流数据。A data decoding module, the browser stores the video stream data in the cache, obtains a webpage decoding script and a webpage rendering script from the server to analyze the video stream data, and displays the video stream data in real time; The browser plays the audio stream data in real time through the audio decoder.

本发明第三方面公开了一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述的方法。The third aspect of the present invention discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned method is realized.

本发明第四方面公开了一种电子设备,包括处理器和存储器;The fourth aspect of the present invention discloses an electronic device, including a processor and a memory;

所述存储器,用于存储操作指令;The memory is used to store operation instructions;

所述处理器,用于通过调用所诉操作指令,执行上述的方法。The processor is configured to execute the above method by calling the operation instruction.

本发明第五方面公开了一种计算机程序产品,包括计算机程序和/或指令,其特征在于,该计算机程序和/或指令被处理器执行时实现上述方法的步骤。The fifth aspect of the present invention discloses a computer program product, including computer programs and/or instructions, characterized in that, when the computer programs and/or instructions are executed by a processor, the steps of the above method are realized.

本发明的有益效果为:The beneficial effects of the present invention are:

采用本发明所述音视频处理方法及系统,该方法将iOS终端设备屏幕显示数据编码并且将编码后的视频数据提供给远程使用iOS终端设备的客户端,无需iOS终端设备安装任何应用或嵌入代码,同时可以实现高帧率、高画质、低延时,并同步传输音频。Using the audio and video processing method and system of the present invention, the method encodes the screen display data of the iOS terminal device and provides the encoded video data to the client using the iOS terminal device remotely, without installing any application or embedded code on the iOS terminal device , while achieving high frame rate, high image quality, low latency, and synchronous audio transmission.

附图说明Description of drawings

图1为本发明实施例提供的音视频处理方法流程示意图。FIG. 1 is a schematic flowchart of an audio and video processing method provided by an embodiment of the present invention.

图2为本发明实施例提供的音视频处理系统结构示意图。FIG. 2 is a schematic structural diagram of an audio and video processing system provided by an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the description and claims of the present invention and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

本发明第一方面涉及一种流程如图1所示的音视频处理方法,具体包括:The first aspect of the present invention relates to an audio and video processing method as shown in Figure 1, specifically comprising:

步骤S1、浏览器接收到触发操作后,发送消息至服务器,所述服务器与移动终端建立连接。Step S1. After receiving the trigger operation, the browser sends a message to the server, and the server establishes a connection with the mobile terminal.

其中,所述浏览器接收到客户端点击“使用手机”的触发操作后,发送websocket消息至服务器,所述服务器通过向所述移动终端发送NEED数据包建立连接。Wherein, the browser sends a websocket message to the server after receiving the trigger operation of clicking "use mobile phone" by the client, and the server establishes a connection by sending a NEED data packet to the mobile terminal.

所述移动终端为iOS设备,具体为iOS手机设备。The mobile terminal is an iOS device, specifically an iOS mobile phone device.

在所述步骤S1之前,所述方法还包括所述移动终端通过USB协议与所述服务器建立连接,开启传输屏幕音视频数据的配置,并完成交互操作。Before the step S1, the method further includes establishing a connection between the mobile terminal and the server through the USB protocol, enabling the configuration for transmitting screen audio and video data, and completing the interactive operation.

步骤S2、所述服务器接收并处理所述移动终端发送的视频流和音频流数据,并将所述视频流数据和所述音频流数据发送至所述浏览器。Step S2, the server receives and processes the video stream and audio stream data sent by the mobile terminal, and sends the video stream data and the audio stream data to the browser.

优选的,所述音频流数据的处理方法包括以下步骤:Preferably, the processing method of the audio stream data comprises the following steps:

所述服务器采用Waveform Audio File Format(wave)处理所述音频流数据;The server adopts Waveform Audio File Format (wave) to process the audio stream data;

将处理后的数据输入到ffmpeg中进行解析;Input the processed data into ffmpeg for parsing;

将ffmpeg输出的音频流数据,切分为音频块并打包成blob发送至所述浏览器。The audio stream data output by ffmpeg is divided into audio blocks and packaged into blobs and sent to the browser.

优选的,所述视频流数据的处理方法包括以下步骤:Preferably, the processing method of the video stream data comprises the following steps:

所述服务器采用H.264网络抽象层单元(NALU)处理有效载荷数据(Payload);The server uses H.264 Network Abstraction Layer Unit (NALU) to process payload data (Payload);

将处理后的数据输入到ffmpeg中进行解析,并对视频分辨率、帧率和码率进行控制;Input the processed data into ffmpeg for analysis, and control the video resolution, frame rate and bit rate;

将ffmpeg输出的视频流数据发送至所述浏览器。Send the video stream data output by ffmpeg to the browser.

步骤S3、所述浏览器将所述视频流数据存储至缓存中,从所述服务器获取网页解码脚本和网页绘制脚本对所述视频流数据进行解析,实时展示所述视频流数据;所述浏览器通过音频解码器实时播放所述音频流数据。Step S3, the browser stores the video stream data in the cache, obtains a webpage decoding script and a webpage rendering script from the server to analyze the video stream data, and displays the video stream data in real time; the browsing The device plays the audio stream data in real time through the audio decoder.

其中,所述浏览器对于接收到的H.264视频流数据,确定是完整的NALU后将其存储至缓存中。Wherein, the browser stores the received H.264 video stream data in the cache after determining that it is a complete NALU.

采用本发明所述音视频处理方法及系统,该方法将iOS终端设备屏幕显示数据编码并且将编码后的视频数据提供给远程使用iOS终端设备的客户端,无需iOS终端设备安装任何应用或嵌入代码,同时可以实现高帧率、高画质、低延时,并同步传输音频。Using the audio and video processing method and system of the present invention, the method encodes the screen display data of the iOS terminal device and provides the encoded video data to the client using the iOS terminal device remotely, without installing any application or embedded code on the iOS terminal device , while achieving high frame rate, high image quality, low latency, and synchronous audio transmission.

本发明还涉及一种如图2所示的音视频处理系统,结构包括:The present invention also relates to an audio and video processing system as shown in Figure 2, the structure comprising:

数据连接模块,浏览器接收到触发操作后,发送消息至服务器,所述服务器与移动终端建立连接;The data connection module, after the browser receives the trigger operation, sends a message to the server, and the server establishes a connection with the mobile terminal;

数据处理模块,所述服务器接收并处理所述移动终端发送的视频流和音频流数据,并将所述视频流数据和所述音频流数据发送至所述浏览器;A data processing module, the server receives and processes the video stream and audio stream data sent by the mobile terminal, and sends the video stream data and the audio stream data to the browser;

数据解码模块,所述浏览器将所述视频流数据存储至缓存中,从所述服务器获取网页解码脚本和网页绘制脚本对所述视频流数据进行解析,实时展示所述视频流数据;所述浏览器通过音频解码器实时播放所述音频流数据。A data decoding module, the browser stores the video stream data in the cache, obtains a webpage decoding script and a webpage rendering script from the server to analyze the video stream data, and displays the video stream data in real time; The browser plays the audio stream data in real time through the audio decoder.

通过使用该系统,能够执行上述的音视频处理方法并实现对应的技术效果。By using the system, the above-mentioned audio and video processing method can be implemented and corresponding technical effects can be achieved.

在使用上述方法及系统具体执行音视频传输,可以参考如下具体实施例进行。When using the above method and system to specifically execute audio and video transmission, reference may be made to the following specific embodiments.

1.初始化会话1. Initialize the session

(1)启用隐藏设备配置信息(1) Enable hidden device configuration information

(2)锁定开启传输端点(2) Lock and open the transmission endpoint

(3)等待接收PING包(3) Waiting to receive PING packets

(4)用PING包响应(4) Respond with PING packet

(5)等待SYNC CWPA数据包接收设备音频时间戳(5) Wait for the SYNC CWPA packet to receive the device audio timestamp

(6)创建本地时间戳记录,将该时间戳放入SYNC CWPA并发送(6) Create a local timestamp record, put the timestamp into SYNC CWPA and send it

(7)发送ASYN_HPD1(7) Send ASYN_HPD1

(8)发送ASYN_HPA1(8) Send ASYN_HPA1

(9)接收同步AFMT并返回没有错误的信号(9) Receive synchronous AFMT and return no error signal

(10)接收CVRP视频时间戳(10) Receive CVRP video timestamp

(11)使用本地视频时间戳回复(11) Reply with local video timestamp

(12)使用步骤(10)的时间戳发送NEED消息(12) Send a NEED message using the timestamp of step (10)

(13)接收两个ASYN(13) Receive two ASYN

(14)接收CLOK消息,创建新的时间戳记录并回复消息(14) Receive the CLOK message, create a new timestamp record and reply to the message

(15)接收TIME消息,使用步骤(14)创建的时间戳并回复消息(15) Receive the TIME message, use the timestamp created in step (14) and reply to the message

2.接收数据2. Receive data

视频和音频数据将由设备发送,需要定期发送视频NEED数据包Video and audio data will be sent by the device, and video NEED packets need to be sent periodically

3.关闭数据流3. Close the data stream

(1)发送来自CWPA SYNC数据包中带有设备时间戳的ASYN_HPA0告诉设备停止发送音频数据(1) Send ASYN_HPA0 with the device timestamp in the CWPA SYNC packet to tell the device to stop sending audio data

(2)发送时间戳为空的ASYN_HPD0来停止视频数据(2) Send ASYN_HPD0 with empty timestamp to stop video data

(3)接收停止SYNC数据包(3) Receive stop SYNC packet

(4)响应8位为0的停止SYNC数据包(4) Respond to the stop SYNC data packet whose 8 bits are 0

(5)接收一个本地视频时间戳的ASYN_RELS(5) Receive ASYN_RELS of a local video timestamp

(6)接收一个在SYNC CLOK消息之后创建的本地时间戳的ASYN_RELS(6) Receive an ASYN_RELS with a local timestamp created after the SYNC CLOK message

(7)释放usb端点(7) Release the usb endpoint

(8)将设备活动配置设置为usbmux(8) Set the device active configuration to usbmux

本发明的实施例还提供能够实现上述实施例中的方法中全部步骤的一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例中的方法的全部步骤。Embodiments of the present invention also provide a computer-readable storage medium capable of implementing all the steps in the methods in the above-mentioned embodiments, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned All steps of the method in the embodiment.

本发明的实施例还提供一种用于执行上述方法的电子设备,作为该方法的实现装置,所述电子设备至少具备有处理器和存储器,特别是该存储器上存储有执行方法所需的数据和相关的计算机程序,并通过由处理器调用存储器中的数据、程序执行实现方法的全部步骤,并获得对应的技术效果。An embodiment of the present invention also provides an electronic device for performing the above method. As an implementation device of the method, the electronic device is at least equipped with a processor and a memory, and in particular, the memory stores data required for executing the method. and related computer programs, and all the steps of the method are implemented by the processor calling the data in the memory, and the program executes, and corresponding technical effects are obtained.

优选的,该电子设备可以包含有总线架构,总线可以包括任意数量的互联的总线和桥,总线将包括由一个或多个处理器和存储器的各种电路链接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和接收器和发送器之间提供接口。接收器和发送器可以是同一个元件,即收发机,提供用于在传输介质上与各种其他系统通信的单元。处理器负责管理总线和通常的处理,而存储器可以被用于存储处理器在执行操作时所使用的数据。Preferably, the electronic device may include a bus architecture, and the bus may include any number of interconnected buses and bridges, and the bus may link together various circuits including one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and therefore will not be further described herein. The bus interface provides the interface between the bus and the receiver and transmitter. The receiver and transmitter can be the same element, a transceiver, providing means for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while memory may be used to store data used by the processor when performing operations.

额外的,所述电子设备还可以进一步包括通信模块、输入单元、音频处理器、显示器、电源等部件。其所采用的处理器(或称为控制器、操作控件)可以包括微处理器或其他处理器装置和/或逻辑装置,该处理器接收输入并控制电子设备的各个部件的操作;存储器可以是缓存器、闪存、硬驱、可移动介质、易失性存储器、非易失性存储器或其它合适装置中的一种或更多种,可储存上述有关的数据信息,此外还可存储执行有关信息的程序,并且处理器可执行该存储器存储的该程序,以实现信息存储或处理等;输入单元用于向处理器提供输入,例如可以为按键或触摸输入装置;电源用于向电子设备提供电力;显示器用于进行图像和文字等显示对象的显示,例如可为LCD显示器。通信模块即为经由天线发送和接收信号的发送机/接收机。通信模块(发送机/接收机)耦合到处理器,以提供输入信号和接收输出信号,这可以和常规移动通信终端的情况相同。基于不同的通信技术,在同一电子设备中,可以设置有多个通信模块,如蜂窝网络模块、蓝牙模块和/或无线局域网模块等。通信模块(发送机/接收机)还经由音频处理器耦合到扬声器和麦克风,以经由扬声器提供音频输出,并接收来自麦克风的音频输入,从而实现通常的电信功能。音频处理器可以包括任何合适的缓冲器、解码器、放大器等。另外,音频处理器还耦合到中央处理器,从而使得可以通过麦克风能够在本机上录音,且使得可以通过扬声器来播放本机上存储的声音。Additionally, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or called controller, operation control) adopted by it may include a microprocessor or other processor devices and/or logic devices, which receive input and control the operation of various components of the electronic equipment; the memory may be One or more of buffer memory, flash memory, hard drive, removable media, volatile memory, non-volatile memory or other suitable devices, which can store the above-mentioned relevant data information, and can also store execution-related information program, and the processor can execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used to provide input to the processor, such as a button or a touch input device; the power supply is used to provide power to electronic equipment ; The display is used for displaying display objects such as images and text, for example, it may be an LCD display. A communication module is a transmitter/receiver that sends and receives signals via an antenna. A communication module (transmitter/receiver) is coupled to the processor to provide input signals and receive output signals, which may be the same as in conventional mobile communication terminals. Based on different communication technologies, multiple communication modules, such as a cellular network module, a bluetooth module and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) is also coupled to a speaker and a microphone via an audio processor to provide audio output via the speaker and receive audio input from the microphone for usual telecommunication functions. Audio processors may include any suitable buffers, decoders, amplifiers, etc. In addition, the audio processor is also coupled to the central processing unit, so that the recording on the machine can be made through the microphone, and the sound stored on the machine can be played through the speaker.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的系统。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a A system for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令系统的制造品,该指令系统实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising a system of instructions, the The system implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams. While preferred embodiments of the present invention have been described, additional changes and modifications can be made to these embodiments by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.

以上所述仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换等都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求书的保护范围为准。The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention etc. should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (9)

1. An audio-video processing method, characterized by comprising:
after receiving the trigger operation, the browser sends a message to a server, and the server is connected with the mobile terminal;
the server receives and processes video stream data and audio stream data sent by the mobile terminal, and sends the video stream data and the audio stream data to the browser;
the browser stores the video stream data into a cache, acquires a webpage decoding script and a webpage drawing script from the server to analyze the video stream data, and displays the video stream data in real time; and the browser plays the audio stream data in real time through an audio decoder.
2. The method of claim 1, wherein the mobile terminal is an iOS device.
3. The method of claim 1, wherein in step S1, after receiving the trigger operation, the browser sends a websocket message to a server, and the server establishes a connection by sending a NEED packet to the mobile terminal.
4. The method according to claim 1, wherein in the step S2, the processing method of the audio stream data comprises the steps of:
the server processes the Audio stream data by adopting a Waveform Audio File Format;
inputting the processed data into ffmpeg for analysis;
and segmenting the audio stream data output by the ffmpeg into audio blocks, packaging the audio blocks into blobs and sending the blobs to the browser.
5. The method according to any one of claims 1 to 4, wherein in the step S2, the processing method of the video stream data comprises the following steps:
the server adopts an H.264 network abstraction layer unit to process the effective load data;
inputting the processed data into ffmpeg for analysis, and controlling the video resolution, the frame rate and the code rate;
and sending the video stream data output by the ffmpeg to the browser.
6. An audio-video processing system, comprising:
the data connection module is used for sending a message to the server after the browser receives the triggering operation, and the server is connected with the mobile terminal;
the server receives and processes video stream data and audio stream data sent by the mobile terminal, and sends the video stream data and the audio stream data to the browser;
the browser stores the video stream data into a cache, acquires a webpage decoding script and a webpage drawing script from the server to analyze the video stream data, and displays the video stream data in real time; and the browser plays the audio stream data in real time through an audio decoder.
7. A computer-readable storage medium, characterized in that a computer program is stored on the storage medium, which computer program, when being executed by a processor, carries out the method of any one of claims 1 to 5.
8. An electronic device comprising a processor and a memory;
the memory is used for storing operation instructions;
the processor is used for executing the method of any one of claims 1 to 5 by calling the operation instruction.
9. A computer program product comprising a computer program and/or instructions, characterized in that the computer program and/or instructions, when executed by a processor, implement the steps of the method of any one of claims 1 to 5.
CN202211577730.9A 2022-12-05 2022-12-05 Audio and video processing method and system Pending CN115988234A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211577730.9A CN115988234A (en) 2022-12-05 2022-12-05 Audio and video processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211577730.9A CN115988234A (en) 2022-12-05 2022-12-05 Audio and video processing method and system

Publications (1)

Publication Number Publication Date
CN115988234A true CN115988234A (en) 2023-04-18

Family

ID=85973033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211577730.9A Pending CN115988234A (en) 2022-12-05 2022-12-05 Audio and video processing method and system

Country Status (1)

Country Link
CN (1) CN115988234A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108833963A (en) * 2018-05-31 2018-11-16 腾讯科技(上海)有限公司 Method, computer equipment, readable storage medium storing program for executing and the system of display interface picture
CN110086889A (en) * 2019-05-16 2019-08-02 北京字节跳动网络技术有限公司 Terminal device adjustment method and equipment
CN111131891A (en) * 2018-11-01 2020-05-08 阿里巴巴集团控股有限公司 Audio and video playing method and device, playing equipment and system
CN112596848A (en) * 2020-12-30 2021-04-02 北京达佳互联信息技术有限公司 Screen recording method and device, electronic equipment, storage medium and program product
CN113821428A (en) * 2020-06-18 2021-12-21 阿里巴巴集团控股有限公司 Cloud testing method and device, electronic equipment and computer storage medium
US20220321699A1 (en) * 2020-08-20 2022-10-06 Cyara Solutions Pty Ltd System and methods for monitoring and testing real-time communications between web browsers and contact centers

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108833963A (en) * 2018-05-31 2018-11-16 腾讯科技(上海)有限公司 Method, computer equipment, readable storage medium storing program for executing and the system of display interface picture
CN111131891A (en) * 2018-11-01 2020-05-08 阿里巴巴集团控股有限公司 Audio and video playing method and device, playing equipment and system
CN110086889A (en) * 2019-05-16 2019-08-02 北京字节跳动网络技术有限公司 Terminal device adjustment method and equipment
CN113821428A (en) * 2020-06-18 2021-12-21 阿里巴巴集团控股有限公司 Cloud testing method and device, electronic equipment and computer storage medium
US20220321699A1 (en) * 2020-08-20 2022-10-06 Cyara Solutions Pty Ltd System and methods for monitoring and testing real-time communications between web browsers and contact centers
CN112596848A (en) * 2020-12-30 2021-04-02 北京达佳互联信息技术有限公司 Screen recording method and device, electronic equipment, storage medium and program product

Similar Documents

Publication Publication Date Title
EP2251782A3 (en) Program, Network System, Terminal Apparatus, and Server Apparatus
CN104219286B (en) streaming media processing method, device, client, CDN node server and terminal
CN105072190A (en) Method and system for realizing real-time desktop cloud
CN109495761A (en) Video switching method and device
CN102158553A (en) Method and device for playing multi-media files for remote desktop
CN108079578A (en) A kind of code rate adjustment method based on cloud game, device and storage medium
KR101528367B1 (en) Sound control system and method as the same
CN103200461A (en) Multiple-player-terminal synchronized playing system and playing method
WO2016127687A1 (en) Media file playback progress synchronization method, device and system
CN101883097A (en) Method and device for realizing that server equipment shares screen of client equipment
CN104602118A (en) Multimedia data output method and equipment
CN101674486A (en) Streaming media audio and video synchronization method and system
WO2022017007A1 (en) Audio data processing method, server, and storage medium
CN105451071A (en) Video stream processing method, device and system
CN107509051A (en) Long-range control method, device, terminal and computer-readable recording medium
JP2019050554A (en) Method and apparatus for providing voice service
CN105786441A (en) Audio processing method, server, user equipment and system
CN105872724A (en) A video playback method and device
WO2022110943A1 (en) Speech preview method and apparatus
JP2016527792A (en) Video conference terminal, secondary stream data access method, and computer storage medium
CN113242436B (en) Live broadcast data processing method and device and electronic equipment
CN115065669A (en) Audio transmission method and device, electronic equipment and storage medium
JP2014075735A (en) Image processor and image processing method
CN104837046A (en) Multi-media file processing method and device
CN109889922A (en) Method, device, equipment and storage medium for forwarding streaming media data

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

Application publication date: 20230418

RJ01 Rejection of invention patent application after publication