CN110809189A - Video playing method and device, electronic equipment and computer readable medium - Google Patents

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

Info

Publication number
CN110809189A
CN110809189A CN201911220352.7A CN201911220352A CN110809189A CN 110809189 A CN110809189 A CN 110809189A CN 201911220352 A CN201911220352 A CN 201911220352A CN 110809189 A CN110809189 A CN 110809189A
Authority
CN
China
Prior art keywords
video
aspect ratio
target video
target
playing
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.)
Granted
Application number
CN201911220352.7A
Other languages
Chinese (zh)
Other versions
CN110809189B (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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201911220352.7A priority Critical patent/CN110809189B/en
Publication of CN110809189A publication Critical patent/CN110809189A/en
Application granted granted Critical
Publication of CN110809189B publication Critical patent/CN110809189B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • H04N21/440272Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA for performing aspect ratio conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Abstract

The embodiment of the disclosure discloses a video playing method, a video playing device, electronic equipment and a computer readable medium. One embodiment of the method comprises: acquiring the aspect ratio of a target video from a video file of the target video; determining whether the aspect ratio of the video playing information is consistent with that of the video playing information corresponding to the target video, and issuing the video playing information by a server; in response to determining that the aspect ratio of the target video is inconsistent with the aspect ratio in the video playing information, processing the target video based on the aspect ratio of the target video and the aspect ratio of the screen of the video playing device to obtain a processed video; and playing the processed video. The implementation mode realizes the purpose of avoiding video compression or amplification caused by server issuing errors.

Description

Video playing method and device, electronic equipment and computer readable medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a video playing method, a video playing device, electronic equipment and a computer readable medium.
Background
The continuous development of internet technology, especially the continuous popularization of electronic equipment represented by smart phones, greatly facilitates the life of people. Meanwhile, various applications are also emerging. Taking video applications as an example, in addition to the traditional video playing applications, new video applications such as video streaming playing applications, video live broadcasting applications and the like are increasing. These video applications often play video according to the aspect ratio in the video playing information.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure provide a video playing method, apparatus, electronic device and computer readable medium to solve the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a video playing method, including: acquiring the aspect ratio of a target video from a video file of the target video; determining whether the aspect ratio of the video playing information is consistent with that of the video playing information corresponding to the target video, and issuing the video playing information by a server; in response to determining that the aspect ratio of the target video is inconsistent with the aspect ratio in the video playing information, processing the target video based on the aspect ratio of the target video and the aspect ratio of the screen of the video playing device to obtain a processed video; and playing the processed video.
In a second aspect, some embodiments of the present disclosure provide a video playback device, including: an acquisition unit configured to acquire an aspect ratio of a target video from a video file of the target video; the comparison unit is configured to determine whether the aspect ratio of the comparison unit is consistent with that in the video playing information, and the video playing information is issued by the server; the processing unit is configured to respond to the fact that the aspect ratio is inconsistent with the aspect ratio in the video playing information, and process the target video based on the aspect ratio and the aspect ratio of the screen of the video playing equipment to obtain a processed video; and the playing unit is configured to play the processed video.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement any of the methods described above.
In a fourth aspect, some embodiments of the disclosure provide a computer readable medium having a computer program stored thereon, where the program is to implement any of the above-mentioned methods when executed by a processor.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: the aspect ratio issued by the server is verified by comparing the aspect ratio of the video with the aspect ratio issued by the server. Therefore, video compression or amplification caused by server issuing errors can be avoided. And for the condition that the aspect ratio of the video player is inconsistent with the aspect ratio issued by the server, playing the target video based on the aspect ratio of the video player so as to correct the wrong aspect ratio and realize the normal playing of the video.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic diagram of an application scenario of a video playing method of some embodiments of the present disclosure;
fig. 2 is a flow diagram of some embodiments of a video playback method according to some embodiments of the present disclosure;
FIG. 3 is a flow diagram of further embodiments of a video playback method according to some embodiments of the present disclosure;
fig. 4 is a schematic structural diagram of some embodiments of a video playback device according to some embodiments of the present disclosure;
FIG. 5 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of an application scenario of a video playing method according to some embodiments of the present disclosure.
The video playing method provided by some embodiments of the present disclosure is generally executed by a terminal device. The terminal device may be hardware or software. When the terminal device is hardware, it may be various electronic devices supporting video processing, including but not limited to a smart phone, a tablet computer, an electronic book reader, a vehicle-mounted terminal, and the like. When the terminal device is software, the terminal device can be installed in the electronic devices listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
In the application scenario shown in fig. 1, an execution subject of the video playing method may be a video-class application installed on the smartphone 100. The user can watch videos through the smart phone 100 and the video-type application installed on the smart phone. In this process, as an example, the video class application may first read the native aspect ratio 102 of the target video 101 obtained from the video file of the target video 101. In practice, various attribute information such as the size and aspect ratio of a video is often contained in a video file. The video-class application can directly read such information of the target video 101. On this basis, it can be determined whether the aspect ratio 102 is consistent with the aspect ratio 104 in the video playing information 103 corresponding to the target video 101, and the video playing information 103 is issued by the server. The video playback information 103 may be intermediate information related to video playback. As an example, information such as aspect ratio may be included. In response to determining that the aspect ratio 102 is inconsistent with the aspect ratio 104 in the video playing information 103, processing the target video based on the aspect ratio and the aspect ratio of the screen of the video playing device to obtain a processed video; and playing the processed video. For example, the native aspect ratio is 2:1, and the screen aspect ratio is 16:9, in which case the width of the target video may be clipped to obtain a processed video with an aspect ratio of 16: 9.
With continued reference to fig. 2, a flow 200 of some embodiments of a video playback method according to the present disclosure is shown. The video playing method comprises the following steps:
step 201, obtaining the aspect ratio of the target video from the video file of the target video.
In some embodiments, the executing subject of the video playing method may obtain the self aspect ratio of the target video from the video file of the target video. The video file of the target video can be stored locally in the execution main body or can be stored in other electronic equipment in communication connection. When stored in other electronic devices, the execution body may acquire the video file in a limited or wireless manner. In practice, various attribute information of the target video may be included in the video file of the target video. For example, the size, aspect ratio, resolution, etc. of the video. The execution subject of the video playing method (e.g., the video-class application in fig. 1) can directly read this information. The target video may be any video. The target video can be determined through specification or screening under certain conditions. For example, a currently playing video may be determined as the target video. As another example, a video stored at a video playback address acquired by the execution subject may be determined as the target video. Wherein the aspect ratio may refer to a ratio between a width and a height of the video image.
Step 202, determining whether the aspect ratio of the video playing information corresponding to the target video is consistent with the aspect ratio of the video playing information corresponding to the target video, and issuing the video playing information by the server.
In some embodiments, when the video file is stored in the server, the execution main body may receive a video playing address (URL) issued by the server. In addition, the video playing information sent by the server can be received. As an example, the video playing information may include information such as aspect ratio. On this basis, the execution subject may determine whether the aspect ratio thereof coincides with the aspect ratio in the video play information corresponding to the target video. If not, execution may continue to step 203. If the video playing information is consistent with the target video, optionally, the target video can be directly played according to the aspect ratio (or the aspect ratio of the target video) in the video playing information.
In some optional implementations of some embodiments, the execution body may upload aspect ratio comparison information to a server of the communication connection. The aspect ratio comparison information is used for representing whether the aspect ratio of the aspect ratio is consistent with the aspect ratio in the video playing information corresponding to the target video. Therefore, the server can perform corresponding marking so as to adjust the aspect ratio in the video playing information subsequently.
Step 203, in response to determining that the aspect ratio of the target video is inconsistent with the aspect ratio in the video playing information, processing the target video based on the aspect ratio of the target video and the aspect ratio of the screen of the video playing device to obtain a processed video.
In some embodiments, in response to determining that the self aspect ratio is not consistent with the aspect ratio in the video playing information, as an example, the execution subject may crop the target video based on the self aspect ratio and the screen aspect ratio of the video playing device, thereby obtaining the processed video. For example, the native aspect ratio is 2:1, and the screen aspect ratio is 16:9, in which case the width of the target video may be cropped to obtain a processed video with an aspect ratio of 16: 9.
And step 204, playing the processed video.
In some embodiments, the aspect ratio of the processed video to the screen is adapted, and the execution subject can play the processed video.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: in some scenarios, for example, the aspect ratio of the video is not included in the video playing information, or the video rotation parameter is included in the video playing information, and the like, which may cause the aspect ratio reading failure or the reading error, thereby affecting the normal playing of the video. The aspect ratio issued by the server is verified by comparing the aspect ratio of the video with the aspect ratio issued by the server. Therefore, video compression or amplification caused by server issuing errors can be avoided. And for the condition that the aspect ratio of the video playing device is inconsistent with the aspect ratio issued by the server, processing the target video based on the aspect ratio of the video playing device and the aspect ratio of the screen of the video playing device, and playing the processed video to correct the wrong aspect ratio and realize the normal playing of the video.
With further reference to fig. 3, a flow 300 of further embodiments of a video playback method according to the present disclosure is shown. The video playing method comprises the following steps:
step 301, before playing the first preset number of frames of the target video, obtaining the aspect ratio of the target video from the video file of the target video.
In some embodiments, the execution subject may obtain the self aspect ratio of the target video from the video file of the target video before playing the first preset number of frames of the target video. In practice, the preset number can be set according to actual needs. For example, the preset number may be one, so that subsequent processing may be performed before the first frame to reduce video frames that are not normally played (enlarged or reduced). Compared with the verification at other times, the aspect ratio verification is carried out before the first frame is played, so that the video amplification or compression can be avoided to the maximum extent. In addition, step 201 in those embodiments corresponding to fig. 2 may be referred to for specific implementation of obtaining the aspect ratio of the target video from the video file of the target video, and details are not repeated here.
Step 302, determining whether the aspect ratio of the video playing information corresponding to the target video is consistent with the aspect ratio of the video playing information corresponding to the target video, and issuing the video playing information by the server.
In some embodiments, the specific implementation of step 302 and the technical effect brought by the implementation may refer to step 202 in the embodiment corresponding to fig. 2, which are not described herein again.
Step 303, in response to determining that the aspect ratio of itself is inconsistent with the aspect ratio in the video playing information, determining the type of the target video.
In some embodiments, the execution subject may determine the type of the target video in response to determining that the aspect ratio itself is not consistent with the aspect ratio in the video playback information. According to actual needs, videos can be classified according to different classification standards. For example, videos may be classified according to whether they are horizontal or vertical. As another example, the video may be classified according to the content thereof.
And step 304, processing the target video based on the aspect ratio of the target video, the aspect ratio of the screen of the video playing device and the type of the target video.
In some embodiments, the executing agent may process the target video based on its aspect ratio, the aspect ratio of the screen of the video playback device, and the type of target video determined in step 303. Taking as an example the classification of a video according to whether the video is a horizontal version video or a vertical version video, the processing can be performed according to the following steps:
step 3041, in response to determining that the type of the target video is a landscape video, fixing the width of the target video, and cutting the height of the target video based on the aspect ratio of the target video and the aspect ratio of the screen to obtain a processed video. For example, the target video is a landscape video with an aspect ratio of 16:9 and an aspect ratio of 16:8, and the height of the target video may be clipped to obtain a processed video with an aspect ratio of 16: 8. The video is guaranteed to be a horizontal version video all the time through fixing the width and cutting the height, and the video type is guaranteed to be unchanged.
Step 3042, in response to determining that the type of the target video is a portrait video, fixing the height of the target video, and cutting the width of the target video based on the aspect ratio of the target video and the aspect ratio of the screen to obtain a processed video. For example, the target video is a portrait video with an aspect ratio of 6:8 and an aspect ratio of 5:8, and the width of the target video may be clipped to obtain a processed video with an aspect ratio of 5: 8. The height is cut by fixing the height, so that the video is always vertical, and the video type is unchanged.
Of course, for videos classified by other classification criteria, a corresponding mode may be selected for processing such as clipping.
And 305, playing the processed video.
As can be seen from fig. 3, compared with the description of some embodiments corresponding to fig. 2, by determining the type of the video and performing different processing on the video according to different types of the video, the video processing is more targeted and accurate, so as to further ensure the normal playing of the video.
With further reference to fig. 4, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a video playing apparatus, which correspond to those shown in fig. 2, and which may be applied in various electronic devices.
As shown in fig. 4, the video playback apparatus 400 of some embodiments includes: an acquisition unit 401, a comparison unit 402, a processing unit 403, and a playback unit 404. Wherein the obtaining unit 401 is configured to obtain the self aspect ratio of the target video from the video file of the target video. The comparing unit 402 is configured to determine whether the aspect ratio of the video playing information is consistent with that of the video playing information corresponding to the target video, and the video playing information is issued by the server. The playing unit 403 is configured to process the target video based on the aspect ratio of the video playing device and the aspect ratio of the screen of the video playing device, in response to determining that the aspect ratio of the video playing device is inconsistent with the aspect ratio of the video playing device, to obtain a processed video. The playback unit 404 is configured to play back the processed video.
In some embodiments, specific implementations of the obtaining unit 401, the comparing unit 402, the processing unit 403, and the playing unit 404 in the video playing apparatus 400 and the technical effects thereof may refer to step 201 and step 204 in the embodiment corresponding to fig. 2, which are not described herein again.
In an alternative implementation of some embodiments, the processing unit 403 may be further configured to: determining the type of the target video; and processing the target video based on the aspect ratio of the target video, the aspect ratio of the screen of the video playing device and the type of the target video.
In an optional implementation of some embodiments, the obtaining unit 401 may be further configured to: before the first preset number of frames of the target video are played, the self aspect ratio of the target video is obtained from the video file of the target video.
In an alternative implementation of some embodiments, the processing unit 403 may be further configured to: in response to the fact that the type of the target video is determined to be a horizontal version video, fixing the width of the target video, and cutting the height of the target video based on the self aspect ratio and the aspect ratio of the screen; and in response to the fact that the type of the target video is determined to be a portrait video, fixing the height of the target video, and cutting the width of the target video based on the aspect ratio of the target video and the aspect ratio of the screen.
In some embodiments, the aspect ratio delivered by the server is checked by comparing the aspect ratio of the video itself with the aspect ratio delivered by the server. Therefore, video compression or amplification caused by server issuing errors can be avoided. And for the condition that the aspect ratio of the video player is inconsistent with the aspect ratio issued by the server, playing the target video based on the aspect ratio of the video player so as to correct the wrong aspect ratio and realize the normal playing of the video.
Referring now to fig. 5, a block diagram of an electronic device (e.g., the terminal device of fig. 1) 500 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device in some embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; a storage device 508 including, for example, a memory card; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 5 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program, when executed by the processing device 501, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring the aspect ratio of a target video from a video file of the target video; determining whether the aspect ratio of the video playing information is consistent with that of the video playing information corresponding to the target video, and issuing the video playing information by a server; in response to determining that the aspect ratio of the target video is inconsistent with the aspect ratio in the video playing information, processing the target video based on the aspect ratio of the target video and the aspect ratio of the screen of the video playing device to obtain a processed video; and playing the processed video.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a comparison unit, and a play unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, the acquisition unit may also be described as a "unit that acquires the own aspect ratio of the target video".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
According to one or more embodiments of the present disclosure, there is provided a video playing method including: acquiring the aspect ratio of a target video from a video file of the target video; determining whether the aspect ratio of the video playing information is consistent with that of the video playing information corresponding to the target video, and issuing the video playing information by a server; in response to determining that the aspect ratio of the target video is inconsistent with the aspect ratio in the video playing information, processing the target video based on the aspect ratio of the target video and the aspect ratio of the screen of the video playing device to obtain a processed video; and playing the processed video.
According to one or more embodiments of the present disclosure, processing a target video based on an aspect ratio of the target video and an aspect ratio of a screen of a video playing device includes: determining the type of the target video; and processing the target video based on the aspect ratio of the target video, the aspect ratio of the screen of the video playing device and the type of the target video.
According to one or more embodiments of the present disclosure, acquiring the self aspect ratio of the target video includes: before the first preset number of frames of the target video are played, the self aspect ratio of the target video is obtained from the video file of the target video.
According to one or more embodiments of the present disclosure, processing a target video based on an aspect ratio of the target video, an aspect ratio of a screen of a video playing device, and a type of the target video includes: in response to the fact that the type of the target video is determined to be a horizontal version video, fixing the height of the target video, and cutting the width of the target video based on the aspect ratio of the target video and the aspect ratio of the screen; and in response to the fact that the type of the target video is determined to be a portrait video, fixing the width of the target video, and cutting the height of the target video based on the aspect ratio of the target video and the aspect ratio of the screen.
According to one or more embodiments of the present disclosure, there is provided a video playback apparatus including: an acquisition unit configured to acquire an aspect ratio of a target video from a video file of the target video; the comparison unit is configured to determine whether the aspect ratio of the comparison unit is consistent with that of the video playing information corresponding to the target video or not, and the video playing information is issued by the server; the processing unit is configured to respond to the fact that the aspect ratio is inconsistent with the aspect ratio in the video playing information, and process the target video based on the aspect ratio and the aspect ratio of the screen of the video playing equipment to obtain a processed video; and the playing unit is configured to play the processed video.
In accordance with one or more embodiments of the present disclosure, the processing unit is further configured to: determining the type of the target video; and processing the target video based on the aspect ratio of the target video, the aspect ratio of the screen of the video playing device and the type of the target video.
In accordance with one or more embodiments of the present disclosure, in an optional implementation of some embodiments, the obtaining unit may be further configured to: before the first preset number of frames of the target video are played, the self aspect ratio of the target video is obtained from the video file of the target video.
In accordance with one or more embodiments of the present disclosure, the processing unit may be further configured to: in response to the fact that the type of the target video is determined to be a horizontal version video, fixing the width of the target video, and cutting the height of the target video based on the self aspect ratio and the aspect ratio of the screen; and in response to the fact that the type of the target video is determined to be a portrait video, fixing the height of the target video, and cutting the width of the target video based on the aspect ratio of the target video and the aspect ratio of the screen.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement any of the methods described above.
According to one or more embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, wherein the program, when executed by a processor, implements any of the methods described above.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (10)

1. A video playback method, comprising:
acquiring the aspect ratio of a target video from a video file of the target video;
determining whether the aspect ratio of the video playing information corresponding to the target video is consistent with the aspect ratio of the video playing information corresponding to the target video, wherein the video playing information is issued by a server;
in response to determining that the aspect ratio is inconsistent with the aspect ratio in the video playing information, processing the target video based on the aspect ratio and the aspect ratio of a screen of the video playing device to obtain a processed video;
and playing the processed video.
2. The method of claim 1, wherein the processing the target video based on the native aspect ratio and an aspect ratio of a screen of a video playback device comprises:
determining the type of the target video;
and processing the target video based on the aspect ratio of the target video, the aspect ratio of the screen of the video playing device and the type of the target video.
3. The method of claim 1, wherein the obtaining the native aspect ratio of the target video from the video file of the target video comprises:
before the first preset number of frames of the target video are played, the self aspect ratio of the target video is obtained from the video file of the target video.
4. The method of claim 2, wherein the processing the target video based on the native aspect ratio, the aspect ratio of the screen of the video playback device, and the type of the target video comprises:
in response to the fact that the type of the target video is determined to be a horizontal version video, fixing the width of the target video, and cutting the height of the target video based on the self aspect ratio and the aspect ratio of the screen;
and in response to the fact that the type of the target video is determined to be a portrait video, fixing the height of the target video, and cutting the width of the target video based on the aspect ratio of the target video and the aspect ratio of the screen.
5. A video playback apparatus comprising:
an acquisition unit configured to acquire an aspect ratio of a target video from a video file of the target video;
the comparison unit is configured to determine whether the aspect ratio of the comparison unit is consistent with the aspect ratio in the video playing information corresponding to the target video, and the video playing information is issued by a server;
a processing unit configured to process the target video based on the aspect ratio and an aspect ratio of a screen of a video playing device to obtain a processed video in response to determining that the aspect ratio is inconsistent with the aspect ratio in the video playing information;
a playback unit configured to play back the processed video.
6. The apparatus of claim 5, wherein the processing unit is further configured to:
determining the type of the target video;
and processing the target video based on the aspect ratio of the target video, the aspect ratio of the screen of the video playing device and the type of the target video.
7. The apparatus of claim 5, wherein the obtaining unit is further configured to:
before the first preset number of frames of the target video are played, the self aspect ratio of the target video is obtained from the video file of the target video.
8. The apparatus of claim 6, wherein the processing unit is further configured to:
in response to the fact that the type of the target video is determined to be a horizontal version video, fixing the width of the target video, and cutting the height of the target video based on the self aspect ratio and the aspect ratio of the screen;
and in response to the fact that the type of the target video is determined to be a portrait video, fixing the height of the target video, and cutting the width of the target video based on the aspect ratio of the target video and the aspect ratio of the screen.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-4.
CN201911220352.7A 2019-12-03 2019-12-03 Video playing method and device, electronic equipment and computer readable medium Active CN110809189B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911220352.7A CN110809189B (en) 2019-12-03 2019-12-03 Video playing method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911220352.7A CN110809189B (en) 2019-12-03 2019-12-03 Video playing method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN110809189A true CN110809189A (en) 2020-02-18
CN110809189B CN110809189B (en) 2022-01-04

Family

ID=69492216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911220352.7A Active CN110809189B (en) 2019-12-03 2019-12-03 Video playing method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN110809189B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112561839A (en) * 2020-12-02 2021-03-26 北京有竹居网络技术有限公司 Video clipping method and device, storage medium and electronic equipment
CN112770183A (en) * 2020-11-10 2021-05-07 北京达佳互联信息技术有限公司 Video playing control method and device, electronic equipment and storage medium
CN112788426A (en) * 2020-12-30 2021-05-11 北京安博盛赢教育科技有限责任公司 Display method, device, medium and electronic equipment of function display area
CN113364672A (en) * 2021-06-29 2021-09-07 中星电子股份有限公司 Method, device, equipment and computer readable medium for determining media gateway information
CN114302211A (en) * 2021-12-29 2022-04-08 北京百度网讯科技有限公司 Video playing method and device and electronic equipment
CN114760503A (en) * 2022-04-15 2022-07-15 北京爱奇艺科技有限公司 Video playing method, device, system, electronic equipment and storage medium
WO2022242544A1 (en) * 2021-05-21 2022-11-24 北京字节跳动网络技术有限公司 Live-streaming video stream playing method and apparatus, and electronic device and storage medium

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006339775A (en) * 2005-05-31 2006-12-14 Kddi R & D Laboratories Inc Scalable moving picture transmission system
CN102064906A (en) * 2009-11-18 2011-05-18 突触计算机系统(上海)有限公司 Method and device for checking data blocks
CN102609326A (en) * 2012-01-17 2012-07-25 大唐移动通信设备有限公司 Data downloading processing method and data downloading processing device
CN102867024A (en) * 2012-08-22 2013-01-09 东莞宇龙通信科技有限公司 File downloading method and terminal equipment
CN104104972A (en) * 2013-04-10 2014-10-15 深圳市快播科技有限公司 Multimedia playing method, apparatus and system
CN104281427A (en) * 2014-03-10 2015-01-14 深圳深讯和科技有限公司 Video data processing method and system in interactive application
CN104301779A (en) * 2013-07-16 2015-01-21 腾讯科技(深圳)有限公司 Method, system and device of playing video file
CN106028056A (en) * 2016-06-27 2016-10-12 北京金山安全软件有限公司 Video production method and device and electronic equipment
CN106131685A (en) * 2016-06-27 2016-11-16 乐视控股(北京)有限公司 A kind of information transferring method, video playback apparatus and video display apparatus
CN106155828A (en) * 2016-07-13 2016-11-23 微鲸科技有限公司 For play-back application resource control method and equipment
CN106254779A (en) * 2016-08-30 2016-12-21 上海乐欢软件有限公司 A kind of panoramic video processing method and server and client side
CN106303573A (en) * 2016-08-30 2017-01-04 上海乐欢软件有限公司 A kind of 3D method of video image processing and server and client side
CN106331009A (en) * 2015-06-26 2017-01-11 广州市动景计算机科技有限公司 Application program downloading method, device and system
CN106385632A (en) * 2016-09-21 2017-02-08 微鲸科技有限公司 Video playing method and video playing device
CN108092995A (en) * 2018-01-12 2018-05-29 珠海市杰理科技股份有限公司 Streaming medium data processing method, device, computer equipment and storage medium
CN109101350A (en) * 2018-08-20 2018-12-28 郑州云海信息技术有限公司 A kind of data processing method and its relevant device
CN109684026A (en) * 2019-01-14 2019-04-26 武汉斗鱼鱼乐网络科技有限公司 APP replacing skins method, apparatus, electronic equipment and storage medium
CN109963171A (en) * 2017-12-14 2019-07-02 腾讯科技(深圳)有限公司 Transmitting of Multi-media Information method, transmission device and storage medium
CN113395585A (en) * 2021-02-09 2021-09-14 腾讯科技(北京)有限公司 Video detection method, video playing control method and device and electronic equipment

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006339775A (en) * 2005-05-31 2006-12-14 Kddi R & D Laboratories Inc Scalable moving picture transmission system
CN102064906A (en) * 2009-11-18 2011-05-18 突触计算机系统(上海)有限公司 Method and device for checking data blocks
CN102609326A (en) * 2012-01-17 2012-07-25 大唐移动通信设备有限公司 Data downloading processing method and data downloading processing device
CN102867024A (en) * 2012-08-22 2013-01-09 东莞宇龙通信科技有限公司 File downloading method and terminal equipment
CN104104972A (en) * 2013-04-10 2014-10-15 深圳市快播科技有限公司 Multimedia playing method, apparatus and system
CN104301779A (en) * 2013-07-16 2015-01-21 腾讯科技(深圳)有限公司 Method, system and device of playing video file
CN104281427A (en) * 2014-03-10 2015-01-14 深圳深讯和科技有限公司 Video data processing method and system in interactive application
CN106331009A (en) * 2015-06-26 2017-01-11 广州市动景计算机科技有限公司 Application program downloading method, device and system
CN106131685A (en) * 2016-06-27 2016-11-16 乐视控股(北京)有限公司 A kind of information transferring method, video playback apparatus and video display apparatus
CN106028056A (en) * 2016-06-27 2016-10-12 北京金山安全软件有限公司 Video production method and device and electronic equipment
CN106155828A (en) * 2016-07-13 2016-11-23 微鲸科技有限公司 For play-back application resource control method and equipment
CN106254779A (en) * 2016-08-30 2016-12-21 上海乐欢软件有限公司 A kind of panoramic video processing method and server and client side
CN106303573A (en) * 2016-08-30 2017-01-04 上海乐欢软件有限公司 A kind of 3D method of video image processing and server and client side
CN106385632A (en) * 2016-09-21 2017-02-08 微鲸科技有限公司 Video playing method and video playing device
CN109963171A (en) * 2017-12-14 2019-07-02 腾讯科技(深圳)有限公司 Transmitting of Multi-media Information method, transmission device and storage medium
CN108092995A (en) * 2018-01-12 2018-05-29 珠海市杰理科技股份有限公司 Streaming medium data processing method, device, computer equipment and storage medium
CN109101350A (en) * 2018-08-20 2018-12-28 郑州云海信息技术有限公司 A kind of data processing method and its relevant device
CN109684026A (en) * 2019-01-14 2019-04-26 武汉斗鱼鱼乐网络科技有限公司 APP replacing skins method, apparatus, electronic equipment and storage medium
CN113395585A (en) * 2021-02-09 2021-09-14 腾讯科技(北京)有限公司 Video detection method, video playing control method and device and electronic equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112770183A (en) * 2020-11-10 2021-05-07 北京达佳互联信息技术有限公司 Video playing control method and device, electronic equipment and storage medium
CN112770183B (en) * 2020-11-10 2023-03-24 北京达佳互联信息技术有限公司 Video playing control method and device, electronic equipment and storage medium
CN112561839A (en) * 2020-12-02 2021-03-26 北京有竹居网络技术有限公司 Video clipping method and device, storage medium and electronic equipment
CN112788426A (en) * 2020-12-30 2021-05-11 北京安博盛赢教育科技有限责任公司 Display method, device, medium and electronic equipment of function display area
WO2022242544A1 (en) * 2021-05-21 2022-11-24 北京字节跳动网络技术有限公司 Live-streaming video stream playing method and apparatus, and electronic device and storage medium
CN113364672A (en) * 2021-06-29 2021-09-07 中星电子股份有限公司 Method, device, equipment and computer readable medium for determining media gateway information
CN113364672B (en) * 2021-06-29 2022-12-30 中星电子股份有限公司 Method, device, equipment and computer readable medium for determining media gateway information
CN114302211A (en) * 2021-12-29 2022-04-08 北京百度网讯科技有限公司 Video playing method and device and electronic equipment
CN114302211B (en) * 2021-12-29 2023-08-01 北京百度网讯科技有限公司 Video playing method and device and electronic equipment
CN114760503A (en) * 2022-04-15 2022-07-15 北京爱奇艺科技有限公司 Video playing method, device, system, electronic equipment and storage medium
CN114760503B (en) * 2022-04-15 2023-12-05 北京爱奇艺科技有限公司 Video playing method, device, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110809189B (en) 2022-01-04

Similar Documents

Publication Publication Date Title
CN110809189B (en) Video playing method and device, electronic equipment and computer readable medium
CN111399956B (en) Content display method and device applied to display equipment and electronic equipment
CN110213614B (en) Method and device for extracting key frame from video file
CN111459364B (en) Icon updating method and device and electronic equipment
CN109684589B (en) Client comment data processing method and device and computer storage medium
CN112311656B (en) Message aggregation and display method and device, electronic equipment and computer readable medium
CN110958481A (en) Video page display method and device, electronic equipment and computer readable medium
CN112312222A (en) Video sending method and device and electronic equipment
US11783865B2 (en) Method and apparatus for displaying video playback page, and electronic device and medium
CN111596991A (en) Interactive operation execution method and device and electronic equipment
CN111263220B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN111756953A (en) Video processing method, device, equipment and computer readable medium
CN110619101B (en) Method and apparatus for processing information
CN112000251A (en) Method, apparatus, electronic device and computer readable medium for playing video
CN111754600A (en) Poster image generation method and device and electronic equipment
CN111209432A (en) Information acquisition method and device, electronic equipment and computer readable medium
CN112307393A (en) Information issuing method and device and electronic equipment
CN111367592B (en) Information processing method and device
CN111385638B (en) Video processing method and device
CN113126985A (en) Method, device, electronic equipment and computer readable medium for page rendering
CN112417276A (en) Paging data acquisition method and device, electronic equipment and computer readable storage medium
CN112732457A (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN111294657A (en) Information processing method and device
CN112346630B (en) State determination method, device, equipment and computer readable medium
CN111294321B (en) Information processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.