Method for simultaneously storing remote software plug streams
By issuing rtmp links during remote connections and using nginx server to configure rtmp protocol, the problem that existing streaming software cannot save remote operating videos at the same time is solved, and a method of automatically saving operating videos and improving information security and traceability is realized.
Patent Information
- Application Number
- CN202411575782.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-14
AI Technical Summary
Existing streaming software cannot save operation videos at the same time during remote operation, resulting in information leakage and incomplete recording.
By issuing the rtmp link when the remote connection is connected, the client uses ffmpeg for video encoding and streaming, and the nginx server configures the rtmp protocol for data storage, realizing the method of simultaneously saving remote software streaming.
It realizes automatic saving of operation videos during remote streaming, improves information security and traceability, and avoids information leakage and human operation errors in traditional screen recording methods.
Smart Images

Figure CN119449780A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of streaming, and in particular to a method for simultaneously saving streaming using remote software. Background Art
[0002] Current streaming software can usually only realize unilateral remote operation and cannot save operation videos. Some companies need to record and review employees' remote operations, which can only be done through screen recording. However, screen recording requires the installation of separate screen recording software, and the screen recording software will only record the entire screen. When the screen displays other items at the same time, it is easy to cause information leakage. Moreover, after the separate screen recording software records the screen, it still needs to be manually operated to store the screen recording data, which is prone to the possibility of manual operation, and some videos can be deleted by themselves, which is not conducive to complete recording.
[0003] Therefore, the prior art has defects and needs to be improved. Summary of the invention
[0004] The technical problem to be solved by the present invention is: through a method for remote software streaming and saving at the same time, all operation videos of the user's streaming can be saved in the case of remote streaming, thereby avoiding information leakage caused by traditional screen recording methods.
[0005] The technical solution of the present invention is as follows: a method for remote software streaming and simultaneous saving is provided, comprising the following steps.
[0006] S1: Sending an rtmp link to the client when establishing a remote connection: When the user starts a remote connection, the server generates an rtmp link and sends it to the client; the rtmp link contains parameters that identify the connection. The parameters that identify the connection are the connection ID and the client IP address.
[0007] S2: The client encodes the recorded desktop data through ffmpeg: The client uses tools such as ffmpeg to encode the recorded desktop data, and prepares to push the encoded video data to the rtmp link.
[0008] S3: The client pushes the encoded video data to the rtmp link: The client pushes the video-encoded data to the previously received rtmp link to ensure data transmission and storage;
[0009] S4: The server uses nginx server to save data: After receiving the pushed video data, the nginx server saves it and can use files or databases to store and manage it.
[0010] The Nginx server configures the rtmp protocol and uses the three parameters record, record_path, and record_append to enable the nginx server to store rtmp video stream data.
[0011] The code for configuring the rtmp protocol on the Nginx server is as follows:
[0012] rtmp{
[0013] server{
[0014] listen XXXX;
[0015] application hls
[0016] live on;
[0017] hls on;
[0018] publish_notify on;
[0019] on_publish callback address api / rtmp / hls / check;
[0020] on_publish_done callback address api / rtmp / hls / onPublishDone;
[0021] hls_path / opt / mnt / live;
[0022] hls_fragment 8s;
[0023] record all;
[0024] record_path / opt / mnt / record;
[0025] record_append on;
[0026] }
[0027] }
[0028] }.
[0029] The above code uses the rtmp protocol to configure the nginx server to listen to port XXXX, where XXXX is a specific port number, such as 7777. In the application section, set the application name to "hls" and turn on the live and hls options. The publish_notify and on_publish parameters are used to configure the callback address for streaming. The hls_path specifies the path for storing hls-format video fragments, and the hls_fragment sets the duration of each fragment. The record parameter is set to all, indicating that all streaming content needs to be stored. The record_path specifies the path for storing recorded videos, and the record_append parameter is set to on, indicating that data is appended when the recording file exists.
[0030] In a preferred solution, the callback address is: http: / / 172.0.0.1:9081 / .
[0031] By adopting the above scheme, the present invention provides a method for remote software streaming and saving at the same time, which has the following technical effects:
[0032] (1) Save operation video: When a user performs remote streaming operations, all user operation videos will be saved to record the user's operation process for subsequent viewing and analysis.
[0033] (2) Improved security: Companies and other organizations that need to monitor and review employees’ remote operations can better monitor operational behaviors and ensure information security by saving remote operation videos.
[0034] (3) Improve traceability: The operation video is saved with information such as timestamp, which can be used to trace the specific time and content of the operation, facilitating subsequent review and examination. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0036] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0037] See also Figure 1 The present invention provides a method for remote software streaming and saving at the same time, comprising the following steps.
[0038] S1: Sending an rtmp link to the client when establishing a remote connection: When the user starts a remote connection, the server generates an rtmp link and sends it to the client; the rtmp link contains parameters that identify the connection. The parameters that identify the connection are the connection ID and the client IP address.
[0039] S2: The client encodes the recorded desktop data through ffmpeg: The client uses tools such as ffmpeg to encode the recorded desktop data, and prepares to push the encoded video data to the rtmp link.
[0040] S3: The client pushes the encoded video data to the rtmp link: The client pushes the video-encoded data to the previously received rtmp link to ensure data transmission and storage;
[0041] S4: The server uses nginx server to save data: After receiving the pushed video data, the nginx server saves it and can use files or databases to store and manage it.
[0042] The Nginx server configures the rtmp protocol and uses the three parameters record, record_path, and record_append to enable the nginx server to store rtmp video stream data.
[0043] In the present invention, when a remote connection is established, an rtmp link is sent to the client to prepare for the connection of the nginx server to the client. By using recording software such as ffmpeg, the client is recorded and encoded, thereby recording the operations performed by the user on the client. The client is monitored by configuring the rtmp protocol using the nginx server. The client pushes the encoded video data to the rtmp link, and the nginx server obtains the recorded video data through the rtmp link and saves it.
[0044] The code for configuring the rtmp protocol on the Nginx server is as follows:
[0045] rtmp{
[0046] server{
[0047] listen XXXX;
[0048] application hls
[0049] live on;
[0050] hls on;
[0051] publish_notify on;
[0052] on_publish callback address api / rtmp / hls / check;
[0053] on_publish_done callback address api / rtmp / hls / onPublishDone;
[0054] hls_path / opt / mnt / live;
[0055] hls_fragment 8s;
[0056] record all;
[0057] record_path / opt / mnt / record;
[0058] record_append on;
[0059] }
[0060] }
[0061] }.
[0062] The above code uses the rtmp protocol to configure the nginx server to listen to port XXXX, where XXXX is a specific port number, such as 7777; in the application section, set the application name to "hls" and turn on the live and hls options; the publish_notify and on_publish parameters are used to configure the callback address of the push stream; hls_path specifies the path for storing hls format video fragments, and hls_fragment sets the duration of each fragment; the record parameter is set to all, indicating that all push stream content needs to be stored; record_path specifies the path for storing recorded videos, and the record_append parameter is set to on, indicating that data is appended when the recorded file exists. When applying, the callback address needs to be changed to a specific address. In a preferred solution, the callback address is: http: / / 172.0.0.1:9081 / .
[0063] In summary, the present invention provides a method for simultaneously saving remote software streaming, which has the following technical effects:
[0064] (1) Save operation video: When a user performs remote streaming operations, all user operation videos will be saved to record the user's operation process for subsequent viewing and analysis.
[0065] (2) Improved security: Companies and other organizations that need to monitor and review employees’ remote operations can better monitor operational behaviors and ensure information security by saving remote operation videos.
[0066] (3) Improve traceability: The operation video is saved with information such as timestamp, which can be used to trace the specific time and content of the operation, facilitating subsequent review and examination.
[0067] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for remote software streaming and saving at the same time, characterized in that: The following steps are involved: S1: When the user starts a remote connection, the server generates an rtmp link and sends it to the client; the rtmp link contains parameters that identify the connection; S2: The client encodes the recorded desktop data and prepares to push the encoded video data to the rtmp link; S3: The client pushes the video-encoded data to the previously received rtmp link to ensure data transmission and storage; S4: After receiving the pushed video data, the nginx server saves it; The Nginx server configures the rtmp protocol and uses the three parameters record, record_path, and record_append to enable the nginx server to store rtmp video stream data.
2. A method for remote software streaming and saving at the same time according to claim 1, characterized in that: In step S1, the parameters for identifying the connection are the connection ID and the client IP address.
3. A method for remote software streaming and saving at the same time according to claim 1, characterized in that: The client encodes the recorded desktop data through ffmpeg.
4. A method for remote software streaming and saving at the same time according to claim 1, characterized in that: The nginx server uses files or databases to store and manage video data.
5. The method for remote software streaming and saving at the same time according to claim 1, characterized in that: The code for configuring the rtmp protocol on the Nginx server is as follows: The above code uses the rtmp protocol to configure the nginx server to listen to port XXXX, where XXXX is the specific port number. In the application section, set the application name to "hls" and turn on the live and hls options. The publish_notify and on_publish parameters are used to configure the callback address of the push stream. The hls_path specifies the path for storing hls format video fragments, and the hls_fragment sets the duration of each fragment. The record parameter is set to all, indicating that all push stream content needs to be stored. The record_path specifies the path for storing recorded videos, and the record_append parameter is set to on, indicating that data is appended when the recorded file exists.
6. A method for remote software streaming and saving at the same time according to claim 5, characterized in that: The callback address is: http: / / 172.0.0.1:9081 / .