Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide a method, an apparatus, a medium, and a terminal for visually cutting and issuing a linkage video, which are used to solve the technical problems in the prior art.
To achieve the above and other related objects, a first aspect of the present invention provides a method for visually cutting and issuing a linkage video, including: obtaining source video information, including source video resolution information; acquiring a visual cutting interface based on the source video resolution information; generating a corresponding cutting window on the visual cutting interface based on the resolution of each playing node to cut the source video to obtain a plurality of sub videos; and respectively issuing the sub-videos to corresponding playing nodes to carry out linkage video playing.
In some embodiments of the first aspect of the present invention, the method comprises: acquiring a plurality of cutting windows according to a preset cutting window length-width ratio, a cutting reference point and the playing node resolution ratio based on FFmpeg; and after sequencing the cutting windows according to a preset sequence, dragging the cutting windows to cut the source video so as to obtain the sub-videos.
In some embodiments of the first aspect of the present invention, the method comprises: storing the divided videos obtained by cutting in an FTP server; and the FTP server respectively transmits the sub-videos to the corresponding playing nodes through a TCP/IP protocol.
In some embodiments of the first aspect of the present invention, the method comprises: each playing node carries out time calibration through a GPS and/or the Internet; and each playing node after time calibration synchronously plays the received sub-video according to the received playing time strategy so as to realize linkage video playing.
In some embodiments of the first aspect of the present invention, the method comprises: the background cuts and issues the acquired source video, and the method comprises the following steps: under the condition that the playing node is disconnected with the background, the background sends out corresponding prompt information; under the condition that the playing nodes are reconnected with the background, the background issues a playing time strategy to the reconnected playing nodes so that the playing time strategy is synchronous with video playing of other playing nodes to realize linkage; and under the condition that the playing node is reconnected with the background and the source video is updated before the source video is disconnected, the background transmits a time strategy corresponding to the updated source video to the reconnected playing node, so that the playing node and other playing nodes play videos synchronously according to the received time strategy to realize linkage.
In some embodiments of the first aspect of the present invention, the method comprises: the playing node stores backup videos, and the local program playing function is achieved under the condition that the playing node is disconnected with the background.
In some embodiments of the first aspect of the present invention, the method is applied to night scene lighting light linkage video, and the playback nodes include building nodes; the method comprises the following steps: the background divides the buildings to be linked into groups to obtain building nodes and construct a node tree; acquiring a corresponding node cutting window based on the resolution of a master controller of each building node; sequentially pre-arranging the node cutting windows to the visual cutting interface according to the node tree sequence; and adjusting the node cutting windows after the pre-arrangement based on the current requirement, and cutting the source video to obtain the sub video and sending the sub video to the main controller of the corresponding building node.
In order to achieve the above and other related objects, a second aspect of the present invention provides a visual cutting and issuing device for linkage video, including: the video acquisition module is used for acquiring source video information which comprises source video resolution information; the visual cutting interface acquisition module is used for acquiring a visual cutting interface based on the source video resolution information; the video cutting module is used for generating a corresponding cutting window on the visual cutting interface based on the resolution of each playing node to cut the source video so as to obtain a plurality of sub videos; and the video issuing module is used for respectively issuing the sub-videos to corresponding playing nodes for linkage video playing.
To achieve the above and other related objects, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, implements the visual cutting and issuing method of linked videos.
To achieve the above and other related objects, a fourth aspect of the present invention provides an electronic terminal, comprising: a processor and a memory; the memory is used for storing computer programs, and the processor is used for executing the computer programs stored by the memory so as to enable the terminal to execute the visual cutting and issuing method of the linkage video.
As described above, the visual cutting and issuing method, device, medium and terminal for linkage video provided by the invention have the following beneficial effects: the visual cutting of the linkage video is realized, so that a user can clearly observe the relation between each cutting window and the total cutting interface, the cutting scheme of the source video is better adjusted according to actual needs, and the flexibility is stronger; acquiring a visual cutting interface based on the resolution of a source video, generating a corresponding cutting window based on the resolution of each playing node, further acquiring a sub video adaptive to the resolution of each playing node, and improving the visual effect of video playing; the utilization rate of high-quality videos with large resolution difference can be improved, customized development and production of the videos are not needed, and the cost is reduced; the user can drag each cutting window to realize the flexible cutting of the video, the user is endowed with higher control right, the interestingness of the video cutting and issuing process is improved, and the method has better commercial value.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It is noted that in the following description, reference is made to the accompanying drawings which illustrate several embodiments of the present invention. It is to be understood that other embodiments may be utilized and that mechanical, structural, electrical, and operational changes may be made without departing from the spirit and scope of the present invention. The following detailed description is not to be taken in a limiting sense, and the scope of embodiments of the present invention is defined only by the claims of the issued patent. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. Spatially relative terms, such as "upper," "lower," "left," "right," "lower," "below," "lower," "above," "upper," and the like, may be used herein to facilitate describing one element or feature's relationship to another element or feature as illustrated in the figures.
Also, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," and/or "comprising," when used in this specification, specify the presence of stated features, operations, elements, components, items, species, and/or groups, but do not preclude the presence, or addition of one or more other features, operations, elements, components, items, species, and/or groups thereof. The terms "or" and/or "as used herein are to be construed as inclusive or meaning any one or any combination. Thus, "A, B or C" or "A, B and/or C" means "any of the following: a; b; c; a and B; a and C; b and C; A. b and C ". An exception to this definition will occur only when a combination of elements, functions or operations are inherently mutually exclusive in some way.
The invention provides a visual cutting and issuing method, a visual cutting and issuing device, a visual cutting and issuing medium and a terminal of a linkage video, which are used for solving the technical problems in the prior art, such as incapability of visualizing video cutting and incapability of seeing the relation between an actual building cutting window and a total video window; in general, the resolution ratio of actual video production and the resolution ratio required by building linkage video have certain difference, which can generate bad influence on visual effect, and there is no way to quickly modify, and the final effect can only be determined by continuous parameter test; high-quality videos with great resolution difference cannot be utilized, and customized video development and manufacturing are needed; the video cutting scheme can not be flexibly changed according to the user requirements, the user control interest is lacked, the diversified requirements of the user can not be met, and the like.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention are further described in detail by the following embodiments in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example one
As shown in fig. 1, an embodiment of the present invention provides a flow diagram of a method for visually cutting and issuing a linkage video, which includes steps S11 to S14, specifically expressed as follows:
and S11, obtaining source video information which comprises source video resolution information. Specifically, the source of the source video is different in different application scenes of the linkage video. When applied to night scene lightening projects, source videos are provided by relevant designer design departments; when applied to the monitoring field, the source video is derived from the real-time monitoring video.
In some examples, the source video is uploaded to the FTP server through the web side and analyzed to obtain source video information. Optionally, the source video information includes, but is not limited to, source video format information, source video size information, source video resolution information, source video bitrate information, source video frame rate information, and the like.
S12, acquiring a visual cutting interface based on the resolution information of the source video, wherein the generated visual cutting interface is matched with the resolution of the source video, so that the cutting window is ensured to be enough for the cutting operation of a user, meanwhile, the video display is prevented from being fuzzy, the visual effect is prevented from being influenced, and the use experience of the user is favorably improved.
And S13, generating a corresponding cutting window on the visual cutting interface based on the resolution of each playing node to cut the source video to obtain a plurality of sub videos. Each cutting window is matched with the resolution of the corresponding playing node, so that the resolution of the sub-video obtained by cutting is matched with the resolution of each playing node, and the playing effect of each playing node is guaranteed.
Furthermore, the user can obtain the required sub-videos by dragging each cutting window, so that the video cutting is more flexible and interesting in operation. In a preferred embodiment of the present invention, a plurality of cutting windows are obtained according to a preset length-width ratio of the cutting windows, a cutting reference point and the resolution of the playing node based on FFmpeg; and after sequencing the cutting windows according to a preset sequence, dragging the cutting windows to cut the source video so as to obtain the sub-videos.
And S14, respectively transmitting the sub-videos to corresponding play nodes to carry out linkage video play. Specifically, the sub-video is issued while a corresponding play time strategy is associated, and each play node realizes synchronous play of the sub-video based on the received play time strategy, so that a linked visual effect is achieved.
Furthermore, in order to guarantee the linkage effect of each playing node, each playing node is subjected to time calibration through a GPS and/or the Internet; and each playing node after time calibration synchronously plays the received sub-video according to the received playing time strategy so as to realize linkage video playing. The play time policy may be a daily play time policy, a weekly play time policy, a monthly play time policy, a quarterly play time policy, and the like, which is not specifically limited in this embodiment.
In a preferred embodiment of this embodiment, the sub-video obtaining method includes: acquiring a plurality of cutting windows according to a preset cutting window length-width ratio, a cutting reference point and the playing node resolution ratio based on FFmpeg; and after sequencing the cutting windows according to a preset sequence, dragging the cutting windows to cut the source video to obtain the sub-videos.
The FFmpeg is a set of open-source computer programs capable of converting videos into streams, is particularly suitable for application in a method for cutting and issuing source videos, and the real-time property and the wide spreading property of the video streams are also beneficial to further improving the flexibility of linkage video application.
As shown in fig. 2, the present embodiment provides a schematic diagram of a linkage video cutting principle based on FFmpeg, wherein the command syntax is as follows: mpeg-i source, mp4-vf crop = w: h: y target, mp4-y, and the parameter format of crop is w: h: x: y, wherein (x, y) marks a certain point in the input video (source video) as a cutting reference point, the point is cut from the cutting reference point to the right and downwards, w and h respectively represent the width and height of the output video, if (x, y) is not set, the video is cut in the middle by default, and finally the output video (sub video) is obtained.
Further, storing the cut sub-video in an FTP Server (File Transfer Protocol Server); and the FTP server respectively transmits the sub-videos to the corresponding playing nodes through a TCP/IP protocol. The FTP server is a computer providing file storage and access service on the internet, providing service according to FTP protocol, and optionally authorized FTP server, anonymous FTP server, ASCII transfer mode FTP server, binary transfer mode FTP server, etc., wherein the authorized FTP server is preferred to improve the security of the system.
In a preferred embodiment of this embodiment, the background cuts and issues the acquired source video, which includes: under the condition that the playing node is disconnected with the background, the background sends out corresponding prompt information; under the condition that the playing nodes are reconnected with the background, the background issues a playing time strategy to the reconnected playing nodes so that the playing time strategy is synchronous with video playing of other playing nodes to realize linkage; and under the condition that the playing node is reconnected with the background and the source video is updated compared with the video before disconnection, the background issues a time strategy corresponding to the updated source video to the reconnected playing node, so that the playing node is synchronized with the video playing of other playing nodes according to the received time strategy to realize linkage.
Furthermore, the playing node stores backup videos, and the local program playing function is realized under the condition that the playing node is disconnected from the background. In some examples, if the background does not support the source video format, the source video is converted into the supported format and then cut.
In a preferred embodiment of this embodiment, the method is applied to a night scene lighting light linkage video, and the playing nodes include each building node; it includes: the background groups each building to be linked to obtain each building node and construct a node tree; acquiring a corresponding node cutting window based on the resolution of a master controller of each building node; sequentially pre-arranging the node cutting windows to the visual cutting interface according to the node tree sequence; and adjusting the node cutting windows after the pre-arrangement based on the current requirement, and cutting the source video to obtain the sub video and sending the sub video to the main controller of the corresponding building node.
Further, a complete video is cut according to the required length-width ratio and any position by using the FFmpeg technology, and the cut multiple videos can be spliced to synthesize a complete video. Therefore, each section of cut video can be played on a certain building independently, and a plurality of buildings can play the sections in the complete video, so that the effect of playing the same complete video by linkage of the plurality of buildings can be achieved. Preferably, the visual interface is supported to freely drag the window so as to cut the source video to obtain each sub video, and then each sub video is issued to each linkage building master controller to realize the visual effect of linkage.
As shown in fig. 3, the present embodiment provides a flow diagram of a method for visually cutting and issuing a night-scene-lighting linkage video, which includes: acquiring a linkage building source video; analyzing a source video, and acquiring source video information, such as parameter information of format, resolution, size and the like; displaying a total cutting window (visual cutting interface) according to the resolution size; respectively displaying the corresponding cutting window ranges in the total cutting window according to the resolution of each linkage building master controller; the user can move the cutting window corresponding to each linkage building at will according to the self requirement to cut the corresponding video in the main window and send the cut video file to the corresponding building; and finally, the linked buildings play programs in a unified time, so that the visual linkage effect is achieved.
Further, the cutting windows of the respective linked buildings are arranged into a total cutting window, wherein the arrangement order can be ordered according to a predetermined arrangement order. Furthermore, a user can drag the window at will according to the self requirement, cut the video covered by the window and store the video in the FTP server; and the FTP server respectively transmits the cut videos to the corresponding linkage building master controllers through a TCP/IP protocol.
In some examples, the background may prompt the node that the master control video fails to be delivered because the device is offline due to reasons such as unsmooth network of some nodes; when the off-line main controller is on-line next time, the background system automatically issues the video, so that the consistency of the whole task is ensured, and repeated cutting and issuing are avoided; if the user updates another source video program and cuts and issues the updated source video program before the node main controller is on line, the node main controller does not receive the previous video content but directly receives the latest video content after the node main controller is on line.
Further, when the offline master controller is online next time, the background system automatically issues a time strategy, so that the consistency of the whole task is ensured, and repeated cutting and issuing are avoided. If the user updates another source video program and cuts the program before the node main controller is on line, the node main controller does not receive the previous time strategy but directly receives the latest time strategy after the node main controller is on line; each node plays programs according to a play time strategy to form a linked visual effect; if the linked building node master controller is off-line before playing the program, the program playing of the node master controller is not influenced, and all the node master controllers have the local program playing function.
In some examples, all the linkage building master controllers are used for timing through GPS or internet uniformly, so that the time of all the online master controllers is kept consistent. After the background system issues planning time (playing time strategy) to all online main controllers, if national celebration programs are played on the following modes that the national celebration programs are played on 10 months, 1 day to 7 days, 18 days 00 to 23.
In some embodiments, the method may be applied to a controller, such as an ARM (Advanced RISC Machines) controller, an FPGA (Field Programmable Gate Array) controller, an SoC (System on Chip) controller, a DSP (Digital Signal Processing) controller, or an MCU (Microcontroller Unit) controller, among others. In some embodiments, the methods are also applicable to computers including components such as memory, memory controllers, one or more processing units (CPUs), peripheral interfaces, RF circuits, audio circuits, speakers, microphones, input/output (I/O) subsystems, display screens, other output or control devices, and external ports; the computer includes, but is not limited to, personal computers such as desktop computers, notebook computers, tablet computers, smart phones, smart televisions, personal Digital Assistants (PDAs), and the like. In other embodiments, the method may also be applied to servers that may be arranged on one or more physical servers, or may be formed of a distributed or centralized cluster of servers, depending on various factors such as function, load, etc.
Example two
As shown in fig. 4, an embodiment of the present invention provides a schematic structural diagram of a visual cutting and issuing device for linkage video, including: a video obtaining module 41, configured to obtain source video information, which includes source video resolution information; a visual cutting interface obtaining module 42, which obtains a visual cutting interface based on the source video resolution information; the video cutting module 43 generates a corresponding cutting window on the visual cutting interface based on the resolution of each playing node to cut the source video to obtain a plurality of sub-videos; and the video issuing module 44 is used for issuing the sub-videos to corresponding playing nodes respectively for linkage video playing.
It should be noted that the modules provided in this embodiment are similar to the methods and embodiments provided above, and therefore, the description thereof is omitted. It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can all be implemented in the form of software invoked by a processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the visual cutting interface obtaining module may be a processing element that is set up separately, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and a processing element of the apparatus calls and executes the function of the visual cutting interface obtaining module. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
EXAMPLE III
The embodiment of the invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program is characterized in that when being executed by a processor, the computer program realizes the visual cutting and issuing method of the linkage video.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Example four
As shown in fig. 5, an embodiment of the present invention provides a schematic structural diagram of an electronic terminal. The electronic terminal provided by the embodiment comprises: a processor 51, a memory 52, a communicator 53; the memory 52 is connected with the processor 51 and the communicator 53 through a system bus and completes mutual communication, the memory 52 is used for storing computer programs, the communicator 53 is used for communicating with other equipment, and the processor 51 is used for operating the computer programs, so that the electronic terminal executes the steps of the visual cutting and issuing method of the linkage video.
The above-mentioned system bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface is used for realizing communication between the database access device and other devices (such as a client, a read-write library and a read-only library). The Memory may include a Random Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In summary, the invention provides a visual cutting and issuing method, device, medium and terminal of a linkage video, which realize visual cutting of the linkage video and enable a user to clearly observe the relationship between each cutting window and a total cutting interface, so that the cutting scheme of a source video can be better adjusted according to actual needs, and the flexibility is stronger; acquiring a visual cutting interface based on the resolution of a source video, generating a corresponding cutting window based on the resolution of each playing node, further acquiring a sub video adaptive to the resolution of each playing node, and improving the visual effect of video playing; the utilization rate of high-quality videos with large resolution difference can be improved, customized development and production of the videos are not needed, and the cost is reduced; the user can drag each cutting window to realize the flexible cutting of the video, the user is endowed with higher control right, and the interestingness of the video cutting and issuing process is improved. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Those skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.