CN111147911A - Video clipping method and device, electronic equipment and storage medium - Google Patents
Video clipping method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111147911A CN111147911A CN201911382565.XA CN201911382565A CN111147911A CN 111147911 A CN111147911 A CN 111147911A CN 201911382565 A CN201911382565 A CN 201911382565A CN 111147911 A CN111147911 A CN 111147911A
- Authority
- CN
- China
- Prior art keywords
- video
- size parameter
- preset
- display mode
- screen display
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000000694 effects Effects 0.000 abstract description 18
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 8
- 238000004590 computer program Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/4104—Peripherals receiving signals from specially adapted client devices
- H04N21/4122—Peripherals receiving signals from specially adapted client devices additional display device, e.g. video projector
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/485—End-user interface for client configuration
- H04N21/4858—End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The disclosure relates to a video clipping method, a video clipping device, an electronic device and a storage medium. The method is applied to a viewer client, and comprises the following steps: receiving video data which are sent by a server and collected by a main broadcasting client and the screen type of the main broadcasting client; if the screen type is a preset screen type, acquiring size parameters of video pictures in the video data; and if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter to obtain a cut video. The method and the device can enable the video content seen by the audience to be larger and clearer, and are beneficial to improving the display effect of the video picture.
Description
Technical Field
The present disclosure relates to the field of video processing technologies, and in particular, to a video clipping method and apparatus, an electronic device, and a storage medium.
Background
With the development of network technology, live webcasting becomes a new sunrise industry. In a network live broadcast system, a main broadcast client acquires a main broadcast video stream and sends the main broadcast video stream to a server, and the server sends the live broadcast video stream to audience clients in a broadcast or multicast mode, so that the audience clients can play the live broadcast video stream.
In the related art, since the devices used by the anchor client and the viewer client may be different, the video stream recorded by the anchor client has poor picture effect when played by the viewer client. Therefore, there is an urgent need for improvement of the existing live broadcasting method.
Disclosure of Invention
The disclosure provides a video clipping method, a video clipping device, an electronic device and a storage medium, which are used for at least solving the problem of poor playing effect of a picture in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a video cropping method, applied to a viewer client, including:
receiving video data which are sent by a server and collected by a main broadcasting client and a screen type of the main broadcasting client;
if the screen type is a preset screen type, acquiring size parameters of video pictures in the video data;
and if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter to obtain a cut video.
In one embodiment, the method further comprises:
receiving a first screen display mode of the anchor client during video acquisition, which is sent by the server;
determining a second screen display mode of the audience client during video playing;
if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter, and obtaining the cut video comprises the following steps:
and if the first screen display mode is a horizontal screen display mode, the second screen display mode is a vertical screen display mode, and the size parameter of the video picture is different from the preset first size parameter, cutting the video data according to the preset first size parameter, wherein the preset first size parameter corresponds to the size parameter of the video picture when the horizontal screen display mode is switched to the vertical screen display mode.
In one embodiment, the method further comprises:
receiving a first screen display mode of the anchor client during video acquisition, which is sent by the server;
determining a second screen display mode of the audience client during video playing;
if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter, and obtaining the cut video comprises the following steps:
and if the first screen display mode is a vertical screen display mode, the second screen display mode is a horizontal screen display mode, and the size parameter of the video picture is different from a preset second size parameter, cutting the video data according to the preset second size parameter, wherein the preset second size parameter corresponds to the size parameter of the video picture when the vertical screen display mode is switched to the horizontal screen display mode.
In one embodiment, the step of obtaining the size parameter of the video picture in the video data comprises:
acquiring the length-width ratio of a video picture in the video data;
if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter, and obtaining the cut video comprises the following steps:
and if the aspect ratio of the video image is different from the preset aspect ratio, cutting the video data according to the preset aspect ratio to obtain a cut video.
In one embodiment, the preset first size parameter includes a first aspect ratio, and the ratio of the first aspect ratio is smaller than the ratio of the aspect ratios of the video pictures.
In one embodiment, the preset second size parameter includes a second aspect ratio, and the ratio of the second aspect ratio is greater than the ratio of the aspect ratios of the video pictures.
In one embodiment, the preset screen type includes a shaped screen.
In one embodiment, the method further comprises:
and when a cutting request is detected, cutting the video data according to the cutting parameters in the cutting request, or further cutting the cut video according to the cutting parameters in the cutting request.
In one embodiment, if the first screen display mode is the same as the second screen display mode, video playing is performed according to the video data.
According to a second aspect of the embodiments of the present disclosure, there is provided a video cropping device, the device being provided at a viewer client, including:
the data receiving unit is configured to receive video data collected by an anchor client and a screen type of the anchor client, wherein the video data are sent by a server;
a size parameter obtaining unit configured to obtain a size parameter of a video picture in the video data if the screen type is a preset screen type;
and the first cutting unit is configured to cut the video data according to a preset size parameter if the size parameter of the video picture is different from the preset size parameter, so as to obtain a cut video.
In one embodiment, the apparatus further comprises:
a first mode receiving unit configured to receive a first screen display mode of the anchor client at the time of video acquisition, which is sent by the server;
a second mode determination unit configured to determine a second screen display mode of the viewer client at the time of video playback;
the first clipping unit is specifically configured to clip the video data according to a preset first size parameter if the first screen display mode is a horizontal screen display mode, the second screen display mode is a vertical screen display mode, and the size parameter of the video picture is different from the preset first size parameter, wherein the preset first size parameter corresponds to the size parameter of the video picture when the horizontal screen display mode is switched to the vertical screen display mode.
In one embodiment, the apparatus further comprises:
a first mode receiving unit configured to receive a first screen display mode of the anchor client at the time of video acquisition, which is sent by the server;
a second mode determination unit configured to determine a second screen display mode of the viewer client at the time of video playback;
the first clipping unit is specifically configured to clip the video data according to a preset second size parameter if the first screen display mode is a vertical screen display mode, the second screen display mode is a horizontal screen display mode, and the size parameter of the video picture is different from the preset second size parameter, wherein the preset second size parameter corresponds to the size parameter of the video picture when the vertical screen display mode is switched to the horizontal screen display mode.
In one embodiment, the size parameter acquiring unit is specifically configured to acquire an aspect ratio of a video picture in the video data;
the first cropping unit is specifically configured to crop the video data according to the preset length-width ratio if the aspect ratio of the video picture is different from a preset aspect ratio, so as to obtain a cropped video.
In one embodiment, the preset first size parameter includes a first aspect ratio, and the ratio of the first aspect ratio is smaller than the ratio of the aspect ratios of the video pictures.
In one embodiment, the preset second size parameter includes a second aspect ratio, and the ratio of the second aspect ratio is greater than the ratio of the aspect ratios of the video pictures.
In one embodiment, the preset screen type includes a shaped screen.
In one embodiment, the apparatus further comprises:
and the second clipping unit is configured to clip the video data according to the clipping parameters in the clipping request or further clip the clipped video according to the clipping parameters in the clipping request when the clipping request is detected.
In one embodiment, the apparatus further comprises:
and the playing unit is configured to play video according to the video data if the first screen display mode is the same as the second screen display mode.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the video cropping method as described above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the video cropping method as described above.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program stored in a readable storage medium, from which the computer program is read and executed by at least one processor of a device, such that the device performs the video cropping method described in any one of the embodiments of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the video clipping method, the video clipping device, the electronic equipment and the storage medium take the fact that the screen type of the anchor client can influence the display effect of a video picture, such as a special-shaped screen or a screen with a very unique screen proportion into consideration. When the video recorded by the anchor client is played by the viewer client with the regular screen, the displayed picture effect may be poor, for example, the picture display is too small. After determining that the screen type of the anchor client is the preset screen type, the present disclosure may be, for example, the special screen type, and the video data is clipped according to the preset size parameter, for example: the method and the device have the advantages that the image data of the non-safety area in the special-shaped screen are cut, so that some images which are not important for audiences can be properly cut, the cut video can be amplified at the client side of the audiences, and the user can receive the image content which the user is interested in more intuitively, so that the video content seen by the audiences is larger and clearer, and the display effect of the video images is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a diagram illustrating an application environment for a method of video cropping, according to an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a method of video cropping, according to an example embodiment.
Fig. 3 is a block diagram illustrating a video cropping device according to an exemplary embodiment.
FIG. 4 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The video cropping method provided by the disclosure can be applied to the application environment shown in fig. 1. Where the anchor client 102 communicates with the server side 104 over a network, and the server side 104 communicates with the viewer client 106 over a network. Specifically, in the live broadcast process, the anchor client 102 collects video data running on the anchor client and obtains the screen type of the video data, and then the anchor client 102 sends the collected video data and the screen type to the server 104. The server side 104 then sends the video data and the screen type to the viewer client 106. The audience client 106 matches the screen type with a preset screen type, if the matching is successful, the size parameter of the video picture in the video data is obtained, and if the size parameter is different from the preset size parameter, the video data is cut according to the preset size parameter, so that the cut video is obtained.
The anchor client 102 and the viewer client 106 may be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers.
FIG. 2 is a flow diagram illustrating a method of video cropping, according to an example embodiment. The video clipping method is applied to a viewer client, and as shown in fig. 2, comprises the following steps:
in step S21, the video data collected by the anchor client and the screen type of the anchor client sent by the server are received.
In step S22, if the screen type is a preset screen type, the size parameter of the video frame in the video data is obtained.
In step S23, if the size parameter of the video frame is different from the preset size parameter, the video data is clipped according to the preset size parameter to obtain a clipped video.
Specifically, when the anchor live broadcast or the video is recorded, the anchor client may collect image data and audio data running in the anchor client through an image collecting device (such as a camera) and an audio collecting device (such as a microphone) in the anchor client, respectively, and the image data and the audio data constitute video data and send the video data to the server. And the server receives the collected video data sent by the anchor client and acquires the screen type of the anchor client. The screen type of the anchor client can be sent by the anchor client or read from a memory of the server. And the server side sends the video data and the screen type to the audience client side. And matching the screen type with a preset screen type by the audience client, if the matching is successful, obtaining the size parameter of a video picture in the video data, and if the size parameter is different from the preset size parameter, cutting the video data according to the preset size parameter to obtain a cut video. It is understood that the size parameter of the cropped video picture is consistent or corresponding to the preset size parameter.
The video clipping method considers that the screen type of the anchor client can influence the display effect of the video picture, such as a special-shaped screen or a screen with a unique screen proportion. When the video recorded by the anchor client is played by the viewer client with the regular screen, the displayed picture effect may be poor, for example, the picture display is too small. After determining that the screen type of the anchor client is the preset screen type, the present disclosure may be, for example, the special screen type, and the video data is clipped according to the preset size parameter, for example: the method and the device have the advantages that the image data of the non-safety area in the special-shaped screen are cut, so that some images which are not important for audiences can be properly cut, the cut video can be amplified at the client side of the audiences, and the user can receive the image content which the user is interested in more intuitively, so that the video content seen by the audiences is larger and clearer, and the display effect of the video images is improved.
Optionally, the size parameter of the video picture comprises an aspect ratio of the video picture. In an embodiment, the spectator client obtains an aspect ratio of a video image in the video data, and if the aspect ratio of the video image is different from a preset aspect ratio, the spectator client cuts the video data according to the preset aspect ratio to obtain a cut video.
The aspect ratio of a video frame refers to the ratio of the length to the width of the video frame. Typically, in the anchor client, the aspect ratio of the video pictures is the aspect ratio of the anchor client screen. For example, when the anchor uses an apple full-screen mobile phone for live broadcasting, the aspect ratio of the recorded video pictures is equal to that of the screen of the apple full-screen mobile phone, such as 19.5: 9. In general, the video cropping mode may crop both end regions of the picture. Therefore, the preset aspect ratio may be set to 18:9, 16:9, 4:3 or other ratios, but is not limited thereto, and the ratio may be set according to the actual application requirements. Alternatively, the preset aspect ratio may be determined based on an aspect ratio of a display in a screen of the viewer client. For example, the preset aspect ratio is an aspect ratio of a display in a screen of the viewer client. By setting various preset length-width ratios, the watching requirements of different audience client sides can be met, and the watching experience of audiences is improved.
Illustratively, the aspect ratio of the video frame captured by the anchor client is 19.5:9, and the preset aspect ratio is 18:9, the viewer client may crop the video data according to the ratio of 18:9, thereby obtaining the video data of 18: 9. For example, when the anchor uses an apple full-screen mobile phone to broadcast directly, since the screen ratio (screen length: screen width) of the apple full-screen is 19.5:9, the aspect ratio of the picture displayed during live broadcasting is also 19.5: 9. However, for the viewer client with the screen ratio of 18:9 or 16:9, due to the unequal numerical values, when such a viewer client plays a live video, the problem of picture ratio imbalance or picture content display is too small, which affects the viewing effect of the viewer. Therefore, if the video data in the live broadcast is cut according to 18:9 or 16:9 in the audience client, the audience client with the screen ratio of 18:9 or 16:9 can be obtained, and the playing effect of the audience client is improved.
Optionally, the size parameter of the video picture comprises a length and a width of the video picture. In one embodiment, the length and the width of a video picture in video data are obtained by a viewer client, and if the length and the width of the video picture are different from the preset length and width, the viewer client cuts the video data according to the preset length and width to obtain a cut video. It will be appreciated that the cropping pattern also aims to capture video with less picture content in order to present a larger and clearer picture content to the viewer.
In one embodiment, the aspect ratio of the video pictures can be derived by reading the resolution of the video stream. If the video pixel ratio is 1: 1, the aspect ratio of the video pictures is equal to the ratio of the resolutions of the video streams.
In another embodiment, the aspect ratio of the video frame can be obtained by counting the number of pixels.
In an actual live broadcast or video recording scene, a main broadcast may adopt a horizontal screen display mode for live broadcast or video recording, or may adopt a vertical screen display mode for live broadcast or video recording, and audiences may adopt the horizontal screen display mode for watching videos or the vertical screen display mode for watching videos. If the screen display modes of the anchor client and the audience client are different, namely the anchor client adopts a horizontal screen display mode and the audience client adopts a vertical screen display mode, or the anchor client adopts the vertical screen display mode and the audience client adopts the horizontal screen display mode, the picture displayed by the audience client is too small, and the audience is not favorably watched.
In view of the above inconvenience of the application scenario, in order to enlarge the content of the video picture, in one embodiment, the method further comprises the steps of:
in step S24, a first screen display mode of the anchor client at the time of video capture is received, which is transmitted by the server.
In step S25, determining a second screen display mode of the viewer client at the time of video playback;
step S23 includes: s231, if the first screen display mode is a horizontal screen display mode, the second screen display mode is a vertical screen display mode, and the size parameter of the video picture is different from the preset first size parameter, clipping the video data according to the preset first size parameter.
The preset first size parameter corresponds to the size parameter of the video picture when the horizontal screen display mode is switched to the vertical screen display mode.
Specifically, on the basis of the above embodiment, the viewer client further obtains the screen display mode of the anchor client at the time of video capture, and determines the second screen display mode of the anchor client at the time of video playing. If the anchor client side adopts a horizontal screen display mode, namely the anchor adopts the horizontal screen display mode for live broadcasting, and the audience client side adopts a vertical screen display mode, namely the audience adopts the vertical screen display mode for watching, and the size parameter of the video picture is different from the preset first size parameter, the video data is cut according to the preset first size parameter. Compared with an uncut video, the cut video has smaller size, so that the video content can be amplified when the video is played by a client of a viewer, and the viewing effect of the viewer is facilitated.
As an embodiment, if the first screen display mode is a horizontal screen display mode, the second screen display mode is a vertical screen display mode, and the aspect ratio of the video frame is different from the preset first aspect ratio, the viewer client clips the video data according to the preset first aspect ratio.
Optionally, the ratio of the first aspect ratio is smaller than the ratio of the aspect ratio of the display screen.
For example: the anchor client side adopts a transverse screen display mode of the apple full-screen mobile phone for live broadcasting, the aspect ratio of a transverse screen display picture of the apple full-screen mobile phone is 19.5:9, and if transverse screen video content collected in the transverse screen display mode is played in a vertical screen display mode, a visual picture area is very small. Typically, a secure area, e.g. 18:9 or a core area 16:9 or 4:3, i.e. a first aspect ratio, will be set in the viewer client. In this way, the video data is clipped according to the aspect ratio of the safety area or the aspect ratio of the core area, the video data of the 18:9 or 16:9 area is reserved, and the video data of other areas is discarded. Because the ratio of the aspect ratio of the secure area or the aspect ratio of the core area is greater than the ratio of the aspect ratio of the horizontal screen display picture, the picture area visible when the clipped video data is played in the vertical screen display mode is enlarged, so that the viewing area of a viewer in the vertical screen display mode is larger.
In this embodiment, when the live video content recorded in the horizontal screen display mode is played in the vertical screen display mode, the picture display is larger.
In another embodiment, step S23 includes: s232, if the first screen display mode is a vertical screen display mode, the second screen display mode is a horizontal screen display mode, and the size parameter of the video picture is different from the preset second size parameter, cutting the video data according to the preset second size parameter.
The preset second size parameter corresponds to the size parameter of the video picture when the vertical screen display mode is switched to the horizontal screen display mode.
As an embodiment, if the first screen display mode is the vertical screen display mode, the second screen display mode is the horizontal screen display mode, and the aspect ratio of the video frame is different from the preset second aspect ratio, the viewer client clips the video data according to the preset second aspect ratio.
Optionally, the ratio of the second aspect ratio is greater than the ratio of the aspect ratio of the display screen.
For example: and if the aspect ratio of a display picture in the screen of the anchor client is 18:9 and the second preset aspect ratio is 18:8, the audience client cuts the video data according to the aspect ratio of 18:8, reserves the video data in the 18:8 area, and discards the video data in other areas.
In this embodiment, when the live video content recorded in the vertical screen display mode is played in the horizontal screen display mode, the picture display is larger.
Optionally, in an embodiment, the method further comprises the steps of:
in step S26, if the first screen display mode is the same as the second screen display mode, video playing is performed according to the video data.
Specifically, if the first screen display mode is the same as the second screen display mode, that is, both the first screen display mode and the second screen display mode are the horizontal screen display mode or the vertical screen display mode, the viewer client directly plays the video according to the received video data.
In this embodiment, the user can still see the complete video content under the condition that the screen display mode is the same.
In one embodiment, the method further comprises the steps of:
in step S27, when a cropping request is detected, the video data is cropped according to the cropping parameters in the cropping request, or the cropped video data is further cropped according to the cropping parameters in the cropping request.
Specifically, a clipping setting option may be set in the viewer client, in which the viewer may configure a clipping parameter, and the viewer client generates a clipping request based on the clipping parameter. And when the audience client detects the cutting request, extracting the cutting parameters in the cutting request, and cutting the video data according to the cutting parameters. Alternatively, the clipped video data obtained in step S23 is further clipped according to the clipping parameter in the clipping request.
Optionally, a crop trigger button may also be provided in the viewer client, which may trigger the crop function or turn off the crop function.
In this embodiment, the spectator can cut the video data according to the self-requirement, and the flexibility of cutting is improved.
Fig. 3 is a block diagram illustrating a video cropping device according to an exemplary embodiment. The video cropping device 30 is disposed at the viewer client, and referring to fig. 3, the device includes a data receiving unit 311, a size parameter obtaining unit 312, and a first cropping unit 313.
The data receiving unit 311 is configured to receive video data collected by the anchor client and a screen type of the anchor client, which are transmitted by the server;
the size parameter obtaining unit 312 is configured to obtain a size parameter of a video picture in the video data if the screen type is a preset screen type;
the first cropping unit 313 is configured to crop the video data according to the preset size parameter if the size parameter of the video frame is different from the preset size parameter, so as to obtain a cropped video.
The video clipping device considers that the screen type of the anchor client can influence the display effect of the video picture, such as a special-shaped screen or a screen with a unique screen proportion. When the video recorded by the anchor client is played by the viewer client with the regular screen, the displayed picture effect may be poor, for example, the picture display is too small. After determining that the screen type of the anchor client is the preset screen type, the present disclosure may be, for example, the special screen type, and the video data is clipped according to the preset size parameter, for example: the method and the device have the advantages that the image data of the non-safety area in the special-shaped screen are cut, so that some images which are not important for audiences can be properly cut, the cut video can be amplified at the client side of the audiences, and the user can receive the image content which the user is interested in more intuitively, so that the video content seen by the audiences is larger and clearer, and the display effect of the video images is improved.
In one embodiment, the apparatus further comprises: a first mode receiving unit (not shown) and a second mode determining unit (not shown);
the first mode receiving unit is configured to receive a first screen display mode of the anchor client during video acquisition, which is sent by the server;
the second mode determining unit is configured to determine a second screen display mode of the viewer client at the time of video playing;
the first cropping unit 313 is specifically configured to crop the video data according to a preset first size parameter if the first screen display mode is the landscape screen display mode, the second screen display mode is the portrait screen display mode, and the size parameter of the video frame is different from the preset first size parameter, where the preset first size parameter corresponds to the size parameter of the video frame when the landscape screen display mode is switched to the portrait screen display mode.
In one embodiment, the apparatus further comprises: a first mode receiving unit (not shown) and a second mode determining unit (not shown);
the first mode receiving unit is configured to receive a first screen display mode of the anchor client during video acquisition, which is sent by the server;
the second mode determining unit is configured to determine a second screen display mode of the viewer client at the time of video playing;
the first cropping unit 313 is specifically configured to crop the video data according to a preset second size parameter if the first screen display mode is the vertical screen display mode, the second screen display mode is the horizontal screen display mode, and the size parameter of the video frame is different from the preset second size parameter, where the preset second size parameter corresponds to the size parameter of the video frame when the vertical screen display mode is switched to the horizontal screen display mode.
In one embodiment, the size parameter obtaining unit 312 is specifically configured to obtain an aspect ratio of a video picture in the video data;
the first cropping unit 313 is specifically configured to crop the video data according to the preset aspect ratio if the aspect ratio of the video frame is different from the preset aspect ratio, so as to obtain a cropped video.
In one embodiment, the preset first size parameter includes a first aspect ratio, and the ratio of the first aspect ratio is smaller than the ratio of the aspect ratios of the video pictures.
In one embodiment, the preset second size parameter includes a second aspect ratio, and the ratio of the second aspect ratio is greater than the ratio of the aspect ratios of the video pictures.
In one embodiment, the preset screen type includes a shaped screen.
In one embodiment, the apparatus further comprises: and a second clipping unit (not shown) configured to, when the clipping request is detected, clip the video data according to the clipping parameters in the clipping request, or further clip the clipped video according to the clipping parameters in the clipping request.
In one embodiment, the apparatus further comprises: a playing unit (not shown) configured to play video according to the video data if the first screen display mode is the same as the second screen display mode.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 4 is a block diagram illustrating an electronic device in accordance with an example embodiment. The electronic device may be a client. The electronic device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a video cropping method. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided an electronic device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute the instructions to perform the steps of:
receiving video data which are sent by a server and collected by a main broadcasting client and the screen type of the main broadcasting client;
if the screen type is a preset screen type, acquiring size parameters of video pictures in the video data;
and if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter to obtain a cut video.
The electronic equipment considers that the screen type of the anchor client can influence the display effect of the video picture, such as a special-shaped screen or a screen with a unique screen scale. When the video recorded by the anchor client is played by the viewer client with the regular screen, the displayed picture effect may be poor, for example, the picture display is too small. After determining that the screen type of the anchor client is the preset screen type, the present disclosure may be, for example, the special screen type, and the video data is clipped according to the preset size parameter, for example: the method and the device have the advantages that the image data of the non-safety area in the special-shaped screen are cut, so that some images which are not important for audiences can be properly cut, the cut video can be amplified at the client side of the audiences, and the user can receive the image content which the user is interested in more intuitively, so that the video content seen by the audiences is larger and clearer, and the display effect of the video images is improved.
In an exemplary embodiment, there is also provided a storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of an apparatus to perform the above method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A video cropping method applied to a viewer client, comprising:
receiving video data which are sent by a server and collected by a main broadcasting client and a screen type of the main broadcasting client;
if the screen type is a preset screen type, acquiring size parameters of video pictures in the video data;
and if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter to obtain a cut video.
2. The video cropping method of claim 1, wherein the method further comprises:
receiving a first screen display mode of the anchor client during video acquisition, which is sent by the server;
determining a second screen display mode of the audience client during video playing;
if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter, and obtaining the cut video comprises the following steps:
and if the first screen display mode is a horizontal screen display mode, the second screen display mode is a vertical screen display mode, and the size parameter of the video picture is different from the preset first size parameter, cutting the video data according to the preset first size parameter, wherein the preset first size parameter corresponds to the size parameter of the video picture when the horizontal screen display mode is switched to the vertical screen display mode.
3. The video cropping method of claim 1, wherein the method further comprises:
receiving a first screen display mode of the anchor client during video acquisition, which is sent by the server;
determining a second screen display mode of the audience client during video playing;
if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter, and obtaining the cut video comprises the following steps:
and if the first screen display mode is a vertical screen display mode, the second screen display mode is a horizontal screen display mode, and the size parameter of the video picture is different from a preset second size parameter, cutting the video data according to the preset second size parameter, wherein the preset second size parameter corresponds to the size parameter of the video picture when the vertical screen display mode is switched to the horizontal screen display mode.
4. A method for video cropping according to any one of claims 1 to 3, wherein said step of obtaining the size parameter of the video pictures in said video data comprises:
acquiring the length-width ratio of a video picture in the video data;
if the size parameter of the video picture is different from the preset size parameter, cutting the video data according to the preset size parameter, and obtaining the cut video comprises the following steps:
and if the aspect ratio of the video image is different from the preset aspect ratio, cutting the video data according to the preset aspect ratio to obtain a cut video.
5. The video cropping method of claim 2, wherein the preset first size parameter comprises a first aspect ratio, and wherein the ratio of the first aspect ratio is smaller than the ratio of the aspect ratios of the video pictures.
6. The video cropping method of claim 3, wherein the preset second size parameter comprises a second aspect ratio, and wherein the ratio of the second aspect ratio is greater than the ratio of the aspect ratios of the video pictures.
7. A video cropping method according to any one of claims 1 to 3 or 5 to 6, characterized in that said preset screen type comprises a shaped screen.
8. The video cropping method of any one of claims 1-3 or 5-6, wherein the method further comprises:
and when a cutting request is detected, cutting the video data according to the cutting parameters in the cutting request, or further cutting the cut video according to the cutting parameters in the cutting request.
9. A method for video cropping according to claim 2 or 3, characterized in that said method further comprises:
and if the first screen display mode is the same as the second screen display mode, video playing is carried out according to the video data.
10. A video cropping device, the device being disposed at a viewer client, comprising:
the data receiving unit is configured to receive video data collected by an anchor client and a screen type of the anchor client, wherein the video data are sent by a server;
a size parameter obtaining unit configured to obtain a size parameter of a video picture in the video data if the screen type is a preset screen type;
and the first cutting unit is configured to cut the video data according to a preset size parameter if the size parameter of the video picture is different from the preset size parameter, so as to obtain a cut video.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911382565.XA CN111147911A (en) | 2019-12-27 | 2019-12-27 | Video clipping method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911382565.XA CN111147911A (en) | 2019-12-27 | 2019-12-27 | Video clipping method and device, electronic equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111147911A true CN111147911A (en) | 2020-05-12 |
Family
ID=70521226
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911382565.XA Pending CN111147911A (en) | 2019-12-27 | 2019-12-27 | Video clipping method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111147911A (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111726688A (en) * | 2020-07-02 | 2020-09-29 | 深圳市鹰硕技术有限公司 | Method and device for self-adapting screen projection picture in network teaching |
| CN113660516A (en) * | 2021-10-19 | 2021-11-16 | 北京易真学思教育科技有限公司 | Video display method, device, equipment and medium |
| CN113873327A (en) * | 2021-09-24 | 2021-12-31 | 北京百度网讯科技有限公司 | A video stream presentation method, apparatus, device and storage medium |
| CN114222188A (en) * | 2021-12-28 | 2022-03-22 | 深圳小湃科技有限公司 | Full-screen display method, device, device and storage medium based on rotating screen |
| CN115379246A (en) * | 2021-05-21 | 2022-11-22 | 北京字节跳动网络技术有限公司 | Live video stream playing method and device, electronic equipment and storage medium |
| US11863835B2 (en) | 2020-07-31 | 2024-01-02 | Douyin Vision Co., Ltd. | Interaction method and apparatus, and electronic device |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2009115101A1 (en) * | 2008-03-20 | 2009-09-24 | Institut für Rundfunktechnik GmbH | A method of adapting video images to small screen sizes |
| CN106454407A (en) * | 2016-10-25 | 2017-02-22 | 广州华多网络科技有限公司 | Video live broadcast method and device |
| CN108073380A (en) * | 2017-12-29 | 2018-05-25 | 广东欧珀移动通信有限公司 | Electronic device, display control method and related product |
| CN108965742A (en) * | 2018-08-14 | 2018-12-07 | 京东方科技集团股份有限公司 | Abnormity screen display method, apparatus, electronic equipment and computer readable storage medium |
-
2019
- 2019-12-27 CN CN201911382565.XA patent/CN111147911A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2009115101A1 (en) * | 2008-03-20 | 2009-09-24 | Institut für Rundfunktechnik GmbH | A method of adapting video images to small screen sizes |
| CN106454407A (en) * | 2016-10-25 | 2017-02-22 | 广州华多网络科技有限公司 | Video live broadcast method and device |
| CN108073380A (en) * | 2017-12-29 | 2018-05-25 | 广东欧珀移动通信有限公司 | Electronic device, display control method and related product |
| CN108965742A (en) * | 2018-08-14 | 2018-12-07 | 京东方科技集团股份有限公司 | Abnormity screen display method, apparatus, electronic equipment and computer readable storage medium |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111726688A (en) * | 2020-07-02 | 2020-09-29 | 深圳市鹰硕技术有限公司 | Method and device for self-adapting screen projection picture in network teaching |
| WO2022001027A1 (en) * | 2020-07-02 | 2022-01-06 | 深圳市鹰硕技术有限公司 | Projection screen picture self-adaption method and apparatus in network teaching |
| US11863835B2 (en) | 2020-07-31 | 2024-01-02 | Douyin Vision Co., Ltd. | Interaction method and apparatus, and electronic device |
| EP4175307A4 (en) * | 2020-07-31 | 2024-03-13 | Beijing Bytedance Network Technology Co., Ltd. | INTERACTION METHOD AND DEVICE AND ELECTRONIC DEVICE |
| US12316922B2 (en) | 2020-07-31 | 2025-05-27 | Beijing Bytedance Network Technology Co., Ltd. | Interaction method and apparatus, and electronic device |
| CN115379246A (en) * | 2021-05-21 | 2022-11-22 | 北京字节跳动网络技术有限公司 | Live video stream playing method and device, electronic equipment and storage medium |
| WO2022242544A1 (en) * | 2021-05-21 | 2022-11-24 | 北京字节跳动网络技术有限公司 | Live-streaming video stream playing method and apparatus, and electronic device and storage medium |
| CN113873327A (en) * | 2021-09-24 | 2021-12-31 | 北京百度网讯科技有限公司 | A video stream presentation method, apparatus, device and storage medium |
| CN113660516A (en) * | 2021-10-19 | 2021-11-16 | 北京易真学思教育科技有限公司 | Video display method, device, equipment and medium |
| CN114222188A (en) * | 2021-12-28 | 2022-03-22 | 深圳小湃科技有限公司 | Full-screen display method, device, device and storage medium based on rotating screen |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111147911A (en) | Video clipping method and device, electronic equipment and storage medium | |
| CN111050204A (en) | Video clipping method and device, electronic equipment and storage medium | |
| CN106454407B (en) | Video live broadcasting method and device | |
| US10943502B2 (en) | Manipulation of media content to overcome user impairments | |
| CN108737882B (en) | Image display method, image display device, storage medium and electronic device | |
| CN110301136B (en) | System and method for selective object of interest scaling in streaming video | |
| US8925004B2 (en) | Techniques to provide an enhanced video replay | |
| CN109089157B (en) | Video picture cutting method, display device and device | |
| US20170171274A1 (en) | Method and electronic device for synchronously playing multiple-cameras video | |
| US20150222815A1 (en) | Aligning videos representing different viewpoints | |
| CN107682714B (en) | Method and device for acquiring online video screenshot | |
| WO2016150317A1 (en) | Method, apparatus and system for synthesizing live video | |
| EP3621309A1 (en) | Transmission system for multi-channel image, control method therefor, and multi-channel image playback method and apparatus | |
| CN113438550B (en) | Video playing method, video conference method, live broadcasting method and related devices | |
| US20160277808A1 (en) | System and method for interactive second screen | |
| CN112954380B (en) | Video playing processing method and device | |
| CN113630614A (en) | Game live broadcast method, device, system, electronic equipment and readable storage medium | |
| WO2014190655A1 (en) | Application synchronization method, application server and terminal | |
| CN111405312A (en) | Live broadcast stream pushing method, device, terminal, server and storage medium | |
| CN113315980B (en) | Intelligent live broadcast method and live broadcast Internet of things system | |
| CN112584189A (en) | Live broadcast data processing method, device and system and computer readable storage medium | |
| CN111147883A (en) | Live broadcast method, apparatus, head mounted display device and readable storage medium | |
| CN112004100B (en) | Driving method for integrating multiple audio and video sources into single audio and video source | |
| CN113141541B (en) | Code rate switching method, device, equipment and storage medium | |
| CN107333172B (en) | Broadcasting method and device of broadcasting system and electronic equipment |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200512 |
|
| RJ01 | Rejection of invention patent application after publication |