CN113918766B - Video thumbnail display method, apparatus and storage medium - Google Patents

Video thumbnail display method, apparatus and storage medium Download PDF

Info

Publication number
CN113918766B
CN113918766B CN202111022205.6A CN202111022205A CN113918766B CN 113918766 B CN113918766 B CN 113918766B CN 202111022205 A CN202111022205 A CN 202111022205A CN 113918766 B CN113918766 B CN 113918766B
Authority
CN
China
Prior art keywords
video
movie
display
thumbnail
width
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111022205.6A
Other languages
Chinese (zh)
Other versions
CN113918766A (en
Inventor
暴文莹
马捷
胡雅君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311287273.4A priority Critical patent/CN117609547A/en
Publication of CN113918766A publication Critical patent/CN113918766A/en
Priority to PCT/CN2022/093046 priority patent/WO2023016015A1/en
Application granted granted Critical
Publication of CN113918766B publication Critical patent/CN113918766B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/738Presentation of query results
    • G06F16/739Presentation of query results in form of a video summary, e.g. the video summary being a video sequence, a composite still image or having synthesized frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Abstract

The application provides a display method, a device and a storage medium of video thumbnail, which are applied to electronic equipment, wherein the display method comprises the following steps: shooting a first video with a first aspect ratio by a camera when the electronic equipment is in a vertical screen; displaying a first thumbnail corresponding to the first video in the album, wherein the aspect ratio of the first thumbnail is consistent with the first aspect ratio; shooting a second video with a second aspect ratio by a camera when the electronic device is in a horizontal screen; and displaying a second thumbnail corresponding to the second video in the album, wherein the first thumbnail and the second thumbnail are displayed on the same row, and the aspect ratio of the second thumbnail is inconsistent with the second aspect ratio. According to the method and the device, the thumbnail with the consistent aspect ratio with the video is displayed, so that the thumbnail can completely present the content in the video, and the use experience of a user when browsing the video in the album is improved.

Description

Video thumbnail display method, apparatus and storage medium
The present application claims priority from chinese patent application No. 202110925581.X entitled "method, apparatus and storage media for displaying video thumbnail", filed on day 8 and 12 of 2021, the entire contents of which are incorporated herein by reference.
Technical Field
The present application relates to the field of image display technologies, and in particular, to a method, an apparatus, and a storage medium for displaying video thumbnails.
Background
The electronic device may display a video browsing interface containing thumbnails of videos on a display screen in response to a user operation. And the user views the videos on the electronic equipment through the video browsing interface and previews the content of each video through the thumbnail.
Currently, the size of a video thumbnail generally has a fixed ratio, and it is common that the ratio of the width to the height of a video thumbnail is fixed to 1:1. while the size of the image in the video may be of various scales, such as 16:9,21: 9, etc. However, the size ratio of the video thumbnail and the size ratio of the image in the video are too large, which results in that the thumbnail cannot completely present the content of the image in the video, and the user experience is poor.
Disclosure of Invention
The application provides a method, equipment and storage medium for displaying video thumbnails, and aims to enable the thumbnails of movie videos in a video browsing interface to completely display the contents of images in the movie videos and improve user experience.
In order to achieve the above object, the present application provides the following technical solutions:
The first aspect of the present application provides a method for displaying a video thumbnail, applied to an electronic device, the method comprising:
when the electronic equipment is in a vertical screen, a first video is obtained through shooting by a camera, and the first video has a first aspect ratio;
displaying a first thumbnail corresponding to the first video in the album, wherein the aspect ratio of the first thumbnail is consistent with the first aspect ratio;
when the electronic equipment is positioned on the horizontal screen, a second video is obtained through shooting by a camera, and the second video has a second aspect ratio;
and displaying a second thumbnail corresponding to the second video in the album, wherein the first thumbnail and the second thumbnail are displayed on the same row, and the aspect ratio of the second thumbnail is inconsistent with the second aspect ratio.
Illustratively, the first video may be denoted as movie 1, the second video may be denoted as movie 2, and the first aspect ratio may be 9:21, the second aspect ratio may be 21:9.
in some optional embodiments, before displaying the second thumbnail corresponding to the second video in the album, the method further includes:
reading video information of a first video;
determining the direction of the first video as a vertical screen according to the video information of the first video;
reading video information of the second video;
determining the direction of the second video as a horizontal screen according to the video information of the second video;
And determining that the first thumbnail and the second thumbnail corresponding to the second video are displayed on the same row.
For example, the video information of the first video and the video information of the second video may be stored in a media database and synchronized by the gallery from the media database to the database of the gallery itself.
In some alternative embodiments, further comprising:
when the electronic equipment is positioned on the horizontal screen, shooting by a camera to obtain a third video, wherein the third video has a third aspect ratio;
and displaying a third thumbnail corresponding to the third video in the album, wherein the third thumbnail is displayed in a row different from the second thumbnail, and the aspect ratio of the third thumbnail is consistent with the third aspect ratio.
Illustratively, the third video may be denoted movie 5 and the third aspect ratio may be 21:9.
in some optional embodiments, before displaying the third thumbnail corresponding to the third video in the album, the method further includes:
reading video information of the third video;
determining the direction of the third video as a horizontal screen according to the video information of the third video;
and determining that a third thumbnail corresponding to the third video is displayed on a different line from the second thumbnail.
In some alternative embodiments, further comprising:
when the electronic equipment is in a vertical screen, a fourth video is obtained through shooting by a camera, and the fourth video has a fourth aspect ratio;
And displaying a fourth thumbnail corresponding to the fourth video in the album, wherein the fourth thumbnail is displayed in a row different from the third thumbnail, and the aspect ratio of the fourth thumbnail is consistent with the fourth aspect ratio.
In some alternative embodiments, further comprising:
when the electronic equipment is in a vertical screen, a fifth video is shot by a camera, and the fifth video has a fifth aspect ratio;
and displaying a fifth thumbnail corresponding to the fifth video in the album, wherein the fifth thumbnail and the fourth thumbnail are displayed on the same row, and the aspect ratio of the fifth thumbnail is consistent with the fifth aspect ratio.
Illustratively, in the above embodiment, the fourth video may be movie 3, the fifth video may be movie 4, and the fourth aspect ratio and the fifth aspect ratio may each be 9:21.
in some optional embodiments, before displaying the fifth thumbnail corresponding to the fifth video in the album, the method further includes:
reading video information of a fourth video;
determining the direction of the fourth video as a vertical screen according to the video information of the fourth video;
reading video information of a fifth video;
determining the direction of the fifth video as a vertical screen according to the video information of the fifth video;
and determining that the fourth thumbnail and the fifth thumbnail corresponding to the fifth video are displayed on the same row.
In some alternative embodiments, further comprising:
when the electronic equipment is in a vertical screen, a sixth video is obtained through shooting by a camera, and the sixth video has a sixth aspect ratio;
and displaying a sixth thumbnail corresponding to the fifth video in the album, wherein the sixth thumbnail and the fifth thumbnail are displayed on the same row, and the aspect ratio of the sixth thumbnail is consistent with the sixth aspect ratio.
Illustratively, in the above embodiment, the fourth video may be movie 3, the fifth video may be movie 4, and the fourth aspect ratio and the fifth aspect ratio may each be 9:21.
in some optional embodiments, before displaying the sixth thumbnail corresponding to the fifth video in the album, the method further includes:
reading video information of a sixth video;
determining the direction of the sixth video as a vertical screen according to the video information of the sixth video;
and determining that the fourth thumbnail, the fifth thumbnail and a sixth thumbnail corresponding to the sixth video are displayed on the same row.
Illustratively, in the above embodiment, the fourth video may be movie 6, the fifth video may be movie 7, the sixth video may be movie 8, the fourth aspect ratio, and the fifth aspect ratio and the sixth aspect ratio may each be 9:21.
in some alternative embodiments, after capturing the first video by the camera, the method further includes:
And adding a movie tag into the first video, wherein the movie tag is used for indicating the first video to be a video shot in a preset movie mode.
In some optional embodiments, before displaying the first thumbnail corresponding to the first video in the album, the method further includes:
calculating to obtain the display height of the first video according to the width of the video display area on the display screen and a preset reference coefficient;
calculating to obtain the display width of the first video according to the display height and the first aspect ratio of the first video;
and obtaining a first thumbnail corresponding to the first video based on the display height of the first video and the display width of the first video.
In some optional embodiments, before displaying the second thumbnail corresponding to the second video in the album, the method further includes:
determining a display height of the first video as a display height of the second video;
calculating to obtain the display width of the second video according to the width of the video display area on the display screen and the display width of the first video;
and obtaining a second thumbnail corresponding to the second video based on the display height of the second video and the display width of the second video.
In some optional embodiments, before displaying the third thumbnail corresponding to the third video in the album, the method further includes:
Determining the width of a video display area on the display screen as the display width of the third video;
calculating to obtain the display height of the third video according to the display width and the third aspect ratio of the third video;
and obtaining a third thumbnail corresponding to the third video based on the display width of the third video and the display height of the third video.
In some optional embodiments, before displaying the fifth thumbnail corresponding to the fifth video in the album, the method further includes:
calculating the width and the total aspect ratio of a video display area on a display screen to obtain the display height of a fifth video according to a preset video layout interval, wherein the total aspect ratio is the sum of the fourth aspect ratio and the fifth aspect ratio;
calculating to obtain the display width of the fifth video according to the display height of the fifth video and the aspect ratio of the fifth video;
and obtaining a fifth thumbnail corresponding to the fifth video based on the display height of the fifth video and the display width of the fifth video.
In some optional embodiments, obtaining the first thumbnail corresponding to the first video based on the display height of the first video and the display width of the first video includes:
analyzing a first video to obtain a frame of image;
and reducing the analyzed image to obtain a first thumbnail corresponding to the first video, wherein the height of the first thumbnail is the display height of the first video, and the width of the first thumbnail is the display width of the first video.
In some optional embodiments, obtaining the second thumbnail corresponding to the second video based on the display height of the second video and the display width of the second video includes:
analyzing the second video to obtain a frame of image;
reducing the image obtained by analysis to obtain a reduced image, wherein the height of the reduced image is consistent with the display height of the second video;
and cutting the reduced image in the middle along the width direction to obtain a second thumbnail corresponding to the second video, wherein the width of the second thumbnail is consistent with the display width of the second video.
The second aspect of the present application also provides an electronic device, including: one or more processors, memory, and cameras;
the memory is used for storing one or more programs;
the one or more processors are configured to execute the one or more programs, so that the electronic device performs the method for displaying video thumbnails provided in any one of the first aspects of the present application.
The third aspect of the present application also provides a computer storage medium storing a computer program, which is specifically configured to implement the method for displaying video thumbnail provided in any one of the first aspects of the present application when the computer program is executed.
The application provides a display method, a device and a storage medium of video thumbnail, which are applied to electronic equipment, wherein the display method comprises the following steps: shooting a first video with a first aspect ratio by a camera when the electronic equipment is in a vertical screen; displaying a first thumbnail corresponding to the first video in the album, wherein the aspect ratio of the first thumbnail is consistent with the first aspect ratio; shooting a second video with a second aspect ratio by a camera when the electronic device is in a horizontal screen; and displaying a second thumbnail corresponding to the second video in the album, wherein the first thumbnail and the second thumbnail are displayed on the same row, and the aspect ratio of the second thumbnail is inconsistent with the second aspect ratio. According to the method and the device, the thumbnail with the consistent aspect ratio with the video is displayed, so that the thumbnail can completely present the content in the video, and the use experience of a user when browsing the video in the album is improved.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a video browsing interface according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a main interface of an electronic device according to an embodiment of the present application;
Fig. 4 to 9 are schematic diagrams of a movie video browsing interface according to an embodiment of the present application;
fig. 10 is a schematic diagram of a software architecture of an electronic device according to an embodiment of the present application;
FIG. 11 is a flowchart of a method for displaying video thumbnails according to an embodiment of the present application;
FIG. 12 is a flow chart of dividing a movie video into lines according to a horizontal screen rule according to an embodiment of the present application;
fig. 13 is a flowchart of a method for grouping movie videos according to a vertical screen rule according to an embodiment of the present application.
Detailed Description
The terms first, second, third and the like in the description and in the claims and in the drawings are used for distinguishing between different objects and not for limiting the specified order.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
For ease of understanding, the terms referred to in the embodiments of the present application are described herein:
1) Film mode: refers to a mode in which the electronic device records video. In the embodiment of the application, the film mode comprises a 4K high-dynamic range (HDR) function and a look-up table (LUT) function, and when a user selects the film mode to record video, the recorded video can have the texture of a film, so that the picture is more stereoscopic. For convenience of distinction, videos recorded by an electronic device in a movie mode are referred to as movie videos, and videos recorded by an electronic device in a non-movie mode are referred to as non-movie videos. Generally, if the electronic device is in the landscape orientation when recording a movie video, the aspect ratio of the movie video may be 21:9, the direction of the movie video with the width being larger than the height is a horizontal screen, if the electronic device is in the vertical screen direction when the movie video is recorded, the aspect ratio of the movie video can be 9:21, the direction of the movie video with the height larger than the width is vertical screen.
2) 4K HDR: the HDR technology is added on the basis of 4K resolution, so that photographed pictures can show more real effects and are more similar to real pictures visible to human eyes. In some embodiments, the bright portions of the picture taken with the 4K HDR functionality are not overexposed and the dark portion details are clearly visible.
3) LUT: which may also be referred to as LUT files or LUT parameters, is a color conversion template, such as a mapping table of Red Green Blue (RGB). The LUT can change the gray value of the pixel actually sampled into another gray value corresponding to the gray value through certain conversion (such as threshold value, inversion, contrast adjustment, linear conversion and the like), so that the LUT can play a role in highlighting the useful information of the image and enhancing the optical contrast of the image.
Referring to fig. 1, an electronic device 100 may include: processor 110, internal memory (also referred to as "memory") 120, external memory 121, sensor module 130, camera 140, display 150, and the like. Wherein the sensor module 130 may include a gyro sensor 130A or the like.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
Internal memory 120, which may also be referred to as "memory," may be used to store computer-executable program code, including instructions. The internal memory 120 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 120 may include a high-speed random access memory, and may also include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 120 and/or instructions stored in a memory provided in the processor.
External memory 121 is typically referred to as external memory, which in embodiments of the present application refers to storage other than memory of an electronic device and a cache of a processor, which is typically non-volatile memory. Common external memories include hard disks, floppy disks, compact disks, U disks, micro SD cards, etc. for implementing the memory capabilities of the expansion electronic device 100. The external memory may communicate with the processor 110 through an external memory interface or bus to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory.
The sensor module 130 may include a gyro sensor 130A in particular. The gyro sensor 130A may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 130A. The gyro sensor 130A may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 130A detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 130A may also be used for navigating, somatosensory game scenes.
The electronic device 100 may implement photographing functions through an ISP, a camera 140, a video codec, a GPU, a display screen 150, an application processor, and the like.
The ISP is used to process the data fed back by the camera 140. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 140.
The camera 140 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 100 may include 1 or N cameras 140, N being a positive integer greater than 1.
The electronic device 100 implements display functions through a GPU, a display screen 150, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 150 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 150 is used to display images, videos, and the like. The display 150 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 150, N being a positive integer greater than 1.
The above is a specific description of the embodiment of the present application using the electronic device 100 as an example. It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. The electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
In some possible embodiments, the internal memory 120 may be used to store one or more programs;
the processor 110 is configured to execute one or more programs stored in the internal memory, so that the electronic device performs the method for displaying video thumbnails provided in any one of the embodiments of the present application.
In some possible embodiments, the external memory 121 may be used as a computer storage medium for storing a computer program, where the stored computer program is executed, specifically for implementing the method for displaying video thumbnail provided in any of the embodiments of the present application.
The user can record the video by using the electronic equipment, and the recorded video can be stored in a memory of the electronic equipment or can be uploaded to a server by the electronic equipment. Further, the user may view the recorded video on a display screen of the electronic device.
A user may browse videos through a gallery application on an electronic device, please refer to fig. 2, the electronic device displays the video browsing interface 200 shown in fig. 2 in response to a user's operation to browse videos, and displays videos in the interface in the form of thumbnails. In the video browsing interface 200, the electronic device displays the thumbnail, the video identifier and the duration corresponding to each video, respectively, according to a specific aspect ratio. Based on the interface 200, the electronic device may respond to the clicking operation of the thumbnail corresponding to any one of the videos by the user, so as to start playing the corresponding video.
The video display method has the following problems:
the thumbnails of each video are displayed at a fixed aspect ratio, however, videos taken by electronic devices may have multiple aspect ratios. The aspect ratio of the recorded movie video is typically 21:9 (when the video is a video in the landscape orientation) or 9:21 Further, when the video is in the vertical direction, the user may edit the recorded movie video to obtain movie video of other aspect ratio, for example, 16: 9. Therefore, presenting the movie video at a fixed aspect ratio may result in the interface shown in fig. 2 failing to completely display one frame image of each movie video when browsing the movie video, and thus the user may feel worse when browsing the movie video.
In view of the above problems, an embodiment of the present application provides a method for displaying a video thumbnail. The method for displaying the video thumbnail provided by the embodiment of the application can be applied to the electronic device 100 shown in fig. 1, and the technical scheme provided by the embodiment of the application is specifically described below by taking the electronic device 100 shown in fig. 1 as an example of a mobile phone.
Referring to fig. 3, the mobile phone 100 lights up a display screen in response to a user's bright screen operation, and presents an interface 300 as shown in fig. 3 on the display screen. In the interface 300, the user may click on the icon of each application presented on the interface 300, and the mobile phone opens the corresponding application in response to the click operation of the icon by the user.
For example, the mobile phone may open the camera application in response to a click operation of the icon 301 of the camera application by the user. After the camera application is started, the camera application can respond to the operation of a mode switching control of the camera application by a user to switch to a film mode, and then in the film mode, respond to the operation of starting to record video by the user to start recording film video. After the camera application starts recording the movie video for a period of time, the camera application responds to the operation that the user stops recording the movie video, so that the camera application finishes recording one movie video, and the recorded movie video can be stored in the internal memory of the mobile phone 100 in the form of a video file.
Further, the user may click on the icon 302 corresponding to the gallery application in the interface 300, the mobile phone starts the gallery application in response to the click operation of the user on the icon 302, and then the gallery application presents the interface 303 shown in fig. 3 on the display screen of the mobile phone.
The interface 303 presents a plurality of photo albums contained in a gallery, such as "camera," "all photos," "videos," "screen shots, and" my movies. Where "my movie" is a movie album containing one or more movie videos.
In some possible embodiments, the movie videos included in the movie album may include movie videos captured by the mobile phone 100, and movie videos captured by other mobile phones except the mobile phone 100 and shared to the mobile phone 100 through a server.
In some possible embodiments, the gallery application may create more albums in response to a user's operation to newly create albums. The embodiment of the application does not limit the types and the number of the photo albums built in the gallery.
For example, the gallery application may create a movie album "movie album 1" that is different from the "my movie" album in response to a user's operation to create a movie album.
After the gallery presents the interface 303, the user can click any album in the gallery, and the gallery responds to the click operation of the user on any album to display videos or pictures included in the album on the display screen.
For example, the gallery may present a movie video browsing interface on a display screen in which movie videos contained in "my movies" are displayed in the form of thumbnails of the movie videos in response to a click operation of the user on the "my movies" album. The movie video browsing interface refers to a video browsing interface for displaying movie videos.
Thumbnail images of a motion picture video can be generally obtained by processing one frame of image in the motion picture video. The processing mode may include zooming, clipping, etc. In some possible embodiments, the image used for generating the thumbnail may be the first frame image in the movie video, that is, the first frame image located at the moment 0 of the movie video, or the first frame image in the movie video, where the image quality is the best frame image, and the image quality may be determined based on parameters such as brightness and definition of the image, for example, the higher the definition of the image, the better the quality of the image is considered.
Before presenting a movie video browsing interface, the gallery first determines the current direction of the mobile phone.
If the current direction of the mobile phone is the vertical screen direction, dividing the movie video into a plurality of rows according to a preset vertical screen rule by the gallery, wherein each row corresponds to 1 to 3 movie videos, and meanwhile, determining the display size corresponding to each movie video in the row according to the vertical screen rule, the number, the direction and the video size of the movie videos corresponding to the row by the gallery, and then displaying the thumbnail corresponding to each movie video corresponding to the row according to the display size corresponding to each movie video.
The video size refers to the size of an image frame in a film video obtained by shooting, and the video size comprises a video width and a video length, wherein the video width is the width of the image frame in the video, and the video height is the height of the image frame in the video. The video is generally sized to correspond to the display screen of the electronic device that captured the video.
By way of example, if a display screen with 1080 pixels wide and 1920 pixels high is used for capturing video in the portrait orientation, the video size of the video may be 1080 pixels wide and 1920 pixels high. If the electronic device with 1080 pixels wide and 1920 pixels high is used to capture video in the horizontal direction, the video size of the video may be 1920 pixels wide and 1080 pixels high.
The display size refers to a size of a thumbnail when a movie video is displayed in the form of a thumbnail on a display screen, and may include a display height, which is a size of the thumbnail in a vertical direction, and a display width, which is a size of the thumbnail in a horizontal direction. The ratio of the display width divided by the display height is noted as the display aspect ratio.
In the embodiment of the application, the display heights of the film videos in the same row are consistent, and the display width is determined according to the display heights and the video aspect ratios of the film videos. The video aspect ratio of a movie video refers to the ratio of the video width of the movie video divided by the video height.
When the gallery divides the movie video according to the vertical screen rule, multiple division results may be generated, and a display mode of a thumbnail corresponding to each division result may refer to fig. 4. Wherein fig. 4b may be understood as an interface presented by the gallery in response to a user sliding up on fig. 4 a.
Note that, the rectangular boxes in fig. 4 and fig. 6 to 8 represent thumbnails corresponding to movie videos, and the aspect ratios noted in the boxes in fig. 4 and fig. 6 to 8 representing the thumbnails of movie videos are the aspect ratios of the thumbnails displayed on the display screen, that is, the ratio of the width of the thumbnail divided by the height of the thumbnail.
In some alternative embodiments, the electronic device may or may not display the aspect ratio of the thumbnails shown in fig. 4, 6-8 when displaying the thumbnails of the movie video.
X1 represents a display mode when a thumbnail of a movie video in a vertical screen direction and a thumbnail of a movie video in a horizontal screen direction are displayed in the same line, and the display mode of the thumbnail of the movie video in the line can be seen in fig. 4a, wherein movie 1 is a movie video in the vertical screen direction and movie 2 is a movie video in the horizontal screen direction. 01 below movie 1:00 indicates that the duration of the movie 1 is 1 minute, and the rectangle frame where the movie 1 is located indicates the thumbnail of the movie 1, and the meaning of each element in the subsequent schematic diagram is similar and will not be repeated.
In the display mode X1, the display heights of movie 1 and movie 2 are Hx1, and Hx1 is calculated according to the following formula:
Hx1=A×Alpha
the height and width of the embodiments of the present application may be expressed in terms of the number of pixels. For example, a display height of 100 for a movie video indicates that a thumbnail of the movie video displayed is 100 pixels in height.
In some alternative embodiments, the height and width may be expressed in units of other centimeters, millimeters, and the like, and the dimensions are not limited in this embodiment of the application.
In the above formula, a is a preset width of a video display area, when the gallery uses the entire display screen of the electronic device to display the movie video, a may be equal to the width of the display screen of the electronic device, and when the gallery can only display the movie video in a window with a certain size on the display screen, a may be equal to the width of the window.
Alpha is a pre-set reference coefficient that may be set by the manufacturer or user of the electronic device. Illustratively, alpha may be set to 9/16.
The display width W1s of the movie 1 in the vertical screen direction is calculated as follows:
W1s=Hx1×(W1÷H1)
in the above formula, W1 represents the video width of movie 1, and H1 represents the video height of movie 1.
The display width W2s of the movie 2 in the horizontal screen direction is calculated as follows:
W2s=min(Wmax,Hx1×(W2÷H2))
wherein W2 is the video width of movie 2, H2 is the video height of movie 2, wmax represents the upper limit of the display width of movie 2, and Wmax is calculated as follows:
Wmax=A-N-W1s
in the above formula, N represents a preset video layout interval, and in the movie video browsing interface, a vertical interval between two adjacent thumbnails up and down and a horizontal interval between two adjacent thumbnails left and right may be set to N. The units of video layout intervals may be consistent with the units of width and height in embodiments of the present application.
In the display mode X1, the display aspect ratio of the video in the horizontal screen direction (e.g., the movie 2 is obtained as shown in fig. 4) may not be identical to the video aspect ratio of the video itself, and the display aspect ratio of the movie 2 is 16 as shown in fig. 4a for example: 9, and movie 2 has a video aspect ratio of 21:9.
when the product of the display height of the movie 2 and the video aspect ratio of the movie 2 is less than or equal to the upper limit of the display width of the movie 2, the display width of the movie 2 is equal to the product, and at this time, the display aspect ratio of the movie 2 and the like coincide with the video aspect ratio of the movie 2. The display aspect ratio refers to the ratio of the display width divided by the display height of a movie video.
When the product of the display height of the movie 2 and the video aspect ratio of the movie 2 is greater than the upper limit of the display width of the movie 2, the display width of the movie 2 is equal to the upper limit of the display width, and at this time, the display aspect ratio of the movie 2 is smaller than the video aspect ratio of the movie 2.
If the display aspect ratio of the movie 2 is smaller than the video aspect ratio of the movie 2, when the gallery displays the movie 2, first, a frame of image for generating a thumbnail in the movie 2 may be acquired, and the frame of image is reduced according to the video aspect ratio of the movie 2, so as to obtain a reduced image with a height consistent with the display height of the movie 2, where the width of the reduced image is larger than the display width of the movie 2. The gallery then crops the scaled-down image in the width direction to obtain a cropped image having a width equal to the display width of movie 2, which is a thumbnail of movie 2.
In some possible embodiments, the gallery may clip the reduced image in a centered clipping manner, or may clip in other manners, and the clipping manner is not limited in the embodiments of the present application.
X2 represents a display mode when thumbnails of the movie videos in two vertical directions are displayed in the same line, please refer to the interface 4a, and movie 3 and movie 4 are movie videos in vertical directions.
In the display mode X2, when the display heights of the movie 3 and the movie 4 are Hx2 and Hx2 is calculated, one of the following formulas (1) and (2) is selected and calculated according to the video aspect ratio of the video in the two vertical screen directions of the same line.
If the video aspect ratio of the two movie videos is smaller than the reference coefficient Alpha, the video aspect ratio is calculated according to the formula (1):
(1)Hx2=(A-N)÷2÷Alpha
if the video aspect ratio of at least one of the two movie videos is greater than or equal to the reference coefficient Alpha, the video aspect ratio is calculated according to formula (2):
(2)Hx2=(A-N)÷(W3÷H3+W4÷H4)
where W3 represents the video width of movie 3, H3 represents the video height of movie 3, W4 represents the video width of movie video 4, and H4 represents the video height of movie 4.
The display width W3s of the movie 3 is calculated as follows:
W3s=Hx2×(W3÷H3)
the display width W4s of the movie 4 is calculated as follows:
W4s=Hx2×(W3÷H3)
X3 represents a display mode in which thumbnails of movie videos in one horizontal screen direction are individually displayed in one line, please refer to the interface 4a, and the movie 5 is a movie video in the horizontal screen direction.
In the display mode X3, the display height of the movie 5 is denoted as Hx3, and Hx3 is calculated according to the following formula:
Hx3=A÷(W5÷H5)
where W5 represents the video width of movie 5 and H5 represents the video height of movie 5.
The display width of the movie 5 may coincide with the width a of the display area.
X4 represents a display manner in which thumbnails of movie videos in three vertical screen directions are displayed in the same line, please refer to interface 4a, movie 6, movie 7, and movie 8, which are movie videos in the vertical screen directions.
In the display mode X4, the display heights of the movie 6, the movie 7 and the movie 8 are Hx4, and the Hx4 is calculated according to the following formula:
the display width W6s of the movie 6 is calculated as follows:
W6s=Hx4×(W6÷H6)
similar to movie 6, the display width of movie 7 is equal to the product of the display height of movie 7 and the video aspect ratio of movie 7, and the display width of movie 8 is equal to the product of the display height of movie 8 and the video aspect ratio of movie 8.
X5 represents a display manner in which thumbnails of movie videos in one vertical screen direction are individually displayed in one line, please refer to the interface 4b, and the movie 9 is a movie video in the vertical screen direction.
In the display mode X5, the display width W9s of the movie 9 is calculated as follows:
W9s=(A-N)÷2
the display height H9s of the movie 9 is calculated as follows:
H9s=W9s÷(W9÷H9)
where W9 represents the video width of movie 9 and H9 represents the video height of movie 9.
According to the calculation formulas of the display sizes of the movie videos in the display modes X1 to X5, it can be seen that, in the display mode determined according to the vertical screen rule, the display aspect ratio of the movie video in the vertical screen direction is consistent with the video aspect ratio of the movie video, so that when the movie video in the vertical screen direction is displayed in the display mode determined according to the vertical screen rule, only one frame of image for generating the thumbnail is selected from the movie video, and then the selected frame of image is scaled to the corresponding display width and display height according to the video aspect ratio, and clipping is not required, so that in the display mode determined according to the vertical screen rule, the gallery can completely display one frame of image in the movie video in the vertical screen direction.
It should be noted that the display manner shown in fig. 4 is an example provided by an alternative embodiment of the present application, and in other alternative embodiments, the electronic device may be displayed in other manners while being in the vertical screen direction, and is not limited to the manners shown in fig. 4. For example, the electronic device may display thumbnails of 4 or more movie videos in a row while in the portrait orientation based on other display manners.
In some possible embodiments, the gallery may present the movie video stored locally on the mobile phone and the movie video stored on the server at the movie video browsing interface, may present only the movie video stored locally on the mobile phone at the movie video browsing interface, and may present only the movie video stored on the server at the movie video browsing interface.
Referring to fig. 5, when the gallery opens the movie video browsing interface, the movie video stored locally in the mobile phone and the movie video stored in the server may be presented in thumbnail form by default on the movie video browsing interface, where the movie video browsing interface is shown in interface 501 in fig. 5, and the options of control 505 are "all".
In interface 501, a user may click on control 505. Referring to interface 502, after the user clicks control 505, the electronic device displays menu 506, and in menu 506, the user can switch control 505 to the corresponding option by clicking words such as "all," cloud, "and" local.
The user can cause the gallery to store movie videos locally on the movie video browsing interface handset or server stored movie videos by toggling the options of control 505.
For example, the user may switch control 505 to the "cloud" option, where the gallery presents only movie videos stored on the server in the movie video browsing interface. Referring to interface 503 in fig. 5, after control 505 switches to the "cloud" option, the movie video browsing interface only displays thumbnails of movie video movie 2 and movie 3 stored in the server.
Illustratively, the user can switch control 505 to the "local" option, where the gallery presents only movie videos stored locally on the cell phone in the movie video browsing interface. Referring to interface 504 in fig. 5, after control 505 switches to the "local" option, the movie video browsing interface displays only thumbnails of movie video movie 1, movie 4, and movie 5 stored on the server.
In some possible embodiments, when the mobile phone is in the vertical screen direction, each time the movie video to be presented by the movie video browsing interface is changed, the gallery re-divides the movie videos to be presented according to the vertical screen rule, re-determines the display size of the movie video corresponding to each row, and then displays the thumbnail of each movie video according to the newly determined division manner and display size.
Taking fig. 5 as an example, in the interface 501, the movie videos to be presented by the gallery include movies 1 through 5 stored locally on the mobile phone and in the server, at this time, the thumbnail of movie 1 and the thumbnail of movie 2 are displayed in the same line, the thumbnail of movie 3 and the thumbnail of movie 4 are displayed in the same line, and the thumbnail of movie 5 is displayed in a single line.
When the option of control 505 is switched to cloud, as shown in interface 503, the gallery needs to present movie video including movie 2 and movie 3, where the thumbnails of movie 2 are displayed in a single line, the thumbnails of movie 3 are displayed in a single line, and the thumbnails of movie 2 and movie 3 are both increased in size relative to the thumbnail in interface 501.
When the option of control 505 is switched to local, as shown in interface 504, the gallery of movie videos to be presented includes movie 1, movie 4, and movie 5, with the thumbnails of movie 1 and movie 4 displayed in the same row and the thumbnail of movie 5 displayed in a single row, with the thumbnail of movie 1 increasing in size relative to the thumbnail in interface 501.
If the current direction of the mobile phone is the horizontal screen direction, dividing the movie video into a plurality of rows according to a preset horizontal screen rule by the gallery, wherein each row corresponds to 1 to 3 movie videos, and meanwhile, determining the display size corresponding to each movie video in the row according to the horizontal screen rule, the number, the direction and the video size of the movie videos corresponding to the row by the gallery, and then displaying the thumbnail corresponding to each movie video corresponding to the row according to the display size corresponding to each movie video.
After the gallery divides the movie video into lines according to the horizontal screen rule, multiple line division results may be generated, and the thumbnails of the movie video in the line are displayed on the same line, and the display modes of the thumbnails corresponding to the line division results are shown in fig. 6 to 8.
It should be noted that, in the display modes of the horizontal screen shown in fig. 6 to 8, since the display screen is placed horizontally, the width a of the display area may be equal to the height of the display screen of the electronic device.
Referring to fig. 6a, y1 shows a display mode in which thumbnails of movie videos in three horizontal directions are displayed in the same row, and movies 1 through 3 are movie videos in horizontal directions.
In the display mode Y1, the display heights of movie 1 to movie 3 are all Hy1, and Hy1 is calculated according to the following formula:
the display width of movie 1 is equal to the product of the display height Hy1 of movie 1 and the video aspect ratio of movie 1, and similarly, the display widths of movie 2 and movie 3 are equal to the product of Hy1 and the corresponding video aspect ratio, respectively.
Referring to fig. 6a, y2 shows a display mode in which thumbnails of two movie videos in the horizontal screen direction are displayed on the same line, and movie 4 and movie 5 are movie videos in the horizontal screen direction.
In the display mode Y2, the display heights of the movie 4 and the movie 5 are Hy2, and Hy2 is calculated according to the following formula:
the display width of movie 1 is the same as that of movie 1 in the aforementioned display mode Y1, and the display widths of movie 4 and movie 5 are equal to the product of the display height Hy2 and the corresponding video aspect ratio, respectively.
Referring to fig. 6b, y3 shows a display mode in which thumbnails of movie videos in three vertical directions are displayed in the same line, and movies 6 to 8 are all movie videos in the vertical directions.
In the display mode Y3, the display heights of the movies 6 to 8 are Hy3, and Hy3 is calculated according to the following formula:
Hy3=(A-2×N)÷3
The display widths of movies 6 to 8 are equal to the display heights thereof.
Each of Y4-1, Y4-2, and Y4-3 shown in fig. 7 represents a display mode in which thumbnails of movie videos in one horizontal screen direction and thumbnails of movie videos in two vertical screen directions are displayed on the same line.
Referring to fig. 7a, y4-1, and thumbnails of horizontal-screen-direction movie videos are displayed on the left side of the row, two thumbnails of vertical-screen-direction movie videos are displayed on the right side, movie 9 is a horizontal-screen-direction video, and movie 10 and movie 11 are vertical-screen-direction movie videos.
Referring to fig. 7b, y4-2 shows a display mode when thumbnails of movie videos in a horizontal screen direction are displayed on the right side of the row, thumbnails of movie videos in two vertical screen directions are displayed on the left side, movie 14 is a video in a horizontal screen direction, and movie 12 and movie 13 are movie videos in a vertical screen direction.
Referring to fig. 7c, y4-3 shows a display manner when thumbnails of the horizontal-direction movie video are displayed in the middle of the row, and thumbnails of the two vertical-direction movie videos are respectively displayed on both sides of the thumbnails of the horizontal-direction movie video, wherein movie 16 is a horizontal-direction video, and movie 15 and movie 17 are vertical-direction movie videos.
Among the three display modes of Y4-1, Y4-2 and Y4-3, the display width and the display height of the film video are consistent in calculation mode, and the display heights corresponding to the three display modes of Y4-1, Y4-2 and Y4-3 are recorded as Hy4.
Taking the display mode Y4-1 as an example, the calculation formula of Hy4 is as follows:
wherein W9 and H9 represent the video width and video height of movie 9, respectively, W10 and H10 represent the video width and video height of movie 10, respectively, and W11 and H11 represent the video width and video height of movie 11, respectively.
In the display modes Y4-2 and Y4-3, the display height Hy4 can be calculated along the above formula, and only the video aspect ratio of three movie videos in which the video aspect ratio is replaced with the same row is required.
The three display modes of Y4-1, Y4-2 and Y4-3 comprise two movie videos in the vertical screen direction and one movie video in the horizontal screen direction which are positioned in the same row. Among the three display modes, the display width calculation modes of three movie videos of the same line are identical, and are equal to the product of the display height Hy4 and the video aspect ratio of the corresponding movie video.
Taking the display mode Y4-1 as an example, the display width of the movie 9 is equal to the product of the display height Hy4 of the movie 9 and the video aspect ratio of the movie 9, the display width of the movie 10 is equal to the product of the display height Hy4 of the movie 10 and the video aspect ratio of the movie 10, and the display width of the movie 11 is equal to the product of the display height Hy4 of the movie 11 and the video aspect ratio of the movie 11.
In fig. 6a to 7c, fig. 6a is an interface presented when the gallery opens a movie album and the mobile phone is in a horizontal screen direction, and fig. 6b to 7c may be interfaces displayed by the gallery in response to a user's sliding operation after the movie album is opened.
Referring to fig. 8a, y5 shows a display mode in which thumbnails of a movie video in a horizontal screen direction are displayed individually on one line, and movie 18 is a video in a horizontal screen direction.
In the display mode Y5, the display height of the movie 18 is denoted by Hy5, and Hy5 is calculated according to the following formula:
w18 and H18 represent the video width and video height of the movie 18, respectively.
The display width W18s of the movie 18 is equal to the product of the display height of the movie 18 and the video aspect ratio of the movie 18.
Referring to fig. 8b, y6 shows a display mode in which thumbnails of a movie video in a vertical direction are displayed on one line, and movie 18 is a video in a vertical direction.
Referring to fig. 8c, y7 shows a display mode in which thumbnails of two movie videos in a vertical direction are displayed on the same line, and movie 18 and movie 19 are movie videos in a vertical direction.
In the display modes Y6 and Y7, the display height of the movie video is identical to the display height of the movie video in the display mode Y3, and the display width of the movie video is identical to the display width of the movie video in the display mode Y3, which is not described again.
Each of Y8-1 and Y8-2 shown in fig. 9 represents a display mode in which a thumbnail of a movie video in one horizontal screen direction and a thumbnail of a movie video in one vertical screen direction are displayed on the same line.
Referring to fig. 9a, y8-1 shows a display mode in which a thumbnail of a movie video in a vertical direction is displayed on the left side and a thumbnail of a movie video in a horizontal direction is displayed on the right side.
Referring to fig. 9b, y8-2 shows a display manner in which a thumbnail of a horizontal-screen-direction movie video is displayed on the left side and a thumbnail of a vertical-screen-direction movie video is displayed on the right side.
In the two display modes of Y8-1 and Y8-2, the display width and the display height of the film video are identical in calculation mode, and the display height corresponding to the two display modes of Y8-1 and Y8-2 is recorded as Hy6.
Taking the display mode Y8-1 as an example, the calculation formula of Hy6 is as follows:
w19 and H19 represent the video width and video height of the movie 19, respectively, the display width W18s of the movie 18 being equal to the product of the display height of the movie 18 and the video aspect ratio of the movie 18, and the display width W19s of the movie 19 being equal to the product of the display height of the movie 19 and the video aspect ratio of the movie 19.
The display modes shown in fig. 8a to 8c and fig. 9a and 9b may be a display mode of thumbnails of the last one or two movie videos when the movie album is slid to the bottom, or may be a display mode of thumbnails when only one or two movie videos are contained in the movie album.
According to the above formulas for calculating the display sizes of the movie videos in the display modes Y1 to Y7, the display aspect ratio of the movie videos in the horizontal screen direction in the display mode determined according to the horizontal screen rule is consistent with the video aspect ratio of the movie videos, so that when the movie videos in the horizontal screen direction are displayed in the display mode determined according to the horizontal screen rule, only one frame of image for generating the thumbnail is needed to be selected in the movie videos, then the selected frame of image is scaled to the corresponding display width and display height according to the video aspect ratio, and clipping is not needed, so that in the display mode determined according to the horizontal screen rule, the gallery can completely display one frame of image in the movie videos in the horizontal screen direction.
In each of the display modes of fig. 4 to 9, if the calculation result of the formula for calculating the display size is not an integer, the calculation result may be rounded up or down to obtain the display size.
In some possible embodiments, when the mobile phone is in the horizontal screen direction, each time the movie video to be presented by the movie video browsing interface is changed, the gallery re-divides the movie videos to be presented according to the horizontal screen rule, re-determines the display size of the movie video corresponding to each row, and then displays the thumbnail of each movie video according to the newly determined division manner and display size.
It should be noted that the display manners shown in fig. 6 to 9 are examples provided in an alternative embodiment of the present application, and in other alternative embodiments, the electronic device may be displayed in other manners than the display manners described above when being in the landscape orientation, and are not limited to the manners shown in fig. 6 to 9. For example, the electronic device, while in the landscape orientation, may also display thumbnails of 4 or more movie videos in a row based on other display manners.
In some possible embodiments, the gallery may determine the display order of the thumbnails of the movie videos in the movie video browsing interface according to the morning and evening of the shooting time of each movie video. In the movie video browsing interface, the shooting time of the movie video corresponding to the upper thumbnail is longer than the shooting time of the movie video corresponding to the lower thumbnail, and in the same row, the shooting time of the movie video corresponding to the left thumbnail is longer than the shooting time of the movie video corresponding to the right thumbnail.
The method for displaying the video thumbnail provided by the embodiment of the application has the following beneficial effects:
when the movie videos are displayed, the gallery dynamically determines the position and the display size of each movie video in the video display area based on the horizontal screen rule and the vertical screen rule, so that the display aspect ratio of each movie video is consistent with the actual video aspect ratio or is close to the video aspect ratio, the image of the movie video is prevented from being cut when the thumbnail of the movie video is generated, a user can see a complete frame of image in the movie video when browsing the movie video, the user is helped to preview the content of the movie video through the thumbnail, and a specific movie video can be quickly found according to the thumbnail of the movie video.
Furthermore, the display aspect ratio of the movie video is consistent with the video aspect ratio, so that a user can intuitively distinguish a movie video browsing interface from a non-movie video browsing interface, and the experience of the user when browsing the movie video is improved.
It should be noted that, although the foregoing embodiment describes the method for displaying video thumbnails provided by the present application by taking a movie video as an example, the method for displaying video thumbnails provided by the present application is not limited to displaying thumbnails of movie videos, but may be used for displaying thumbnails of other videos and for displaying other obtained pictures.
The method for displaying the video thumbnail provided by the embodiment of the application can be implemented by camera application, media frame and gallery of the electronic equipment.
Referring to fig. 10, the electronic device 100 may include a hardware layer and a software layer, wherein the software layer includes a kernel layer, an application framework layer, and an application layer. The hardware layer comprises a camera, a memory and a display screen, the kernel layer comprises a camera driver, the application framework layer comprises a camera application service (camera service) and a media framework, the media framework comprises a media database and a media encoder (MediaCodec), and the application layer comprises a camera application and a gallery. The Memory may be a Read-Only Memory (ROM).
The camera application starts a movie mode in response to an operation of recording movie video by a user, and transmits a control instruction to the camera application service in the movie mode, the control instruction being transmitted to the camera through the camera application service and the camera driver, so that the camera starts recording the movie video. When starting to record film video, the camera application creates a file stream in the memory for the current recording process, in the recording process, the video stream shot by the camera is transmitted to the camera application through the camera driver and the camera application service, after the camera application obtains the video stream, the video stream is provided to the media encoder, the media encoder encodes the video stream to obtain corresponding video data, and the media encoder adds the video data obtained by encoding into the file stream. After recording for a certain time, the camera application responds to the operation of stopping recording by the user, controls the camera to stop recording video through the camera application service and the camera driver, and then stores the file stream in a memory in the form of a video file.
After the camera application saves the video file, the media framework analyzes the video file in the memory to obtain the video information of the video file, and the video information is updated to the media database.
After the media database is updated, the gallery synchronizes the media information recorded in the media database to the database of the gallery itself. Thereafter, when the user browses videos through the gallery, the gallery displays thumbnail images of movie videos on the display screen based on the video information stored in the database of the gallery itself in response to the user's operation.
Referring to fig. 11, the following describes a flow of a method for displaying video thumbnails according to an embodiment of the present application in conjunction with the above-mentioned interaction process of a gallery and a media frame in the camera application of the electronic device.
In response to the operation of turning on the movie mode by the user, the camera application executes step S1101, turning on the movie mode.
After the movie mode is turned on, the camera application performs step S1102 of creating a file stream, setting a multimedia format, and adding a movie tag in response to an operation of starting recording by the user.
The created file stream is illustratively stored in a running memory of the electronic device.
The multimedia format (MediaFormat) specifically includes a plurality of fields in a file stream, where the fields are used to describe information such as a coding format, a sampling rate, etc. of a video obtained by recording, and setting the multimedia format is equivalent to configuring field values of the fields. Typically, the multimedia format is located at the beginning of the file stream, i.e. in the header of the file.
In some possible embodiments, the movie Tag (Tag) described above may be added to the file header.
In some possible embodiments, movie tags may also be added to the header after recording is stopped. The embodiment of the application does not limit the time for adding the movie label.
Illustratively, if the media encoder encodes a video stream based on the MP4 (Moving Picture Experts Group, MPEG 4) encoding standard, the movie tag may be the Movie header atom layer field gnre in the file stream. Specifically, if video is recorded in the movie mode, the camera application may configure the field value of the gnre field of Movie header atom layers of the file stream to be a value representing the movie video, and after the configuration is completed, the gnre field is the movie tag in the file stream.
After step S1102 is executed, the camera application executes step S1103 to record video. In the recording process, the camera application obtains the video stream captured by the camera in real time, and performs step S1104 on the video stream, encodes the video stream, and step S1105, outputs the video data to the file stream. Wherein step S1104 is implemented by the camera using the aforementioned media encoder.
After recording for a certain time, the camera application responds to the user operation of stopping recording, performs step S1106, stops recording video, and saves the video file step S1107.
In step S1107, the camera application saves the file stream containing the multimedia format, the movie tag, and the video data in the form of a file in the memory of the electronic device, thereby obtaining a video file.
During the running of the media frame, step S1108 is periodically performed on the memory of the electronic device, and the video file is scanned.
It should be noted that, in step S1108, the video file stored in the memory is scanned.
Illustratively, the media framework may perform step S1108 via a MediaScanner function.
By executing step S1108, in the case that the camera application stops recording and saving the video file, the media framework scans out the newly saved video file in the memory, and then, the media framework executes step S1109 on the video file to parse the video information.
Illustratively, in step S1109, the media framework may parse the video file through a MediaMetaDataRetriever function to obtain video information of the parsed video file.
The parsed video information may specifically include a rotation angle of the corresponding video file, a video name, a video size, a video format, an encoding mode, a storage address of the video file, a video shooting time, a video type, and the like. Video sizes include video width and video height, and video types include motion picture video and non-motion picture video.
Continuing with the previous example, in step S1109, the media framework may read the value of the gnre field in the video file, determine that the video type of this video file is movie video if the read value is a value representing movie video, and determine that the video type of this video file is non-movie video if the read value is not a value representing movie video, or determine that the gnre field is not included in the video file by reading.
After the video information is analyzed, the media framework performs step S1110 of updating the media database based on the piece of media information, and notifying the database listener.
The media database is used for managing multimedia files local to the electronic device, and generally, the media database stores media information corresponding to each multimedia file local to the electronic device, where the multimedia files include video files, image files, document files, music files, and the like, the media information corresponding to the video files is the video information, and the media information corresponding to the image files is image information.
In some alternative embodiments, the media database may be specifically a specific storage area pre-allocated to the media frame in the memory and storage of the electronic device.
The updating in step S1110 means that the piece of media information obtained by parsing is added to the media database. The database monitor is a function for monitoring the media database, which is created by the graph library, and after the media framework updates the media database each time, the database monitor is notified by sending a notification message to the database monitor, and then the database monitor forwards the notification message to the graph library.
After the gallery receives the notification from the database listener, step S1111 is performed to synchronize the media database.
The gallery itself is provided with a database for storing video and image information, which may be referred to as a gallery database, and the gallery synchronizes the update of the media frame to the gallery database by performing step S1111.
The gallery database may specifically be a specific storage area pre-allocated to the gallery in a memory or a memory of the electronic device.
Illustratively, after the media framework adds a piece of video information 1 to the media database, the gallery copies video information 1 from the media database and adds the copied video information 1 to the gallery database by performing step S1111.
The gallery database may store video information and image information of the server in addition to image information and video information in the media database.
In some possible embodiments, the gallery periodically accesses the server when the cloud synchronization function of the electronic device 100 is turned on, so as to download video information of the video stored in the server by the server and image information of the image stored in the server from the server, and saves the video information and the image information downloaded from the server in the gallery database.
The video information and the image information downloaded from the server can be obtained by analyzing the video and the image by the server, or can be uploaded to the server together when the video and the image are uploaded by the terminal equipment.
The gallery may record in the gallery database which album each piece of video information belongs to, and which album each piece of image information belongs to, so that when the gallery opens a particular album in response to a user operation, it is possible to determine which images and videos need to be displayed based on the records.
For example, assuming that there is only one movie album in the gallery, noted as "my movie," the gallery may attribute each piece of video information in the gallery database to the "my movie" album.
After the user performs the gallery opening operation at any time, the gallery responds to the gallery opening operation, and S1112 is performed to display the album interface.
Illustratively, the album interface displayed is interface 303 of FIG. 3.
After displaying the album interface, the user can open any album in the gallery by clicking operation, and when the gallery receives the operation of opening the movie album by the user, the gallery executes step S1113 to identify the device direction.
The device direction refers to the current direction of a display screen of the electronic device, and specifically, the device direction includes a horizontal screen or a vertical screen. The device orientation may be determined specifically by the gyro sensor 130A.
After the device direction is identified, if the gallery identifies that the device direction is a horizontal screen, step S1114 is executed, and the display mode of the movie video is determined according to the horizontal screen rule.
The display modes determined in step S1114 include any one or more of the display modes shown in fig. 6 to 8.
If the gallery identifies that the device direction is the vertical screen direction, step S1115 is executed, and the display mode of the movie video is determined according to the vertical screen rule.
The display modes determined in step S1115 include any one or more of the display modes shown in fig. 4 and 5.
After step S1114 or step S1115 is performed, the gallery performs step S1116 to display thumbnail images of movie videos in the determined display manner.
In some possible embodiments, the gallery may also determine, in advance of opening the movie album in response to a user operation, a display manner of all movie videos in the movie album when the electronic device is horizontally displayed, and determine a display manner of all movie videos in the movie album when the electronic device is vertically displayed, and record the determined display manner in the memory. When the gallery is opened, the corresponding display mode can be obtained from the memory directly according to the current direction of the electronic equipment, and then the movie video is displayed according to the display mode.
In some possible embodiments, the gallery, when executing step S1114 or step S1115, may determine a display manner of a thumbnail of each movie video included in the opened movie album.
Taking fig. 6 as an example, assume that video information of movies 1 to 8 is recorded in the gallery database, and that the shooting times of movies 1 to 8 are incremented, with the shooting time of movie 1 being the earliest and the shooting time of movie 8 being the shortest. When a user opens the my movie album during horizontal screen, the gallery determines the display modes of movie videos recorded in the gallery database one by one according to shooting time from early to late, and thumbnail images of the movie videos are displayed one by one according to the determined display modes.
In other possible embodiments, when the gallery performs step S1114 or step S1115, only the display mode of the movie video to be displayed in the movie album may be determined, and the display mode of the movie video not to be displayed later may not be determined.
Still taking fig. 6 as an example, after the gallery determines the display modes of movies 1 through 5 and displays the thumbnails of movies 1 through 5 according to the interface shown in fig. 6a, the gallery determines that the display screen cannot currently display the thumbnails of the subsequent movie videos, so that the display modes of movies 6 through 8 are not determined. When the gallery receives the up-sliding operation of the user and needs to display the movie video after the movie 5, the display modes of the subsequent movies 6 to 8 are determined, and the thumbnails of the movies 6 to 8 are displayed according to the interface shown in fig. 6 b.
The gallery may obtain thumbnail images of movie videos by:
when the gallery needs to acquire the thumbnail of the film video, an analysis request is sent to the media frame through an analysis interface of the media frame, wherein the analysis request carries the display size of the film video determined by the gallery. The media framework responds to the analysis request, a video file of the thumbnail to be analyzed is found in a memory according to video information recorded in a media database, a frame image for generating the thumbnail is obtained by analysis from the video file, and then the media framework reduces the frame image analyzed based on the display size provided by the gallery, so that the thumbnail of the film video is obtained. After obtaining the thumbnail, the media framework writes the thumbnail into the running memory of the electronic device, and then the gallery may read the thumbnail of the movie video from the running memory of the electronic device.
In some alternative embodiments. If the movie video is a movie video stored by the server, the gallery sends an analysis request carrying the display size of the movie video to the server. The server responds to the analysis request, executes the process executed by the media framework, obtains the thumbnail of the film video, and then feeds back the thumbnail of the film video to the gallery located in the electronic device.
In some alternative embodiments, the aspect ratio of the movie video is consistent with the aspect ratio of the video, in which case the size of the thumbnail fed back by the media frame or server, i.e., the display size provided by the gallery, may be displayed directly on the display screen after the gallery obtains the thumbnail.
In other alternative embodiments, the movie video is a video in the landscape orientation, and the display aspect ratio of the movie video and the video aspect ratio are not identical, at which time the height of the thumbnail written into the running memory by the media frame or server is identical to the display height of the movie video, but the width of the thumbnail and the display width of the movie video are not identical. After the gallery obtains the thumbnail, if the width of the thumbnail is smaller than or equal to the display width of the movie video, the gallery can directly display the received thumbnail on the display screen, if the width of the thumbnail is larger than the display width of the movie video, the gallery cuts the thumbnail in a centered cutting mode along the width direction, and cuts away part of the content on the left side and the right side of the thumbnail to obtain a cut thumbnail with the width consistent with the display width of the movie video and the height consistent with the display height of the movie video, and then the cut thumbnail is displayed on the display screen.
In yet other alternative embodiments, the movie video is a vertical screen oriented video, and the display aspect ratio of the movie video and the video aspect ratio are not consistent, where the width of the thumbnail fed back by the media frame or server is consistent with the display width of the movie video, but the height of the thumbnail is not consistent with the display height of the movie video. After the gallery receives the thumbnail, if the height of the thumbnail is smaller than or equal to the display height of the movie video, the gallery can directly display the received thumbnail on a display screen, if the height of the thumbnail is larger than the display height of the movie video, the gallery cuts the thumbnail in a centered cutting mode along the height direction, cuts partial contents at the upper end and the lower end of the thumbnail, and obtains a cut thumbnail with the height consistent with the display height of the movie video and the width consistent with the display width of the movie video, and then displays the cut thumbnail on the display screen.
In some alternative embodiments, after obtaining the thumbnail fed back by the media frame or the server, the gallery may store the thumbnail in the gallery database, then store the frame image in the gallery database, and then directly read the thumbnail stored in the gallery database each time the gallery needs to display the thumbnail of the movie video. The benefit of storing the thumbnail in the gallery database is that the gallery can display the thumbnail of the movie video on the display screen of the electronic device faster when the user opens the movie album without having to wait for the media frame or server to feed back the thumbnail.
In some possible embodiments, after the gallery determines the display mode of the electronic device when the electronic device is vertical according to the vertical rule, the display mode of the electronic device when the electronic device is vertical may be stored in the memory of the electronic device, and similarly, after the gallery determines the display mode of the electronic device when the electronic device is horizontal according to the vertical rule, the display mode of the electronic device when the electronic device is horizontal may be stored in the memory of the electronic device.
When the gallery opens a movie album, it may be determined whether movie videos included in the movie album are updated. If the movie videos included in the movie album are updated, for example, a part of the movie videos in the movie album are deleted or some movie videos are newly added, the gallery performs the foregoing step S1114 or S1115 to determine the corresponding display mode according to the direction of the electronic device, and if the movie videos included in the movie album are not updated, the gallery may directly perform the step S1116 according to the read display mode according to the direction of the electronic device, the display mode when the horizontal screen or the display mode when the vertical screen is previously stored in the memory.
In some alternative embodiments, after the display of the movie video is completed, the gallery may periodically detect whether the direction of the electronic device changes, and if the direction of the electronic device changes, the gallery redetermines the display modes of each movie video according to the changed direction, and then displays the movie video in a new display mode.
When the movie album is opened, the direction of the electronic device is the horizontal screen direction, so that the gallery determines the display mode of the movie video according to the horizontal screen rule and displays the movie video, after a period of time, the direction of the electronic device is changed from the horizontal screen direction to the vertical screen direction, and the movie album is still in an open state, so that the gallery redetermines the display mode of the movie video according to the vertical screen rule and then displays the movie video according to the newly determined display mode.
Further, when the direction of the electronic device changes, if the movie video included in the movie album is not updated, the gallery can judge whether a display mode corresponding to the changed direction exists in the memory, and if the display mode corresponding to the changed direction exists in the memory, the gallery directly reads the display mode and displays the movie video based on the display mode; if the memory has no display mode corresponding to the changed direction, the gallery redetermines the display mode of each movie video according to the changed direction.
When the electronic device changes from the vertical screen to the horizontal screen, if the movie videos in the movie album are not updated and the display mode of the horizontal screen of the electronic device is stored in the memory, the gallery can directly display the movie videos according to the display mode of the horizontal screen of the electronic device stored in the memory, and if the display mode of the horizontal screen of the electronic device is not stored in the memory, the gallery redetermines the display mode of the movie videos according to the horizontal screen rule and then displays the movie videos according to the newly determined display mode.
Step S1115 specifically includes two links, firstly, the gallery determines which thumbnails of the movie videos are displayed on each line of the display screen according to the method shown in fig. 12, that is, the movie videos are divided into lines, and after the lines are completed, the display size of each movie video in the line is calculated according to the size calculation formulas corresponding to the display modes X1 to X5, and finally, in step S1116, the gallery can display the thumbnails of the movie videos line by line based on the calculated display sizes.
Referring to fig. 12, the gallery may be formed by the following method. And dividing the movie video into lines according to the vertical screen rule.
S1201, video information of the first movie video is read.
In step S1201, if the gallery read fails, i.e. the video information of the first movie video is not read, it is determined that there is no movie video, and the method ends, and if the gallery read is successful, step S1202 is executed.
There may be two or more movie albums in the gallery, and in this embodiment, the read video information refers to video information of movie videos contained in the opened movie album. For example, there are two movie albums in the gallery, respectively denoted as "my movie 1" and "my movie 2", and if the movie album opened by the user is "my movie 1" and "my movie 1" contains 10 movie videos, the gallery reads video information of the 10 movie videos in "my movie 1" one by one according to the order of shooting time, and divides the thumbnails of the 10 movie videos according to the method shown in fig. 12.
Video information of the movie video is stored in a gallery database. If the film video is stored in a memory local to the device, the video information of the film video is read from a media database by a gallery and stored in the gallery database; if the movie video is a video stored in the server, the video information of the movie video is downloaded from the server by the gallery and stored in the gallery database.
In the embodiment shown in fig. 12 and 13, the gallery reads video information of the movie videos from the early to the late according to the shooting time of the movie videos, so that the first movie video refers to the movie video with the earliest shooting time in the movie videos, the second movie video has the shooting time later than the first movie video, the third movie video has the shooting time later than the second movie video, and so on.
S1202, a video direction of a first movie video is identified.
If the video direction of the first movie is horizontal, step S1209 is performed, and if the video direction of the first movie is vertical, step S1203 is performed.
The video direction of the film video is determined according to the video height and the video width recorded in the video information of the film video, if the video height of the film video is larger than the video width, the video direction of the film video is identified as a vertical screen, and if the video height of the film video is smaller than the video width, the video direction of the film video is identified as a horizontal screen.
Further, when the rotation angle recorded in the video information of the movie video is 90 °, if the video height of the movie video is greater than the video width, the video direction of the movie video is identified as a horizontal screen, and if the video height of the movie video is less than the video width, the video direction of the movie video is identified as a vertical screen.
The method for identifying the video direction of the movie video is applicable to each subsequent step of identifying the video direction of the movie video, and the subsequent related steps are not repeated.
S1203 reads video information of the second movie video.
Optionally, when step S1203 is executed, if the reading fails, step S1209 is executed if it is determined that there is no second movie, and if the reading is successful, step S1204 is executed.
S1204, identifying a video direction of the second movie video.
If the video direction of the second movie is horizontal, step S1208 is executed, and if the video direction of the second movie is vertical, step S1205 is executed.
S1205, video information of the third movie video is read.
Optionally, when executing step S1205, if the reading fails, determining that there is no third movie video, executing step S1208; if the reading is successful, step S1206 is performed.
S1206, a video direction of the third movie video is identified.
If the video direction of the third movie is horizontal, step S1208 is executed, and if the video direction of the third movie is vertical, step S1207 is executed.
S1207, the thumbnails of the first movie video, the second movie video, and the third movie video are displayed on the same line.
After step S1208 is performed, the thumbnails of the first movie video, the second movie video, and the third movie video are displayed as shown in the foregoing X4.
S1208, the thumbnail of the first movie video and the thumbnail of the second movie video are displayed on the same line.
After step S1208 is performed, if the first movie video is a video in the vertical direction and the second movie video is a video in the horizontal direction, the thumbnail images of the first movie video and the thumbnail images of the second movie video are displayed as shown in the above X1, and if the first movie video and the second movie video are both videos in the vertical direction, the thumbnail images of the first movie video and the thumbnail images of the second movie video are displayed as shown in the above X2.
S1209, the thumbnail of the first movie video is displayed alone in one line.
After step S1209 is executed, if the first movie is a video in the horizontal direction, the thumbnail of the movie is displayed in the display mode X3, and if the first movie is a video in the vertical direction, the thumbnail of the movie is displayed in the display mode X5.
The embodiment shown in fig. 12 will be described by taking fig. 4a as an example, assuming that the my movie album contains 8 movie videos of movies 1 through 8, and the shooting times of movies 1 through 8 are increased.
When the gallery opens the my movie album, the movie videos include movies 1 to 8, the gallery reads the video information of the first movie video, namely movie 1, and recognizes that movie 1 is a vertical screen video, and then the gallery reads the video information of the second movie video, namely movie 2, and recognizes that movie 2 is a horizontal screen video, so that the gallery determines that thumbnails of movie 1 and movie 2 are displayed in the same row.
After the thumbnails of movie 1 and movie 2 are divided into the same row, the gallery again performs step S1201, where movie 1 and movie 2 have completed the division, the gallery sequentially reads the video information of the first and second movie videos, namely, movie 3 and movie 4, at this time, and movie 3 and movie 4 are both vertical screen videos, so the gallery reads the video information of the third movie video, namely, movie 5, and recognizes that movie 5 is a horizontal screen video, and the gallery determines that the thumbnails of movie 3 and movie 4 are displayed in the same row according to the above embodiment.
After the thumbnails of movie 3 and movie 4 are divided into the same row, the gallery returns to step S1201, where the movie video includes movie 5 to movie 8, the gallery reads the video information of movie 5, and recognizes that movie 5 is a flat screen video, and then the gallery determines that the thumbnails of movie 5 are displayed individually in a row.
After the thumbnails of movie 5 are individually divided into one line, the gallery returns to step S1201, and by executing the above-described embodiment, it is determined that the thumbnails of movie 6 to movie 8 are displayed on the same line.
After the thumbnails of movies 6 to 8 are divided into the same row, the gallery executes step S1201 again, at which time, since movies 1 to 8 in the my movie album are all completed in the row, there is no video information of the movie video to be read, and the gallery fails to read the video information, the method ends.
Step S1114 specifically includes two links, firstly, the gallery determines which thumbnails of the movie videos are displayed on each line of the display screen according to the method shown in fig. 13, that is, the movie videos are divided into lines, and after the lines are completed, the display sizes of the movie videos in the line are calculated according to the size calculation formulas corresponding to the display modes Y1 to Y7, and finally, the gallery can display the thumbnails of the movie videos line by line based on the calculated display sizes in step S1116.
Referring to fig. 13, the gallery may be formed by the following method. And dividing the movie video into lines according to the horizontal screen rule.
S1301, video information of the first movie video is read.
In step S1301, if the gallery read fails, i.e. the video information of the first movie video is not read, it is determined that there is no movie video, the method ends, and if the gallery read is successful, step S1302 is executed.
There may be two or more movie albums in the gallery, and in this embodiment, the read video information refers to video information of movie videos contained in the opened movie album.
S1302, identifying the video direction of the first movie video.
If the video direction of the first movie is vertical, step S1303 is executed, and if the video direction of the first movie is horizontal, step S1307 is executed.
S1303, video information of the second movie video is read.
S1304, identifying a video direction of the second movie video.
If the video direction of the second movie is vertical, step S1305 is executed, and if the video direction of the second movie is horizontal, step S1309 is executed.
S1305, video information of the third movie video is read.
S1306, thumbnail images of the first movie video, the second movie video, and the third movie video are displayed on the same line.
After the execution of step S1306, the process returns to step S1301.
After step S1306 is executed, if the first movie video to the third movie video are all videos in the horizontal screen direction, the thumbnail images of the first movie video to the third movie video are displayed in the display mode Y1; if the first movie video to the third movie video are all videos in the vertical screen direction, displaying the thumbnail images of the first movie video to the third movie video in the display mode Y3; if one of the first to third movie videos is a video in the horizontal screen direction and the other two movie videos are videos in the vertical screen direction, the thumbnail images of the first to third movie videos are displayed in the display modes Y4-1 to Y4-3.
If the first movie video is a video in the horizontal screen direction and the other two movie videos are videos in the vertical screen direction, the display mode is Y4-1; if the third movie video is a video in the horizontal screen direction and the other two movie videos are videos in the vertical screen direction, the display mode is Y4-2; if the second movie video is a video in the horizontal screen direction and the other two movie videos are videos in the vertical screen direction, the display mode is Y4-3.
S1307, video information of the second movie video is read.
S1308, the video direction of the second movie video is identified.
If the video direction of the second movie is vertical, step S1309 is executed, and if the video direction of the second movie is horizontal, step S1312 is executed.
S1309, video information of the third movie video is read.
S1310, identifying the video direction of the third movie video.
If the video direction of the third movie is vertical, step S1306 is executed, and if the video direction of the third movie is horizontal, step S1311 is executed.
S1311, displaying the thumbnails of the first movie video and the second movie video on the same line.
After the execution of step S1311, the process returns to step S1301.
After step S1311 is executed, if the first movie video and the second movie video are both videos in the horizontal screen direction, the thumbnail images of the first movie video and the second movie video are displayed in the display mode Y2; if the first movie video and the second movie video are both videos in the vertical screen direction, displaying the thumbnail images of the first movie video and the second movie video in the display mode Y7; if the first movie video is a video in the vertical screen direction and the second movie video is a video in the horizontal screen direction, the thumbnail is displayed in the display mode Y8-1, and if the first movie video is a video in the horizontal screen direction and the second movie video is a video in the vertical screen direction, the thumbnail is displayed in the display mode Y8-2.
S1312, video information of the third movie video is read.
S1313, identify the video direction of the third movie video.
If the video direction of the third movie is vertical, step S1311 is executed, and if the video direction of the third movie is horizontal, step S1306 is executed.
In the above-described flow, if any one of the steps of reading video information fails to read, it is determined that there is no next movie video, and the thumbnails of the movie videos that have been currently read with video information are displayed in the same line, and then step S1301 is returned.
For example, when any one of the video information of the second movie video fails to be read, it is determined that there is no second movie video, the thumbnail of the first movie video is displayed alone in one line, and then step S1301 is returned. When any one of the video information of the third movie video fails to be read, it is determined that there is no third movie video, and the thumbnails of the first movie video and the second movie video are displayed on the same line, and then step S1301 is returned.
When the thumbnail of a movie video is displayed on a single line, if the movie video is a video in the horizontal screen direction, the thumbnail of the movie video is displayed in the display mode Y5, and if the movie video is a video in the vertical screen direction, the thumbnail of the movie video is displayed in the display mode Y6.
The specific implementation of each step in the embodiment shown in fig. 13 may refer to the corresponding step in fig. 12, which is not repeated.
The embodiment of the application also provides a computer storage medium for storing a computer program, which is particularly used for realizing the display method of the video thumbnail provided by any embodiment of the application when the computer program is executed.
The embodiment of the application also provides a computer program product, which comprises a plurality of executable computer commands, and the computer commands of the product are executed, and are particularly used for realizing the display method of the video thumbnail provided by any embodiment of the application.

Claims (10)

1. A display method of a video thumbnail, applied to an electronic device, the display method comprising:
responding to the operation of opening the album by a user, reading video information of a first video, and determining that the video direction of the first video is a vertical screen direction according to the video information of the first video, wherein the album comprises the first video, a second video, a third video, a fourth video, a fifth video, a sixth video, a seventh video and an eighth video;
reading video information of the second video, and determining that the video direction of the second video is a horizontal screen direction according to the video information of the second video;
Determining to display a first thumbnail corresponding to the first video and a second thumbnail corresponding to the second video on the same line in the album based on the determination that the video direction of the first video is a vertical screen direction and the determination that the video direction of the second video is a horizontal screen direction;
reading video information of the third video, and determining that the video direction of the third video is a vertical screen direction according to the video information of the third video;
reading video information of the fourth video, and determining that the video direction of the fourth video is a vertical screen direction according to the video information of the fourth video;
reading video information of the fifth video, and determining that the video direction of the fifth video is a horizontal screen direction according to the video information of the fifth video;
determining to display a third thumbnail corresponding to the third video and a fourth thumbnail corresponding to the fourth video on the same line in the album based on the determination that the video direction of the third video is the vertical screen direction, the determination that the video direction of the fourth video is the vertical screen direction, and the determination that the video direction of the fifth video is the horizontal screen direction;
reading video information of the fifth video, and determining that the video direction of the fifth video is a horizontal screen direction according to the video information of the fifth video;
Based on the fact that the video direction of the fifth video is determined to be the horizontal screen direction, the fifth thumbnail corresponding to the fifth video is determined to be singly displayed in one row in the album;
reading video information of the sixth video, and determining that the video direction of the sixth video is a vertical screen direction according to the video information of the sixth video;
reading video information of the seventh video, and determining that the video direction of the seventh video is a vertical screen direction according to the video information of the seventh video;
reading video information of the eighth video, and determining that the video direction of the eighth video is a vertical screen direction according to the video information of the eighth video;
and determining that a sixth thumbnail corresponding to the sixth video, a seventh thumbnail corresponding to the seventh video and an eighth thumbnail corresponding to the eighth video are displayed on the same row of the album based on the determination that the video direction of the sixth video is the vertical screen direction, the determination that the video direction of the seventh video is the vertical screen direction and the determination that the video direction of the eighth video is the vertical screen direction.
2. The display method according to claim 1, characterized by further comprising:
The first video has a first aspect ratio, the second video has a second aspect ratio, the third video has a third aspect ratio, the fourth video has a fourth aspect ratio, and the fifth video has a fifth aspect ratio.
3. The display method according to claim 2, characterized by further comprising:
calculating to obtain the display height of the first video according to the width of a video display area on a display screen and a preset reference coefficient;
calculating to obtain the display width of the first video according to the display height of the first video and the first aspect ratio;
and obtaining a first thumbnail corresponding to the first video based on the display height of the first video and the display width of the first video.
4. A display method according to claim 3, further comprising:
determining a display height of the first video as a display height of the second video;
calculating the display width of the second video according to the width of the video display area on the display screen and the display width of the first video;
and obtaining a second thumbnail corresponding to the second video according to the display height of the second video and the display width of the second video.
5. The method as recited in claim 2, further comprising:
determining the width of a video display area on a display screen as the display width of the fifth video;
calculating to obtain the display height of the fifth video according to the display width and the fifth aspect ratio of the fifth video;
and obtaining a fifth thumbnail corresponding to the fifth video based on the display width of the fifth video and the display height of the fifth video.
6. The display method according to any one of claims 2 to 5, characterized by further comprising:
calculating the display height of the fourth video according to the preset video layout interval and the width and the total aspect ratio of a video display area on a display screen, wherein the total aspect ratio is the sum of the third aspect ratio and the fourth aspect ratio;
calculating to obtain the display width of the fourth video according to the display height of the fourth video and the aspect ratio of the fourth video;
and obtaining a fourth thumbnail corresponding to the fourth video based on the display height of the fourth video and the display width of the fourth video.
7. The display method according to claim 3, wherein the obtaining a first thumbnail corresponding to the first video based on a display height of the first video and a display width of the first video includes:
Analyzing the first video to obtain a frame of image;
and reducing the analyzed image to obtain a first thumbnail corresponding to the first video, wherein the height of the first thumbnail is the display height of the first video, and the width of the first thumbnail is the display width of the first video.
8. The display method according to claim 4, wherein the obtaining a second thumbnail corresponding to the second video based on a display height of the second video and a display width of the second video includes:
analyzing the second video to obtain a frame of image;
reducing the analyzed image to obtain a reduced image, wherein the height of the reduced image is consistent with the display height of the second video;
and cutting the reduced image in the middle along the width direction to obtain a second thumbnail corresponding to the second video, wherein the width of the second thumbnail is consistent with the display width of the second video.
9. An electronic device, the electronic device comprising: one or more processors, memory, and cameras;
the memory is used for storing one or more programs;
The one or more processors are configured to execute the one or more programs to cause the electronic device to perform the method of displaying video thumbnails as recited in any one of claims 1-8.
10. A computer storage medium for storing a computer program which, when executed, is in particular adapted to carry out the method of displaying video thumbnails according to any one of claims 1 to 8.
CN202111022205.6A 2021-08-12 2021-09-01 Video thumbnail display method, apparatus and storage medium Active CN113918766B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202311287273.4A CN117609547A (en) 2021-08-12 2021-09-01 Video thumbnail display method, apparatus and storage medium
PCT/CN2022/093046 WO2023016015A1 (en) 2021-08-12 2022-05-16 Method for displaying video thumbnail, and device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110925581X 2021-08-12
CN202110925581 2021-08-12

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311287273.4A Division CN117609547A (en) 2021-08-12 2021-09-01 Video thumbnail display method, apparatus and storage medium

Publications (2)

Publication Number Publication Date
CN113918766A CN113918766A (en) 2022-01-11
CN113918766B true CN113918766B (en) 2023-10-13

Family

ID=79233739

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311287273.4A Pending CN117609547A (en) 2021-08-12 2021-09-01 Video thumbnail display method, apparatus and storage medium
CN202111022205.6A Active CN113918766B (en) 2021-08-12 2021-09-01 Video thumbnail display method, apparatus and storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202311287273.4A Pending CN117609547A (en) 2021-08-12 2021-09-01 Video thumbnail display method, apparatus and storage medium

Country Status (2)

Country Link
CN (2) CN117609547A (en)
WO (1) WO2023016015A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117609547A (en) * 2021-08-12 2024-02-27 荣耀终端有限公司 Video thumbnail display method, apparatus and storage medium
CN116048744B (en) * 2022-08-19 2023-09-12 荣耀终端有限公司 Image acquisition method and related electronic equipment

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007947A (en) * 2014-05-19 2014-08-27 广州金山网络科技有限公司 Thumbnail display method and device
CN104754223A (en) * 2015-03-12 2015-07-01 广东欧珀移动通信有限公司 Method for generating thumbnail and shooting terminal
CN105447034A (en) * 2014-08-29 2016-03-30 富泰华工业(深圳)有限公司 Method and system for generating picture thumbnail
CN106792272A (en) * 2016-11-28 2017-05-31 维沃移动通信有限公司 The generation method and mobile terminal of a kind of video thumbnails
CN108089788A (en) * 2017-12-19 2018-05-29 维沃移动通信有限公司 A kind of thumbnail display control method and mobile terminal
CN108737882A (en) * 2018-05-09 2018-11-02 腾讯科技(深圳)有限公司 Display methods, device, storage medium and the electronic device of image
CN108780377A (en) * 2016-03-17 2018-11-09 三星电子株式会社 Object Management group using computing device and visualization
CN109120997A (en) * 2018-09-30 2019-01-01 北京微播视界科技有限公司 Method for processing video frequency, device, terminal and medium
CN110691259A (en) * 2019-11-08 2020-01-14 北京奇艺世纪科技有限公司 Video playing method, system, device, electronic equipment and storage medium
CN111050062A (en) * 2018-10-15 2020-04-21 华为技术有限公司 Shooting method and electronic equipment
WO2020172826A1 (en) * 2019-02-27 2020-09-03 华为技术有限公司 Video processing method and mobile device
CN111669462A (en) * 2020-05-30 2020-09-15 华为技术有限公司 Method and related device for displaying image
CN111694533A (en) * 2020-06-12 2020-09-22 深圳新智联软件有限公司 Screen projection display method and device applied to horizontal and vertical screens, computer equipment and storage medium
CN111880711A (en) * 2020-07-31 2020-11-03 Oppo广东移动通信有限公司 Display control method, display control device, electronic equipment and storage medium
CN111918131A (en) * 2020-08-18 2020-11-10 北京达佳互联信息技术有限公司 Video generation method and device
CN112822394A (en) * 2020-12-30 2021-05-18 维沃移动通信(杭州)有限公司 Display control method and device, electronic equipment and readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7711193B2 (en) * 2006-11-07 2010-05-04 Aol Inc. Recognizing blank and nearly blank images
CN113055585B (en) * 2019-12-27 2022-06-10 青岛海信移动通信技术股份有限公司 Thumbnail display method of shooting interface and mobile terminal
CN112804445B (en) * 2020-12-30 2022-08-26 维沃移动通信有限公司 Display method and device and electronic equipment
CN117609547A (en) * 2021-08-12 2024-02-27 荣耀终端有限公司 Video thumbnail display method, apparatus and storage medium

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007947A (en) * 2014-05-19 2014-08-27 广州金山网络科技有限公司 Thumbnail display method and device
CN105447034A (en) * 2014-08-29 2016-03-30 富泰华工业(深圳)有限公司 Method and system for generating picture thumbnail
CN104754223A (en) * 2015-03-12 2015-07-01 广东欧珀移动通信有限公司 Method for generating thumbnail and shooting terminal
CN108780377A (en) * 2016-03-17 2018-11-09 三星电子株式会社 Object Management group using computing device and visualization
CN106792272A (en) * 2016-11-28 2017-05-31 维沃移动通信有限公司 The generation method and mobile terminal of a kind of video thumbnails
CN108089788A (en) * 2017-12-19 2018-05-29 维沃移动通信有限公司 A kind of thumbnail display control method and mobile terminal
CN108737882A (en) * 2018-05-09 2018-11-02 腾讯科技(深圳)有限公司 Display methods, device, storage medium and the electronic device of image
CN109120997A (en) * 2018-09-30 2019-01-01 北京微播视界科技有限公司 Method for processing video frequency, device, terminal and medium
CN111050062A (en) * 2018-10-15 2020-04-21 华为技术有限公司 Shooting method and electronic equipment
WO2020172826A1 (en) * 2019-02-27 2020-09-03 华为技术有限公司 Video processing method and mobile device
CN110691259A (en) * 2019-11-08 2020-01-14 北京奇艺世纪科技有限公司 Video playing method, system, device, electronic equipment and storage medium
CN111669462A (en) * 2020-05-30 2020-09-15 华为技术有限公司 Method and related device for displaying image
CN111694533A (en) * 2020-06-12 2020-09-22 深圳新智联软件有限公司 Screen projection display method and device applied to horizontal and vertical screens, computer equipment and storage medium
CN111880711A (en) * 2020-07-31 2020-11-03 Oppo广东移动通信有限公司 Display control method, display control device, electronic equipment and storage medium
CN111918131A (en) * 2020-08-18 2020-11-10 北京达佳互联信息技术有限公司 Video generation method and device
CN112822394A (en) * 2020-12-30 2021-05-18 维沃移动通信(杭州)有限公司 Display control method and device, electronic equipment and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Bongwon Suh.et al.Automatic thumbnail cropping and its effectiveness.UIST '03: Proceedings of the 16th annual ACM symposium on User interface software and technology.2003,第95–104页. *
基于IOS缩略图文件的数据恢复研究和开发;盛蒙蒙等;计算机时代;第19-21页 *

Also Published As

Publication number Publication date
CN113918766A (en) 2022-01-11
WO2023016015A9 (en) 2023-11-23
CN117609547A (en) 2024-02-27
WO2023016015A1 (en) 2023-02-16

Similar Documents

Publication Publication Date Title
CN105827964B (en) A kind of image processing method and mobile terminal
KR102045957B1 (en) Method and apparatus for photographing of a portable terminal
CN113918766B (en) Video thumbnail display method, apparatus and storage medium
CN114223192A (en) System and method for content enhancement using four-color filtered array sensors
WO2022252660A1 (en) Video capturing method and electronic device
WO2022022726A1 (en) Image capture method and device
CN113099146B (en) Video generation method and device and related equipment
WO2023134583A1 (en) Video recording method and apparatus, and electronic device
WO2023160241A1 (en) Video processing method and related device
WO2023093169A1 (en) Photographing method and electronic device
CN111479059B (en) Photographing processing method and device, electronic equipment and storage medium
US20220246178A1 (en) System and Method for Performing a Rewind Operation with a Mobile Image Capture Device
US20230188830A1 (en) Image Color Retention Method and Device
WO2024055797A1 (en) Method for capturing images in video, and electronic device
US10785415B2 (en) Display control device and display control method
WO2023226634A1 (en) Photographing method and electronic device
CN115550544B (en) Image processing method and device
WO2023036007A1 (en) Method for acquiring image, and electronic device
CN115484423A (en) Transition special effect adding method and electronic equipment
CN115802146A (en) Method for snapping image in video and electronic equipment
WO2023231696A1 (en) Photographing method and related device
CN115883957B (en) Shooting mode recommendation method
WO2023231616A1 (en) Photographing method and electronic device
WO2024055817A1 (en) Code scanning method and electronic device
WO2023160143A1 (en) Method and apparatus for viewing multimedia content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant