Video playing method and device, equipment and storage medium
By obtaining and cropping source videos in the terminal device, the problem that the server needs to store multiple videos to support different display modes is solved, and the effect of reducing server resource consumption and improving video playback efficiency is achieved.
Patent Information
- Application Number
- CN202411637733.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art requires servers to store multiple source videos to support video playback in different display modes, resulting in increased server computing consumption and storage resources.
By obtaining the source video in the terminal device and cropping it according to the display mode of the terminal screen, videos suitable for different display modes are generated and played directly in the terminal device.
It reduces the computing consumption of the server and the use of storage resources, frees up the storage space of the server, and improves the video playback efficiency of the terminal device.
Smart Images

Figure CN119520905A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a video playback method, apparatus, device, and storage medium. Background Art
[0002] In order to meet the viewing needs of users, terminal devices generally support playing videos in a horizontal screen mode and also support playing videos in a vertical screen mode.
[0003] In the related art, in order to enable the video to be played in both horizontal and vertical modes on the terminal screen, the server usually processes the source video and stores the source video supporting horizontal mode playback and the source video supporting vertical mode playback respectively.
[0004] However, the above method requires that multiple source videos be stored in the server to support different display modes respectively. Summary of the invention
[0005] The embodiment of the present application provides a video playback method, device, equipment and storage medium. The technical solution is as follows:
[0006] According to one aspect of an embodiment of the present application, a video playback method is provided, the method comprising:
[0007] Acquire a source video, where the source video is displayed on a terminal screen in a first display mode, where the first display mode is one of a horizontal screen mode and a vertical screen mode;
[0008] Cropping the source video to obtain the first video displayed in a second display mode, where the second display mode is another one of the horizontal screen mode and the vertical screen mode that is different from the first display mode;
[0009] The first video is played in the second display mode on the terminal screen.
[0010] According to one aspect of an embodiment of the present application, a video playback device is provided, the device comprising:
[0011] An acquisition module, used for acquiring a source video, wherein the source video is displayed in a first display mode on a terminal screen, wherein the first display mode is one of a horizontal screen mode and a vertical screen mode;
[0012] a cropping mode, used for cropping the source video to obtain the first video displayed in a second display mode, where the second display mode is another one of the horizontal mode and the vertical mode that is different from the first display mode;
[0013] A playing module is used to play the first video in the second display mode on the terminal screen.
[0014] According to one aspect of an embodiment of the present application, a terminal device is provided, the terminal device comprising a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-mentioned video playback method.
[0015] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned video playback method.
[0016] According to one aspect of an embodiment of the present application, a computer program product is provided, wherein the computer program product includes a computer program, and the computer program is loaded and executed by a processor to implement the above-mentioned video playback method.
[0017] The technical solution provided in the embodiments of the present application can bring the following beneficial effects:
[0018] After the terminal device obtains the source video, it crops the source video to adapt to the display mode of the terminal screen. The server does not need to store the source videos corresponding to different display modes, which reduces the computing consumption of the server and reduces the storage resources of the server occupied by the source video, freeing up the storage space of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a schematic diagram of a computer system provided by an embodiment of the present application;
[0020] Figure 2 is a flow chart of a video playback method provided by an embodiment of the present application;
[0021] Figure 3 is a flowchart of a video playback method provided by another embodiment of the present application;
[0022] Figure 4 is a schematic diagram of a video playback method provided by an embodiment of the present application;
[0023] Figure 5 is a flow chart of a picture display method provided by an embodiment of the present application;
[0024] Figure 6 is a block diagram of a video playback device provided by an embodiment of the present application;
[0025] Figure 7 It is a structural diagram of a terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0027] Please refer to Figure 1 , which shows a schematic diagram of a computer system provided by an embodiment of the present application. The computer system can be implemented as a video playback system. The computer system may include: a terminal device 10 and a server 20.
[0028] The number of terminal devices 10 can be one or more. The terminal device 10 can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a game console, an e-book reader, a multimedia playback device, a wearable device, a smart TV, a vehicle-mounted terminal, etc. The client corresponding to the target application can be installed in the terminal device 10. Optionally, the target application can be an application that needs to be downloaded and installed, or it can be a point-and-click application, which is not limited in the embodiment of the present application. In the embodiment of the present application, the above-mentioned target application is an application with a video playback function. Of course, there is no limitation on the specific type of the target application, and the type of the target application can be a music application, a video application, a social application, a live broadcast application, a virtual reality application, an augmented reality application, etc. The embodiment of the present application does not limit the specific category of the target application. In other embodiments, the target application can be considered as a separate functional module, such as being implemented as one of the functional modules for video playback in a live broadcast application. Exemplarily, the above-mentioned client is running in the terminal device 10.
[0029] The server 20 is used to provide background services for the client of the target application installed and running in the terminal device 10. For example, the server 20 can be the background server of the above-mentioned target application. The server 20 can be a single server, or a server cluster composed of multiple servers, or a cloud computing service center. Optionally, the server 20 provides background services for the clients of the target application in multiple terminal devices 10 at the same time. The terminal device 10 and the server 20 can communicate with each other through the network.
[0030] In some embodiments, the terminal device 10 obtains a source video, which is displayed in a first display mode on the terminal screen, where the first display mode is a horizontal mode or a vertical mode; crops the source video to obtain a first video displayed in a second display mode, where the second display mode is another one of the horizontal mode and the vertical mode that is different from the first display mode; and plays the first video in the second display mode on the terminal screen.
[0031] In the method provided in the embodiment of the present application, the execution subject of each step may be a terminal device. A terminal device is an electronic device with data storage and processing capabilities. For example, a terminal device may be Figure 1 The terminal device 10 in.
[0032] Please refer to Figure 2 , which shows a flow chart of a video playback method provided by an embodiment of the present application. The method is executed by a terminal device. The method includes at least one of the following steps 210 to 230.
[0033] Step 210, obtaining a source video, and displaying the source video on the terminal screen in a first display mode, wherein the first display mode is one of a horizontal screen mode and a vertical screen mode.
[0034] In some embodiments, the source video refers to the source file of the video. In some embodiments, the source video is stored in a server. In some embodiments, obtaining the source video refers to the terminal device obtaining the source video from the server. In some embodiments, the terminal device receives the source video sent by the server.
[0035] In some embodiments, the source video may also be stored locally on the terminal device. In some embodiments, obtaining the source video refers to obtaining the source video from a storage space of the terminal device. In some embodiments, the terminal device determines a storage address corresponding to the source video in the local storage space.
[0036] In some embodiments, the source video is displayed in the terminal screen in the first display mode, that is, after rendering the source video, the source video is played in the terminal screen in the first display mode. Exemplarily, the first display mode is a horizontal screen mode, and the source video is displayed in the terminal screen in the horizontal screen mode. Exemplarily, the first display mode is a vertical screen mode, and the source video is displayed in the terminal screen in the vertical screen mode.
[0037] In some embodiments, the source video may be displayed in full screen on the terminal screen in the first display mode, or may be displayed in a small window on the terminal screen in the first display mode. In some embodiments, the aspect ratio corresponding to the full screen display and the aspect ratio corresponding to the small window display may be the same or different. In some embodiments, the sizes of the terminal screens of different terminal devices may be different, and the aspect ratios corresponding to the display on different terminal devices may also be different.
[0038] In some embodiments, the source video is fixed in format. The format of the source video may include a display mode corresponding to the source video, an aspect ratio corresponding to the source video, and a video frame size of the source video. In some embodiments, after receiving the source video, if the terminal device wants to adapt the source video to the terminal screen (e.g., align the display mode, adapt the aspect ratio, adapt the size, etc.), it is necessary to crop the source video to obtain a first video adapted to the terminal screen. In the embodiment of the present application, the cropping of the source video is described by taking the display mode of the source video being different from the display mode corresponding to the terminal screen as an example.
[0039] Step 220, cropping the source video to obtain the first video displayed in a second display mode, where the second display mode is another one of the horizontal mode and the vertical mode that is different from the first display mode.
[0040] In some embodiments, the first display mode is different from the second display mode. Exemplarily, the first display mode is a landscape mode, and the second display mode is a portrait mode. Exemplarily, the first display mode is a portrait mode, and the second display mode is a landscape mode.
[0041] In some embodiments, cropping the source video refers to cropping the video frames included in the source video to obtain a first video composed of new video frames. Exemplarily, the first display mode is a horizontal screen mode, and the second display mode is a vertical screen mode. The video frames of the first video obtained after cropping may differ from the content contained in the video frames of the source video. Exemplarily, the background content on both sides of the horizontal direction of the video frame of the source video is cropped and discarded, and only the video frame area where the characters are located is retained in the video frame of the first video. Exemplarily, the first display mode is a vertical screen mode, and the second display mode is a horizontal screen mode. The video frames of the first video obtained after cropping may differ from the content contained in the video frames of the source video. Exemplarily, the background content on both sides of the vertical direction of the video frame of the source video is cropped and discarded, and only the video frame area where the characters are located is retained in the video frame of the first video.
[0042] In some embodiments, in the process of cropping the source video, the focus of the video frame is determined based on the characters included in the source video. Exemplarily, in the process of cropping the source video, the focus of the video frame is determined based on at least one character included in the source video. Exemplarily, in the process of cropping the source video, the focus of the video frame is determined based on at least one main character included in the source video. In some embodiments, at least one main character is determined among the characters included in the source video. Exemplarily, at least one main character is determined based on the facial features of at least one character included in the source video.
[0043] Step 230: Play the first video in the second display mode on the terminal screen.
[0044] In some embodiments, after obtaining the first video, the first video is rendered and played in the second display mode on the terminal screen.
[0045] In some embodiments, after the source video is cropped, the image quality of the source video may be compressed, so the first video can be optimized. Exemplarily, before playing the first video, the first video is enhanced in picture and / or color to obtain a processed first video, and the processed first video is played in the second display mode on the terminal screen to ensure the display effect of the first video and improve the user's viewing experience.
[0046] According to the technical solution provided by the embodiment of the present application, after the terminal device obtains the source video, the terminal device crops the source video to adapt to the display mode of the terminal screen. There is no need for the server to store source videos corresponding to different display modes, thereby reducing the computing consumption of the server and reducing the storage resources of the server occupied by the source video, thereby freeing up the storage space of the server.
[0047] Please refer to Figure 3 , which shows a flow chart of a video playback method provided by another embodiment of the present application. The method is executed by a terminal device, and the method includes at least one of the following steps 310 to 350.
[0048] Step 310: Acquire a source video. The source video is displayed on the terminal screen in a first display mode. The first display mode is one of a horizontal screen mode and a vertical screen mode.
[0049] In some embodiments, the terminal device obtains the source video stored by the server. In some embodiments, the terminal device sends a request message to the server, and the request message is used to request to obtain the source video. In some embodiments, after receiving the request message, the server sends the source video to the terminal device.
[0050] Step 320: Determine at least one main character included in the source video.
[0051] In some embodiments, a video usually includes one or more characters, and the video content is developed around the main character. In some embodiments, the characters can be people, or plants, animals, objects, etc. Exemplarily, the characters included in the video are people, such as a video telling a story between people. Exemplarily, the characters included in the video are animals, such as a video introducing bird habits, in which the characters included are birds. Exemplarily, the characters included in the video are objects, such as a video introducing cultural relics, in which the characters included are cultural relics.
[0052] In some embodiments, the main character refers to the character that runs through the main narrative line of the video. For example, when the character is a person, the main character refers to the protagonist in the video. In some embodiments, the main character usually appears more frequently in the video, occupies a higher proportion in the picture, and has higher definition than the secondary character, so the main character in the video can be determined based on the above-mentioned features.
[0053] Next, a method for determining at least one main character included in a source video will be described by taking a case where the character is a person.
[0054] In some embodiments, the above step 320 may include at least one of the following steps 1 to 3.
[0055] Step 1: Detect at least one person included in a source video.
[0056] In some embodiments, the source video usually includes one or more characters. If the source video includes only one character, the character can be determined as the main character of the source video. If the source video includes multiple characters, the main character needs to be determined from the multiple characters.
[0057] In some embodiments, at least one person included in the source video is detected by a person detection algorithm. In some embodiments, the person detection algorithm may be a detection algorithm for identifying a human body. In some embodiments, the person detection algorithm may also be a detection algorithm for identifying a certain part of a human body, such as a detection algorithm for identifying a face, a detection algorithm for identifying a palm, etc. The specific detection algorithm used may be set based on the content of the source video.
[0058] In some embodiments, when acquiring the source video, the terminal device also acquires tag information corresponding to the source video, and the tag information is related to the content of the source video. Exemplarily, the tag information is used to indicate the subject of the source video, and the terminal device determines the character detection algorithm to be adopted based on the tag information. Exemplarily, the tag information can directly indicate the character detection algorithm to be adopted by the terminal device. In some embodiments, if the character is not a character, the tag information can also be used to indicate the character in the source video, and the terminal device determines the detection algorithm to be adopted based on the character indicated in the tag information.
[0059] Step 2: extract facial features of at least one person to obtain a facial feature set, where the facial feature set includes facial features corresponding to each person in the source video.
[0060] In some embodiments, compared to other parts of the human body, the face is easier to distinguish between two characters, so the facial features of the characters can be extracted and the main character can be determined based on the facial features of the characters.
[0061] In some embodiments, facial features of at least one person are extracted by a facial feature extraction algorithm. Exemplarily, facial features of a person are extracted by YOLOv3 (You Only Look Once). Exemplarily, YOLOv3 is an object detection algorithm based on a deep convolutional neural network. First, a high-precision face detection model is obtained by training with face data, for example, WIDER FACE (a face detection benchmark data set) is used for training. The face detection model obtained by training is used to identify faces in the video frame by frame; after determining the position of the face in the picture, the face image at that position is extracted, that is, it contains face information, and the face image is aligned with face key points by using the DAN (Deep Alignment Network) algorithm. The key point rules are used to connect the key points of the chin, lips, and cheeks to obtain a combination of face key points in each frame, and the key point combination of each frame in the video is then assembled to obtain the facial features of the person.
[0062] In some embodiments, the facial features may include at least one of the following: appearance frequency, facial screen ratio, and character clarity. The appearance frequency refers to the frequency of a character appearing in a video frame of a source video, the facial screen ratio refers to the ratio of the character's face to the video frame, and the character clarity refers to the display clarity of the character in the video frame. Usually, the main character is closer to the camera and located in the center of the video frame, which makes the main character occupy a higher screen ratio in the video frame and the clarity is also higher, so the above features can be used to determine the main character.
[0063] Step 3: Determine at least one main role based on the facial features corresponding to at least one character.
[0064] In some embodiments, at least one main character may be determined based on any one of the above-mentioned facial features.
[0065] In some embodiments, when the facial features include appearance frequency, a character whose appearance frequency is greater than a first threshold is determined as at least one main character. In some embodiments, the first threshold is preset. In some embodiments, the appearance frequency is sorted in descending order, and the first N characters are determined as at least one main character, where N is a positive integer. In some embodiments, N is preset.
[0066] In some embodiments, when the facial features include a facial screen ratio, a character whose facial screen ratio is greater than a second threshold is determined as at least one main character. In some embodiments, the second threshold is preset. In some embodiments, the facial screen ratio is sorted in descending order, and the top N characters are determined as at least one main character, where N is a positive integer. In some embodiments, N is preset.
[0067] In some embodiments, when the facial features include character clarity, a character whose character clarity is greater than a third threshold is determined as at least one main character. In some embodiments, the third threshold is preset. In some embodiments, the character clarity is sorted in descending order, and the top N characters are determined as at least one main character, where N is a positive integer. In some embodiments, N is preset.
[0068] In some embodiments, at least one main character may be determined based on any number of the facial features described above. In some embodiments, a character is determined as at least one main character when at least two of the facial features meet a condition.
[0069] In some embodiments, for each character included in the source video, when the corresponding appearance frequency of the character is greater than a first threshold and the facial screen ratio is greater than a second threshold, the character is determined as the main character; when the corresponding appearance frequency of the character is greater than the first threshold and the character clarity is greater than a third threshold, the character is determined as the main character; when the corresponding facial screen ratio of the character is greater than the second threshold and the character clarity is greater than the third threshold, the character is determined as the main character; when the corresponding appearance frequency of the character is greater than the first threshold, the facial screen ratio is greater than the second threshold, and the character clarity is greater than the third threshold, the character is determined as the main character.
[0070] In some embodiments, for each character included in the source video, when the corresponding appearance frequency of the character is in the top N and the facial screen ratio is in the top N, the character is determined as the main character; when the corresponding appearance frequency of the character is in the top N and the character clarity is in the top N, the character is determined as the main character; when the corresponding facial screen ratio of the character is in the top N and the character clarity is in the top N, the character is determined as the main character; when the corresponding appearance frequency of the character is in the top N, the facial screen ratio is in the top N, and the character clarity is in the top N, the character is determined as the main character.
[0071] In some embodiments, the above-mentioned threshold-based judgment method and sorting-based judgment method can be used in combination. Exemplarily, the appearance frequency adopts a sorting-based judgment method, and the facial screen ratio and character clarity adopt a threshold-based judgment method. Exemplarily, for each character included in the source video, if the appearance frequency corresponding to the character is in the top N and the facial screen ratio is greater than the second threshold, the character is determined as the main character; if the appearance frequency corresponding to the character is in the top N and the character clarity is greater than the third threshold, the character is determined as the main character; if the facial screen ratio corresponding to the character is greater than the second threshold and the character clarity is greater than the third threshold, the character is determined as the main character; if the appearance frequency corresponding to the character is in the top N, the facial screen ratio is greater than the second threshold, and the character clarity is greater than the third threshold, the character is determined as the main character.
[0072] In some embodiments, the values of the first threshold, the second threshold, the third threshold and N corresponding to different videos may be the same, for example, uniformly set by the client, or different, for example, determined by the client based on the tag information of the video.
[0073] In some embodiments, the tag information of the source video may be set by the server for the source video, or may be determined by the terminal device based on the relevant information of the source video. Exemplarily, the tag information is determined by the terminal device based on the title of the source video.
[0074] Step 330: For each video frame in the source video, determine the area where at least one main character is located as the focus of the video frame.
[0075] In some embodiments, after determining the main characters, the area where at least one main character is located is determined as the focus of the video frame. In some embodiments, the area where the entire screen occupied by the main characters is located is determined as the focus of the video. In some embodiments, the area where the face of the main character is located is determined as the focus of the video frame. In some embodiments, the size of the focus in different video frames and the characters contained therein may be different. Therefore, after determining the focus of the video frame, a smoothing algorithm can be used to process the focus of the video frame so that the switching of the focus is more continuous and smooth, ensuring the fluency of the video content and improving the user viewing experience.
[0076] Step 340: crop the source video based on the focus of each video frame to obtain a first video.
[0077] In some embodiments, each video frame is cropped based on the focus of each video frame, the cropped video frame includes the focus of the video frame, and the cropped video frames are combined to obtain the first video.
[0078] In some embodiments, the size of the first video is determined based on the size of the terminal screen.
[0079] In some embodiments, obtaining the size of the first video may include at least one of the following steps a to c.
[0080] Step a, obtaining the size of the source video, the size of the terminal screen, and the display mode of the terminal screen, where the display mode is a horizontal screen mode or a vertical screen mode.
[0081] In some embodiments, the size of the terminal screen refers to the size of the display area of the first video on the terminal screen. In some embodiments, if the first video is displayed in full screen on the terminal screen, the size of the terminal screen refers to the full size of the terminal screen; if the first video is displayed in a small window on the terminal screen, the size of the terminal screen refers to the size of the small window.
[0082] Step b: determining the display mode of the terminal screen to be the second display mode.
[0083] Step c: determining a first size based on the size of the terminal screen and the second display mode, where the first size is the size of the first video displayed on the terminal screen.
[0084] In some embodiments, the second display mode affects the aspect ratio of the first size. For example, the aspect ratio in the landscape mode is 4:3, 16:9; the aspect ratio in the portrait mode is 3:4, 9:16.
[0085] In some embodiments, the above step 340 can be implemented as the following step 341.
[0086] Step 341 : cropping a region of a first size from each video frame based on the focus of each video frame to obtain a first video.
[0087] In some embodiments, based on the focus of each video frame, a region of a first size is cropped in each video frame, the cropped video frame includes the focus of the video frame, and the cropped video frames are combined to obtain a first video. In some embodiments, the focus of the video frame is located at the center of the cropped video frame. In some embodiments, the position of the focus of the video frame in the cropped video frame corresponds to the position of the focus of the video frame in the video frame of the source video. Exemplarily, in the cropped video frame, the relative position of the focus of the video frame and the reference object in the background remains unchanged. The reference object can be any object or person in the background retained in the cropped video frame.
[0088] In some embodiments, the cropping method used to crop the source video includes a first cropping method and a second cropping method, the parameters corresponding to the first cropping method are default configurations, and the parameters corresponding to the second cropping method are user-defined settings. In some embodiments, before executing step 340, the terminal device also needs to determine the cropping method. In some embodiments, the cropping method can be determined by the terminal device itself or selected by the user. The parameters corresponding to the cropping method can include at least one of the following: a cropping focus parameter, a cropping size parameter, and a background-related parameter.
[0089] In some embodiments, when the cropping mode is the first cropping mode, the source video is cropped based on the parameters corresponding to the first cropping mode. In some embodiments, the parameters of the first cropping mode are determined by the client based on the size of the terminal screen. In some embodiments, when the cropping mode is the second cropping mode, the source video is cropped based on the parameters corresponding to the second cropping mode. In some embodiments, the parameters corresponding to the second cropping mode are set by the user. In some embodiments, each application of the second cropping mode requires the user to reset the relevant parameters. In some embodiments, the terminal device can store the parameters of the historical second cropping mode, and the user can modify them based on the parameters of the historical second cropping mode to determine the parameters of the second cropping mode.
[0090] In some embodiments, the parameters corresponding to the second cropping method include at least one of the following:
[0091] Cropping focus parameters: Cropping focus parameters are used to determine the focus of the source video and the switching frequency of the focus of the source video. In some embodiments, the cropping focus parameters may include protagonist priority settings, focus switching settings, multi-character focus settings, etc. The protagonist priority setting means that the user chooses to follow a specific character, which is specified by the user. The character may be the main character or not. The focus switching setting refers to the switching frequency of different main characters, so as to dynamically switch the focus of the video frame in the plot. The multi-character focus setting means that it is also allowed to focus on multiple main characters at the same time, so that all characters are included in the picture as much as possible, which is suitable for scenes with multiple people interacting.
[0092] Cropping size parameters: Cropping size parameters are used to determine the framing range in the source video and the display size on the terminal screen. In some embodiments, the cropping size parameters may include framing parameters and screen adaptation ratio settings. Among them, the framing parameters may include close-up, mid-shot, and long-shot, and different framing parameters correspond to different sizes of cropping frames. For example, a close-up means that the focus remains on a close-up of the face, a mid-shot means that the focus remains on a half-body image, and a long-shot means that the focus remains on a full-body image. The screen adaptation ratio setting refers to whether the cropping frame is dynamically modulated to adapt to the aspect ratio of the terminal screen.
[0093] Background related parameters: Background related parameters are used to determine whether to retain the background area in the source video. In some embodiments, background related parameters are used to determine whether to prioritize retaining certain background areas (such as landmarks, background environment) to enhance the overall viewing experience. For example, a user may want to focus not only on the characters when cropping, but also retain some background information.
[0094] Point of interest parameters are used to set the points of interest that the user is interested in. In some embodiments, in some specific content scenes, the user can set the points of interest that the user is interested in, such as animals, specific items or events, etc., and the scene segmentation is automatically performed during cropping to include these points of interest as much as possible.
[0095] Step 350: Play the first video in the second display mode on the terminal screen.
[0096] In some embodiments, after the source video is cropped, the quality of the video frame will be affected, so before playing, the first video needs to be optimized to improve the display effect of the first video. In some embodiments, before displaying the first video, at least one of picture enhancement and color enhancement is performed on the first video to obtain a processed first video, and the processed first video is used to display on the terminal screen in the second display mode.
[0097] In some embodiments, the video frames may be enhanced by super-resolution or by sharpening. In some embodiments, the video frames may be classified, and different categories of video frames may be enhanced by different methods.
[0098] In some embodiments, the video frames in the first video are classified to obtain a first type of video frames and a second type of video frames, wherein the first type of video frames are video frames containing people, and the second type of video frames are video frames that do not contain people; the first type of video frames are enhanced by sharpening; and the second type of video frames are enhanced by super-resolution. In some embodiments, since the use of super-resolution to enhance the picture will cause the face of the person to deform, affecting the user's viewing experience, the sharpening method is used to enhance the picture of the video frames containing people.
[0099] In some embodiments, color enhancement is performed on the video frame through a VAE (Variational Autoencoder) model. VAE is a deep learning model that is closely integrated with the concept of Bayesian networks. The core feature of VAE is that it does not directly map the input to a fixed vector, but maps the input to a probability distribution. This method enables VAE to not only reconstruct data, but also generate new data similar to the input data. By inputting the video frame of the first video into the VAE model, a color-enhanced video frame can be obtained.
[0100] The technical solution provided by the embodiment of the present application is that after the terminal device obtains the source video, the video frame can be cropped based on the focus of the video frame to obtain the first video, which can adapt to the display mode of the terminal screen, and the server does not need to store the source videos corresponding to different display modes, thereby reducing the computing consumption of the server and reducing the storage resources of the server occupied by the source video, thereby freeing up the storage space of the server. The main characters in the video are tracked and cropped, and the first video obtained is more coherent in plot.
[0101] Please refer to Figure 4 , which shows a schematic diagram of a video playback method provided by an embodiment of the present application. The key contents of the method will be exemplified in the following embodiments.
[0102] 1. Single / multiple character determination: The number of characters and facial information are extracted through character detection algorithms and facial feature extraction algorithms, and the facial features of the protagonist (main character) are located (based on the frequency of character appearances in each frame, the proportion of the facial area in the screen, the clarity of the character, etc.).
[0103] (1) The protagonist’s judgment
[0104] 1. Frequency of appearance: Through character detection and facial feature extraction, character recognition is performed on each frame, and the number of times each character appears is recorded. If the frequency of appearance of a character is significantly higher than that of others, it can be determined that the character is the main character.
[0105] 2. Face area proportion: Analyze the proportion of the character's face area in each frame. If a character's face area accounts for a larger proportion in most frames, it may be the main character. The area proportion can avoid misjudgment based solely on the number of appearances, especially in relatively short shots.
[0106] 3. Character clarity: For the protagonist, his face is usually clearer in the picture. The resolution and clarity of facial features can be detected to filter out some blurred or distant facial information.
[0107] 4. Uniqueness of facial features: Facial feature extraction can help distinguish different characters by extracting the geometric shape or relative position of key features such as eyes, nose, mouth, etc. Based on feature similarity, cluster analysis of these facial features can group the same characters into one category.
[0108] (2) Determination of single or multiple protagonists:
[0109] In a multi-protagonist scene, two or more characters will appear with similar frequency, and both have high definition and facial area ratio. For example:
[0110] Dual protagonists: Two faces frequently appear in the same scene, and their features are prominent in each frame, so they can be identified as dual protagonists.
[0111] Group portrait protagonists: Multiple characters appear frequently and the number of times they appear is not much different from each other. After facial feature extraction, it is found that they all have high clarity and screen share.
[0112] 2. Single character intelligent cropping: After selecting the facial features of a single protagonist, focus tracking is performed on each frame based on the features. The frame including the protagonist is calculated.
[0113] In some embodiments, focus tracking may include the following steps:
[0114] 1. Facial feature location and labeling: In each frame, a facial detection algorithm (e.g., key point-based facial feature location) is used to accurately identify the facial position of the subject and label its bounding box (cropping box).
[0115] 2. Tracking algorithm: Use tracking algorithms (such as KLT feature point tracking, optical flow tracking or deep learning methods such as MOT, multi-object tracking) to maintain the continuity of the protagonist's face in the video sequence. Focus tracking will maintain the continuity of the protagonist between frames, even if the character has a slight displacement or rotation.
[0116] 3. Dynamic adjustment of the focus frame: Dynamically adjust the size and position of the focus frame according to the movement of the protagonist, so that the focus frame always maintains an appropriate size to avoid cropping too much background or over-magnification.
[0117] 4. Smooth cropping frame: Use time smoothing algorithm to make the cropping frame transition smoothly during movement to avoid screen jitter. Smooth cropping frame is more in line with the audience's visual comfort.
[0118] In a multi-protagonist scene, cropping becomes more difficult because you need to focus on the facial features and positions of multiple protagonists. Specific cropping solutions may include:
[0119] 1. Dynamic Adaptation Frame: The cropping frame needs to be expanded to include all the main characters, and try to maintain visual balance so that all the protagonists can be better included in the picture.
[0120] 2. Focus Switching: In some scenes, you can choose “Focus Switching”, which means dynamically switching the cropping focus from one protagonist to another according to the progress of the plot.
[0121] Different operations for switching between horizontal and vertical screen modes
[0122] 1. Switch from landscape mode to portrait mode: When cropping, we usually focus on the center of the protagonist's face, and retain key information by scaling and appropriately cropping the left and right boundaries.
[0123] 2. Switch from portrait mode to landscape mode: When cropping, you can increase the left and right borders so that the protagonist is still centered in the picture, and consider appropriate filling of the scene background to maintain the visual balance of the overall picture.
[0124] 3. Intelligent cropping of multiple characters: Similar to the second step above, each frame needs to include as many protagonists as possible.
[0125] 4. Personalized intelligent cropping: Users can actively set the cropping method and store it on the server. If set, cropping can be performed based on historical cropping data.
[0126] In personalized intelligent cutting, users can customize cutting parameters according to their needs so that the automated system can provide personalized cutting effects based on these preference history data. Common personalized cutting parameters include:
[0127] (1) Cropping focus
[0128] 1. Protagonist priority: Choose to mainly follow a specific protagonist, suitable for users who have clear viewing preferences.
[0129] 2. Focus switching: Set the switching frequency of different protagonists to dynamically change the cropping focus during the plot.
[0130] 3. Multi-character focus: allows you to focus on multiple protagonists at the same time, so that the picture can include all characters as much as possible, suitable for multi-person interactive scenes.
[0131] (2) Cropping frame size
[0132] 1. Close shot / Mid shot / Long shot: The size of the cropping frame can be preset to decide whether to keep the focus on the face close-up (close shot), half body (medium shot) or full body (long shot).
[0133] 2. Adapt to screen ratio: Whether the cropping frame is dynamically adjusted to adapt to the aspect ratio of the screen, such as 1:1, 4:3, 16:9, etc.
[0134] (3) Situational judgment and context retention
[0135] Whether to prioritize retaining certain background areas (such as landmarks and background environments) to improve the overall viewing experience. For example, the user may want to focus not only on the person but also retain some background information when cropping.
[0136] (4) Content interest point setting
[0137] In some specific content scenes, users can set points of interest, such as animals, specific objects or events, etc., and the scene will be automatically segmented during cropping to try to include these points of interest.
[0138] 5. Image enhancement: Use sharpening for video frames containing people (super-resolution will cause screen flickering), and use super-resolution for video frames that do not contain people.
[0139] Using super-resolution to perform image enhancement on video frames containing people will cause facial problems, resulting in the enhanced people not looking like the real person and with significant changes in facial features, affecting the user's viewing experience.
[0140] 6. VAE color enhancement: Improve the picture color through the VAE model.
[0141] The embodiment of the present application proposes a horizontal and vertical screen switching intelligent player. The video is played directly on the client, and the horizontal and vertical screens are automatically switched according to the screen information and the video picture. Since cropping will reduce the image quality, the image quality is enhanced before rendering.
[0142] In some embodiments, the technical solutions provided in the embodiments of the present application can also be applied to pictures. Figure 5 , which shows a flow chart of a method for displaying an image provided by an embodiment of the present application. The method is executed by a terminal device, and the method may include at least one of the following steps 510 to 530.
[0143] Step 210, obtaining a source image, the source image is displayed on the terminal screen in a first display mode, the first display mode being one of a horizontal screen mode and a vertical screen mode.
[0144] In some embodiments, the source image refers to the source file of the image. In some embodiments, the source image is stored in a server. In some embodiments, obtaining the source image refers to the terminal device obtaining the source image from the server. In some embodiments, the terminal device receives the source image sent by the server.
[0145] In some embodiments, the source image may also be stored locally on the terminal device. In some embodiments, obtaining the source image refers to obtaining the source image from a storage space of the terminal device. In some embodiments, the terminal device determines a storage address corresponding to the source image in the local storage space.
[0146] In some embodiments, the source image is displayed in the first display mode on the terminal screen, that is, after rendering the source image, the source image is displayed in the first display mode on the terminal screen. Exemplarily, the first display mode is a horizontal screen mode, and the source image is displayed in the horizontal screen mode on the terminal screen. Exemplarily, the first display mode is a vertical screen mode, and the source image is displayed in the vertical screen mode on the terminal screen.
[0147] In some embodiments, the source image may be displayed in full screen on the terminal screen in the first display mode, or may be displayed in a small window on the terminal screen in the first display mode. In some embodiments, the aspect ratio corresponding to the full screen display and the aspect ratio corresponding to the small window display may be the same or different. In some embodiments, the sizes of the terminal screens of different terminal devices may be different, and the aspect ratios corresponding to the display on different terminal devices may also be different.
[0148] In some embodiments, the source image is fixed in format. The format of the source image may include a display mode corresponding to the source image, an aspect ratio corresponding to the source image, and a picture frame size of the source image. In some embodiments, after receiving the source image, if the terminal device wants to adapt the source image to the terminal screen (for example, align the display mode, adapt the aspect ratio, adapt the size, etc.), it is necessary to crop the source image to obtain a first image adapted to the terminal screen. In the embodiment of the present application, the cropping of the source image is described by taking the display mode of the source image being different from the display mode corresponding to the terminal screen as an example.
[0149] Step 220 , cropping the source image to obtain the first image displayed in a second display mode, where the second display mode is another one of the horizontal mode and the vertical mode that is different from the first display mode.
[0150] In some embodiments, the first display mode is different from the second display mode. Exemplarily, the first display mode is a landscape mode, and the second display mode is a portrait mode. Exemplarily, the first display mode is a portrait mode, and the second display mode is a landscape mode.
[0151] Exemplarily, the first display mode is a landscape mode, and the second display mode is a portrait mode. The first image obtained after cropping may have different contents than those contained in the source image. Exemplarily, the background contents on both sides of the source image are cropped and discarded, and only the area where the characters are located is retained in the first image. Exemplarily, the first display mode is a portrait mode, and the second display mode is a landscape mode. The first image obtained after cropping may have different contents than those contained in the source image. Exemplarily, the background contents on both sides of the source image are cropped and discarded, and only the area where the characters are located is retained in the first image.
[0152] In some embodiments, in the process of cropping the source picture, the focus is determined based on the characters included in the source picture. Exemplarily, in the process of cropping the source picture, the focus is determined based on at least one character included in the source picture. Exemplarily, in the process of cropping the source picture, the focus is determined based on at least one main character included in the source picture. In some embodiments, at least one main character is determined among the characters included in the source picture. Exemplarily, at least one main character is determined based on the facial features of at least one character included in the source picture.
[0153] Step 230: Display the first image in the second display mode on the terminal screen.
[0154] In some embodiments, after obtaining the first image, the first image is rendered, and the first image is displayed in the second display mode on the terminal screen.
[0155] In some embodiments, after the source image is cropped, the image quality of the source image may be compressed, so the first image may be optimized. Exemplarily, before the first image is displayed, the first image is enhanced in picture and / or color to obtain a processed first image, and the processed first image is displayed in the second display mode on the terminal screen to ensure the display effect of the first image and improve the user's viewing experience.
[0156] According to the technical solution provided by the embodiment of the present application, after the terminal device obtains the source image, the terminal device crops the source image to adapt to the display mode of the terminal screen. There is no need for the server to store source images corresponding to different display modes, thereby reducing the computing consumption of the server and reducing the storage resources of the server occupied by the source image, thereby freeing up the storage space of the server.
[0157] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0158] Please refer to Figure 6, which shows a block diagram of a video playback device provided by an embodiment of the present application. The device has the function of implementing the above method example, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the first terminal device introduced above, or it can be set in the first terminal device. Figure 6 As shown, the device 600 may include: an acquisition module 610 , a cropping module 620 and a playing module 630 .
[0159] The acquisition module 610 is used to acquire a source video, where the source video is displayed in a first display mode on a terminal screen, where the first display mode is one of a horizontal screen mode and a vertical screen mode.
[0160] The cropping mode 620 is used to crop the source video to obtain the first video displayed in a second display mode, where the second display mode is another one of the horizontal screen mode and the vertical screen mode that is different from the first display mode.
[0161] The playing module 630 is used to play the first video in the second display mode on the terminal screen.
[0162] In some embodiments, the cropping module 620 is used to determine at least one main character included in the source video; for each video frame in the source video, determine the area where the at least one main character is located as the focus of the video frame; and crop the source video based on the focus of each of the video frames to obtain the first video.
[0163] In some embodiments, the cropping module 620 is used to detect at least one person included in the source video; extract facial features of the at least one person to obtain a facial feature set, wherein the facial feature set includes facial features corresponding to each person in the source video; and determine the at least one main character based on the facial features corresponding to the at least one person.
[0164] In some embodiments, the cropping module 620 is used to, when the facial features include appearance frequency, determine a character whose appearance frequency is greater than a first threshold as the at least one main character; when the facial features include facial screen ratio, determine a character whose facial screen ratio is greater than a second threshold as the at least one main character; when the facial features include character clarity, determine a character whose character clarity is greater than a third threshold as the at least one main character.
[0165] In some embodiments, the acquisition module 610 is further used to acquire the size of the source video, the size of the terminal screen, and the display mode of the terminal screen, where the display mode is a horizontal screen mode or a vertical screen mode; determine the display mode of the terminal screen as the second display mode; determine a first size based on the size of the terminal screen and the second display mode, where the first size is the size of the first video displayed on the terminal screen;
[0166] The cropping module 620 is further configured to crop a region of the first size from each of the video frames based on a focus of each of the video frames to obtain the first video.
[0167] In some embodiments, the apparatus 600 further includes a determination module (not shown).
[0168] The determining module is used to determine a cropping mode, wherein the cropping mode includes a first cropping mode and a second cropping mode, wherein parameters corresponding to the first cropping mode are default configurations, and parameters corresponding to the second cropping mode are user-defined settings;
[0169] The cropping module 620 is further configured to crop the source video based on parameters corresponding to the first cropping method when the cropping method is the first cropping method; and to crop the source video based on parameters corresponding to the second cropping method when the cropping method is the second cropping method.
[0170] In some embodiments, the parameters corresponding to the second cropping method include at least one of the following:
[0171] A cropping focus parameter, wherein the cropping focus parameter is used to determine the focus of the source video and the switching frequency of the focus of the source video;
[0172] A cropping size parameter, wherein the cropping size parameter is used to determine a framing range in the source video and a display size on the terminal screen;
[0173] Background related parameters, the background related parameters are used to determine whether to retain the background area in the source video;
[0174] Point of interest parameters, where the point of interest parameters are used to set the points of interest that the user is interested in.
[0175] In some embodiments, the device 600 further includes an enhancement module (not shown).
[0176] The enhancement module is used to perform at least one of picture enhancement and color enhancement on the first video to obtain a processed first video, and the processed first video is used to be displayed on the terminal screen in the second display mode.
[0177] In some embodiments, the enhancement module is used to classify the video frames in the first video to obtain a first category of video frames and a second category of video frames, wherein the first category of video frames are video frames containing characters, and the second category of video frames are video frames that do not contain characters; the first category of video frames are enhanced by sharpening; and the second category of video frames are enhanced by super-resolution.
[0178] According to the technical solution provided by the embodiment of the present application, after the terminal device obtains the source video, the terminal device crops the source video to adapt to the display mode of the terminal screen. There is no need for the server to store source videos corresponding to different display modes, thereby reducing the computing consumption of the server and reducing the storage resources of the server occupied by the source video, thereby freeing up the storage space of the server.
[0179] It should be noted that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In practical applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0180] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0181] Please refer to Figure 7 , which shows a block diagram of a terminal 700 provided in one embodiment of the present application. The terminal 700 may be an electronic device such as a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia playback device, a wearable device, a PC, etc. The terminal is used to implement the video playback method provided in the above embodiment. The terminal may be Figure 1 The terminal 10 shown. Specifically:
[0182] Typically, the terminal 700 includes a processor 701 and a memory 702 .
[0183] The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 701 may also include an AI processor, which is used to process computing operations related to machine learning.
[0184] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is configured to be executed by one or more processors to implement the above-mentioned virtual object control method.
[0185] In some embodiments, the terminal 700 may further optionally include: a peripheral device interface 703 and at least one peripheral device. The processor 701, the memory 702 and the peripheral device interface 703 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 703 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 704, a display screen 705, a camera 706, an audio circuit 707, a positioning component 708 and a power supply 709.
[0186] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the terminal 700, and the terminal 700 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0187] For details not described in detail in this embodiment, please refer to the above embodiments, which will not be described in detail here.
[0188] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a processor of a terminal device to implement the above-mentioned video playback method.
[0189] Optionally, the computer readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives) or optical disks, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0190] An embodiment of the present application also provides a computer program product, which includes computer instructions. The computer instructions are stored in a computer-readable storage medium. The processor of the terminal device reads and executes the computer instructions from the computer-readable storage medium to implement the above-mentioned video playback method.
[0191] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between two items, or an association relationship between the two items, or a relationship between indication and being indicated, configuration and being configured, and the like.
[0192] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0193] In addition, the step numbers described in this document only illustrate a possible execution order between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to that shown in the figure. The embodiments of the present application are not limited to this.
[0194] In addition, the embodiments provided herein may be arbitrarily combined to form new embodiments, which are all within the scope of protection of the present application.
[0195] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0196] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A video playback method, characterized in that: The method comprises: Acquire a source video, where the source video is displayed on a terminal screen in a first display mode, where the first display mode is one of a horizontal screen mode and a vertical screen mode; Cropping the source video to obtain the first video displayed in a second display mode, where the second display mode is another one of the horizontal screen mode and the vertical screen mode that is different from the first display mode; The first video is played in the second display mode on the terminal screen.
2. The method according to claim 1, characterized in that The step of cropping the source video to obtain a first video displayed in a second display mode includes: Determining at least one main character included in the source video; For each video frame in the source video, determining the area where the at least one main character is located as the focus of the video frame; The source video is cropped based on the focus of each of the video frames to obtain the first video.
3. The method according to claim 2, characterized in that The determining of at least one main character included in the source video comprises: Detecting at least one person included in the source video; Extracting facial features of the at least one person to obtain a facial feature set, wherein the facial feature set includes facial features corresponding to each person in the source video; The at least one main role is determined based on the facial features respectively corresponding to the at least one character.
4. The method according to claim 3, characterized in that The determining the at least one main role based on the facial features respectively corresponding to the at least one character comprises: In the case where the facial feature includes appearance frequency, determining a character whose appearance frequency is greater than a first threshold as the at least one main character; In a case where the facial feature includes a facial screen ratio, determining a character whose facial screen ratio is greater than a second threshold as the at least one main character; In a case where the facial feature includes character clarity, a character whose character clarity is greater than a third threshold is determined as the at least one main character.
5. The method according to claim 2, characterized in that: The method further comprises: Acquire the size of the source video, the size of the terminal screen, and the display mode of the terminal screen, where the display mode is a horizontal screen mode or a vertical screen mode; Determining the display mode of the terminal screen as the second display mode; Determine a first size based on the size of the terminal screen and the second display mode, where the first size is the size of the first video displayed on the terminal screen; The step of cropping the source video based on the focus of each of the video frames to obtain the first video includes: The first video is obtained by cropping a region of the first size from each of the video frames based on a focus of each of the video frames.
6. The method according to claim 2, characterized in that The method further comprises: Determine a cropping method, wherein the cropping method includes a first cropping method and a second cropping method, wherein parameters corresponding to the first cropping method are default configurations, and parameters corresponding to the second cropping method are user-defined settings; The step of cropping the source video comprises: When the cropping method is the first cropping method, cropping the source video based on parameters corresponding to the first cropping method; When the cropping method is the second cropping method, the source video is cropped based on parameters corresponding to the second cropping method.
7. The method according to claim 6, characterized in that The parameters corresponding to the second cropping method include at least one of the following: A cropping focus parameter, wherein the cropping focus parameter is used to determine the focus of the source video and the switching frequency of the focus of the source video; A cropping size parameter, wherein the cropping size parameter is used to determine a framing range in the source video and a display size on the terminal screen; Background related parameters, the background related parameters are used to determine whether to retain the background area in the source video; Point of interest parameters, where the point of interest parameters are used to set the points of interest that the user is interested in.
8. The method according to claim 1, characterized in that: Before playing the first video, the method further includes: At least one of picture enhancement and color enhancement is performed on the first video to obtain a processed first video, and the processed first video is used to be displayed on the terminal screen in the second display mode.
9. The method according to claim 8, characterized in that Performing picture enhancement on the first video includes: Classify the video frames in the first video to obtain first-category video frames and second-category video frames, wherein the first-category video frames are video frames containing people, and the second-category video frames are video frames not containing people; Performing picture enhancement on the first type of video frames by sharpening; The second type of video frames are subjected to picture enhancement by adopting a super-resolution method.
10. A video playback device, characterized in that: The device comprises: An acquisition module, used for acquiring a source video, wherein the source video is displayed in a first display mode on a terminal screen, wherein the first display mode is one of a horizontal screen mode and a vertical screen mode; a cropping mode, used for cropping the source video to obtain the first video displayed in a second display mode, where the second display mode is another one of the horizontal mode and the vertical mode that is different from the first display mode; A playing module is used to play the first video in the second display mode on the terminal screen.
11. A terminal device, characterized in that: The terminal device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the video playback method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement the video playback method according to any one of claims 1 to 9.
13. A computer program product, characterized in that The computer program product comprises a computer program, and the computer program is loaded and executed by a processor to implement the video playback method according to any one of claims 1 to 9.