CN110460891B - Video frame output method and device, electronic equipment and storage medium - Google Patents

Video frame output method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110460891B
CN110460891B CN201810434233.0A CN201810434233A CN110460891B CN 110460891 B CN110460891 B CN 110460891B CN 201810434233 A CN201810434233 A CN 201810434233A CN 110460891 B CN110460891 B CN 110460891B
Authority
CN
China
Prior art keywords
output
video frame
time
cutting block
video
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.)
Active
Application number
CN201810434233.0A
Other languages
Chinese (zh)
Other versions
CN110460891A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201810434233.0A priority Critical patent/CN110460891B/en
Publication of CN110460891A publication Critical patent/CN110460891A/en
Application granted granted Critical
Publication of CN110460891B publication Critical patent/CN110460891B/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/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4305Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets
    • 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/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • 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

Abstract

The embodiment of the invention provides a video frame output method, a video frame output device, electronic equipment and a storage medium, wherein the method comprises the steps of calculating the difference value of the output playing delay of an output channel corresponding to a synchronous operation moment and a video frame cutting block aiming at each video frame cutting block of a video frame to be displayed, and respectively obtaining the expected output moment of each video frame cutting block; and outputting each video frame cutting block according to the expected output time of each video frame cutting block. The expected output time of each video frame cutting block is determined according to the output playing delay of each output channel, when the video frame to be displayed is displayed, the phenomenon of display asynchronism caused by different output playing delays of each video frame cutting block can be effectively reduced, the synchronism of video frame image display can be enhanced, and the watching effect is enhanced.

Description

Video frame output method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of video transmission and display technologies, and in particular, to a method and an apparatus for outputting video frames, an electronic device, and a storage medium.
Background
With the development of video display technology, tiled screens are widely used in various aspects of life. Such as a tiled screen in a movie theater, a tiled screen at a conference site or a tiled screen on an exterior wall of a mall, etc. When the mosaic screen displays a video image, each display area of the mosaic screen independently displays partial pictures of the video image, and in order to enhance the ornamental value, all the pictures of the same video image need to be ensured to be output simultaneously.
In the related art, a video output device splits a received video frame into a plurality of video frame cutting blocks, determines output channels corresponding to the video frame cutting blocks, and simultaneously outputs the video frame cutting blocks of the same video frame according to a synchronous output instruction so as to complete the display of the video frame on a spliced screen.
However, with the above method, when the play delay of each display area of the mosaic screen is different, the display synchronization of the video frame image is poor, and the watching effect is affected.
Disclosure of Invention
Embodiments of the present invention provide a video frame output method, a video frame output device, an electronic device, and a storage medium, so as to enhance the synchronization of video frame image display and enhance the viewing effect. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a video frame output method, where the method includes:
acquiring the synchronous operation time of a video frame to be displayed, each video frame cutting block of the video frame to be displayed and control parameters, wherein the control parameters comprise the output playing delay of each output channel, and the output playing delay of each output channel is the time from the output of the video frame cutting block of the output channel to the display of the video frame cutting block on a splicing screen;
aiming at each video frame cutting block, respectively obtaining the expected output time of each video frame cutting block by calculating the difference value of the synchronous operation time and the output playing delay of an output channel corresponding to the video frame cutting block;
and outputting each video frame cutting block according to the expected output time of each video frame cutting block.
Optionally, the synchronization operation time is: the method comprises the steps that the synchronization instruction of a video frame to be displayed is obtained, wherein the synchronization instruction obtaining time is the time when each output channel synchronously obtains a synchronization output instruction;
the obtaining, for each video frame cutting block, an expected output time of each video frame cutting block by calculating a difference between the synchronous operation time and an output playing delay of an output channel corresponding to the video frame cutting block includes:
and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous instruction acquisition time, and adding a preset delay time length to respectively obtain the expected output time of each video frame cutting block, wherein the preset delay time length is not less than any output playing delay.
Optionally, the synchronization operation time is: the synchronous display time of the video frame to be displayed;
the obtaining, for each video frame cutting block, an expected output time of each video frame cutting block by calculating a difference between the synchronous operation time and an output playing delay of an output channel corresponding to the video frame cutting block includes:
and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous display time to respectively obtain the expected output time of each video frame cutting block.
Optionally, the control parameters further include: the video frame display method comprises the steps of playing a frame rate and presetting processing delay, wherein the presetting processing delay is longer than the processing time of a video frame to be displayed, and the processing time of the video frame to be displayed is the time from the acquisition of the video frame to be displayed to the display of each video frame cutting block on a splicing screen; the method further comprises the following steps:
judging whether the output time sequence of the video frame to be displayed is a first output time sequence or not, wherein the video frame of the first output time sequence is a first frame video frame in the video;
if the output time sequence of the video frame to be displayed is the first output time sequence, determining the time of a preset clock when the video frame to be displayed is acquired, and taking the time as the acquisition time of the video frame to be displayed;
adding the preset processing delay to the acquisition time of the video frame to be displayed to obtain the synchronous display time of the video frame to be displayed synchronously displayed on the spliced screen;
if the output time sequence of the video frame to be displayed is not the first output time sequence, acquiring a frame of video frame of which the output time sequence is before the output time sequence of the video frame to be displayed as a reference video frame;
determining the duration of a video playing period according to the playing frame rate;
determining the difference value between the output time sequence of the video frame to be displayed and the output time sequence of the reference video frame, and calculating the product of the difference value and the duration of the video playing period to be used as the display time difference;
and acquiring the synchronous display time of the reference video frame, and increasing the display time difference on the synchronous display time of the reference video frame to obtain the synchronous display time of the video frame to be displayed on the spliced screen.
Optionally, the control parameters further include: a video output period; outputting each of the video frame cut blocks according to an expected output time of each of the video frame cut blocks, comprising:
acquiring the output interruption time of each output channel in the current video output period and the duration of the video output period;
respectively increasing the duration of the video output period at the output interruption time of each output channel to obtain the prediction judgment time of each output channel;
for each output channel, comparing the expected output time of the video frame cutting block corresponding to the output channel with the output interruption time of the current video output period of the output channel, and comparing the expected output time of the video frame cutting block corresponding to the output channel with the prediction judgment time;
and if the expected output time of the video frame cutting block corresponding to the output channel is greater than the output interruption time of the current video output period of the output channel and is not greater than the prediction judgment time corresponding to the output channel, outputting the video frame cutting block corresponding to the output channel when a preset clock reaches the expected output time of the video frame cutting block corresponding to the output channel in the next video output period.
Optionally, the video frame output method according to the embodiment of the present invention further includes:
and if the expected output time of the video frame cutting block corresponding to the output channel is not greater than the output interruption time of the current video output period of the output channel, discarding the video frame cutting block corresponding to the output channel.
Optionally, the video frame output method according to the embodiment of the present invention further includes:
if the expected output time of the video frame cutting block corresponding to the output channel is larger than the prediction judgment time corresponding to the output channel, outputting the video frame cutting block output by the output channel in the current video output period in the next video output period, and judging the video frame cutting block corresponding to the output channel again.
Optionally, the video frame output method according to the embodiment of the present invention further includes:
and calibrating the control parameters according to a preset parameter synchronization rule.
Optionally, in the video frame output method according to the embodiment of the present invention, each output channel corresponds to one preset clock, and the method further includes:
and calibrating each preset clock according to a preset clock synchronization rule.
In a second aspect, an embodiment of the present invention provides a video frame output apparatus, where the apparatus includes:
the data acquisition module is used for acquiring the synchronous operation time of a video frame to be displayed, each video frame cutting block of the video frame to be displayed and control parameters, wherein the control parameters comprise output playing delay of each output channel, and the output playing delay of each output channel is the time from the output of the video frame cutting block of the output channel to the display of the video frame cutting block on the splicing screen;
an output time determining module, configured to calculate, for each video frame cutting block, a difference between the synchronous operation time and an output playing delay of an output channel corresponding to the video frame cutting block, so as to obtain an expected output time of each video frame cutting block;
and the video output module is used for outputting each video frame cutting block according to the expected output time of each video frame cutting block.
Optionally, the synchronization operation time is: the method comprises the steps that the synchronization instruction of a video frame to be displayed is obtained, wherein the synchronization instruction obtaining time is the time when each output channel synchronously obtains a synchronization output instruction;
the output time determination module is specifically configured to:
and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous instruction acquisition time, and adding a preset delay time length to respectively obtain the expected output time of each video frame cutting block, wherein the preset delay time length is not less than any output playing delay.
Optionally, the synchronization operation time is: the synchronous display time of the video frame to be displayed;
the output time determination module is specifically configured to:
and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous display time to respectively obtain the expected output time of each video frame cutting block.
Optionally, the control parameters further include: the video frame display method comprises the steps of playing a frame rate and presetting processing delay, wherein the presetting processing delay is longer than the processing time of a video frame to be displayed, and the processing time of the video frame to be displayed is the time from the acquisition of the video frame to be displayed to the display of each video frame cutting block on a splicing screen; the video frame output apparatus further includes:
the time sequence judging module is used for judging whether the output time sequence of the video frame to be displayed is a first output time sequence or not, wherein the video frame of the first output time sequence is a first frame video frame in the video;
the first calculation module is used for determining the time of a preset clock when the video frame to be displayed is acquired as the acquisition time of the video frame to be displayed if the output time sequence of the video frame to be displayed is the first output time sequence;
the first determining module is used for adding the preset processing delay to the acquisition time of the video frame to be displayed to obtain the synchronous display time of the video frame to be displayed synchronously displayed on the spliced screen;
the second calculation module is used for acquiring a frame of video frame with the output time sequence before the output time sequence of the video frame to be displayed as a reference video frame if the output time sequence of the video frame to be displayed is not the first output time sequence;
the period calculation module is used for determining the duration of a video playing period through the playing frame rate;
the difference value calculation module is used for determining the difference value between the output time sequence of the video frame to be displayed and the output time sequence of the reference video frame, and calculating the product of the difference value and the duration of the video playing period to be used as the display time difference;
and the second determining module is used for acquiring the synchronous display time of the reference video frame, and increasing the display time difference on the synchronous display time of the reference video frame to obtain the synchronous display time of the video frame to be displayed on the spliced screen.
Optionally, the control parameters further include: a video output period; the video output module comprises:
the time acquisition submodule is used for acquiring the output interruption time of each output channel in the current video output period and the duration of the video output period;
the time prediction submodule is used for respectively increasing the duration of the video output period at the output interruption time of each output channel to obtain the prediction judgment time of each output channel;
the time comparison submodule is used for comparing the expected output time of the video frame cutting block corresponding to each output channel with the output interruption time of the current video output period of the output channel and comparing the expected output time of the video frame cutting block corresponding to the output channel with the prediction judgment time;
and the cutting block output sub-module is used for outputting the video frame cutting block corresponding to the output channel when a preset clock reaches the expected output time of the video frame cutting block corresponding to the output channel in the next video output period if the expected output time of the video frame cutting block corresponding to the output channel is greater than the output interruption time of the current video output period of the output channel and is not greater than the prediction judgment time corresponding to the output channel.
Optionally, the video output module further includes:
and the cutting block discarding sub-module is used for discarding the video frame cutting block corresponding to the output channel if the expected output time of the video frame cutting block corresponding to the output channel is not greater than the output interruption time of the current video output period of the output channel.
Optionally, the video output module further includes:
and the secondary judgment sub-module is used for outputting the video frame cutting block output by the output channel in the current video output period in the next video output period if the expected output time of the video frame cutting block corresponding to the output channel is larger than the prediction judgment time corresponding to the output channel, and judging the video frame cutting block corresponding to the output channel again.
Optionally, the video frame output apparatus according to the embodiment of the present invention further includes:
and the parameter calibration module is used for calibrating the control parameters according to a preset parameter synchronization rule.
Optionally, in the video frame output apparatus according to the embodiment of the present invention, each of the output channels corresponds to one of the preset clocks, and the apparatus further includes:
and the clock calibration module is used for calibrating each preset clock according to a preset clock synchronization rule.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory is used for storing a computer program; the processor is configured to implement the video frame output method according to any one of the first aspect described above when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the video frame output method according to any one of the above first aspects.
The video frame output method, the video frame output device, the electronic equipment and the storage medium provided by the embodiment of the invention are used for acquiring the synchronous operation time of a video frame to be displayed, each video frame cutting block of the video frame to be displayed and control parameters, wherein the control parameters comprise output playing delay of each output channel, and the output playing delay of each output channel is the time from the output of the video frame cutting block of the output channel to the display of the video frame cutting block on a spliced screen; aiming at each video frame cutting block, respectively obtaining the expected output time of each video frame cutting block by calculating the difference value of the synchronous operation time and the output playing delay of the output channel corresponding to the video frame cutting block; and outputting each video frame cutting block according to the expected output time of each video frame cutting block. The expected output time of each video frame cutting block is determined according to the output playing delay of each output channel, when the video frame to be displayed is displayed, the phenomenon of display asynchronism caused by different output playing delays of each video frame cutting block can be effectively reduced, the synchronism of video frame image display can be enhanced, and the watching effect is enhanced. Of course, not all of the above advantages need be achieved in the practice of any one product or method of the present invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a video frame output method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating calibration of control parameters according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating calibration of a default clock according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a video frame output method according to an embodiment of the present invention;
FIG. 5 is a diagram of a video frame output apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the related display technology of the spliced screen, a video output device divides a received video frame into a plurality of video frame cutting blocks, determines output channels corresponding to the video frame cutting blocks, and simultaneously outputs the video frame cutting blocks of the same video frame according to a synchronous output instruction so as to complete the display of the video frame on the spliced screen. In the actual display process, due to the reasons that the transmission time of each output channel is different, the display time delay of each display area of the spliced screen is different and the like, the synchronism of the video frame cutting blocks of each display area of the spliced screen is poor, and the watching effect is influenced.
In view of this, an embodiment of the present invention provides a video frame output method, and referring to fig. 1, the method includes:
s101, acquiring the synchronous operation time of a video frame to be displayed, each video frame cutting block of the video frame to be displayed and control parameters, wherein the control parameters comprise output playing delay of each output channel, and the output playing delay of each output channel is the time from the output of the video frame cutting block of the output channel to the display of the video frame cutting block on a splicing screen.
The video frame output method in the embodiment of the invention can be realized by an output system, and the output system is any system capable of realizing the video frame output method in the embodiment of the invention. For example:
the output system may be an apparatus comprising: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through a bus and complete mutual communication; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the video frame output method of the embodiment of the present invention.
The output system may also be an application program for executing the video frame output method of the embodiment of the present invention when running.
The output system may also be a storage medium for storing executable code for performing the video frame output method of the embodiments of the present invention.
After the video frame to be displayed is obtained, the video to be displayed is divided into a plurality of video frame cutting blocks according to the position and the resolution of each display area of the splicing screen, and an output channel corresponding to each video frame cutting block is determined.
The synchronous operation time of the video frame to be displayed is any operation time related to the video frame to be displayed, such as the acquisition time of the video frame to be displayed, the acquisition time of a synchronous instruction of the video frame to be displayed, the synchronous display time of the video frame to be displayed, and the like, wherein the acquisition time of the synchronous instruction is the time when each output channel synchronously acquires a synchronous output instruction, and the synchronous display time is the time when each video frame cutting block of the video frame to be displayed is synchronously displayed on the splicing screen.
The method for acquiring the output playing delay of each output channel may be as follows: acquiring preset output playing delay of each output channel; and for each output channel, measuring the time from the output of the video frame cutting block to the display of the video frame cutting block on the spliced screen for a plurality of times in advance, and averaging to set the average value as the output playing delay of the output channel. The method for acquiring the output playing delay of each output channel may further comprise: after the output system is started each time, the output system measures the output playing delay of each output channel.
And S102, aiming at each video frame cutting block, calculating the difference value of the output playing delay of the synchronous operation time and the output channel corresponding to the video frame cutting block, and respectively obtaining the expected output time of each video frame cutting block.
Optionally, the synchronization operation time is: acquiring a synchronous instruction of the video frame to be displayed, wherein the synchronous instruction acquisition time is the time when each output channel synchronously acquires a synchronous output instruction;
the obtaining, for each of the video frame cutting blocks, an expected output time of each of the video frame cutting blocks by calculating a difference between the synchronization operation time and an output playing delay of an output channel corresponding to the video frame cutting block includes:
and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block at the synchronous instruction acquisition time, and adding a preset delay time length to respectively obtain the expected output time of each video frame cutting block, wherein the preset delay time length is not less than any output playing delay.
And determining the time when each output channel acquires the synchronous output instruction, namely the synchronous instruction acquisition time, acquiring the synchronous instruction acquisition time by the output system, and respectively obtaining the expected output time of each video frame cutting block according to the synchronous instruction acquisition time. Taking a video frame cutting block as an example, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous instruction obtaining time, and adding a preset delay time length to obtain the expected output time of the video frame cutting block. The preset delay time is any time longer than any output playing delay time, and can be set according to actual conditions. The preset delay time is longer than any output playing delay, so that the expected output time is not less than the synchronous instruction acquisition time, and the error of the output time of the video frame cutting block is prevented.
Optionally, the synchronization operation time is: the synchronous display time of the video frame to be displayed;
the obtaining, for each of the video frame cutting blocks, an expected output time of each of the video frame cutting blocks by calculating a difference between the synchronization operation time and an output playing delay of an output channel corresponding to the video frame cutting block includes:
and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous display time to respectively obtain the expected output time of each video frame cutting block.
And the output system respectively obtains the expected output time of each video frame cutting block according to the synchronous display time. Taking a video frame cutting block as an example, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous display time to obtain the expected output time of the video frame cutting block.
And S103, outputting each video frame cutting block according to the expected output time of each video frame cutting block.
And for each video frame cutting block, outputting the video frame cutting block when the expected output time of the video frame cutting block is reached through an output channel corresponding to the video frame cutting block.
In the embodiment of the invention, the expected output time of each video frame cutting block is obtained by calculating the difference value between the synchronous operation time and the output playing delay, and when the video frame to be displayed is displayed, the phenomenon of display asynchronism caused by different output playing delays of each video frame cutting block can be effectively reduced, the synchronism of video frame image display can be enhanced, and the watching effect is enhanced.
Optionally, the control parameters further include: the video frame display method comprises the steps of playing a frame rate and presetting processing delay, wherein the presetting processing delay is longer than the processing time of a video frame to be displayed, and the processing time of the video frame to be displayed is the time from the acquisition of the video frame to be displayed to the display of each video frame cutting block on a splicing screen; the video frame output method further includes:
step one, judging whether the output time sequence of the video frame to be displayed is a first output time sequence or not, wherein the video frame of the first output time sequence is a first frame video frame in a video.
The output time sequence of the video frame to be displayed represents the time sequence position of the video frame to be displayed in the video, namely the output time sequence is used for representing that the video frame to be displayed is the video frame of the frame in the video. The output system judges whether the output time sequence of the video frame to be displayed is a first output time sequence.
And step two, if the output time sequence of the video frame to be displayed is the first output time sequence, determining the time of a preset clock when the video frame to be displayed is acquired as the acquisition time of the video frame to be displayed.
The preset clock is any clock, for example, the preset clock is an internet clock, the preset clock is a system clock of an output system, the preset clock is a clock in a data receiving chip for receiving a video frame to be displayed, or the preset clock is a clock of an output channel.
And step three, adding the preset processing delay to the acquisition time of the video frame to be displayed to obtain the synchronous display time of the video frame to be displayed synchronously displayed on the spliced screen.
The preset processing delay is any time longer than the processing time of the video frame to be displayed, and can be set according to actual conditions. The larger the preset processing delay is, the smaller the influence caused by network fluctuation in the video transmission process is, the better the smoothing effect on the instability of the video source frame rate is, but the higher the delay from the receiving of the video frame to be displayed to the displaying of the video frame to be displayed on the spliced screen is. The preset processing delay is longer than the processing time of the video frame to be displayed, so that the expected output time is not less than the time for acquiring the video frame cutting block by the output channel, and the error of the output time of the video frame cutting block is prevented.
And step four, if the output time sequence of the video frame to be displayed is not the first output time sequence, acquiring a frame of video frame with the output time sequence before the output time sequence of the video frame to be displayed as a reference video frame.
The output system acquires a frame of video frame whose output timing is before the output timing of the video frame to be displayed. For example, the storage system acquires a video frame of a previous frame whose output timing is before the output timing of the video frame to be displayed, the storage system acquires a video frame whose output timing is the first output timing, or the storage system acquires a video frame of any frame whose output timing is before the output timing of the video frame to be displayed, or the like.
Determining the duration of a video playing period through the playing frame rate;
and the output system determines the duration of a video playing period according to the playing frame rate, wherein the playing frame rate and the playing period are the frame rate and the period aiming at the video source. For example, if the frame rate is 50HZ, the duration of the video playing period is 20 ms. If the frame rate is 25HZ, the duration of the video playing period is 40 ms.
And step six, determining the difference value between the output time sequence of the video frame to be displayed and the output time sequence of the reference video frame, and calculating the product of the difference value and the duration of the video playing period as the display time difference.
The output time sequence of the Nth (N is a positive integer) frame video frame in the video is the Nth output time sequence, the output system calculates the difference value of the output time sequences of the video frame to be displayed and the reference video frame, and the difference value is multiplied by the duration of the video playing period to obtain the display time difference.
And step seven, acquiring the synchronous display time of the reference video frame, and adding the display time difference to the synchronous display time of the reference video frame to obtain the synchronous display time of the video frame to be displayed on the spliced screen.
In the embodiment of the invention, a specific method for determining the synchronous display time is provided, so that the display time of each video frame in the video is ensured to accord with the play frame rate.
Optionally, the control parameters further include: a video output period;
correspondingly, the outputting each of the video frame slicing blocks according to the expected output time of each of the video frame slicing blocks includes:
step one, acquiring the output interruption time of each output channel in the current video output period and the duration of the video output period.
And the output interruption time of the output channel in the current video output period is the finishing time of the output video frame cutting block of the output channel in the current video output period, wherein the video output period is the period of the output video frame.
And step two, respectively increasing the duration of the video output period at the output interruption time of each output channel to obtain the prediction judgment time of each output channel.
And step three, aiming at each output channel, comparing the expected output time of the video frame cutting block corresponding to the output channel with the output interruption time of the current video output period of the output channel, and comparing the expected output time of the video frame cutting block corresponding to the output channel with the prediction judgment time.
And step four, if the expected output time of the video frame cutting block corresponding to the output channel is greater than the output interruption time of the current video output period of the output channel and is not greater than the prediction judgment time of the output channel, outputting the video frame cutting block corresponding to the output channel when the preset clock reaches the expected output time of the video frame cutting block corresponding to the output channel in the next video output period.
Optionally, if the expected output time of the video frame cutting block corresponding to the output channel is greater than the predicted determination time of the output channel, it is indicated that the expected output time of the video frame cutting block corresponding to the output channel is not in the next video output period, and it is necessary to wait for the video output period in which the expected output time of the video frame cutting block corresponding to the output channel is located, and output the video frame cutting block according to the expected output time of the video frame cutting block.
In the embodiment of the present invention, the expected output time of the video frame cutting block corresponding to the output channel is greater than the output interruption time of the current video output period of the output channel and is not greater than the prediction judgment time of the output channel corresponding to the video frame cutting block corresponding to the output channel, which indicates that the expected output time of the output channel is in the next video output period, and in the next video output period, when the preset clock reaches the expected output time of the video frame cutting block corresponding to the output channel, the video frame cutting block corresponding to the output channel is output, and the output of the video frame cutting block is completed.
Optionally, the video frame output method according to the embodiment of the present invention further includes:
and if the expected output time of the video frame cutting block corresponding to the output channel is not greater than the output interruption time of the current video output period of the output channel, discarding the video frame cutting block corresponding to the output channel.
And the expected output time of the video frame cutting block corresponding to the output channel is not greater than the output interruption time of the current video output period of the output channel, which indicates that the video frame cutting block is overdue, and the video frame cutting block corresponding to the output channel is discarded.
In the embodiment of the invention, the expired video frame cutting block is discarded, so that the display error caused by outputting the expired video frame cutting block is prevented.
Optionally, the video frame output method according to the embodiment of the present invention further includes:
if the expected output time of the video frame cutting block corresponding to the output channel is larger than the prediction judgment time corresponding to the output channel, outputting the video frame cutting block output by the output channel in the current video output period in the next video output period, and judging the video frame cutting block corresponding to the output channel again.
And when the expected output time of the video frame cutting block corresponding to the output channel is greater than the prediction judgment time of the current video output period corresponding to the output channel, indicating that the expected output time of the video frame cutting block corresponding to the output channel is not in the next video output period. However, in the next video output period, if the video frame cutting block is not output, the condition of a black screen may occur, so that the video frame cutting block output by the output channel in the current video output period may be output in the next video output period to reduce the condition of a black screen, where the output time of the video frame cutting block in the next video output period may be obtained by adding the output time of the current video output period and the duration of the video output period.
When the expected output time of the video frame cutting block corresponding to the output channel is greater than the predicted judgment time of the current video output period corresponding to the output channel, in the next video output period, the output judgment needs to be performed again on the video frame cutting block corresponding to the output channel, and the judgment method is the same as the method described above, and is not repeated here.
In the embodiment of the invention, if the expected output time of the video frame cutting block corresponding to the output channel is greater than the prediction judgment time corresponding to the output channel, the video frame cutting block output by the output channel in the current video output period is output in the next video output period, so that the black screen condition can be effectively reduced; and judging the video frame cutting blocks corresponding to the output channel again, thereby effectively reducing the phenomenon of display asynchronism caused by different output playing delays of the video frame cutting blocks, enhancing the synchronism of video frame image display and enhancing the watching effect.
Optionally, the video frame output method according to the embodiment of the present invention further includes:
and calibrating the control parameters according to a preset parameter synchronization rule.
The preset parameter synchronization rule is any control parameter calibration rule, for example, the output system periodically calibrates the control parameters according to preset data; or the output system calibrates the control parameter according to the user input instruction (the user input instruction comprises the numerical value of the control parameter to be calibrated); or calibrating the control parameter when detecting that the difference between the value of the control parameter and the actual measurement value exceeds a preset error threshold (for example, when the error between the output playing delay of a certain output channel for current calculation and the output playing delay actually measured by the output system exceeds the preset error threshold, correcting the output playing delay of the output channel to the actually measured output playing delay), and the like.
The output system controls each output channel to reset the output timing sequence at the same time, reconfigures the same control parameters, such as output resolution, output frame rate, and the like, and controls each output channel to restart the output timing sequence at the same time.
Referring to fig. 2, the output system broadcasts a PCIE (peripheral Component Interconnect express) MSI (Message Signaled Interrupt) Message, and the output channel 1, the output channel 2, the output channel 3, and the output channel 4 update control parameters and synchronously restart according to the broadcast PCIE MSI Message. Correspondingly, the specific step of calibrating the control parameter according to the preset parameter synchronization rule may include:
step one, selecting output channels to be calibrated, namely an output channel 1, an output channel 2, an output channel 3 and an output channel 4.
And step two, broadcasting the PCIE MSI first message interrupt, synchronously resetting and configuring control parameters of each output channel to be calibrated, wherein the control parameters comprise output resolution and output frame rate, so as to ensure that the output resolution and the output frame rate of each output channel to be calibrated are strictly consistent.
And step three, broadcasting a PCIE MSI second message interrupt, and synchronously starting each output channel to be calibrated so as to ensure that the output starting time of each output channel to be calibrated is strictly consistent.
In the embodiment of the invention, a specific method for calibrating the control parameters is provided, and the control parameters of each output channel are calibrated, so that the display synchronism of video frames can be improved, and the viewing effect is improved.
Optionally, in the video frame output method according to the embodiment of the present invention, each of the output channels corresponds to one of the preset clocks, and the method further includes:
and calibrating each preset clock according to a preset clock synchronization rule.
The preset clock synchronization rule is any clock calibration rule, for example, the output system periodically calibrates each preset clock according to preset data; or the output system triggers and calibrates each preset clock according to the user input instruction; or calibrating each preset clock when detecting that the error between the preset clocks exceeds a preset error threshold value, and the like.
Each output channel and each video receiving channel correspond to a preset clock, the output system broadcasts the system clock for the first time, each output channel and each video receiving channel reset the corresponding preset clock according to the system clock, and simultaneously, an internal timer is started to carry out the timing of the preset clock. The output system periodically broadcasts a system clock, periodically calibrates the preset clocks corresponding to each output channel and each video receiving channel to eliminate clock synchronization error divergence caused by respective timer error accumulation of the preset clocks corresponding to each output channel and each video receiving channel, and thus maintains high-precision synchronous clocks of each output channel and each video receiving channel.
Referring to fig. 3, the output system broadcasts a PCIE (peripheral Component Interconnect express) MSI (Message Signaled Interrupt) Message, and the video receiving channel 1, the video receiving channel 2, the video receiving channel 3, the video receiving channel 4, the output channel 1, the output channel 2, the output channel 3, and the output channel 4 establish a preset clock and calibrate the preset clock according to the broadcast PCIE MSI Message. The process of pre-establishing the preset clock may be:
the output system broadcasts a third message interrupt of the PCIE MSI, so that each video receiving channel (including the video receiving channel 1, the video receiving channel 2, the video receiving channel 3, and the video receiving channel 4) and each output channel (including the output channel 1, the output channel 2, the output channel 3, and the output channel 4) respectively establish a preset clock, and reset each preset clock according to the system clock, and simultaneously start an internal timer of each preset clock to perform clock timing.
Correspondingly, calibrating each preset clock according to a preset clock synchronization rule, including:
and the output system sends a PCIE MSI fourth message interrupt, so that each video receiving channel and each output channel calibrate respective preset clocks according to the system clock, and clock synchronization error accumulation caused by accumulated divergence of respective timer errors of the preset clocks of each video receiving channel and each output channel is eliminated, and high-precision synchronous clocks of each video receiving channel and each output channel are maintained.
In the embodiment of the invention, the preset clocks are calibrated, the time for outputting the video frame cutting block according to the preset clocks is more accurate, the display synchronism of the video frames can be increased, and the watching effect is improved.
Optionally, as shown in fig. 4, the video frame output method according to the embodiment of the present invention includes:
s401, receiving a video frame to be displayed.
And the output system receives the video frame to be displayed through the video frame receiving channel.
S402, cutting the video frame to be displayed into video frame cutting blocks.
And the output system cuts the video frames to be displayed into video frame cutting blocks with corresponding quantity and size according to the configuration parameters of the spliced screen, including the position and the resolution of each display area of the spliced screen, so as to obtain n (n is a positive integer greater than 1) video frame cutting blocks, and respectively determines the output channels corresponding to the video frame cutting blocks.
And S403, determining the expected output time of each video frame cutting block.
And the output system determines the synchronous display time of the video frames to be displayed, and subtracts the output playing delay of the output channel corresponding to each video frame cutting block from the synchronous display time aiming at each video frame cutting block to respectively obtain the expected output time of each video frame cutting block.
Optionally, the step of determining, by the output system, the synchronous display time of the video frame to be displayed includes: and judging whether the output time sequence of the video frame to be displayed is the first output time sequence. And if the output time sequence of the video frame to be displayed is the first output time sequence, determining the moment of a preset clock of the video frame receiving channel when the video frame receiving channel receives the video frame to be displayed as the acquisition moment of the video frame to be displayed. And adding a preset processing delay time to the acquisition time of the video frame to be displayed to obtain the synchronous display time of the video frame to be displayed synchronously displayed on the spliced screen.
And if the output time sequence of the video frame to be displayed is not the first output time sequence, acquiring a frame of video frame of which the output time sequence is before the output time sequence of the video frame to be displayed as a reference video frame. And determining the duration of the video playing period through the playing frame rate. And determining the difference value between the output time sequence of the video frame to be displayed and the output time sequence of the reference video frame, and calculating the product of the difference value and the duration of the video playing period to be used as the display time difference. And acquiring the synchronous display time of the reference video frame, and increasing the display time difference at the synchronous display time of the reference video frame to obtain the synchronous display time of the video frame to be displayed on the spliced screen.
S404, the related data of each video frame cutting block is respectively transmitted to the output channel corresponding to each video frame cutting block, so that each output channel receives the related data of the corresponding video frame cutting block.
The related data of the video frame cutting block comprises the video frame cutting block and the expected output time of the video frame cutting block. And aiming at each video frame cutting block, the output system controls a video frame receiving channel to transmit the related data of the video frame cutting block to an output channel corresponding to the video frame cutting block, so that the output channel receives the related data of the corresponding video frame cutting block.
S405, according to the expected output time of each video frame cutting block, respectively controlling the output time of the video frame cutting block in each output channel.
And if the expected output time of the video frame cutting block is not greater than the output interruption time of the current video output period of the output channel corresponding to the video frame cutting block, the video frame cutting block misses the output time and is directly discarded.
And if the expected output time of the video frame cutting block is greater than the output interruption time of the current video output period of the output channel corresponding to the video frame cutting block and is not greater than the prediction judgment time of the output channel corresponding to the video frame cutting block, determining to output the video frame cutting block in the next video output period, wherein the prediction judgment time is the output interruption time of the next video output period of the output channel corresponding to the video frame cutting block.
And if the expected output time of the video frame cutting block is larger than the predicted judgment time of the output channel corresponding to the video frame cutting block, carrying out output time control on the video frame cutting block again in the next video output period.
And S406, outputting each video frame cutting block through each output channel according to the expected output time.
The video frame cut block to be output in the next video output period is determined for each according to the time control result of each video frame cut block in S405. And in the next video output period, when the preset clock of the output channel corresponding to the video frame cutting block reaches the expected output time, outputting the video frame cutting block so as to display the video frame cutting block on the spliced screen.
Optionally, the video frame output method according to the embodiment of the present invention further includes:
and calibrating the control parameters of each output channel according to a preset parameter synchronization rule.
The output system controls each output channel to reset the output timing sequence at the same time, reconfigures the same control parameters such as output resolution, output frame rate and the like, and controls each output channel to restart the output timing sequence at the same time.
Optionally, the video frame output method according to the embodiment of the present invention further includes:
and calibrating each preset clock according to the preset clock synchronization rule.
Each output channel and each video receiving channel correspond to a preset clock, the output system broadcasts the system clock for the first time, each output channel and each video receiving channel reset the corresponding preset clock according to the system clock, and simultaneously, an internal timer is started to carry out the timing of the preset clock. The output system periodically broadcasts a system clock, periodically calibrates the preset clocks corresponding to each output channel and each video receiving channel to eliminate clock synchronization error divergence caused by respective timer error accumulation of the preset clocks corresponding to each output channel and each video receiving channel, and thus maintains high-precision synchronous clocks of each output channel and each video receiving channel.
In the embodiment of the invention, the output playing delay of the output channel corresponding to the video frame cutting block is subtracted from the synchronous display time to respectively obtain the expected output time of each video frame cutting block, the video frame cutting block is output at the expected output time, and when the video frame to be displayed is displayed, the phenomenon of display asynchronism caused by different output playing delays of each video frame cutting block can be effectively reduced, the synchronism of video frame picture display can be enhanced, and the watching effect is enhanced.
An embodiment of the present invention further provides a video frame output apparatus, and referring to fig. 5, the apparatus includes:
a data obtaining module 501, configured to obtain a synchronization operation time of a video frame to be displayed, each video frame cutting block of the video frame to be displayed, and a control parameter, where the control parameter includes an output playing delay of each output channel, and the output playing delay of each output channel is a time taken from outputting a video frame cutting block by the output channel to displaying the video frame cutting block on a mosaic screen;
an output time determining module 502, configured to calculate, for each video frame cutting block, a difference between the synchronous operation time and an output playing delay of an output channel corresponding to the video frame cutting block, so as to obtain an expected output time of each video frame cutting block;
the video output module 503 is configured to output each of the video frame cutting blocks according to an expected output time of each of the video frame cutting blocks.
In the embodiment of the invention, the expected output time of each video frame cutting block is obtained by calculating the difference value between the synchronous operation time and the output playing delay, and when the video frame to be displayed is displayed, the phenomenon of display asynchronism caused by different output playing delays of each video frame cutting block can be effectively reduced, the synchronism of video frame image display can be enhanced, and the watching effect is enhanced.
Optionally, the synchronization operation time is: acquiring a synchronous instruction of the video frame to be displayed, wherein the synchronous instruction acquisition time is the time when each output channel synchronously acquires a synchronous output instruction;
the output time determination module 502 is specifically configured to:
and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block at the synchronous instruction acquisition time, and adding a preset delay time length to respectively obtain the expected output time of each video frame cutting block, wherein the preset delay time length is not less than any output playing delay.
Optionally, the synchronization operation time is: the synchronous display time of the video frame to be displayed;
the output time determination module 502 is specifically configured to:
and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous display time to respectively obtain the expected output time of each video frame cutting block.
Optionally, the control parameters further include: the video frame display method comprises the steps of playing a frame rate and presetting processing delay, wherein the presetting processing delay is longer than the processing time of a video frame to be displayed, and the processing time of the video frame to be displayed is the time from the acquisition of the video frame to be displayed to the display of each video frame cutting block on a splicing screen; the video frame output apparatus further includes:
the time sequence judging module is used for judging whether the output time sequence of the video frame to be displayed is a first output time sequence or not, wherein the video frame of the first output time sequence is a first frame video frame in the video;
the first calculation module is used for determining the time of a preset clock when the video frame to be displayed is acquired as the acquisition time of the video frame to be displayed if the output time sequence of the video frame to be displayed is the first output time sequence;
a first determining module, configured to add the preset processing delay to the acquisition time of the video frame to be displayed, so as to obtain a synchronous display time at which the video frame to be displayed is synchronously displayed on the mosaic screen;
a second calculating module, configured to, if the output timing of the video frame to be displayed is not the first output timing, obtain a frame of video frame whose output timing is before the output timing of the video frame to be displayed, and use the frame of video frame as a reference video frame;
the period calculation module is used for determining the duration of the video playing period through the playing frame rate;
a difference value calculating module, configured to determine a difference value between an output timing sequence of the video frame to be displayed and an output timing sequence of the reference video frame, and calculate a product of the difference value and a duration of the video playing period as a display time difference;
and the second determining module is used for acquiring the synchronous display time of the reference video frame, and increasing the display time difference on the synchronous display time of the reference video frame to obtain the synchronous display time of the video frame to be displayed on the spliced screen.
In the embodiment of the invention, a specific method for determining the synchronous display time is provided, so that the display time of each video frame in the video is ensured to accord with the play frame rate.
Optionally, the control parameters further include: a video output period; the video output module 503 includes:
the time acquisition submodule is used for acquiring the output interruption time of each output channel in the current video output period and the duration of the video output period;
a time prediction sub-module, configured to increase a duration of the video output period at an output interruption time of each output channel, respectively, to obtain a prediction determination time of each output channel;
a time comparison submodule, configured to compare, for each output channel, the expected output time of the video frame cutting block corresponding to the output channel with the output interruption time of the current video output period of the output channel, and compare the expected output time of the video frame cutting block corresponding to the output channel with the prediction judgment time;
and the cutting block output sub-module is used for outputting the video frame cutting block corresponding to the output channel when a preset clock reaches the expected output time of the video frame cutting block corresponding to the output channel in the next video output period if the expected output time of the video frame cutting block corresponding to the output channel is greater than the output interruption time of the current video output period of the output channel and is not greater than the prediction judgment time corresponding to the output channel.
In the embodiment of the present invention, the expected output time of the video frame cutting block corresponding to the output channel is greater than the output interruption time of the current video output period of the output channel and is not greater than the prediction judgment time of the output channel corresponding to the video frame cutting block corresponding to the output channel, which indicates that the expected output time of the output channel is in the next video output period, and in the next video output period, when the preset clock reaches the expected output time of the video frame cutting block corresponding to the output channel, the video frame cutting block corresponding to the output channel is output, and the output of the video frame cutting block is completed.
Optionally, the video output module 503 further includes:
and the cutting block discarding sub-module is used for discarding the video frame cutting block corresponding to the output channel if the expected output time of the video frame cutting block corresponding to the output channel is not greater than the output interruption time of the current video output period of the output channel.
In the embodiment of the invention, the expired video frame cutting block is discarded, so that the display error caused by outputting the expired video frame cutting block is prevented.
Optionally, the video output module 503 further includes:
and the secondary judgment sub-module is used for outputting the video frame cutting block output by the output channel in the current video output period in the next video output period if the expected output time of the video frame cutting block corresponding to the output channel is larger than the prediction judgment time corresponding to the output channel, and judging the video frame cutting block corresponding to the output channel again.
In the embodiment of the invention, if the expected output time of the video frame cutting block corresponding to the output channel is greater than the prediction judgment time corresponding to the output channel, the video frame cutting block output by the output channel in the current video output period is output in the next video output period, so that the black screen condition can be effectively reduced; and judging the video frame cutting blocks corresponding to the output channel again, thereby effectively reducing the phenomenon of display asynchronism caused by different output playing delays of the video frame cutting blocks, enhancing the synchronism of video frame image display and enhancing the watching effect.
Optionally, the video frame output apparatus according to the embodiment of the present invention further includes:
and the parameter calibration module is used for calibrating the control parameters according to a preset parameter synchronization rule.
In the embodiment of the invention, a specific method for calibrating the control parameters is provided, and the control parameters of each output channel are calibrated, so that the display synchronism of video frames can be improved, and the viewing effect is improved.
Optionally, in the video frame output apparatus according to the embodiment of the present invention, each of the output channels corresponds to one of the preset clocks, and the apparatus further includes:
and the clock calibration module is used for calibrating each preset clock according to a preset clock synchronization rule.
In the embodiment of the invention, the preset clocks are calibrated, the time for outputting the video frame cutting block according to the preset clocks is more accurate, the display synchronism of the video frames can be increased, and the watching effect is improved.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 601 and a memory 602, where the memory 602 is used for storing a computer program; the processor 601, when executing the program stored in the memory 602, implements the following steps:
acquiring the synchronous operation time of a video frame to be displayed, each video frame cutting block of the video frame to be displayed and control parameters, wherein the control parameters comprise output playing delay of each output channel, and the output playing delay of each output channel is the time from the output of the video frame cutting block of the output channel to the display of the video frame cutting block on a splicing screen;
for each video frame cutting block, respectively obtaining the expected output time of each video frame cutting block by calculating the difference value of the output playing delay of the synchronous operation time and the output channel corresponding to the video frame cutting block;
and outputting each video frame cutting block according to the expected output time of each video frame cutting block.
In the embodiment of the invention, the expected output time of each video frame cutting block is obtained by calculating the difference value between the synchronous operation time and the output playing delay, and when the video frame to be displayed is displayed, the phenomenon of display asynchronism caused by different output playing delays of each video frame cutting block can be effectively reduced, the synchronism of video frame image display can be enhanced, and the watching effect is enhanced.
Optionally, the electronic device further includes a communication interface and a communication bus, and the processor 601, the memory 602, and the communication interface complete mutual communication through a communication main line.
Optionally, when the processor 601 is used to execute the program stored in the memory 602, any of the video frame output methods described above can also be implemented.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
An embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps:
acquiring the synchronous operation time of a video frame to be displayed, each video frame cutting block of the video frame to be displayed and control parameters, wherein the control parameters comprise output playing delay of each output channel, and the output playing delay of each output channel is the time from the output of the video frame cutting block of the output channel to the display of the video frame cutting block on a splicing screen;
for each video frame cutting block, respectively obtaining the expected output time of each video frame cutting block by calculating the difference value of the output playing delay of the synchronous operation time and the output channel corresponding to the video frame cutting block;
and outputting each video frame cutting block according to the expected output time of each video frame cutting block.
In the embodiment of the invention, the expected output time of each video frame cutting block is obtained by calculating the difference value between the synchronous operation time and the output playing delay, and when the video frame to be displayed is displayed, the phenomenon of display asynchronism caused by different output playing delays of each video frame cutting block can be effectively reduced, the synchronism of video frame image display can be enhanced, and the watching effect is enhanced.
Optionally, the computer program, when executed by the processor, is further capable of implementing any of the video frame output methods described above.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, the electronic apparatus and the storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (16)

1. A method of outputting video frames, the method comprising:
acquiring the synchronous operation time of a video frame to be displayed, each video frame cutting block of the video frame to be displayed and control parameters, wherein the control parameters comprise the output playing delay of each output channel, and the output playing delay of each output channel is the time from the output of the video frame cutting block of the output channel to the display of the video frame cutting block on a splicing screen;
aiming at each video frame cutting block, respectively obtaining the expected output time of each video frame cutting block by calculating the difference value of the synchronous operation time and the output playing delay of an output channel corresponding to the video frame cutting block;
outputting each video frame cutting block according to the expected output time of each video frame cutting block;
wherein, at the synchronous operation time, the following steps are carried out: when the synchronization instruction acquisition time of the video frame to be displayed is the time when each output channel synchronously acquires the synchronization output instruction, the obtaining, for each video frame cutting block, the expected output time of each video frame cutting block by calculating the difference between the synchronization operation time and the output playing delay of the output channel corresponding to the video frame cutting block includes: for each video frame cutting block, subtracting the output playing delay of an output channel corresponding to the video frame cutting block from the synchronous instruction acquisition time, and adding a preset delay time length to respectively obtain the expected output time of each video frame cutting block, wherein the preset delay time length is not less than any output playing delay time; or
At the time of the synchronization operation: under the condition of the synchronous display time of the video frame to be displayed, respectively obtaining the expected output time of each video frame cutting block by calculating the difference value of the output playing delay of the output channel corresponding to the synchronous operation time and the video frame cutting block aiming at each video frame cutting block comprises: and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous display time to respectively obtain the expected output time of each video frame cutting block.
2. The method of claim 1, wherein the control parameters further comprise: the video frame display method comprises the steps of playing a frame rate and presetting processing delay, wherein the presetting processing delay is longer than the processing time of a video frame to be displayed, and the processing time of the video frame to be displayed is the time from the acquisition of the video frame to be displayed to the display of each video frame cutting block on a splicing screen; the method further comprises the following steps:
judging whether the output time sequence of the video frame to be displayed is a first output time sequence or not, wherein the video frame of the first output time sequence is a first frame video frame in the video;
if the output time sequence of the video frame to be displayed is the first output time sequence, determining the time of a preset clock when the video frame to be displayed is acquired, and taking the time as the acquisition time of the video frame to be displayed;
adding the preset processing delay to the acquisition time of the video frame to be displayed to obtain the synchronous display time of the video frame to be displayed synchronously displayed on the spliced screen;
if the output time sequence of the video frame to be displayed is not the first output time sequence, acquiring a frame of video frame of which the output time sequence is before the output time sequence of the video frame to be displayed as a reference video frame;
determining the duration of a video playing period according to the playing frame rate;
determining the difference value between the output time sequence of the video frame to be displayed and the output time sequence of the reference video frame, and calculating the product of the difference value and the duration of the video playing period to be used as the display time difference;
and acquiring the synchronous display time of the reference video frame, and increasing the display time difference on the synchronous display time of the reference video frame to obtain the synchronous display time of the video frame to be displayed on the spliced screen.
3. The method of claim 1 or 2, wherein the control parameters further comprise: a video output period; outputting each of the video frame cut blocks according to an expected output time of each of the video frame cut blocks, comprising:
acquiring the output interruption time of each output channel in the current video output period and the duration of the video output period;
respectively increasing the duration of the video output period at the output interruption time of each output channel to obtain the prediction judgment time of each output channel;
for each output channel, comparing the expected output time of the video frame cutting block corresponding to the output channel with the output interruption time of the current video output period of the output channel, and comparing the expected output time of the video frame cutting block corresponding to the output channel with the prediction judgment time;
and if the expected output time of the video frame cutting block corresponding to the output channel is greater than the output interruption time of the current video output period of the output channel and is not greater than the prediction judgment time corresponding to the output channel, outputting the video frame cutting block corresponding to the output channel when a preset clock reaches the expected output time of the video frame cutting block corresponding to the output channel in the next video output period.
4. The method of claim 3, further comprising:
and if the expected output time of the video frame cutting block corresponding to the output channel is not greater than the output interruption time of the current video output period of the output channel, discarding the video frame cutting block corresponding to the output channel.
5. The method of claim 3, further comprising:
if the expected output time of the video frame cutting block corresponding to the output channel is larger than the prediction judgment time corresponding to the output channel, outputting the video frame cutting block output by the output channel in the current video output period in the next video output period, and judging the video frame cutting block corresponding to the output channel again.
6. The method of claim 3, further comprising:
and calibrating the control parameters according to a preset parameter synchronization rule.
7. The method of claim 3, wherein each of the output channels corresponds to one of the preset clocks, the method further comprising:
and calibrating each preset clock according to a preset clock synchronization rule.
8. A video frame output apparatus, characterized in that the apparatus comprises:
the data acquisition module is used for acquiring the synchronous operation time of a video frame to be displayed, each video frame cutting block of the video frame to be displayed and control parameters, wherein the control parameters comprise output playing delay of each output channel, and the output playing delay of each output channel is the time from the output of the video frame cutting block of the output channel to the display of the video frame cutting block on the splicing screen;
an output time determining module, configured to calculate, for each video frame cutting block, a difference between the synchronous operation time and an output playing delay of an output channel corresponding to the video frame cutting block, so as to obtain an expected output time of each video frame cutting block;
the video output module is used for outputting each video frame cutting block according to the expected output time of each video frame cutting block;
wherein, at the synchronous operation time, the following steps are carried out: the output time determining module is specifically configured to, when the synchronization instruction of the video frame to be displayed is obtained at a time when the synchronization instruction is obtained by each of the output channels, obtain a synchronization output instruction: for each video frame cutting block, subtracting the output playing delay of an output channel corresponding to the video frame cutting block from the synchronous instruction acquisition time, and adding a preset delay time length to respectively obtain the expected output time of each video frame cutting block, wherein the preset delay time length is not less than any output playing delay time; or
At the time of the synchronization operation: the output time determination module is specifically configured to, in the case of the synchronous display time of the video frame to be displayed: and for each video frame cutting block, subtracting the output playing delay of the output channel corresponding to the video frame cutting block from the synchronous display time to respectively obtain the expected output time of each video frame cutting block.
9. The apparatus of claim 8, wherein the control parameters further comprise: the video frame display method comprises the steps of playing a frame rate and presetting processing delay, wherein the presetting processing delay is longer than the processing time of a video frame to be displayed, and the processing time of the video frame to be displayed is the time from the acquisition of the video frame to be displayed to the display of each video frame cutting block on a splicing screen; the video frame output apparatus further includes:
the time sequence judging module is used for judging whether the output time sequence of the video frame to be displayed is a first output time sequence or not, wherein the video frame of the first output time sequence is a first frame video frame in the video;
the first calculation module is used for determining the time of a preset clock when the video frame to be displayed is acquired as the acquisition time of the video frame to be displayed if the output time sequence of the video frame to be displayed is the first output time sequence;
the first determining module is used for adding the preset processing delay to the acquisition time of the video frame to be displayed to obtain the synchronous display time of the video frame to be displayed synchronously displayed on the spliced screen;
the second calculation module is used for acquiring a frame of video frame with the output time sequence before the output time sequence of the video frame to be displayed as a reference video frame if the output time sequence of the video frame to be displayed is not the first output time sequence;
the period calculation module is used for determining the duration of a video playing period through the playing frame rate;
the difference value calculation module is used for determining the difference value between the output time sequence of the video frame to be displayed and the output time sequence of the reference video frame, and calculating the product of the difference value and the duration of the video playing period to be used as the display time difference;
and the second determining module is used for acquiring the synchronous display time of the reference video frame, and increasing the display time difference on the synchronous display time of the reference video frame to obtain the synchronous display time of the video frame to be displayed on the spliced screen.
10. The apparatus of claim 8 or 9, wherein the control parameters further comprise: a video output period; the video output module comprises:
the time acquisition submodule is used for acquiring the output interruption time of each output channel in the current video output period and the duration of the video output period;
the time prediction submodule is used for respectively increasing the duration of the video output period at the output interruption time of each output channel to obtain the prediction judgment time of each output channel;
the time comparison submodule is used for comparing the expected output time of the video frame cutting block corresponding to each output channel with the output interruption time of the current video output period of the output channel and comparing the expected output time of the video frame cutting block corresponding to the output channel with the prediction judgment time;
and the cutting block output sub-module is used for outputting the video frame cutting block corresponding to the output channel when a preset clock reaches the expected output time of the video frame cutting block corresponding to the output channel in the next video output period if the expected output time of the video frame cutting block corresponding to the output channel is greater than the output interruption time of the current video output period of the output channel and is not greater than the prediction judgment time corresponding to the output channel.
11. The apparatus of claim 10, wherein the video output module further comprises:
and the cutting block discarding sub-module is used for discarding the video frame cutting block corresponding to the output channel if the expected output time of the video frame cutting block corresponding to the output channel is not greater than the output interruption time of the current video output period of the output channel.
12. The apparatus of claim 10, wherein the video output module further comprises:
and the secondary judgment sub-module is used for outputting the video frame cutting block output by the output channel in the current video output period in the next video output period if the expected output time of the video frame cutting block corresponding to the output channel is larger than the prediction judgment time corresponding to the output channel, and judging the video frame cutting block corresponding to the output channel again.
13. The apparatus of claim 10, further comprising:
and the parameter calibration module is used for calibrating the control parameters according to a preset parameter synchronization rule.
14. The apparatus of claim 10, wherein each of the output channels corresponds to one of the preset clocks, the apparatus further comprising:
and the clock calibration module is used for calibrating each preset clock according to a preset clock synchronization rule.
15. An electronic device comprising a processor and a memory, wherein the memory is configured to store a computer program; the processor, when executing the program stored in the memory, implementing the method steps of any of claims 1-7.
16. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN201810434233.0A 2018-05-08 2018-05-08 Video frame output method and device, electronic equipment and storage medium Active CN110460891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810434233.0A CN110460891B (en) 2018-05-08 2018-05-08 Video frame output method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810434233.0A CN110460891B (en) 2018-05-08 2018-05-08 Video frame output method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110460891A CN110460891A (en) 2019-11-15
CN110460891B true CN110460891B (en) 2021-09-10

Family

ID=68480271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810434233.0A Active CN110460891B (en) 2018-05-08 2018-05-08 Video frame output method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110460891B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026595B (en) * 2019-12-16 2021-07-16 威创集团股份有限公司 Multi-screen system synchronous display testing method, device and equipment
CN111654690A (en) * 2020-05-06 2020-09-11 北京百度网讯科技有限公司 Live video delay time determination method and device and electronic equipment
CN111741185B (en) * 2020-06-24 2022-04-26 杭州海康威视数字技术股份有限公司 Light supplement control method, device, system and equipment and storage medium
CN113453053B (en) * 2021-06-25 2022-05-06 杭州海康威视数字技术股份有限公司 Distributed video synchronous display system, video synchronous display method and storage medium
CN114143486A (en) * 2021-09-16 2022-03-04 浙江大华技术股份有限公司 Video stream synchronization method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104284098A (en) * 2013-07-01 2015-01-14 杭州海康威视数字技术股份有限公司 Method and system for processing video data
CN104375789A (en) * 2013-08-14 2015-02-25 杭州海康威视数字技术股份有限公司 Synchronous displaying method and system of tiled display screen
CN105761705A (en) * 2016-05-04 2016-07-13 南京洛菲特数码科技有限公司 Method and system for synchronous display of screen wall
US9466257B1 (en) * 2012-10-19 2016-10-11 CSC Holdings, LLC Multi-screen virtual billboard
CN106454010A (en) * 2016-10-21 2017-02-22 青岛海信电器股份有限公司 Synchronous display calibration method for multi-screen spliced display system, displays and multi-screen spliced display system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150057421A (en) * 2013-11-19 2015-05-28 한국전자통신연구원 Multi-screen display apparatus and synchronication tuning method for the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9466257B1 (en) * 2012-10-19 2016-10-11 CSC Holdings, LLC Multi-screen virtual billboard
CN104284098A (en) * 2013-07-01 2015-01-14 杭州海康威视数字技术股份有限公司 Method and system for processing video data
CN104375789A (en) * 2013-08-14 2015-02-25 杭州海康威视数字技术股份有限公司 Synchronous displaying method and system of tiled display screen
CN105761705A (en) * 2016-05-04 2016-07-13 南京洛菲特数码科技有限公司 Method and system for synchronous display of screen wall
CN106454010A (en) * 2016-10-21 2017-02-22 青岛海信电器股份有限公司 Synchronous display calibration method for multi-screen spliced display system, displays and multi-screen spliced display system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Android平台的多移动终端拼接显示技术;白旭卉;《长春理工大学学报(自然科学版)》;20140815;全文 *

Also Published As

Publication number Publication date
CN110460891A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
CN110460891B (en) Video frame output method and device, electronic equipment and storage medium
CN109391799B (en) Monitoring video synchronization method and device and video acquisition equipment
CN107277385B (en) Multi-camera system synchronous exposure control method and device and terminal equipment
CN110266420B (en) Clock synchronization method, clock synchronization apparatus, and computer-readable storage medium
US10892840B2 (en) Method and apparatus for TDMA slot synchronization and calibration of master and slave
CN108259783B (en) Digital matrix synchronous output control method and device and electronic equipment
JP2011109226A (en) Reception device
US20160295271A1 (en) Time Adjustment System and Time Adjustment Method for Electronic Program Guide
CN112422888A (en) Video splicing method and device, electronic equipment and computer readable storage medium
WO2014118984A1 (en) Signal processing apparatus
JP6149162B2 (en) Photometric method, photometric device, terminal, program and recording medium
EP2073552A1 (en) Method and arrangement for controlling a media consumption rate of a receiver
JP4891707B2 (en) Electronic device, timer processing method, and timer processing program
CN109862259B (en) Image sensor synchronous configuration method and device
CN113891065A (en) Single-frame image transmission delay measuring method and system
CN108769609B (en) Video display method and device
JP3220355U (en) Real-time clock inspection device
CN107197351B (en) Method and system for synchronizing streaming digital content
CN114173166A (en) Image synchronous display system and method and display controller
US10931434B2 (en) Relay apparatus, communication system, and failure detection method
US20180268778A1 (en) Image processing apparatus, display apparatus, and image processing method
CN114697466B (en) Video frame acquisition synchronization control
WO2023220939A1 (en) Time delay measurement method and apparatus, and device, system, storage medium and chip
JP2008070335A (en) Time-calibrating controller and method therefor
TWI773524B (en) A time synchronization method used in a precision time protocol system

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