CN114189730A - Video recording method, video playback method and device - Google Patents

Video recording method, video playback method and device Download PDF

Info

Publication number
CN114189730A
CN114189730A CN202111297709.9A CN202111297709A CN114189730A CN 114189730 A CN114189730 A CN 114189730A CN 202111297709 A CN202111297709 A CN 202111297709A CN 114189730 A CN114189730 A CN 114189730A
Authority
CN
China
Prior art keywords
video
data
coded data
splicing
output unit
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.)
Granted
Application number
CN202111297709.9A
Other languages
Chinese (zh)
Other versions
CN114189730B (en
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.)
Beijing Tricolor Technology Co ltd
Original Assignee
Beijing Tricolor Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tricolor Technology Co ltd filed Critical Beijing Tricolor Technology Co ltd
Priority to CN202111297709.9A priority Critical patent/CN114189730B/en
Publication of CN114189730A publication Critical patent/CN114189730A/en
Application granted granted Critical
Publication of CN114189730B publication Critical patent/CN114189730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations

Abstract

The invention discloses a video recording method, a video playback method and a video playback device, wherein the video recording method comprises the following steps: receiving a video recording instruction sent by a client; responding to a video recording instruction, and sending a video acquisition request to first splicing equipment with N1 output units; receiving N1 video coded data sent by a first splicing device in response to a video acquisition request and a first identifier corresponding to each video coded data, wherein N1 output units correspond to N1 video coded data one by one, N1 video coded data correspond to the same frame of display picture of a first splicing screen, and the first identifiers corresponding to the video coded data are the same; and writing the N1 pieces of video coded data and the first identifier corresponding to each piece of video coded data into the video recording file. The scheme described by the invention can record the data output by each output unit of the splicing equipment respectively, so that the resolution of the video data cannot be compressed, and the image quality can be ensured to be clearer under the condition of synchronous playback on the splicing screens with different sizes.

Description

Video recording method, video playback method and device
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a video recording method, a video playback method, and a video playback device.
Background
With the rapid development of science and technology and communication, the spliced screen for delivering videos can meet the meeting application scene with a large number of people. However, human memory is limited and the need to record the video during delivery is not avoided in order to prepare it for possible future playback.
In the prior art, video recording is performed on a spliced screen, the whole picture of the spliced screen is reduced to a 1080P or 4K resolution picture and then stored, and a general player is used for playing during playback. Because the resolution of the video data is compressed, when the video data is played back on the spliced screen, the playback picture on the spliced screen is not clear enough.
Disclosure of Invention
The invention provides a video recording method, a video playback method and a video playback device, which are beneficial to improving the definition of a playback picture on a spliced screen.
In a first aspect, an embodiment of the present invention provides a video recording method, which is applied to a recording server, and the method includes:
receiving a video recording instruction sent by a client;
responding to the video recording instruction, and sending a video acquisition request to a first splicing device, wherein the first splicing device is provided with N1 output units, and N1 is larger than 1;
receiving N1 video coded data sent by the first splicing device in response to the video acquisition request and a first identifier corresponding to each video coded data, wherein the N1 output units correspond to the N1 video coded data one by one, the N1 video coded data correspond to the same frame of display picture of a first splicing screen, and the first identifiers corresponding to the video coded data are the same;
writing N1 pieces of video encoding data and a first identifier corresponding to each piece of the video encoding data into a video recording file.
In one possible embodiment, the method further comprises:
responding to the video recording instruction, and sending an address acquisition request to the first splicing device, wherein the address acquisition request is used for requesting to acquire a coding address corresponding to each output unit;
receiving coding addresses corresponding to the output units sent by the first splicing equipment in response to the address acquisition request;
the sending of the video acquisition request to the first splicing device includes:
and sending a video acquisition request to the first splicing device based on the coding address corresponding to each output unit.
In a possible implementation manner, the writing, into a video file, N1 pieces of encoded video data and a first identifier corresponding to each piece of the encoded video data includes:
and sequentially writing the N1 pieces of video coded data and the first marks corresponding to the video coded data into a video recording file based on the arrangement sequence of output units.
In one possible embodiment, the method further comprises:
establishing N1 buffers, wherein the N1 output units correspond to the N1 buffers one by one;
storing the received N1 video coded data and the first identifier corresponding to each video coded data into corresponding buffer areas respectively;
the writing, in a video recording file, the N1 encoded video data and the first flag corresponding to each encoded video data in sequence based on the output unit arrangement order includes:
after the N1 encoded video data and the first identifier corresponding to each encoded video data are stored in the corresponding buffer area, sequentially writing the encoded video data and the first identifier in the N1 buffer areas into a video file based on the arrangement sequence of the output units.
In a possible implementation manner, the output unit arrangement order is set by the user through the client.
In one possible embodiment, the first identifier is a timestamp.
In a second aspect, an embodiment of the present invention provides a video recording method, which is applied to a first splicing device, where the first splicing device includes N1 output units, where N1 is greater than 1, and the method includes:
receiving a video acquisition request sent by a video server;
responding to the video acquisition request, and encoding N1 video data output by the N1 output units to obtain N1 video encoded data, wherein the N1 video encoded data correspond to the same frame of display picture of the first splicing screen;
generating the same first identification for each video coding data;
and sending the N1 video coded data and a first identifier corresponding to each video coded data to the video recording server.
In a possible implementation manner, before the first splicing device receives a video acquisition request sent by a video recording server, the method further includes:
receiving an address acquisition request sent by the video server, wherein the address acquisition request is used for requesting to acquire a coding address corresponding to each output unit;
and responding to the address acquisition request, and sending the coded address corresponding to each output unit to the video recording server.
In one possible embodiment, the first identifier is a timestamp.
In a third aspect, an embodiment of the present invention provides a video playback method, which is applied to a video recording server, and the method includes:
receiving a video playback instruction which is sent by a client and used for playing back on a second spliced screen, wherein the video playback instruction carries an identifier of a video file and a playback starting moment;
reading N1 video coded data after the playback starting time and first identifications corresponding to the video coded data from the video file, wherein the N1 video coded data correspond to the same frame of display picture of a first splicing screen, the N1 video coded data correspond to N1 output units of first splicing equipment corresponding to the first splicing screen one by one, and the first identifications corresponding to the video coded data are the same;
and sending the N1 video coded data and a first identifier corresponding to each video coded data to a second splicing device corresponding to the second splicing screen, wherein N1 playing windows of the second splicing screen correspond to the N1 video coded data in a one-to-one manner, and the video coded data and the first identifier corresponding to the playing windows are sent to an output unit of the second splicing device corresponding to the playing windows.
In a possible implementation manner, before the reading, from the video file, the N1 pieces of video encoding data after the playback start time and the first identifier corresponding to each piece of video encoding data, the method further includes:
sending a first notification to the second splicing device, wherein the first notification is used for notifying the playback starting time;
and receiving a data acquisition request sent by the second splicing device, wherein the data acquisition request is used for requesting to acquire the video coding data after the playback starting time in the video file and the first identifier corresponding to the video coding data.
In a possible implementation manner, the N video coded data and the first identifier corresponding to each video coded data are written into the video file based on an output unit arrangement order;
the reading, from the video file, the N1 pieces of video encoding data after the playback start time and the first identifier corresponding to each piece of video encoding data includes:
and sequentially reading the N1 video coded data after the playback starting time and the first identifier corresponding to each video coded data from the video recording file based on the output unit arrangement sequence.
In a possible implementation manner, the output unit arrangement order is set by the user through the client.
In one possible embodiment, the first identifier is a timestamp.
In a fourth aspect, an embodiment of the present invention provides a video playback method applied to a second splicing device, where the second splicing device includes N2 output units, and N2 is greater than 1, and the method includes:
setting N1 playing windows on the second splicing screen, wherein each playing window corresponds to one or more output units of the second splicing device, and N1 is larger than 1;
receiving N1 video coded data sent by a video recording server and first identifications corresponding to the video coded data, wherein the N1 video coded data correspond to the same frame of display picture of a first splicing screen, the N1 video coded data correspond to N1 output units of first splicing equipment corresponding to the first splicing screen one by one, and the first identifications corresponding to the video coded data are the same; the N1 playing windows correspond to the N1 video coded data one by one, and the video coded data and the first identification corresponding to the playing windows are sent to output units corresponding to the playing windows;
decoding video coded data through an output unit corresponding to each playing window to obtain video decoded data corresponding to each playing window;
and outputting video decoding data with the same first identification to the second spliced screen for display through the output unit corresponding to each playing window.
In one possible embodiment, the method further comprises:
establishing N1 buffers, wherein the N1 playing windows correspond to the N1 buffers one by one;
respectively storing the received N1 video coded data and the first identification corresponding to each video coded data into corresponding buffer areas;
the decoding the video encoding data through the output unit corresponding to each playing window to obtain the video decoding data corresponding to each playing window includes:
after the N1 encoded video data and the first identifier corresponding to each encoded video data are stored in the corresponding buffer area, the encoded video data in the corresponding buffer area are decoded by the output unit corresponding to each playing window, and the decoded video data corresponding to each playing window is obtained.
In a possible implementation manner, before receiving the N1 encoded video data sent by the video recording server and the first identifier corresponding to each encoded video data, the method further includes:
receiving a first notification sent by the video recording server, wherein the first notification is used for notifying the playback starting time;
and sending a data acquisition request to the video recording server, wherein the data acquisition request is used for requesting to acquire the video encoding data after the playback starting moment in the video recording file and the first identifier corresponding to the video encoding data.
In one possible embodiment, the first identifier is a timestamp.
In a fifth aspect, an embodiment of the present invention provides a video recording apparatus, where the video recording apparatus may be a video recording server, may also be an apparatus in the video recording server, or may be an apparatus capable of being used in cooperation with the video recording server. The video recording device can also be a chip system. The video recording apparatus may perform the method of the first aspect. The functions of the video recording device can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more units or modules corresponding to the above functions. The unit or module may be software and/or hardware. The operations and advantageous effects performed by the video recording apparatus can be referred to the method and advantageous effects described in the first aspect.
In a sixth aspect, an embodiment of the present invention provides a video recording apparatus, where the video recording apparatus may be splicing equipment, may also be an apparatus in the splicing equipment, or may be an apparatus capable of being used in cooperation with the splicing equipment. The video recording device can also be a chip system. The video recording apparatus may perform the method of the second aspect. The functions of the video recording device can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more units or modules corresponding to the above functions. The unit or module may be software and/or hardware. The operations and advantages performed by the video recording apparatus can be referred to the method and advantages of the second aspect.
In a seventh aspect, an embodiment of the present invention provides a video playback apparatus, where the video playback apparatus may be a video recording server, may also be an apparatus in the video recording server, or may be an apparatus capable of being used in cooperation with the video recording server. The video playback device can also be a chip system. The video playback device may perform the method of the third aspect. The functions of the video playback device can be realized by hardware, and can also be realized by hardware executing corresponding software. The hardware or software includes one or more units or modules corresponding to the above functions. The unit or module may be software and/or hardware. The operations and advantageous effects performed by the video playback apparatus can be found in the method and advantageous effects described in the third aspect.
In an eighth aspect, an embodiment of the present invention provides a video playback apparatus, where the video playback apparatus may be a splicing device, may also be an apparatus in a splicing device, or may be an apparatus capable of being used in cooperation with a splicing device. The video playback device can also be a chip system. The video playback device may perform the method of the fourth aspect. The functions of the video playback device can be realized by hardware, and can also be realized by hardware executing corresponding software. The hardware or software includes one or more units or modules corresponding to the above functions. The unit or module may be software and/or hardware. The operations and advantageous effects performed by the video playback apparatus can be found in the method and advantageous effects described in the fourth aspect above.
In a ninth aspect, embodiments of the present invention provide an electronic device, which includes a processor and a memory, wherein the memory is used for storing a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions, execute the method according to the first aspect, execute the method according to the second aspect, execute the method according to the third aspect, or execute the method according to the fourth aspect.
In a tenth aspect, embodiments of the invention provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform a method as in the first aspect, or to perform a method as in the second aspect, or to perform a method as in the third aspect, or to perform a method as in the fourth aspect.
Drawings
In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings used in the description of the embodiment will be briefly introduced below.
Fig. 1 is a schematic diagram of a communication system provided by an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a splicing device and a splicing screen according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a video recording method according to an embodiment of the present invention;
fig. 4 is a schematic flow chart of a video playback method provided by an embodiment of the present invention;
fig. 5 is a schematic diagram of a second splicing device opening a play window according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a video recording apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a video playback apparatus provided in an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The terms "first" and "second," and the like in the description, claims, and drawings of the present application are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
In order to better understand the present application, the following describes a communication system provided in an embodiment of the present application:
referring to fig. 1, fig. 1 is a schematic diagram of a communication system according to an embodiment of the present invention. The communication system includes: the system comprises a video server, a client, a network switch, a first splicing device, a first splicing screen, a second splicing device and a second splicing screen. The network switch is connected with the video recording server, the client, the first splicing device and the second splicing device and is used for information interaction of the four splicing devices. The client is used for controlling the sending of the video recording instruction and starting the video recording or playback function. Clients include, but are not limited to, smart phones, tablets, laptops, desktop computers, and the like. The video server is used for recording and storing the spliced video displayed on the first spliced screen and also used for playing back the video file on the second spliced screen.
The first splicing device comprises N1 output units which are respectively output unit 1-output unit N1. The first spliced screen comprises N1 sub-screens from sub-screen 1 to sub-screen N1. The N1 output units of the first splicing device correspond to the N1 sub-screens of the first splicing screen one by one. Wherein N1 is greater than 1. For example, when N1 is 9, the size of the first tiled screen is 3 × 3. When N1 is 16, the size of the first tiled screen is 4 x 4. Each output unit corresponds to one path of video data, the first splicing equipment can synchronously send the multiple paths of video data to the first splicing screen to form a complete spliced video, and the spliced video can be sent to the video server through the output units to be recorded.
For example, as shown in fig. 2, N1 is 4. The first splicing apparatus 201 in fig. 2 includes four output units: output unit 1, output unit 2, output unit 3, and output unit 4. The first tiled screen 202 in FIG. 2 includes four sub-screens: sub-screen 1, sub-screen 2, sub-screen 3, and sub-screen 4. Four output units of the first splicing device correspond to four sub-screens of the first splicing screen one by one: the output unit 1 corresponds to the sub-screen 1, the output unit 2 corresponds to the sub-screen 2, the output unit 3 corresponds to the sub-screen 3, and the output unit 4 corresponds to the sub-screen 4. The data output by the output unit 1 can be displayed on the sub-screen 1, the data output by the output unit 2 can be displayed on the sub-screen 2, the data output by the output unit 3 can be displayed on the sub-screen 3, and the data output by the output unit 4 can be displayed on the sub-screen 4.
The second splicing device comprises N2 output units which are respectively output unit 1-output unit N2. The second spliced screen comprises N2 sub-screens from sub-screen 1 to sub-screen N2. The N2 output units of the second splicing device correspond to the N2 sub-screens of the second splicing screen one by one. The second splicing device may display the video data output by the output unit on the corresponding sub-screen. Wherein N2 is greater than 1. For example, when N2 is 4, the size of the second tiled screen is 2 × 2. When N2 is 9, the size of the second tiled screen is 3 × 3. When N2 is 16, the size of the second tiled screen is 4 x 4. N2 and N1 may be the same or different.
The corresponding relationship between the output unit in the second mosaic device and the sub-screen in the second mosaic screen is similar to the corresponding relationship between the output unit in the first mosaic device and the sub-screen in the first mosaic screen, and the corresponding relationship between the output unit in the second mosaic device and the sub-screen in the second mosaic screen is not illustrated here.
In one possible implementation, the first and second tiled devices can be the same device, and the first and second tiled screens can be the same tiled screen. That is to say, after a certain splicing device and a splicing screen are recorded by the video recording server, video playback can be performed on the same splicing device and the same splicing screen.
In another possible implementation, the first and second tiled devices can be different devices, and the first and second tiled screens can be different tiled screens. That is, after a certain splicing device and a splicing screen are recorded, the recording server can play back video on another splicing device and a splicing screen.
The following describes a video recording method, a video playback method, and related apparatuses provided in the embodiments of the present invention in detail.
Referring to fig. 3, fig. 3 is a schematic flowchart of a video recording method according to an embodiment of the present invention. The video recording method provided by the embodiment of the invention can comprise the following steps S301 to S306.
S301, the client sends a video recording instruction to the video recording server.
In the embodiment of the application, a user can click a video recording button on a client. And after detecting that the user clicks the video recording button, the client sends a video recording instruction to the video recording server.
Alternatively, the client may automatically send a video recording instruction to the video recording server. For example, the user may set a time at which the client automatically transmits the video recording instruction to the video recording server on the client, and when the time arrives, the client automatically transmits the video recording instruction to the video recording server.
Or, the client may also automatically send a video recording instruction to the video recording server when detecting that the first splicing device starts video playing. Optionally, the user may set splicing equipment that needs to automatically record a video at the client, so that when the subsequent client detects that the splicing equipment starts video playing, the subsequent client automatically sends a video recording instruction to the video recording server to record the video played by the splicing equipment.
S302, the video recording server responds to the video recording instruction and sends a video acquisition request to the first splicing device.
In the embodiment of the application, after receiving the video recording instruction, the video recording server responds to the video recording instruction and sends a video acquisition request to the first splicing device.
Optionally, the video recording instruction may further indicate a first splicing device to be video-recorded. Optionally, the video recording instruction may carry the identifier of the first splicing device, so as to indicate that the video recording server needs to record the video on the first splicing device. Optionally, the identifier of the first splicing device may be a model, a number, an address, or the like of the first splicing device.
Optionally, the first splicing device may be a splicing device selected by a user at the client. For example, the client may display a list of splicing devices. The user can select the splicing equipment in the splicing equipment list displayed by the client. The client sends a video recording instruction to the video recording server, wherein the video recording instruction can carry the identifier of the splicing equipment selected by the user, so that the video recording server can record the video on the splicing equipment selected by the user.
Or, the video recording instruction may not indicate the first splicing device to be video-recorded, and the first splicing device may be a default splicing device.
S303, the first splicing device encodes the N1 video data output by the N1 output units to obtain N1 video encoded data.
Wherein, the N1 video coded data correspond to the same frame of display of the first mosaic screen. I.e., N1 video data encoded into the N1 encoded video data for simultaneous display on the first mosaic.
The encoding protocol may be H264 or H265, or the encoding protocol may be another protocol.
For example, taking N1 as 4 as an example, the first splicing device includes output units 1 to 4. The output unit 1 encodes the video data 1 to obtain video encoded data 1; the output unit 2 encodes the video data 2 to obtain video encoded data 2; the output unit 3 encodes the video data 3 to obtain video encoded data 3; the output unit 4 encodes the video data 4 to obtain video encoded data 4. The video data 1 to the video data 4 correspond to the same frame of display picture of the first spliced screen, that is, the video data 1 to the video data 4 are displayed on the first spliced screen at the same time.
S304, the first splicing device generates the same first identification for each video coding data.
For example, a first splicing device may generate a first identity a for video encoded data 1; the first splicing device may generate a first identifier a for video encoded data 2; the first splicing device may generate a first identity a for video coded data 3; the first splicing device may generate a first identity a for video encoding data 4. It can be seen that the first identifiers corresponding to the video coded data 1 to 4 are the same. The same first identification is generated for the video coded data corresponding to the same frame of display picture of the first spliced screen, so that the video coded data corresponding to the same frame of display picture of the first spliced screen can be distinguished, and the video playback is facilitated.
Optionally, the first identifier is a timestamp. The first splicing device synchronizes the N1 video coded data corresponding to the same frame of the spliced screen display picture by using a synchronous clock signal. The first splicing device can then time stamp the N1 video encoded data equally. For example, the time interval between the display pictures of two adjacent frame splicing screens is 1 millisecond. The first splicing device can time-stamp N1 video encoded data of 01 ms at time 14 hours, 12 minutes, 37 seconds with the same time stamp, which can be 14:12:37: 01. The first splicing device may time the same time stamp N1 video encoded data at time 14 hours, 12 minutes, 37 seconds, 02 milliseconds, which may be 14:12:37:02, and so on.
Optionally, the first identifier may be a number, a serial number or a label. For example, the time interval between the display pictures of two adjacent frame splicing screens is 1 millisecond. The first splicing device may assign the same sequence number to N1 video encoded data of 01 ms, 12 minutes, 37 seconds at time 14, which may be sequence number 1. The first splicing device may assign the same sequence number to N1 video encoded data of 02 ms 12 minutes 37 seconds at time 14, which may be sequence number 2.
Note that the timestamp is not necessarily in the form of beijing time, but may be in the form of timer time (e.g., 00:00.01, 00:00.02, 00:00.03) or other time forms, and the present embodiment only takes the form of beijing time as an example, and does not represent the timestamp, and the form is always the same. The particular form of the timestamp is not limiting herein.
S305, the first splicing device sends the N1 video coded data and the first identification corresponding to each video coded data.
In a possible implementation, after receiving the video recording instruction, the video recording server may further send an address acquisition request to the first splicing device in response to the video recording instruction, where the address acquisition request is used to request to acquire a coding address corresponding to each output unit; after receiving an address acquisition request sent by a video server, first splicing equipment responds to the address acquisition request and sends coding addresses corresponding to output units to the video server; after receiving the coding address corresponding to each output unit sent by the first splicing device in response to the address acquisition request, the video server may specifically send a video acquisition request to the first splicing device based on the coding address corresponding to each output unit.
Optionally, the coded address may be a Uniform Resource Locator (URL) address, and the coded address corresponding to each output unit is an independent URL address.
For example, if the first splicing device includes output units 1 to 4, the four output units respectively correspond to URL addresses 1 to 4. The four URL addresses are:
rtsp://192.168.1.100:122/main,
rtsp://192.168.1.100:145/main,
rtsp://192.168.1.100:187/main,
rtsp://192.168.1.100:265/main,
and after receiving the video recording instruction, the video recording server sends an address acquisition request to the first splicing equipment. And after receiving the address acquisition request, the first splicing equipment sends the four URL addresses to the video recording server.
After receiving the four URL addresses, the video recording server may specifically send a video acquisition request to the output unit 1 based on the URL address corresponding to the output unit 1, and send a video acquisition request to the output unit 2 based on the URL address corresponding to the output unit 2, send a video acquisition request to the output unit 3 by the URL address corresponding to the output unit 3, and send a video acquisition request to the output unit 4 by the URL address corresponding to the output unit 4. Accordingly, after receiving the video acquisition request, the output unit 1 sends the encoded video data 1 corresponding to the output unit 1 and the first identifier a corresponding to the encoded video data 1 to the video recording server. After receiving the video acquisition request, the output unit 2 sends the video encoding data 2 corresponding to the output unit 2 and the first identifier a corresponding to the video encoding data 2 to the video recording server. After receiving the video acquisition request, the output unit 3 sends the video encoded data 3 corresponding to the output unit 3 and the first identifier a corresponding to the video encoded data 3 to the video recording server. After receiving the video acquisition request, the output unit 4 sends the video encoding data 4 corresponding to the output unit 4 and the first identifier a corresponding to the video encoding data 4 to the video recording server.
S306, the video recording server writes the N1 video coded data and the first identification corresponding to each video coded data into the video recording file.
In the embodiment of the application, after the video recording server receives N1 video coded data and the first identifier corresponding to each video coded data sent by the first splicing device in response to the video acquisition request, the video recording server writes the N1 video coded data and the first identifier corresponding to each video coded data into a video recording file.
Therefore, based on the method described in fig. 3, by encoding and recording each sub-screen, it is ensured that the resolution of the video data is not compressed, and further, the image quality is clearer when the video data is synchronously played back on the spliced screens of different sizes.
In a possible implementation, a specific implementation manner in which the video recording server writes the N1 encoded video data and the first identifier corresponding to each encoded video data into the video recording file is as follows: the N1 pieces of video coded data and the first marks corresponding to the video coded data are sequentially written into the video recording file based on the arrangement sequence of the output units. That is, N1 pieces of video coded data with the same first identifier (at the same time) are written into the video recording file in the order of the arrangement of the output units.
The output cells may be arranged in any order, for example, from 1 to N1, or from N1 to 1. For example, N1 output units are sorted from 1 to N1, the video encoded data corresponding to output unit 1 is written into a video file, the video encoded data corresponding to output unit 2 is written into a video file, the video encoded data corresponding to output unit 3 is written into a video file, and so on, and finally the video encoded data corresponding to output unit N1 is written into a video file. For another example, the N1 output units are sorted from N1 to 1, the video coded data corresponding to the output unit N1 are written into the video file, the video coded data corresponding to the output unit 3 are written into the video file, the video coded data corresponding to the output unit 2 are written into the video file, and so on, and finally the video coded data corresponding to the output unit 1 are written into the video file.
In one possible implementation, the output unit arrangement order is set by the user through the client. For example, assume that the first splicing device includes 4 output units, output unit 1 to output unit 4, respectively. The user can set the output unit arrangement sequence as follows through the client: output unit 1, output unit 2, output unit 3, and output unit 4. Or, the user can set the output unit arrangement order to be: output unit 4, output unit 3, output unit 2, and output unit 1. Or, the user may set the output unit arrangement order to be: output unit 3, output unit 4, output unit 1, output unit 2.
The N1 video coded data are written into the video recording file according to the arrangement sequence of the output units, so that the video recording server can distinguish which video coded data comes from which output unit according to the arrangement sequence of the output units when the video recording file is played back, and the video recording server can display the picture corresponding to the video coded data in the playing window corresponding to the video coded data.
Optionally, the video server may establish N1 buffer areas, where N1 output units of the first splicing device correspond to the N1 buffer areas one to one; the video recording server respectively stores the received N1 video coded data and the first identification corresponding to each video coded data into corresponding cache regions; the specific implementation manner of the video recording server sequentially writing the N1 video encoding data and the first identifier corresponding to each video encoding data into the video recording file based on the output unit arrangement order is as follows: after the N1 encoded video data and the first identifier corresponding to each encoded video data are stored in the corresponding buffer, the encoded video data and the first identifier in the N1 buffers are sequentially written into the video file based on the arrangement sequence of the output units.
That is, one output unit corresponds to one buffer, N1 output units correspond to N1 buffers, and the video server stores N1 video encoding data with the same first identifier (at the same time) received from the first splicing device into the corresponding buffers. When the video recording server determines that the N1 video encoding data with the same first identifier are all located in the buffer area, the N1 video encoding data are written into the video recording file in sequence according to the arrangement sequence of the output units.
Illustratively, the splicing device includes four output units: output unit 1, output unit 2, output unit 3, and output unit 4. The video server establishes 4 buffer areas according to four output units: buffer 1, buffer 2, buffer 3, and buffer 4. Wherein, output unit 1 corresponds to buffer 1, output unit 2 corresponds to buffer 2, output unit 3 corresponds to buffer 3, and output unit 4 corresponds to buffer 4. The video coded data 1 and the first identifier a received from the output unit 1 are stored in the buffer 1, the video coded data 2 and the first identifier a received from the output unit 2 are stored in the buffer 2, the video coded data 3 and the first identifier a received from the output unit 3 are stored in the buffer 3, and the video coded data 4 and the first identifier a received from the output unit 4 are stored in the buffer 4. And when the four video coded data with the first identifier A are stored in the buffer area, writing the four video coded data into the video file according to the arrangement sequence of the output units.
In the process of network transmission, a network delay situation may occur, and when the network delay occurs, video coding data of the same first identifier of different output units may not arrive at the same time. The received video coding data can be buffered by establishing buffer areas aiming at different output units in the video recording server, so that the video recording file can be written in according to the arrangement sequence of the output units after all the video coding data of the same first identifier are received.
Referring to fig. 4, fig. 4 is a schematic flowchart of a video playback method according to an embodiment of the present invention. The video playback method provided by the embodiment of the invention can comprise the following steps S401 to S406.
S401, the second splicing device sets N1 playing windows on the second splicing screen, each playing window corresponds to one or more output units of the second splicing device, and N1 is larger than 1.
The second splicing device is used for playing back, and the second splicing screen is used for displaying the played back video. The second splicing device for playback and the first splicing device for recording may be the same device, may also be different devices with the same size, and may also be different devices with different sizes, which is not limited herein. For example, video encoded data is a video file which is obtained from a 2 × 2 spliced screen through a video recording operation and then written into a video recording server, and can be played back on a 2 × 2 or 3 × 3 screen by opening a play window.
Exemplarily, fig. 5 is a schematic diagram of opening a play window by the second splicing device according to the embodiment of the present invention. As shown in fig. 5, the second tiled screen 501 in fig. 5 is a 3 × 3 tiled screen, which includes 9 sub-screens in total. In fig. 5 503 is a second stitching device comprising 9 output units. Suppose that a video file obtained by recording a first mosaic screen of 2 x 2 size is to be played back on a second mosaic screen. A 2 × 2 playing window 502 (the playing window 502 includes windows 1 to 4) needs to be opened on the second mosaic screen 501. As shown in fig. 5, a window 1 in the playing window 502 is composed of four sub-screens of the second mosaic screen 501, the four sub-screens of the second mosaic screen correspond to four output units in the second mosaic device 503, and the window 1 also corresponds to four output units in the second mosaic device 503. If it is assumed that window 1 corresponds to four sub-screens of the second mosaic 501: sub-screen 1, sub-screen 2, sub-screen 4, and sub-screen 5. Window 1 corresponds to the four output units of the second stitching device 503: output unit 1, output unit 2, output unit 4, and output unit 5. If it is assumed that window 2 corresponds to four sub-screens of the second mosaic 501: sub-screen 2, sub-screen 3, sub-screen 5, and sub-screen 6. Window 2 corresponds to the four output units of the second stitching device 503: output unit 2, output unit 3, output unit 5, and output unit 6. That is, the output unit corresponding to each window in the playing window is the output unit corresponding to one or more sub-screens constituting the window. The corresponding relationships between other windows and the output unit are similar, and are not described herein.
S402, the client sends a video playback instruction for playing back in the second spliced screen to the video server. Accordingly, the video recording server can receive the video recording playback instruction sent by the client.
The video playback instruction carries the identification of the video file and the playback starting time.
Illustratively, a user selects a video file to be played back from a video file list by using a client, and determines a playback start time in the video file. The video files that the user chooses to play back may be: the name of the video file name is input for selection, or the date and time when the video file is stored is input for selection. The playback start time may be user-input, or the user may drag the time axis of the video file to input the playback start time.
S403, the video recording server reads the N1 video coded data after the playback starting time and the first identifier corresponding to each video coded data from the video recording file.
The description related to the first identifier may refer to the descriptions in S301 to S306 of the video recording method embodiment, which are not described herein again.
The N1 encoded video data correspond to the same frame of display image of the first mosaic screen, the N1 encoded video data correspond to the N1 output units of the first mosaic device corresponding to the first mosaic screen one by one, and the first identifiers corresponding to the encoded video data are the same.
In a possible implementation, before reading, from the video file, N1 pieces of encoded video data after the playback start time and the first identifier corresponding to each piece of encoded video data, the method further includes: the video server sends a first notification to the second splicing device, wherein the first notification is used for notifying the playback starting time; after receiving the first notification, the second splicing device sends a data acquisition request to the video server, wherein the data acquisition request is used for requesting to acquire video coded data after the playback starting moment in the video file and a first identifier corresponding to the video coded data; optionally, after the second splicing device receives the first notification, the second splicing device may send a data acquisition request to the video server through the output unit corresponding to each window. After receiving the data acquisition request sent by the second splicing device, the video server executes step S403.
In a possible implementation manner, the specific implementation manner that the video recording server reads, from the video recording file, the N1 pieces of video encoded data after the playback start time and the first identifier corresponding to each piece of video encoded data is as follows: and sequentially reading the N1 video coded data after the playback starting time and the first identifier corresponding to each video coded data from the video recording file based on the output unit arrangement sequence. The arrangement order of the output units for reading the N1 pieces of video encoded data after the playback start time is the same as the arrangement order of the output units written in the video recording file at the time of video recording.
Illustratively, the first splicing device includes 4 output units, i.e., output unit 1 to output unit 4. During the video recording process, the video recording server receives 4 pieces of video encoding data from the first splicing device, wherein the 4 pieces of video encoding data are respectively { Q4, Q3, Q2 and Q1 }. Q1 comes from the output unit 1, Q2 comes from the output unit 2, Q3 comes from the output unit 3, Q4 comes from the output unit 4, and Q1, Q2, Q3 and Q4 correspond to the same frame display screen of the first spliced screen. The output unit arrangement order is: output unit 1 first row, output unit 2 second row, output unit 3 third row and output unit 4 fourth row. Therefore, the 4 pieces of video coded data { Q1, Q3, Q4, Q2} are written into the video file in the order of { Q1, Q2, Q3, Q4} according to the arrangement of the output units, i.e., Q1 is written first, Q2 is written second, Q3 is written second, and Q4 is written last. During playback, the recording server reads the 4 pieces of video coded data according to the sequence of { Q1, Q2, Q3 and Q4}, namely, the recording server reads Q1, then reads Q2, then reads Q3 and finally reads Q4. Then, the video coding data corresponding to the next frame of display picture is read.
S404, the video recording server sends the N1 video coded data and the first identification corresponding to each video coded data to second splicing equipment corresponding to the second splicing screen.
The N1 playing windows of the second splicing screen correspond to the N1 video coded data one by one, and the video coded data and the first identification corresponding to the playing windows are sent to the output unit of the second splicing device corresponding to the playing windows. The number of windows formed in the second spliced screen for playback is the same as that of the sub-screens of the first spliced screen for video recording, and the windows are in one-to-one correspondence.
For example, the first tiled screen is a 2 × 2 tiled screen, and the first tiled screen includes four sub-screens: sub-screen 1, sub-screen 2, sub-screen 3, and sub-screen 4. And playing back the video file acquired from the video on the first spliced screen on the 3X 3 second spliced screen, wherein four windows need to be opened on the 3X 3 second spliced screen, and the layout of the four windows is 2X 2 as the first spliced screen. For example, as shown in fig. 5, a 2 × 2 play window 502 is opened on the second mosaic screen 501 (the play window 502 includes windows 1 to 4). Referring to step S401, it can be known that the output unit corresponding to each window in the playing window is the output unit corresponding to one or more sub-screens constituting the window. It is assumed that the window 1 shown in fig. 5 corresponds to the output unit 1, the output unit 2, the output unit 4, and the output unit 5. The video server sends the video encoded data corresponding to the window 1 to the output unit 1, the output unit 2, the output unit 4, and the output unit 5 in the second splicing device 503. The video encoding data corresponding to window 1 depends on the picture displayed on the sub-screen corresponding to window 1 on the first mosaic. Other windows are similar and will not be described herein.
S405, the second splicing device decodes the video coding data through the output unit corresponding to each playing window to obtain video decoding data corresponding to each playing window.
For example, the output unit 1 and the output unit 2 corresponding to the playback window 1, and the video recording server transmits the video encoded data corresponding to the playback window 1 and the first identifier corresponding to the video encoded data to the output unit 1 and the output unit 2.
And S406, the second splicing device simultaneously outputs the video decoding data with the same first identifier to the second splicing screen for displaying through the output unit corresponding to each playing window.
In one possible implementation, the second splicing device establishes N1 buffers, where the N1 playing windows correspond to N1 buffers one-to-one; respectively storing the received N1 video coded data and the first identification corresponding to each video coded data into corresponding buffer areas; the specific implementation manner of the second splicing device decoding the video encoded data through the output unit corresponding to each playing window to obtain the video decoded data corresponding to each playing window is as follows: after the N1 encoded video data and the first identifier corresponding to each encoded video data are stored in the corresponding buffer area, the encoded video data in the corresponding buffer area are decoded by the output unit corresponding to each playing window, and the decoded video data corresponding to each playing window is obtained.
Illustratively, the 4 sets of video encoding data for the same frame (with the same first identifier) include { Q1, Q2, Q3, Q4 }. As shown in fig. 5, the second tiled screen is a 3 × 3 tiled screen, and the second tiled device includes 9 output units. Four playing windows in 2 x 2 layout are arranged on the second spliced screen. The second splicing device establishes 4 buffer areas, wherein the buffer area 1 corresponds to the playing window 1, the buffer area 2 corresponds to the playing window 2, the buffer area 3 corresponds to the playing window 3, and the buffer area 4 corresponds to the playing window 4. After the Q1-Q4 are stored in the corresponding buffer areas, the video coded data Q1-Q4 are decoded through 9 output units corresponding to the four playing windows, and video decoding data corresponding to the four playing windows are obtained. And the second splicing device sends the four decoded data to a sub-screen corresponding to the playing window of the second splicing screen for displaying.
In the network transmission process, a network delay may occur, and when the network delay occurs, video encoding data of the same first identifier of different windows sent by the video recording server may not arrive at the same time. The received video coded data can be buffered by establishing buffer areas aiming at different playing windows in the second splicing device, so that the second splicing device can decode the video coded data and then simultaneously send video decoding data to the second splicing screen after all the video coded data of the same first identifier are received. Therefore, the playing windows on the second spliced screen can be displayed simultaneously.
Referring to fig. 6, the video recording apparatus shown in fig. 6 may be used to perform part or all of the functions of the recording server in the embodiment of the method described in fig. 3. The device may be a video server, a device in a video server, or a device that can be used in conjunction with a video server. The video recording device can also be a chip system. The video recording apparatus shown in fig. 6 may include a communication unit 601 and a processing unit 602. The processing unit 602 is configured to perform data processing. The communication unit 601 is integrated with a receiving unit and a transmitting unit. The communication unit 601 may also be referred to as a transceiving unit. Alternatively, communication section 601 may be divided into a reception section and a transmission section. Wherein:
a communication unit 601, configured to receive a video recording instruction sent by a client;
the communication unit 601 is further configured to send a video acquisition request to a first splicing device in response to the video recording instruction, where the first splicing device has N1 output units, and N1 is greater than 1; receiving N1 video coded data sent by a first splicing device in response to a video acquisition request and a first identifier corresponding to each video coded data, wherein N1 output units correspond to N1 video coded data one by one, N1 video coded data correspond to the same frame of display picture of a first splicing screen, and the first identifiers corresponding to the video coded data are the same;
processing unit 602 is configured to write the N1 encoded video data and the first identifier corresponding to each encoded video data into the video recording file.
In a possible implementation, the communication unit 601 is further configured to send an address obtaining request to the first splicing device in response to the video recording instruction, where the address obtaining request is used to request to obtain the coding address corresponding to each output unit; the first splicing equipment is also used for receiving the coding address corresponding to each output unit sent by the address acquisition request; the method for sending the video acquisition request to the first splicing device by the communication unit 601 specifically includes: and sending a video acquisition request to the first splicing device based on the coding address corresponding to each output unit.
In a possible implementation, the way that processing unit 602 writes N1 encoded video data and the first identifier corresponding to each encoded video data into the video file is specifically: and sequentially writing the N1 pieces of video coded data and the first marks corresponding to the video coded data into a video recording file based on the arrangement sequence of output units.
In one possible implementation, the processing unit 602 is further configured to establish N1 buffers, where N1 output units are in one-to-one correspondence with N1 buffers; the buffer memory is also used for respectively storing the received N1 video coded data and the first identifications corresponding to the video coded data into corresponding buffer memory areas; the way that processing unit 602 sequentially writes N1 pieces of video encoding data and the first identifier corresponding to each piece of video encoding data into the video file based on the output unit arrangement order is specifically: after the N1 encoded video data and the first identifier corresponding to each encoded video data are stored in the corresponding buffer, the encoded video data and the first identifier in the N1 buffers are sequentially written into the video file based on the arrangement sequence of the output units.
Referring to fig. 6, the video recording apparatus shown in fig. 6 may be used to perform part or all of the functions of the first splicing device in the embodiment of the method described in fig. 3. The device may be the first splicing device, may also be a device in the first splicing device, or may be a device capable of being used in cooperation with the first splicing device. The video recording device can also be a chip system. The video recording apparatus shown in fig. 6 may include a communication unit 601 and a processing unit 602. The processing unit 602 is configured to perform data processing. The communication unit 601 is integrated with a receiving unit and a transmitting unit. The communication unit 601 may also be referred to as a transceiving unit. Alternatively, communication section 601 may be divided into a reception section and a transmission section. Wherein:
a communication unit 601, configured to receive a video acquisition request sent by a video server;
the processing unit 602 is configured to respond to the video acquisition request, encode N1 pieces of video data output by the N1 output units to obtain N1 pieces of video encoded data, where the N1 pieces of video encoded data correspond to a same frame of a display picture of the first mosaic screen; generating the same first identification for each video coding data;
communication section 601 is further configured to transmit the N1 pieces of encoded video data and the first flag corresponding to each piece of encoded video data to the recording server.
In a possible implementation, the communication unit 601 is further configured to receive an address obtaining request sent by the video recording server, where the address obtaining request is used to request to obtain a coding address corresponding to each output unit;
the communication unit 601 is further configured to send the coded addresses corresponding to the output units to the recording server in response to the address acquisition request.
Referring to fig. 7, the video playback apparatus shown in fig. 7 may be used to perform part or all of the functions of the video recording server in the embodiment of the method described in fig. 4. The device may be a video server, a device in a video server, or a device that can be used in conjunction with a video server. The video playback device can also be a chip system. The video playback apparatus shown in fig. 7 may include a communication unit 701 and a processing unit 702. The processing unit 702 is configured to perform data processing. The communication unit 701 integrates a receiving unit and a transmitting unit. The communication unit 701 may also be referred to as a transceiving unit. Alternatively, communication section 701 may be divided into a reception section and a transmission section. The processing unit 702 and the communication unit 701 are similar, and are not described in detail below. Wherein:
the communication unit 701 is configured to receive a video playback instruction sent by the client and used for performing playback on the second spliced screen, where the video playback instruction carries an identifier of a video file and a playback start time;
the processing unit 702 is configured to read, from the video file, N1 pieces of video encoded data after the playback start time and first identifiers corresponding to the video encoded data, where N1 pieces of video encoded data correspond to the same frame of display screen of the first mosaic screen, N1 pieces of video encoded data correspond to N1 output units of the first mosaic device corresponding to the first mosaic screen one to one, and the first identifiers corresponding to the video encoded data are the same;
the communication unit 701 is further configured to send N1 video coded data and a first identifier corresponding to each video coded data to a second splicing device corresponding to a second splicing screen, where N1 playing windows of the second splicing screen correspond to N1 video coded data one to one, and the video coded data and the first identifier corresponding to the playing windows are sent to an output unit of the second splicing device corresponding to the playing windows.
In a possible implementation, the communication unit 701 is further configured to send a first notification to the second splicing device, where the first notification is used to notify the playback start time;
the communication unit 701 is further configured to receive a data acquisition request sent by the second splicing device, where the data acquisition request is used to request to acquire video encoded data after the playback start time in the video file and a first identifier corresponding to the video encoded data.
In one possible implementation, the processing unit 702 is specifically configured to sequentially read, from the video recording file, N1 pieces of video encoded data after the playback start time and the first identifier corresponding to each piece of video encoded data in the output unit arrangement order.
Referring to fig. 7, the video playback apparatus shown in fig. 7 can be used to perform part or all of the functions of the second splicing device in the method embodiment described in fig. 4 above. The device may be the second splicing device, or a device in the second splicing device, or a device capable of being used in cooperation with the second splicing device. The video playback device can also be a chip system. The video playback apparatus shown in fig. 7 may include a communication unit 701 and a processing unit 702. The processing unit 702 is configured to perform data processing. The communication unit 701 integrates a receiving unit and a transmitting unit. The communication unit 701 may also be referred to as a transceiving unit. Alternatively, communication section 701 may be divided into a reception section and a transmission section. The processing unit 702 and the communication unit 701 are similar, and are not described in detail below. Wherein:
a processing unit 702, configured to set N1 playing windows in the second mosaic, where each playing window corresponds to one or more output units of the second mosaic device, and N1 is greater than 1;
the communication unit 701 is configured to receive N1 video coded data and first identifiers corresponding to the video coded data sent by the video recording server, where N1 video coded data correspond to the same frame of display screen of the first mosaic screen, N1 video coded data correspond to N1 output units of the first mosaic device corresponding to the first mosaic screen one to one, and the first identifiers corresponding to the video coded data are the same; the N1 playing windows correspond to the N1 video coded data one by one, and the video coded data and the first identification corresponding to the playing windows are sent to output units corresponding to the playing windows;
the communication unit 701 is further configured to decode the video encoded data through the output unit corresponding to each playing window to obtain video decoded data corresponding to each playing window;
the communication unit 701 is further configured to output the video decoded data with the same first identifier to the second mosaic screen through the output unit corresponding to each playing window at the same time for display.
In a possible implementation, the processing unit 702 is further configured to establish N1 buffers, where N1 playing windows correspond to N1 buffers one to one;
the processing unit 702 is further configured to store the received N1 encoded video data and the first identifier corresponding to each encoded video data into corresponding buffer areas, respectively;
the processing unit 702 is further configured to decode the video encoded data through the output unit corresponding to each playing window, and the manner of obtaining the video decoded data corresponding to each playing window specifically is: after the N1 encoded video data and the first identifier corresponding to each encoded video data are stored in the corresponding buffer area, the encoded video data in the corresponding buffer area are decoded by the output unit corresponding to each playing window, and the decoded video data corresponding to each playing window is obtained.
In a possible implementation, the communication unit 701 is further configured to receive a first notification sent by the video recording server, where the first notification is used to notify a playback start time;
the communication unit 701 is further configured to send a data acquisition request to the video recording server, where the data acquisition request is used to request to acquire the encoded video data after the playback start time in the video recording file and the first identifier corresponding to the encoded video data.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device may be a video recording server, a first splicing device or a second splicing device. As shown in fig. 8, the terminal device in this embodiment may include: one or more processors 801, one or more memories 802, and one or more transceivers 803. The processor 801, the memory 802, and the transceiver 803 are connected by a bus 804. The memory 802 is used to store a computer program comprising program instructions, and the processor 801 is used to execute the program instructions stored by the memory 802 for performing data processing operations of the electronic device. The transceiver 803 is used to perform data transceiving operations of the electronic device.
For example, if the electronic device is a video recording server, the transceiver 803 may perform the transceiving operation of the video recording server in the video recording embodiment. Processor 801 may perform step S306 in the video recording embodiment. And/or transceiver 803 may perform the transceiving operations of the video recording server in the video playback embodiment. The processor 801 may perform step S403 in the video playback embodiment.
For example, if the electronic device is a first splicing device, the transceiver 803 may perform the transceiving operation of the first splicing device in the video recording embodiment. Processor 801 may perform steps S303 and S304 in a video recording embodiment.
For example, if the electronic device is a second splicing device, the transceiver 803 can perform transceiving operation of the second splicing device in the video playback embodiment. Processor 801 may perform steps S405 and S406 in a video recording embodiment.
It is noted that, for simplicity of explanation, the foregoing method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some acts may, in accordance with the present application, occur in other orders and/or concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
The descriptions of the embodiments provided in the present application may be referred to each other, and the descriptions of the embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. For convenience and brevity of description, for example, the functions and operations performed by the devices and apparatuses provided in the embodiments of the present application may refer to the related descriptions of the method embodiments of the present application, and may also be referred to, combined with or cited among the method embodiments and the device embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (22)

1. A video recording method is applied to a video recording server, and comprises the following steps:
receiving a video recording instruction sent by a client;
responding to the video recording instruction, and sending a video acquisition request to a first splicing device, wherein the first splicing device is provided with N1 output units, and N1 is larger than 1;
receiving N1 video coded data sent by the first splicing device in response to the video acquisition request and a first identifier corresponding to each video coded data, wherein the N1 output units correspond to the N1 video coded data one by one, the N1 video coded data correspond to the same frame of display picture of a first splicing screen, and the first identifiers corresponding to the video coded data are the same;
writing N1 pieces of video encoding data and a first identifier corresponding to each piece of the video encoding data into a video recording file.
2. The method of claim 1, further comprising:
responding to the video recording instruction, and sending an address acquisition request to the first splicing device, wherein the address acquisition request is used for requesting to acquire a coding address corresponding to each output unit;
receiving coding addresses corresponding to the output units sent by the first splicing equipment in response to the address acquisition request;
the sending of the video acquisition request to the first splicing device includes:
and sending a video acquisition request to the first splicing device based on the coding address corresponding to each output unit.
3. The method of claim 1, wherein writing N1 encoded video data and a first identifier corresponding to each of the encoded video data into a video file comprises:
and sequentially writing the N1 pieces of video coded data and the first marks corresponding to the video coded data into a video recording file based on the arrangement sequence of output units.
4. The method of claim 3, further comprising:
establishing N1 buffers, wherein the N1 output units correspond to the N1 buffers one by one;
storing the received N1 video coded data and the first identifier corresponding to each video coded data into corresponding buffer areas respectively;
the writing, in a video recording file, the N1 encoded video data and the first flag corresponding to each encoded video data in sequence based on the output unit arrangement order includes:
after the N1 encoded video data and the first identifier corresponding to each encoded video data are stored in the corresponding buffer area, sequentially writing the encoded video data and the first identifier in the N1 buffer areas into a video file based on the arrangement sequence of the output units.
5. The method of claim 4, wherein the output unit arrangement order is set by a user through a client.
6. The method according to any one of claims 1 to 5, wherein the first identifier is a timestamp.
7. A video recording method applied to a first splicing device, the first splicing device comprising N1 output units, the N1 being greater than 1, the method comprising:
receiving a video acquisition request sent by a video server;
responding to the video acquisition request, and encoding N1 video data output by the N1 output units to obtain N1 video encoded data, wherein the N1 video encoded data correspond to the same frame of display picture of the first splicing screen;
generating the same first identification for each video coding data;
and sending the N1 video coded data and a first identifier corresponding to each video coded data to the video recording server.
8. The method of claim 7, wherein before the first splicing device receives the video acquisition request sent by the video recording server, the method further comprises:
receiving an address acquisition request sent by the video server, wherein the address acquisition request is used for requesting to acquire a coding address corresponding to each output unit;
and responding to the address acquisition request, and sending the coded address corresponding to each output unit to the video recording server.
9. The method of claim 7 or 8, wherein the first identifier is a timestamp.
10. A video playback method is applied to a video recording server, and the method comprises the following steps:
receiving a video playback instruction which is sent by a client and used for playing back on a second spliced screen, wherein the video playback instruction carries an identifier of a video file and a playback starting moment;
reading N1 video coded data after the playback starting time and first identifications corresponding to the video coded data from the video file, wherein the N1 video coded data correspond to the same frame of display picture of a first splicing screen, the N1 video coded data correspond to N1 output units of first splicing equipment corresponding to the first splicing screen one by one, and the first identifications corresponding to the video coded data are the same;
and sending the N1 video coded data and a first identifier corresponding to each video coded data to a second splicing device corresponding to the second splicing screen, wherein N1 playing windows of the second splicing screen correspond to the N1 video coded data in a one-to-one manner, and the video coded data and the first identifier corresponding to the playing windows are sent to an output unit of the second splicing device corresponding to the playing windows.
11. The method of claim 10, wherein before reading from the video file N1 encoded video data after the playback start time and the corresponding first identifier for each of the encoded video data, the method further comprises:
sending a first notification to the second splicing device, wherein the first notification is used for notifying the playback starting time;
and receiving a data acquisition request sent by the second splicing device, wherein the data acquisition request is used for requesting to acquire the video coding data after the playback starting time in the video file and the first identifier corresponding to the video coding data.
12. The method of claim 10, wherein said N1 encoded video data and said corresponding first flag for each encoded video data are written to said video file based on an output unit arrangement order;
the reading, from the video file, the N1 pieces of video encoding data after the playback start time and the first identifier corresponding to each piece of video encoding data includes:
and sequentially reading the N1 video coded data after the playback starting time and the first identifier corresponding to each video coded data from the video recording file based on the output unit arrangement sequence.
13. The method of claim 12, wherein the output unit arrangement order is set by the user through the client.
14. The method of any one of claims 10 to 13, wherein the first identifier is a timestamp.
15. A video playback method applied to a second splicing device, the second splicing device comprising N2 output units, the N2 being greater than 1, the method comprising:
setting N1 playing windows on the second splicing screen, wherein each playing window corresponds to one or more output units of the second splicing device, and N1 is larger than 1;
receiving N1 video coded data sent by a video recording server and first identifications corresponding to the video coded data, wherein the N1 video coded data correspond to the same frame of display picture of a first splicing screen, the N1 video coded data correspond to N1 output units of first splicing equipment corresponding to the first splicing screen one by one, and the first identifications corresponding to the video coded data are the same; the N1 playing windows correspond to the N1 video coded data one by one, and the video coded data and the first identification corresponding to the playing windows are sent to output units corresponding to the playing windows;
decoding video coded data through an output unit corresponding to each playing window to obtain video decoded data corresponding to each playing window;
and outputting video decoding data with the same first identification to the second spliced screen for display through the output unit corresponding to each playing window.
16. The method of claim 15, further comprising:
establishing N1 buffers, wherein the N1 playing windows correspond to the N1 buffers one by one;
respectively storing the received N1 video coded data and the first identification corresponding to each video coded data into corresponding buffer areas;
the decoding the video encoding data through the output unit corresponding to each playing window to obtain the video decoding data corresponding to each playing window includes:
after the N1 encoded video data and the first identifier corresponding to each encoded video data are stored in the corresponding buffer area, the encoded video data in the corresponding buffer area are decoded by the output unit corresponding to each playing window, and the decoded video data corresponding to each playing window is obtained.
17. The method of claim 15, wherein prior to receiving the N1 encoded video data sent by the video recording server and the corresponding first identifier for each of the encoded video data, the method further comprises:
receiving a first notification sent by the video recording server, wherein the first notification is used for notifying the playback starting time;
and sending a data acquisition request to the video recording server, wherein the data acquisition request is used for requesting to acquire the video encoding data after the playback starting moment in the video recording file and the first identifier corresponding to the video encoding data.
18. The method according to any one of claims 15 to 17, wherein the first identifier is a timestamp.
19. A video recording apparatus comprising means for performing the method of any of claims 1 to 6, or comprising means for performing the method of any of claims 7 to 9.
20. A video playback device comprising means for performing the method of any of claims 10 to 14 or comprising means for performing the method of any of claims 15 to 18.
21. An electronic device, comprising a processor and a memory, wherein the memory is configured to store a computer program comprising program instructions, and the processor is configured to invoke the program instructions, to perform the method of any of claims 1-6, or to perform the method of any of claims 7-9, or to perform the method of any of claims 10-14, or to perform the method of any of claims 15-18.
22. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method of any of claims 1-6, or to perform the method of any of claims 7-9, or to perform the method of any of claims 10-14, or to perform the method of any of claims 15-18.
CN202111297709.9A 2021-11-04 2021-11-04 Video recording method, video playback method and device Active CN114189730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111297709.9A CN114189730B (en) 2021-11-04 2021-11-04 Video recording method, video playback method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111297709.9A CN114189730B (en) 2021-11-04 2021-11-04 Video recording method, video playback method and device

Publications (2)

Publication Number Publication Date
CN114189730A true CN114189730A (en) 2022-03-15
CN114189730B CN114189730B (en) 2023-12-19

Family

ID=80540672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111297709.9A Active CN114189730B (en) 2021-11-04 2021-11-04 Video recording method, video playback method and device

Country Status (1)

Country Link
CN (1) CN114189730B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103260011A (en) * 2013-05-16 2013-08-21 杭州巨峰科技有限公司 System and method for achieving monitoring of more paths by utilization of net-harddisk video recorder
CN104601863A (en) * 2013-09-12 2015-05-06 深圳锐取信息技术股份有限公司 IP matrix system for recording and playing
KR20180098850A (en) * 2017-02-27 2018-09-05 (주)진명아이앤씨 Method and apparatus for stitching uhd videos
US10079963B1 (en) * 2017-04-14 2018-09-18 Via Technologies, Inc. Display method and display system for video wall
CN108924582A (en) * 2018-09-03 2018-11-30 深圳市东微智能科技股份有限公司 Video recording method, computer readable storage medium and recording and broadcasting system
CN110007885A (en) * 2019-04-04 2019-07-12 广州驷骏精密设备股份有限公司 A kind of display control method and device based on mosaic screen
US20190356940A1 (en) * 2017-02-03 2019-11-21 Tv One Limited Method of video transmission and display
CN111182235A (en) * 2019-12-05 2020-05-19 浙江大华技术股份有限公司 Method, device, computer device and storage medium for recording spliced screen pictures
CN111327873A (en) * 2019-07-29 2020-06-23 杭州海康威视系统技术有限公司 Scene layout adjusting method and device, electronic equipment and storage medium
CN112188136A (en) * 2020-09-24 2021-01-05 高新兴科技集团股份有限公司 Method, system, storage medium and equipment for splicing and recording videos in real time in all-in-one mode
CN112422888A (en) * 2019-08-23 2021-02-26 浙江宇视科技有限公司 Video splicing method and device, electronic equipment and computer readable storage medium
CN112929583A (en) * 2021-05-10 2021-06-08 北京小鸟科技股份有限公司 Method and system for synchronously recording and replaying original signal source based on large-screen window
US20210212168A1 (en) * 2020-01-06 2021-07-08 Koji Yoden Edge-based communication and internet communication for media distribution, data analysis, media download/upload, and other services
CN113157232A (en) * 2021-04-26 2021-07-23 青岛海信医疗设备股份有限公司 Multi-screen splicing display system and method
CN113438536A (en) * 2021-06-22 2021-09-24 北京飞讯数码科技有限公司 Video display method, device, equipment and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103260011A (en) * 2013-05-16 2013-08-21 杭州巨峰科技有限公司 System and method for achieving monitoring of more paths by utilization of net-harddisk video recorder
CN104601863A (en) * 2013-09-12 2015-05-06 深圳锐取信息技术股份有限公司 IP matrix system for recording and playing
US20190356940A1 (en) * 2017-02-03 2019-11-21 Tv One Limited Method of video transmission and display
KR20180098850A (en) * 2017-02-27 2018-09-05 (주)진명아이앤씨 Method and apparatus for stitching uhd videos
US10079963B1 (en) * 2017-04-14 2018-09-18 Via Technologies, Inc. Display method and display system for video wall
CN108924582A (en) * 2018-09-03 2018-11-30 深圳市东微智能科技股份有限公司 Video recording method, computer readable storage medium and recording and broadcasting system
CN110007885A (en) * 2019-04-04 2019-07-12 广州驷骏精密设备股份有限公司 A kind of display control method and device based on mosaic screen
CN111327873A (en) * 2019-07-29 2020-06-23 杭州海康威视系统技术有限公司 Scene layout adjusting method and device, electronic equipment and storage medium
CN112422888A (en) * 2019-08-23 2021-02-26 浙江宇视科技有限公司 Video splicing method and device, electronic equipment and computer readable storage medium
CN111182235A (en) * 2019-12-05 2020-05-19 浙江大华技术股份有限公司 Method, device, computer device and storage medium for recording spliced screen pictures
US20210212168A1 (en) * 2020-01-06 2021-07-08 Koji Yoden Edge-based communication and internet communication for media distribution, data analysis, media download/upload, and other services
CN112188136A (en) * 2020-09-24 2021-01-05 高新兴科技集团股份有限公司 Method, system, storage medium and equipment for splicing and recording videos in real time in all-in-one mode
CN113157232A (en) * 2021-04-26 2021-07-23 青岛海信医疗设备股份有限公司 Multi-screen splicing display system and method
CN112929583A (en) * 2021-05-10 2021-06-08 北京小鸟科技股份有限公司 Method and system for synchronously recording and replaying original signal source based on large-screen window
CN113438536A (en) * 2021-06-22 2021-09-24 北京飞讯数码科技有限公司 Video display method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王莹;马富贵;: "数字视频监控系统中的集中式存储解决方案应用", 中国安防, no. 12 *
郭小琴: "基于Android的大屏幕拼接显示系统研究与实现", 《中国优秀硕士学位论文全文数据库电子期刊》 *

Also Published As

Publication number Publication date
CN114189730B (en) 2023-12-19

Similar Documents

Publication Publication Date Title
US11930197B2 (en) Video decoding method and apparatus, computer device, and storage medium
CN109168021B (en) Plug flow method and device
CN112367543B (en) Display device, mobile terminal, screen projection method and screen projection system
CN105612743A (en) Audio video playback synchronization for encoded media
WO2019134235A1 (en) Live broadcast interaction method and apparatus, and terminal device and storage medium
CN103190092A (en) A system and method for synchronized playback of streaming digital content
CN110636370B (en) Video processing method and device, electronic equipment and readable medium
CN111050025B (en) Audio and video display control method, device and system and computer readable storage medium
WO2018024231A1 (en) Method and apparatus for interconnecting spliced wall and mobile intelligent terminal
US20060233192A1 (en) Display control method and information processing apparatus
WO2014190655A1 (en) Application synchronization method, application server and terminal
WO2014144641A1 (en) System and method for replicating a media stream
CN109756744B (en) Data processing method, electronic device and computer storage medium
CN104837046A (en) Multi-media file processing method and device
CN114189730B (en) Video recording method, video playback method and device
CN115665342B (en) Image processing method, image processing circuit, electronic device, and readable storage medium
CN111225242A (en) Video playing disaster tolerance method and device and computer storage medium
CN113691815B (en) Video data processing method, device and computer readable storage medium
CN102917260A (en) Information processing apparatus, information processing system, and program
CN111385590A (en) Live broadcast data processing method and device and terminal
KR100735429B1 (en) Method and system for playing a digital multimedia broadcasting using a personal computer
CN112954483B (en) Data transmission method, system and non-volatile storage medium
CN106303632A (en) Data are carried out piecemeal and flies the method and system that screen is play
JP2958646B2 (en) Image decoding device
CN117119157B (en) Multi-picture splicing retransmission method and system for optical fiber video seat

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
GR01 Patent grant
GR01 Patent grant