CN116582708B - Video playing method and device, electronic equipment and readable storage medium - Google Patents

Video playing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN116582708B
CN116582708B CN202310828823.2A CN202310828823A CN116582708B CN 116582708 B CN116582708 B CN 116582708B CN 202310828823 A CN202310828823 A CN 202310828823A CN 116582708 B CN116582708 B CN 116582708B
Authority
CN
China
Prior art keywords
playing
synchronous
video
picture frame
time point
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
CN202310828823.2A
Other languages
Chinese (zh)
Other versions
CN116582708A (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.)
Shenzhen Skyworth Smart Technology Co ltd
Original Assignee
Shenzhen Skyworth Smart 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 Shenzhen Skyworth Smart Technology Co ltd filed Critical Shenzhen Skyworth Smart Technology Co ltd
Priority to CN202310828823.2A priority Critical patent/CN116582708B/en
Publication of CN116582708A publication Critical patent/CN116582708A/en
Application granted granted Critical
Publication of CN116582708B publication Critical patent/CN116582708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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
    • H04N21/43076Synchronising 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 of the same content streams on multiple devices, e.g. when family members are watching the same movie on different devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a video playing method, a device, an electronic device and a readable storage medium, which are applied to a video playing synchronous system, wherein in the video playing synchronous system, synchronous standard equipment is used for providing standard time and synchronous playing time points, and the synchronous playing equipment is playing equipment which has received the synchronous playing time points and comprises the following steps: after receiving the video to be played, the target playing device sends a synchronous playing request to the synchronous standard device through the target playing device; transmitting a synchronous playing time point to the target playing device according to the synchronous playing request through the synchronous standard device; playing the video to be played through the target playing device and the synchronous playing device at the synchronous playing time point; selecting a target synchronized device from the synchronized device group; calculating the frame similarity between the target synchronized equipment and the rest synchronized equipment; and determining whether to perform synchronous play adjustment on the synchronized equipment group according to the inter-frame similarity. The application solves the technical problem of poor synchronous effect of synchronous video playing.

Description

Video playing method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of image communication technologies, and in particular, to a video playing method, a video playing device, an electronic device, and a readable storage medium.
Background
With the continuous development of the internet of things technology, synchronous playing is just like industry hotwords, and in a scene that a plurality of playing devices synchronously play videos, even if one frame of difference exists between the two, the watching experience of a user can be influenced.
At present, synchronous video playing is generally performed by setting a local area network multicast mode of a master device and a slave device, namely, a certain playing device is used as a master device in a local area network, other playing devices are used as slave devices, the master device sends a synchronous command to the slave devices at a certain moment, and the slave devices synchronously play the video with the master device at a synchronous time point after receiving the synchronous command, however, due to the master-slave relationship between the playing devices, the slave devices have hysteresis property compared with the master device, and meanwhile, different slave devices also have differences in receiving messages sent by the master device, so that the synchronous playing of the video by different playing devices is poor, namely, the synchronous effect of the synchronous playing of the current video is poor.
Disclosure of Invention
The application mainly aims to provide a video playing method, a video playing device, electronic equipment and a readable storage medium, and aims to solve the technical problem that in the prior art, the synchronous effect of video synchronous playing is poor.
In order to achieve the above object, the present application provides a video playing method, applied to a video playing synchronization system, the video playing synchronization system including a target playing device, at least one synchronous playing device and a synchronous standard device, the synchronous standard device being used for providing a standard time and a synchronous playing time point, each of the synchronous playing devices being a playing device that has received the synchronous playing time point, the target playing device and each of the synchronous playing devices being in the standard time, the video playing method comprising:
after the target playing device receives the video to be played, a synchronous playing request is sent to the synchronous standard device through the target playing device;
issuing the synchronous playing time point to the target playing device according to the synchronous playing request through the synchronous standard device;
synchronizing with each synchronous playing device through the target playing device at the synchronous playing time point;
selecting a target synchronized device from a synchronized device group, wherein the synchronized device group comprises the target playing device and each synchronized playing device;
calculating the frame similarity between a first current picture frame currently played by the target synchronized device and at least one second current picture frame currently played by the rest synchronized device, wherein the rest synchronized device is other playing devices except the target synchronized device in the synchronized device group;
And determining whether to perform synchronous play adjustment on the synchronized equipment group according to the similarity between frames.
In order to achieve the above object, the present application provides a video playing apparatus applied to a video playing synchronization system, the video playing synchronization system including a target playing device, at least one synchronous playing device, and a synchronous standard device, the synchronous standard device being used for providing a standard time and a synchronous playing time point, each of the synchronous playing devices being a playing device that has received the synchronous playing time point, the target playing device and each of the synchronous playing devices being in the standard time, the application also provides a video playing apparatus comprising:
the sending module is used for sending a synchronous playing request to the synchronous standard equipment through the target playing equipment after the target playing equipment receives the video to be played;
the issuing module is used for issuing the synchronous playing time point to the target playing device according to the synchronous playing request through the synchronous standard device;
the playing module is used for synchronously playing the video to be played through the target playing device and each synchronous playing device at the synchronous playing time point;
A selecting module, configured to select a target synchronized device from a synchronized device group, where the synchronized device group includes the target playing device and each of the synchronized playing devices;
the computing module is used for computing the frame similarity between a first current picture frame currently played by the target synchronized device and at least one second current picture frame currently played by the residual synchronized device, wherein the residual synchronized device is other playing devices except the target synchronized device in the synchronized device group;
and the determining module is used for determining whether to carry out synchronous play adjustment on the synchronized equipment group according to the similarity among the frames.
The application also provides an electronic device comprising: the video playback device comprises a memory, a processor and a program of the video playback method stored in the memory and capable of running on the processor, wherein the program of the video playback method can realize the steps of the video playback method when being executed by the processor.
The present application also provides a computer-readable storage medium having stored thereon a program for implementing a video playback method, which when executed by a processor implements the steps of the video playback method as described above.
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a video playback method as described above.
The application provides a video playing method, a device, an electronic device and a readable storage medium, which are applied to a video playing synchronous system, wherein the video playing synchronous system comprises a target playing device, at least one synchronous playing device and a synchronous standard device, the synchronous standard device is used for providing standard time and synchronous playing time points, each synchronous playing device is a playing device which has received the synchronous playing time points, and the target playing device and each synchronous playing device are both in the standard time, namely, after the target playing device receives a video to be played, a synchronous playing request is sent to the synchronous standard device through the target playing device; issuing the synchronous playing time point to the target playing device according to the synchronous playing request through the synchronous standard device; synchronously playing the video to be played through the target playing device and each synchronous playing device at the synchronous playing time point; selecting a target synchronized device from a synchronized device group, wherein the synchronized device group comprises the target playing device and each synchronized playing device; calculating the frame similarity between a first current picture frame currently played by the target synchronized device and at least one second current picture frame currently played by the rest synchronized device, wherein the rest synchronized device is other playing devices except the target synchronized device in the synchronized device group; and determining whether to perform synchronous play adjustment on the synchronized equipment group according to the similarity between frames. The synchronous standard equipment can provide standard time for the target playing equipment and different synchronous playing equipment, so that the playing equipment for synchronously playing the video is in the same standard time, after receiving a synchronous playing request of the target playing equipment, the synchronous standard equipment issues a synchronous playing time point to the target playing equipment, and the different synchronous playing equipment is the playing equipment with the received synchronous playing time point, so that after the synchronous playing time point is received by the target playing equipment, the video to be played can be synchronously played through the target playing equipment and the different synchronous playing equipment at the synchronous playing time point, the purpose that the synchronous playing time point is issued for the different playing equipment through the synchronous standard equipment is achieved, the purpose that the video to be played is synchronously played at the synchronous playing time point through the different playing equipment is achieved, and then when the target playing equipment and the different synchronous playing equipment synchronously play the video to be played, the purpose that the synchronous playing equipment in the synchronous playing equipment can be adjusted to the synchronous playing time point is achieved by calculating the frame similarity between the current frame of any playing equipment and the current frame of the other playing equipment in the synchronous playing equipment. Instead of setting master-slave relation in different playing devices to play video synchronously. Therefore, the technical defect that the synchronous playing of videos by different playing devices is poor due to the fact that the slave devices have hysteresis compared with the master device and meanwhile, different slave devices have differences in receiving messages sent by the master device is overcome, and the synchronous effect of synchronous playing of videos is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a video playing method according to a first embodiment of the present application;
fig. 2 is a schematic structural diagram of a video playing system according to a video playing method according to a first embodiment of the present application;
fig. 3 is a flow chart of a video playing method according to a second embodiment of the present application;
fig. 4 is a schematic structural diagram of a video playing device according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to make the above objects, features and advantages of the present application more comprehensible, the following description of the embodiments accompanied with the accompanying drawings will be given in detail. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the first embodiment of the present application, it should be understood that, first, the ground fusion of the video synchronous playing in the actual application scene starts to the advertisement industry, in numerous video playing scenes such as an exhibition hall and a demonstration hall, a plurality of playing devices are usually used to synchronously play the same media file, so as to perform content transmission, sometimes, the same content needs to be played through a plurality of screens to achieve a carry-forward effect, sometimes, a splicing effect needs to be achieved in different areas of different screen display videos, but the above situations all need to achieve accurate video synchronization among a plurality of playing devices, otherwise, even if the difference of one frame is captured by a human eye, so that the user obtains the conclusion that the playing frames are not synchronized, so as to affect the viewing experience of the user, therefore, the video playing synchronization is usually achieved by setting a master-slave relationship among the playing devices, however, once the network state is poor or the situation of network blocking occurs, the video synchronization effect will be very poor, and the playing progress of the slave devices will always be slower than the master device, when the number of slave devices increases, and when the slave devices receive the message time is different, and the video synchronization effect is still poor in the video playing synchronization effect between the different playing devices.
An embodiment of the present application provides a video playing method, applied to a video playing synchronization system, where the video playing synchronization system includes a target playing device, at least one synchronous playing device and a synchronous standard device, where the synchronous standard device is used to provide a standard time and a synchronous playing time point, each synchronous playing device is a playing device that has received the synchronous playing time point, and the target playing device and each synchronous playing device are both located at the standard time, and in an embodiment of the video playing method of the present application, referring to fig. 1, the video playing method includes:
step S10, after the target playing device receives a video to be played, a synchronous playing request is sent to the synchronous standard device through the target playing device;
in this embodiment, it should be noted that, the video playing synchronization system is used to implement video playing synchronization between different playing devices, referring to fig. 2, fig. 2 is a schematic structural diagram of the video playing system, where the video playing synchronization system includes a target playing device 11, a synchronous playing device 12 and a synchronous standard device 13, the target playing device is a playing device that does not receive a synchronous playing time point in the video playing synchronization system, specifically may be a playing device newly joining a multicast local area network, or may be a playing device that does not receive a synchronous playing time point after joining a multicast local area network, the synchronous playing device is a playing device that has received a synchronous playing time point in the video playing synchronization system, and is used to play a video to be played in synchronization with the target playing device, and the synchronous standard device is used to provide a standard time and a synchronous playing time point, the target playing device, the synchronous playing device and the synchronous standard device may be a computer or a personal PC, where the standard time is the clock running time of the synchronous standard device, the synchronous playing time point is a time point of synchronously playing the video to be played, the synchronous standard device is provided with a playing synchronization protocol, the synchronous playing time point can be obtained by playing the synchronization protocol, the video to be played is used to characterize the video file waiting to be played, for example, in one implementation manner, it is assumed that the video playing synchronization system includes a target playing device a, a synchronous playing device B, a synchronous playing device C and a synchronous standard device D, where the clock running time point of the synchronous standard device D is 14:22:01, and since both A, B and C are in standard time, the time of A, B and C are the same as the clock running time point of the synchronous standard device, so a, the clock running time of the B and C at the current time step is 14:22:01, assuming that the synchronous playing time point generated by playing the synchronous protocol is 15:30:00, the A, B and C play the video to be played at 15:30:00, wherein at the beginning of the A, B and C powering on, the clock running time and the synchronous standard have a difference, for example, when the clock running time of the synchronous standard device D is 08:15:00, it is assumed that A, B and C are both powered on at this time, the clock running time of a is 08:14:59, the clock running time of B is 08:15:01, the clock running time of C is 08:15:02, and the clock running times of A, B and C are both adjusted to be consistent with the clock running time of the synchronous standard device.
In addition, it should be noted that, in the video playing system, the playing device (the target playing device or the synchronous playing device) for synchronously playing the video to be played will request the standard time from the synchronous standard device after the video playing system is started, so that the target playing device and the synchronous playing device are both in standard time before synchronously playing the video to be played, thereby avoiding the technical defect that different frame of the video to be played at the synchronous playing time point has different starting time points, for example, in an implementable mode, the synchronous standard device is provided with an NTP (Network Time Protocol) server, and after the different synchronous playing devices are started, the NTP time is requested from the synchronous standard device, so that the NTP time is used as the standard time (time axis), and the synchronous playing time point is searched by referring to the NTP time, so as to synchronously play the video to be played, wherein the NTP server has the characteristic of low time delay, when different clients (the target playing device or the synchronous playing device) access the NTP server, the different client can have microsecond time delay of different levels, and the NTP server can support different clients and have different NTP service levels, and simultaneously have the same time errors, so that the different clients can have the same time errors, and the NTP can have the same time error, and the service error is also can have the minimum.
In addition, it should be noted that, there are various receiving manners of the video to be played, for example, the receiving manner is issued by a signaling system, or the video to be played is transmitted by a third party device, which is not particularly limited in this embodiment of the present application, the target playing device and at least one synchronous playing device are both in communication connection with the synchronous standard device, so as to perform communication message interaction, the synchronous playing request is used to characterize a request for joining in to perform synchronous playing of the video to be played, the target playing device may send the synchronous playing request to the synchronous standard device at a first time point after receiving the video to be played, or may send the synchronous playing request to the synchronous standard device at a preset time point after receiving the video to be played, since the speed of recognizing the continuous image frame of the video by human eyes is 24 frames/second, that is, approximately, every 40 milliseconds is recognized, the time consumed by refreshing a frame of the playing device on the screen can be known by combining with the resolution of the playing device, for example, if the resolution of the playing device is 60Hz, the frame of image data can be refreshed on the screen, so that in 16.66 milliseconds, if the playing device to be ready to play the video to be played under a certain video strategy, the video frame can be perceived by the user can not feel that the user is required to have the situation that the device is crossing the video frame.
As an example, step S10 includes: and sending a video to be played to the target playing device through a signaling system, and sending a synchronous playing request to the synchronous standard device through the target playing device at the current time point of the target playing device after the target playing device receives the video to be played.
Step S20, the synchronous playing time point is issued to the target playing device through the synchronous standard device according to the synchronous playing request;
in this embodiment, it should be noted that, because the standard time is the current time of different playing devices in the video playing synchronization system, and the synchronized playing time point is the time point when the target playing device and the synchronized playing device synchronously play the video to be played, and the target playing device needs to play the video to be played after the synchronized playing time point through requesting, the synchronized playing time point is later than the standard time, and before the synchronized standard device receives the synchronized playing request sent by the target playing device, the synchronized playing time point is issued to at least one synchronized playing device, for single playing of the video to be played, the purpose of playing the video synchronously across devices can be achieved only by making all the playing devices playing the video to be played play the video at the same synchronized playing time point.
As an example, step S20 includes: inquiring a synchronous playing time point corresponding to the synchronous playing request through the synchronous standard equipment according to the synchronous playing request, and issuing the synchronous playing time point to the target playing equipment through the synchronous standard equipment.
The step of issuing the synchronous playing time point to the target playing device according to the synchronous playing request by the synchronous standard device comprises the following steps:
step A10, after the synchronous standard equipment receives the synchronous playing request, acquiring the video playing time length of the video to be played;
step A20, determining a video switching time point of the target playing device in a preset playing period according to the video playing time length;
step A30, acquiring a synchronous playing time point of the synchronous standard equipment at the video switching time point;
and step A40, transmitting the synchronous playing time point to the target playing device through the synchronous standard device.
In this embodiment, it should be noted that in some video synchronous playing scenarios, it is generally required to play the video to be played in a circulating manner within a preset playing period, which causes a switching time slot to exist between different circulating playing times for the video to be played, for example, assuming that the video playing duration of the video to be played is 1 hour, the preset playing period is 8 am to 8 pm, then the video to be played is played in a circulating manner 12 times, so that the viewing experience of the user is not affected when the video to be played is switched, at a video switching time point, where the video switching time point is used to represent the playing time point of a playing key frame of the video to be played, the playing key frame may be specifically set by the user according to the requirement, for example, in one practical manner, it is assumed that the target playing device and the synchronous playing device play the video to be played at 18:00:05, the video to be played has a duration of 1 minute, image frames 5 seconds before the end of the video to be played are all synchronous playing time points, and the video switching time point is 18:00:05 and 18:01:05: 01:00.
As an example, steps a10 to a40 include: after the synchronous standard equipment receives the synchronous playing request, acquiring the video playing time length of the video to be played, wherein the video playing time length can be specifically 1 minute, 2 minutes, 3 minutes or the like; obtaining a video switching time point of the target playing device in a preset playing period by calculating the ratio of the preset playing period to the video playing time length; acquiring a synchronous playing time point of the synchronous standard equipment at the video switching time point; and sending the synchronous playing time point to the target playing device through the synchronous standard device.
In an embodiment, when the target playing device is under the standard time provided by the NTP server, the video playing duration is taken as a step length from the 0 point, the device to be played is scheduled in a preset playing period, the current position of the video to be played, which should be played at the current time point, is calculated, and the target playing device is set to perform cyclic playing of the video to be played by taking the current time point as a reference, wherein a specific mode of calculation may be a mode of dividing the preset playing period by the video playing duration.
The step of determining the video switching time point of the target playing device in the preset playing time period according to the video playing time length includes:
step B10, according to the video playing time length and the preset playing time period, carrying out carousel sequencing on the video to be played to obtain a carousel switching time point;
and step B20, taking the carousel switching time point as the video switching time point.
In this embodiment, it should be noted that, in a portion of a video playing scene, the content played in the preset playing period is not always repeatedly played in a circulating manner, that is, the video to be played includes a plurality of different video files, so as to achieve the noninductive switching of playing between the different video files, the video display time of the different video files in the preset playing period can be calculated, the video display time of each video file is ordered and stored according to the time sequence, the switching time point between the different video files needs to be hidden, so as to achieve the smooth transition of video switching, for example, in an implementation manner, the last 2 seconds of playing of the previous video file can be started by opening up a thread, when the video file is switched to the main interface of the playing device at the time of the carousel switching time point of the video file, seamless connection is finally achieved between the video files, wherein the carousel switching time point is used for representing the video file switching time point of different video files of the video to be played in carousel, and the carousel sequence of the video files is set by a user according to the requirement, for example, in an implementation mode, assuming that the preset playing period is 5 hours from 1 pm to 6 pm, the video to be played comprises a 5-minute video file a, a 6-minute video file b and a 4-minute video file, the carousel sequence can be the sequence of performing cyclic carousel in the modes of 'a, c and b', or the sequence of performing cyclic carousel in the modes of 'a, c, b, b, c and a'.
Additionally, it should be noted that, the principles of video switching between different video files of a video to be played can be referred to as follows: when the last video file to be played is finished, keeping the original encoder instance to continue to run, starting a new encoder instance, synchronizing the frame numbers of the current video file of the video to be played and the last video file of the video to be played, selecting a key frame from the current video file, starting to transmit the current video file to the target playing device from the key frame, finishing the transmission of the last frame data of the key frame by the last video file, and switching the interval between the frame number of the key frame and the frame number of the key frame of the last video file to be more than half the length of a GOP (Group of pictures) of the current video file, then closing the original encoder instance, for example, in an implementable mode, if two video files exist in the video to be played, keeping the first video file to continue to run, starting a new encoder instance according to a time node, synchronizing the video streams of the first video file and the second video file, enabling the frame numbers in the two video files to correspond to each other after the transmission of the last frame data of the key frame, selecting the first video file and the frame number of the key frame number of the second video file to be more than half the length of the first video file, switching the frame number of the key frame number from the first video file to the last video file to be finished, and finishing the transmission of the key frame data of the key frame number of the key file to be finished, and switching the key frame number of the key frame number to be completely coded by the first video file to be completely.
As an example, steps B10 to B20 include: calculating file display time lengths of different video files of the video to be played according to the video playing time lengths, and performing carousel sequencing on the different video files according to the file display time lengths and the preset playing time period to obtain carousel switching time points; and taking the carousel switching time point as the video switching time point.
Step S30, synchronously playing the video to be played through the target playing device and each synchronous playing device at the synchronous playing time point;
in this embodiment, it should be noted that, for a playing device for playing a video to be played synchronously in a video playing synchronous system, after a request is made to a standard Time and a synchronous playing Time point, the playing device takes a Time difference for the current Time point and the synchronous playing Time point under the standard Time, and sets a high-precision timer to fix a point to play the video to be played at the synchronous playing Time point, where the high-precision timer is a special area in an ARM SOC hardware system, and may be powered by a separate circuit, and provides a pulse through a separate crystal oscillator, and timely dormancy is not exceptional, i.e., the RTC (real_time Clock) counts the crystal oscillator pulses continuously, so that the playing device is used for long-Time timing, and has the function of waking up a processor.
As an example, step S30 includes: detecting whether a synchronous playing time point is reached or not through the real-time clocks of the target playing device and the synchronous playing devices, and synchronously playing the video to be played through the target playing device and the synchronous playing devices when the synchronous playing time point is reached.
The step of sending the synchronous playing time point to the target playing device through the synchronous standard device comprises the following steps:
step C10, detecting whether the target playing device is a device to be synchronously played or not according to the device identifier carried by the target playing device;
step C20, if yes, taking the synchronous playing timing point which corresponds to the synchronous playing equipment together as the synchronous playing time point; transmitting the synchronous playing time point to the target playing equipment;
and step C30, if not, sending the synchronous playing time point to the target playing equipment.
In this embodiment, it should be noted that, for the target playing device, there may be two different situations in which the target playing device performs video synchronous playing, firstly, it is synchronized with other synchronous playing devices to a synchronous playing time point to perform playing of the video to be played, and secondly, it is synchronized to a synchronous playing time point to which other synchronous playing videos have been synchronized, so that the target playing device may be divided into a synchronized playing device and a to-be-synchronized playing device, the synchronized playing device is used for characterizing that the playing device to be played has been synchronized with the synchronized playing device, the to-be-synchronized playing device is used for characterizing that the playing device waiting for performing synchronous playing of the video to be played, the device identifier may be a device machine code or a device number, etc., and the synchronous playing timing point is used for characterizing that the other synchronous playing devices have timed playing of the video to be played.
As an example, steps C10 to C30 include: acquiring a device identifier carried by the target playing device, and determining whether the target playing device is a device to be synchronized according to the device identifier; if the target playing device is determined to be the device to be synchronized, acquiring timing points of the video to be played, which are timed by each synchronized playing device, and taking the timing points as the synchronized playing time points; transmitting the synchronous playing time point to the target playing equipment; and if the target playing device is not the device to be synchronized, sending the synchronous playing time point to the target playing device so that the target playing device and each synchronous playing device synchronously play the video to be played at the synchronous playing time point.
The video playing method further comprises the following steps:
step D10, when the starting-up time point of the first playing device is detected to be earlier than the starting-up time point of the second playing device under the standard time, determining a first current playing time point of the first playing device according to a time difference value between the standard time point corresponding to the standard time and the synchronous playing time point; synchronizing the second playing device to the first current playing time point for playing; or alternatively, the first and second heat exchangers may be,
Step D20, when the start-up time point of the first playing device is detected to be later than the start-up time point of the second playing device under the standard time, determining a second current playing time point of the second playing device according to a time difference value between the standard time and the synchronous playing time point; and synchronizing the first playing device to the second current playing time point for playing.
In this embodiment, it should be noted that, due to the influence of time environment, there is a difference in performance of different playing devices in the video playing synchronization system, so that when the video to be played is played by the different playing devices after being started, the situation of unsynchronization is easy to occur, that is, the playing progress of the playing device after being started is behind the playing device started before that, so that when the different playing devices are all under standard time, by determining the starting sequence between the playing devices, the playing device after being started is synchronized to the playing time point of the playing device started before that for playing, where the synchronization is specifically implemented by playing seek (review and fast forward), and the principles of seek playing are as follows: the video to be played consists of one frame of image, so that the encoding is also to encode different video image frames of the video to be played, the image is usually composed of three primary colors of RGB (Red, green and Blue), but RGB is not very friendly to encoding, so that YUV (Luminance-Bandwidth-Chrominance) is usually used, wherein Y represents Luminance, UV represents color space, human eyes are sensitive to Luminance information and slightly weak to Chrominance information, so that the image is differently encoded, key frames of a certain time are obtained through decoding, the key frame interval is relatively small when a video source is reliable, and the frame interval is relatively large, so that the frame can be taken directly from seek to a corresponding time point.
Additionally, it should be noted that, the first current playing time point and the second current playing time point are both subordinate to the current playing time point, where the current playing time point is used to represent the current playing precision of playing the video to be played, the first playing device and the second playing device are different playing devices in the video playing synchronization system, and may specifically be a target playing device or a certain synchronous playing device in each synchronous playing device, for example, in an implementation manner, the first playing device is a target playing device X, the second playing device is a synchronous playing device Y in each synchronous playing device, where the time required for starting up the synchronous playing device Y is 17 seconds, the time required for starting up the target playing device X is 18 seconds, that is, the starting up time point of X is later than the starting up time point of Y, in order to avoid that video playing caused by the starting up time is asynchronous, and the playing time point seek of the target playing device X to the playing time point of the synchronous playing device Y is the current time point under the standard time.
As an example, steps D10 to D20 include: respectively acquiring a first starting time point of the first playing device and a second starting time point of the second playing device under the standard time, calculating a first time difference value between a current time point under the standard time and the synchronous playing time point when the first starting time point is detected to be earlier than the second starting time point, and obtaining a first current playing time point of the first playing device by calculating a ratio of the first time difference value to the video playing time length of the video to be played; synchronizing the second playing device to the first current playing time point for playing; or alternatively, the first and second heat exchangers may be,
Respectively acquiring a third starting time point of the target playing device and a fourth starting time point of the synchronous playing device under the standard time, calculating a second time difference value between a current time point under the standard time and the synchronous playing time point when the third starting time point is detected and the fourth starting time point is detected, and obtaining a second current playing time point of the second playing device by calculating a ratio of the second time difference value to the video playing time length of the video to be played; and synchronizing the first playing synchronization device to the second current playing time point for playing.
In one embodiment, assuming that the playback device M and the playback device N in the video playback synchronization system are synchronizing, the playback device O is first synchronized to a standard time point of the playback device M and the playback device N when the playback device O is just turned onAnd receiving synchronous play time point issued by synchronous standard equipment>The time difference is +.>The time difference divided by the video playing time length of the video to be played is the current playing time point of the video to be played, for example, assuming that the video playing time length is 5 minutes and the remainder is 3.14, the 3:14 is the current playing time point.
Step S40, selecting a target synchronized device from a synchronized device group, wherein the synchronized device group comprises the target playing device and each synchronized playing device;
step S50, calculating the frame similarity between a first current picture frame currently played by the target synchronized device and at least one second current picture frame currently played by the rest synchronized device, wherein the rest synchronized device is other playing devices except the target synchronized device in the synchronized device group;
step S60, determining whether to perform synchronous play adjustment on the synchronized equipment group according to the similarity between frames.
In this embodiment, it should be noted that, in the process of playing the video to be played by multiple devices synchronously, there may be a situation that playing is blocked due to factors in software or hardware, so that the video to be played between the playing devices is not synchronized, and then the video to be played is synchronously played by different playing devices, whether frame differences exist at a certain time point is detected to determine whether to perform synchronous play adjustment, where the synchronized device group is used to characterize a set of playing devices that perform video play synchronization, the playing devices that perform video play synchronization are playing devices that are already under standard time and receive a synchronous play time point issued by a synchronous standard device, the target synchronized device is used to characterize a designated playing device that performs frame detection, and specifically may be any playing device in the target playing device and each of the synchronized playing devices, and the rest synchronized devices are other playing devices in the synchronized device group except the target synchronized device, where the inter-frame similarity is used to characterize similarity between different frames.
As an example, step S40 to step S60 include: randomly selecting a playing device from the synchronized devices as a target synchronized device; selecting any playing device except the synchronized device from the synchronized device group as the rest synchronized device, calculating the inter-frame similarity between the first current picture frame of the target synchronized device and the second current picture frame of the rest synchronized device, and returning to execute the step of selecting any playing device except the synchronized device from the synchronized device group as the rest synchronized device until all other playing devices except the target synchronized device from the synchronized device group are selected; and determining whether to perform synchronous play adjustment on the synchronized equipment group according to the similarity between frames. By detecting the frame similarity of the frames between the playing devices in the synchronized device group, and further determining whether to perform synchronous playing adjustment on the playing devices in the synchronized device group according to the frame similarity of the frames played by different playing devices at the same time point, the situation that the playing devices are always out of synchronization after the playing devices are blocked due to software and hardware in the process of synchronously playing the video to be played by the playing devices can be avoided, and therefore the persistence of synchronous playing of the video is improved.
The step of determining whether to perform synchronous play adjustment on the synchronized equipment group according to the similarity between frames specifically includes:
if the first preset number of inter-frame similarities in the inter-frame similarities is smaller than a preset inter-frame similarity threshold, playing and synchronizing the playing devices in the synchronized device group through the standard synchronizing device, and if the second preset number of inter-frame similarities in the inter-frame similarities is larger than the preset inter-frame similarity threshold, not performing synchronous playing and adjusting on the synchronized device group, wherein when the playing devices in the synchronized device group are synchronized, the current playing time point of the playing devices with the inter-frame similarities larger than the preset inter-frame similarity threshold is used as a reference, and the first preset number and the second preset number can be set according to the requirement and can be the same or different.
The embodiment of the application provides a video playing method, which is applied to a video playing synchronous system, wherein the video playing synchronous system comprises a target playing device, at least one synchronous playing device and a synchronous standard device, the synchronous standard device is used for providing standard time and synchronous playing time points, each synchronous playing device is a playing device which has received the synchronous playing time points, and the target playing device and each synchronous playing device are both in the standard time, namely, after the target playing device receives a video to be played, a synchronous playing request is sent to the synchronous standard device through the target playing device; issuing the synchronous playing time point to the target playing device according to the synchronous playing request through the synchronous standard device; synchronously playing the video to be played through the target playing device and each synchronous playing device at the synchronous playing time point; selecting a target synchronized device from a synchronized device group, wherein the synchronized device group comprises the target playing device and each synchronized playing device; calculating the frame similarity between a first current picture frame currently played by the target synchronized device and at least one second current picture frame currently played by the rest synchronized device, wherein the rest synchronized device is other playing devices except the target synchronized device in the synchronized device group; and determining whether to perform synchronous play adjustment on the synchronized equipment group according to the similarity between frames. The synchronous standard equipment can provide standard time for the target playing equipment and different synchronous playing equipment, so that the playing equipment for synchronously playing the video is in the same standard time, after receiving a synchronous playing request of the target playing equipment, the synchronous standard equipment issues a synchronous playing time point to the target playing equipment, and the different synchronous playing equipment is the playing equipment with the received synchronous playing time point, so that after the synchronous playing time point is received by the target playing equipment, the video to be played can be synchronously played through the target playing equipment and the different synchronous playing equipment at the synchronous playing time point, the purpose that the synchronous playing time point is issued for the different playing equipment through the synchronous standard equipment is achieved, the purpose that the synchronous playing of the video to be played is achieved through the different playing equipment at the synchronous playing time point is achieved, and then when the synchronous playing of the video to be played is carried out through the target playing equipment and the different synchronous playing equipment, the inter-frame similarity of a current frame of any playing equipment in the synchronous playing equipment group and the current frame of other playing equipment is calculated, whether the synchronous playing equipment in the synchronous playing video to be played is required to be synchronously played or not is synchronously played, and the synchronous playing equipment in the synchronous playing equipment can be guaranteed to be in real-time. Instead of setting master-slave relation in different playing devices to play video synchronously. Therefore, the technical defect that the synchronous playing of videos by different playing devices is poor due to the fact that the slave devices have hysteresis compared with the master device and meanwhile, different slave devices have differences in receiving messages sent by the master device is overcome, and the synchronous effect of synchronous playing of videos is improved.
Further, referring to fig. 3, in the second embodiment of the present application, the same or similar contents as those of the first embodiment can be referred to the above description, and the description thereof will be omitted. On the basis, the step of calculating the inter-frame similarity between the first current picture frame currently played by the target synchronized device and the second current picture frame currently played by at least one residual synchronized device comprises the following steps:
step E10, acquiring a first front picture frame positioned at the front side of the first current picture frame and a first rear picture frame positioned at the rear side of the first current picture frame in the video to be played;
step E20, obtaining a second front picture frame positioned at the front side of the second current picture frame and a second back picture frame positioned at the back side of the second current picture frame in the video to be played;
step E30, according to a preset segmentation principle, intercepting first segmentation images of a specific area in the first front side picture frame and the first rear side picture frame respectively, and splicing the two first segmentation images into a first spliced picture frame;
step E40, according to the preset segmentation principle, intercepting second segmentation images of a specific area in the second front side picture frame and the second rear side picture frame respectively, and splicing the two second segmentation images into a second spliced picture frame;
And E50, obtaining the inter-frame similarity of the first current picture frame and each second current picture frame by calculating the feature point similarity of the first spliced picture frame and each second spliced picture frame.
In this embodiment, it should be noted that, when calculating the inter-frame similarity of different frame images, the current frame images of different playing devices need to be processed, so that when the number of devices increases, a lot of time needs to be spent in calculating the inter-frame similarity, and then the inter-frame similarity can be obtained by combining different portions of two images and processing only one spliced image, where the front frame image is a frame before the current frame image, the rear frame image is a frame after the current frame image, and the specific number is not limited, and the first current frame image and the second current frame image are the same frame in the video to be played.
As an example, steps F10 to F30 include: periodically acquiring a first current picture frame in the video to be played, and acquiring a first front picture frame positioned at the front side of the first current picture frame and a first rear picture frame positioned at the rear side of the first current picture frame; periodically collecting a second current picture frame in the video to be played, and obtaining a second front picture frame positioned at the front side of the second current picture frame and a second rear picture frame positioned at the rear side of the second current picture frame; according to a preset segmentation principle, a first segmentation image of a specific area is respectively intercepted in the first front side picture frame and the first rear side picture frame, and the first segmentation image of the first front side picture frame and the first segmentation image of the first rear side picture frame are spliced into a first spliced picture frame, wherein the first segmentation image can be obtained by carrying out equal fraction segmentation on a first forward picture frame or a first rear side picture frame, the equal fraction may be trisection or quartering, and the stitching mode may be a mode of stitching the first split image of the specific area (the area located at the uppermost part of the frame) split by the first front side frame and the first split image of the specific area (the area located at the lowermost part of the frame) split by the first rear side frame; according to the preset segmentation principle, a second segmentation image of a specific area is respectively intercepted in the second front side picture frame and the second rear side picture frame, and the second segmentation image of the second front side picture frame and the second segmentation image of the second rear side picture frame are spliced to obtain a second spliced picture frame, wherein the picture size of the spliced picture frame is the same as the picture size of a corresponding current picture frame, for example, the picture sizes of the second spliced picture frame and the second current picture frame are the same; and obtaining the inter-frame similarity of the first current picture frame and each second current picture frame by calculating the feature point similarity of the first spliced picture frame and each second spliced picture frame.
The step of obtaining the inter-frame similarity of the first current picture frame and each second current picture frame by calculating the feature point similarity of the first spliced picture frame and each second spliced picture frame comprises the following steps:
step F10, constructing a plurality of scale spaces based on a Gaussian differential pyramid, and carrying out convolution processing on the first spliced picture frame in the scale and direction corresponding to the plurality of scale spaces to obtain a multi-scale and multi-directional first characteristic image;
step F20, carrying out convolution processing on the second spliced picture frame in the scale and direction corresponding to the scale spaces to obtain a multi-scale and multi-directional second characteristic image;
step F30, detecting a plurality of first key points of the first characteristic image based on a second derivative matrix, and dividing a region around the plurality of first key points into a plurality of first sub-regions;
step F40, calculating wavelet response values of a plurality of first subareas, and generating a first feature vector based on the wavelet response values;
step F50, detecting a plurality of second key points of the second characteristic image based on a second derivative matrix, and dividing a plurality of areas around the second key points into a plurality of second sub-areas;
Step F60, calculating wavelet response values of a plurality of second subareas, and generating a second feature vector based on the wavelet response values;
and F70, calculating the vector similarity between the first feature vector and the second feature vector to obtain the inter-frame similarity between the first current picture frame and each second current picture frame.
In this embodiment, it should be noted that before calculating the similarity of the feature points, the feature points need to be extracted, the feature points extracted in the conventional feature point extraction method lack stability, the feature points with stability can be extracted under different scales, rotation and illumination changes by using a gaussian differential pyramid algorithm, and the gaussian differential pyramid algorithm specifically includes steps of scale space extremum detection, key point positioning, direction distribution, key point description, feature point matching and the like.
As an example, steps F10 to F70 include: constructing a plurality of scale spaces based on a Gaussian differential pyramid, and carrying out convolution processing on the first spliced picture frame in the scale and direction corresponding to the plurality of scale spaces to obtain a multi-scale and multi-directional first characteristic image; convolving the second spliced picture frame in the scale and direction corresponding to the scale spaces to obtain a multi-scale and multi-directional second characteristic image; detecting a plurality of second key points of the second characteristic image based on a second derivative matrix, and dividing a plurality of areas around the second key points into a plurality of second sub-areas; calculating wavelet response values of a plurality of first subareas, and generating a first eigenvector based on the wavelet response values; detecting a plurality of second key points of the second characteristic image based on a second derivative matrix, and dividing a plurality of areas around the second key points into a plurality of second sub-areas; calculating wavelet response values of a plurality of the second subareas, and generating a second feature vector based on the wavelet response values; and calculating the vector similarity between the first feature vector and the second feature vector to obtain the inter-frame similarity between the first current picture frame and each second current picture frame.
In one embodiment, the specific manner of obtaining the inter-frame similarity through calculating the feature point similarity may refer to the following steps: constructing scale spaces by using Gaussian differential pyramids, applying Gaussian kernel functions to each scale space, convolving spliced picture frames in different scales and directions to obtain multi-scale and multi-directional spliced picture frames, detecting characteristic points of the spliced picture frames in each scale space by using Hessian matrixes, namely determining extreme points by comparing Gaussian differential images in different scales, and eliminating unstable extreme points; for each feature point, calculating a main direction by using gradient information of the spliced picture frame to ensure rotation invariance of the feature, dividing an area around the feature point into a plurality of subareas, calculating Haar wavelet responses of pixels in each subarea, generating feature vectors of each feature point by using the wavelet response values, and obtaining feature point similarity based on the similarity between the feature vectors, thereby calculating the inter-frame similarity.
The embodiment of the application provides a video synchronous play adjustment method. That is, a first front picture frame located at the front side of the first current picture frame and a first rear picture frame located at the rear side of the first current picture frame in the video to be played are obtained; acquiring a second front picture frame positioned at the front side of the second current picture frame and a second rear picture frame positioned at the rear side of the second current picture frame in the video to be played; according to a preset segmentation principle, a first segmentation image of a specific area is respectively intercepted in the first front side picture frame and the first rear side picture frame, and the two first segmentation images are spliced into a first spliced picture frame; according to the preset segmentation principle, intercepting second segmentation images of a specific area in the second front side picture frame and the second rear side picture frame respectively, and splicing the two second segmentation images into a second spliced picture frame; and obtaining the inter-frame similarity of the first current picture frame and each second current picture frame by calculating the feature point similarity of the first spliced picture frame and each second spliced picture frame. According to the embodiment of the application, the front side picture frame and the rear side picture frame of the first current picture frame and the second current picture frame in the video to be played are respectively obtained, the front side picture frame and the rear side picture frame of the current picture frame of different playing devices are respectively segmented according to the preset segmentation principle, and the spliced picture frames corresponding to the different playing devices are obtained after the segmentation, so that the inter-frame similarity of the different playing devices when the current picture frames are played is calculated by comparing the feature point similarity of the spliced picture frames, and the calculated amount of the different playing devices when the inter-frame similarity of the current picture frames is calculated is reduced.
The third embodiment of the present application further provides a video playing apparatus, which is applied to a video playing synchronization system, where the video playing synchronization system includes a target playing device, at least one synchronous playing device, and a synchronous standard device, where the synchronous standard device is used to provide a standard time and a synchronous playing time point, each synchronous playing device is a playing device that has received the synchronous playing time point, and the target playing device and each synchronous playing device are both located at the standard time, and referring to fig. 4, the video playing apparatus includes:
a sending module 101, configured to send, by the target playing device, a synchronous playing request to the synchronous standard device after the target playing device receives a video to be played;
a transmitting module 102, configured to transmit, by using the synchronization standard device, the synchronization play time point to the target play device according to the synchronization play request;
a playing module 103, configured to synchronously play the video to be played through the target playing device and each of the synchronous playing devices at the synchronous playing time point;
a selecting module 104, configured to select a target synchronized device from a synchronized device group, where the synchronized device group includes the target playing device and each of the synchronized playing devices;
A calculating module 105, configured to calculate an inter-frame similarity between a first current frame currently played by the target synchronized device and a second current frame currently played by at least one remaining synchronized device, where the remaining synchronized device is a playing device in the synchronized device group other than the target synchronized device;
and the determining module 106 is configured to determine whether to perform synchronous play adjustment on the synchronized device group according to the similarity between frames.
Optionally, the issuing module 102 is further configured to:
after the synchronous standard equipment receives the synchronous playing request, acquiring the video playing time length of the video to be played;
determining a video switching time point of the target playing device in a preset playing period according to the video playing time length;
acquiring a synchronous playing time point of the synchronous standard equipment at the video switching time point;
and sending the synchronous playing time point to the target playing device through the synchronous standard device.
Optionally, the issuing module 102 is further configured to:
performing carousel sequencing on the video to be played according to the video playing duration and the preset playing period to obtain a carousel switching time point;
And taking the carousel switching time point as the video switching time point.
Optionally, the issuing module 102 is further configured to:
detecting whether the target playing device is a device to be synchronously played or not according to the device identifier carried by the target playing device;
if yes, taking the synchronous playing timing point which corresponds to the synchronous playing equipment together as the synchronous playing time point, and sending the synchronous playing time point to the target playing equipment;
if not, the synchronous playing time point is sent to the target playing equipment.
Optionally, the computing module 105 is further configured to:
acquiring a first front picture frame positioned at the front side of the first current picture frame and a first rear picture frame positioned at the rear side of the first current picture frame in the video to be played;
acquiring a second front picture frame positioned at the front side of the second current picture frame and a second rear picture frame positioned at the rear side of the second current picture frame in the video to be played;
according to a preset segmentation principle, a first segmentation image of a specific area is respectively intercepted in the first front side picture frame and the first rear side picture frame, and the two first segmentation images are spliced into a first spliced picture frame;
According to the preset segmentation principle, intercepting second segmentation images of a specific area in the second front side picture frame and the second rear side picture frame respectively, and splicing the two second segmentation images into a second spliced picture frame;
and obtaining the inter-frame similarity of the first current picture frame and each second current picture frame by calculating the feature point similarity of the first spliced picture frame and each second spliced picture frame.
Optionally, the computing module 105 is further configured to:
constructing a plurality of scale spaces based on a Gaussian differential pyramid, and carrying out convolution processing on the first spliced picture frame in the scale and direction corresponding to the plurality of scale spaces to obtain a multi-scale and multi-directional first characteristic image;
convolving the second spliced picture frame in the scale and direction corresponding to the scale spaces to obtain a multi-scale and multi-directional second characteristic image;
detecting a plurality of first key points of the first characteristic image based on a second derivative matrix, and dividing a region around the plurality of first key points into a plurality of first sub-regions;
calculating wavelet response values of a plurality of first subareas, and generating a first eigenvector based on the wavelet response values;
Detecting a plurality of second key points of the second characteristic image based on a second derivative matrix, and dividing a plurality of areas around the second key points into a plurality of second sub-areas;
calculating wavelet response values of a plurality of the second subareas, and generating a second feature vector based on the wavelet response values;
and calculating the vector similarity between the first feature vector and the second feature vector to obtain the inter-frame similarity between the first current picture frame and each second current picture frame.
Optionally, the video playing device is further configured to:
when the starting time point of the first playing device is detected to be earlier than the starting time point of the second playing device under the standard time, determining a first current playing time point of the first playing device according to a time difference value between the standard time and the synchronous playing time point; synchronizing the second playing device to the first current playing time point for playing; or alternatively, the first and second heat exchangers may be,
when the starting time point of the first playing device is detected to be later than the starting time point of the second playing device under the standard time, determining a second current playing time point of the second playing device according to a time difference value between the standard time and the synchronous playing time point; and synchronizing the first playing device to the second current playing time point for playing.
The video playing device provided by the invention adopts the video playing method in the embodiment, and solves the technical problem of poor synchronous effect of video synchronous playing. Compared with the prior art, the video playing device provided by the embodiment of the invention has the same beneficial effects as the video playing method provided by the embodiment, and other technical features in the video playing device are the same as the features disclosed by the method of the embodiment, and are not repeated here.
A fourth embodiment of the present invention provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the video playing method of the above embodiment.
Referring now to fig. 5, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device may include a processing apparatus 1001 (e.g., a central processing unit, a graphics processor, etc.), which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage apparatus 1003 into a Random Access Memory (RAM) 1004. In the RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus.
In general, the following systems may be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, and the like; an output device 1008 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and communication means 1009. The communication means may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While electronic devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 1009, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the embodiment of the present disclosure are performed when the computer program is executed by the processing device 1001.
The electronic equipment provided by the invention adopts the video playing method in the embodiment, and solves the technical problem of poor synchronous effect of video synchronous playing. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the invention are the same as those of the video playing method provided by the embodiment, and other technical features of the electronic device are the same as those disclosed by the method of the embodiment, so that details are not repeated.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
The fifth embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon for executing the video playback method in the above-described embodiments.
The computer readable storage medium according to the embodiments of the present invention may be, for example, a usb disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The above-described computer-readable storage medium may be contained in an electronic device; or may exist alone without being assembled into an electronic device.
The computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: after the target playing device receives the video to be played, a synchronous playing request is sent to the synchronous standard device through the target playing device; issuing the synchronous playing time point to the target playing device according to the synchronous playing request through the synchronous standard device; synchronously playing the video to be played through the target playing device and each synchronous playing device at the synchronous playing time point; selecting a target synchronized device from a synchronized device group, wherein the synchronized device group comprises the target playing device and each synchronized playing device; calculating the frame similarity between a first current picture frame currently played by the target synchronized device and at least one second current picture frame currently played by the rest synchronized device, wherein the rest synchronized device is other playing devices except the target synchronized device in the synchronized device group; and determining whether to perform synchronous play adjustment on the synchronized equipment group according to the similarity between frames.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The computer readable storage medium provided by the application stores the computer readable program instructions for executing the video playing method, and solves the technical problem of poor synchronous effect of video synchronous playing. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the embodiment of the application are the same as those of the video playing method provided by the above embodiment, and are not described herein.
A sixth embodiment of the present application also provides a computer program product, including a computer program, which when executed by a processor implements the steps of the video playing method as described above.
The computer program product provided by the application solves the technical problem of poor synchronous effect of video synchronous playing. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the video playing method provided by the above embodiment, and are not described herein.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein, or any application, directly or indirectly, within the scope of the application.

Claims (9)

1. A video playing method, characterized in that it is applied to a video playing synchronization system, the video playing synchronization system includes a target playing device, at least one synchronous playing device and a synchronous standard device, the synchronous standard device is used for providing a standard time and a synchronous playing time point, each synchronous playing device is a playing device that has received the synchronous playing time point, the target playing device and each synchronous playing device are both in the standard time, the video playing method includes:
after the target playing device receives the video to be played, a synchronous playing request is sent to the synchronous standard device through the target playing device;
issuing the synchronous playing time point to the target playing device according to the synchronous playing request through the synchronous standard device;
Synchronously playing the video to be played through the target playing device and each synchronous playing device at the synchronous playing time point;
selecting a target synchronized device from a synchronized device group, wherein the synchronized device group comprises the target playing device and each synchronized playing device;
calculating the frame similarity between a first current picture frame currently played by the target synchronized device and at least one second current picture frame currently played by the rest synchronized device, wherein the rest synchronized device is other playing devices except the target synchronized device in the synchronized device group;
determining whether to perform synchronous play adjustment on the synchronized device group according to the inter-frame similarity, wherein the step of calculating the inter-frame similarity of the first current picture frame currently played by the target synchronized device and the second current picture frame currently played by at least one remaining synchronized device includes:
acquiring a first front picture frame positioned at the front side of the first current picture frame and a first rear picture frame positioned at the rear side of the first current picture frame in the video to be played;
acquiring a second front picture frame positioned at the front side of the second current picture frame and a second rear picture frame positioned at the rear side of the second current picture frame in the video to be played;
According to a preset segmentation principle, a first segmentation image of a specific area is respectively intercepted in the first front side picture frame and the first rear side picture frame, and the two first segmentation images are spliced into a first spliced picture frame;
according to the preset segmentation principle, intercepting second segmentation images of a specific area in the second front side picture frame and the second rear side picture frame respectively, and splicing the two second segmentation images into a second spliced picture frame;
and obtaining the inter-frame similarity of the first current picture frame and each second current picture frame by calculating the feature point similarity of the first spliced picture frame and each second spliced picture frame.
2. The video playing method according to claim 1, wherein the step of issuing the synchronized play time point to the target play device according to the synchronized play request by the synchronized standard device includes:
after the synchronous standard equipment receives the synchronous playing request, acquiring the video playing time length of the video to be played;
determining a video switching time point of the target playing device in a preset playing period according to the video playing time length, wherein the video switching time point is used for representing a playing time point of a playing key frame before the video to be played is played;
Acquiring a synchronous playing time point of the synchronous standard equipment at the video switching time point;
and sending the synchronous playing time point to the target playing device through the synchronous standard device.
3. The video playing method according to claim 2, wherein the step of determining a video switching time point of the target playing device within a preset playing period according to the video playing time length includes:
performing carousel sequencing on the video to be played according to the video playing duration and the preset playing period to obtain a carousel switching time point;
and taking the carousel switching time point as the video switching time point.
4. The video playback method of claim 2, wherein the step of transmitting the synchronized playback time point to the target playback device via the synchronized standard device comprises:
detecting whether the target playing device is a device to be synchronously played or not according to the device identifier carried by the target playing device;
if yes, taking the synchronous playing timing point which corresponds to the synchronous playing equipment together as the synchronous playing time point, and sending the synchronous playing time point to the target playing equipment;
If not, the synchronous playing time point is sent to the target playing equipment.
5. The video playing method as claimed in claim 1, wherein the step of obtaining the inter-frame similarity between the first current picture frame and each of the second current picture frames by calculating the feature point similarity between the first stitched picture frame and each of the second stitched picture frames comprises:
constructing a plurality of scale spaces based on a Gaussian differential pyramid, and carrying out convolution processing on the first spliced picture frame in the scale and direction corresponding to the plurality of scale spaces to obtain a multi-scale and multi-directional first characteristic image;
convolving the second spliced picture frame in the scale and direction corresponding to the scale spaces to obtain a multi-scale and multi-directional second characteristic image;
detecting a plurality of first key points of the first characteristic image based on a second derivative matrix, and dividing a region around the plurality of first key points into a plurality of first sub-regions;
calculating wavelet response values of a plurality of first subareas, and generating a first eigenvector based on the wavelet response values;
detecting a plurality of second key points of the second characteristic image based on a second derivative matrix, and dividing a plurality of areas around the second key points into a plurality of second sub-areas;
Calculating wavelet response values of a plurality of the second subareas, and generating a second feature vector based on the wavelet response values;
and calculating the vector similarity between the first feature vector and the second feature vector to obtain the inter-frame similarity between the first current picture frame and each second current picture frame.
6. The video playback method of claim 1, wherein the video playback method further comprises:
when the starting time point of the first playing device is detected to be earlier than the starting time point of the second playing device under the standard time, determining a first current playing time point of the first playing device according to a time difference value between the standard time and the synchronous playing time point; synchronizing the second playing device to the first current playing time point for playing; or alternatively, the first and second heat exchangers may be,
when the starting time point of the first playing device is detected to be later than the starting time point of the second playing device under the standard time, determining a second current playing time point of the second playing device according to a time difference value between the standard time and the synchronous playing time point; and synchronizing the first playing device to the second current playing time point for playing.
7. A video playing apparatus, characterized by being applied to a video playing synchronization system, the video playing synchronization system including a target playing device, at least one synchronous playing device, and a synchronous standard device, the synchronous standard device being configured to provide a standard time and a synchronous playing time point, each of the synchronous playing devices being a playing device that has received the synchronous playing time point, the target playing device and each of the synchronous playing devices being at the standard time, the video playing apparatus comprising:
the sending module is used for sending a synchronous playing request to the synchronous standard equipment through the target playing equipment after the target playing equipment receives the video to be played;
the issuing module is used for issuing the synchronous playing time point to the target playing device according to the synchronous playing request through the synchronous standard device;
the playing module is used for synchronously playing the video to be played through the target playing device and each synchronous playing device at the synchronous playing time point;
a selecting module, configured to select a target synchronized device from a synchronized device group, where the synchronized device group includes the target playing device and each of the synchronized playing devices;
The computing module is used for computing the frame similarity between a first current picture frame currently played by the target synchronized device and at least one second current picture frame currently played by the residual synchronized device, wherein the residual synchronized device is other playing devices except the target synchronized device in the synchronized device group;
the determining module is used for determining whether to synchronously play and adjust the synchronized equipment group according to the similarity among frames, wherein the calculating module is also used for acquiring a first front side picture frame positioned at the front side of the first current picture frame and a first rear side picture frame positioned at the rear side of the first current picture frame in the video to be played; acquiring a second front picture frame positioned at the front side of the second current picture frame and a second rear picture frame positioned at the rear side of the second current picture frame in the video to be played; according to a preset segmentation principle, a first segmentation image of a specific area is respectively intercepted in the first front side picture frame and the first rear side picture frame, and the two first segmentation images are spliced into a first spliced picture frame; according to the preset segmentation principle, intercepting second segmentation images of a specific area in the second front side picture frame and the second rear side picture frame respectively, and splicing the two second segmentation images into a second spliced picture frame; and obtaining the inter-frame similarity of the first current picture frame and each second current picture frame by calculating the feature point similarity of the first spliced picture frame and each second spliced picture frame.
8. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the video playback method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a program for realizing a video playback method, the program for realizing the video playback method being executed by a processor to realize the steps of the video playback method according to any one of claims 1 to 6.
CN202310828823.2A 2023-07-07 2023-07-07 Video playing method and device, electronic equipment and readable storage medium Active CN116582708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310828823.2A CN116582708B (en) 2023-07-07 2023-07-07 Video playing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310828823.2A CN116582708B (en) 2023-07-07 2023-07-07 Video playing method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN116582708A CN116582708A (en) 2023-08-11
CN116582708B true CN116582708B (en) 2023-10-03

Family

ID=87543433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310828823.2A Active CN116582708B (en) 2023-07-07 2023-07-07 Video playing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116582708B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112954417A (en) * 2021-02-01 2021-06-11 禾麦科技开发(深圳)有限公司 Method for realizing synchronous playing and seamless material switching of multiple terminal devices
CN113473191A (en) * 2021-07-06 2021-10-01 深圳市英特飞电子有限公司 Multi-device advertisement synchronous playing method and device, computer device and storage medium
CN114025150A (en) * 2021-10-29 2022-02-08 歌尔光学科技有限公司 Video frame synchronization method and device for multi-head-mounted equipment, head-mounted equipment and medium
CN114630169A (en) * 2020-12-10 2022-06-14 上海三思电子工程有限公司 Synchronous display method, device, system, terminal and storage medium
CN114866829A (en) * 2022-03-24 2022-08-05 阿里云计算有限公司 Synchronous playing control method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114630169A (en) * 2020-12-10 2022-06-14 上海三思电子工程有限公司 Synchronous display method, device, system, terminal and storage medium
CN112954417A (en) * 2021-02-01 2021-06-11 禾麦科技开发(深圳)有限公司 Method for realizing synchronous playing and seamless material switching of multiple terminal devices
CN113473191A (en) * 2021-07-06 2021-10-01 深圳市英特飞电子有限公司 Multi-device advertisement synchronous playing method and device, computer device and storage medium
CN114025150A (en) * 2021-10-29 2022-02-08 歌尔光学科技有限公司 Video frame synchronization method and device for multi-head-mounted equipment, head-mounted equipment and medium
CN114866829A (en) * 2022-03-24 2022-08-05 阿里云计算有限公司 Synchronous playing control method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王朋 ; 张有光 ; .指纹图像帧序列拼接的波形匹配算法.计算机辅助设计与图形学学报.2009,(10),1467-1471. *
黄东军 ; 冯佳 ; .视频场景切分算法研究.企业技术开发.2009,(05),1-9. *

Also Published As

Publication number Publication date
CN116582708A (en) 2023-08-11

Similar Documents

Publication Publication Date Title
WO2020083021A1 (en) Video recording method and apparatus, video playback method and apparatus, device, and storage medium
CN107018370B (en) Display method and system for video wall
CN106210861B (en) Method and system for displaying bullet screen
US20180192044A1 (en) Method and System for Providing A Viewport Division Scheme for Virtual Reality (VR) Video Streaming
US20230360337A1 (en) Virtual image displaying method and apparatus, electronic device and storage medium
CN107454433B (en) Live broadcasting annotation method and device, terminal and live broadcasting system
US20210203908A1 (en) Providing a contiguous virtual space for a plurality of display devices
WO2022007565A1 (en) Image processing method and apparatus for augmented reality, electronic device and storage medium
CN111683260A (en) Program video generation method, system and storage medium based on virtual anchor
WO2017185761A1 (en) Method and device for playing back 2d video
CN115802076A (en) Three-dimensional model distributed cloud rendering method and system and electronic equipment
WO2024067159A1 (en) Video generation method and apparatus, electronic device, and storage medium
CN111833459B (en) Image processing method and device, electronic equipment and storage medium
CN112188219B (en) Video receiving method and device and video transmitting method and device
WO2023226814A1 (en) Video processing method and apparatus, electronic device, and storage medium
CN111818265B (en) Interaction method and device based on augmented reality model, electronic equipment and medium
CN116582708B (en) Video playing method and device, electronic equipment and readable storage medium
CN113676690A (en) Method, device and storage medium for realizing video conference
WO2021088973A1 (en) Live stream display method and apparatus, electronic device, and readable storage medium
CN111586454B (en) Large screen splicing synchronization method and system
US10719286B2 (en) Mechanism to present in an atomic manner a single buffer that covers multiple displays
US20200322669A1 (en) Video recording of a display device
CN110662099B (en) Method and device for displaying bullet screen
US11962743B2 (en) 3D display system and 3D display method
KR20200080041A (en) Method and apparatus for generating multi channel images using mobile terminal

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