An ultra-high-definition video playing method, system, embedded device and medium

By slicing and optimizing the GOP length of ultra-high-definition video files through encoding and decoding, the problems of high hardware cost and poor stability in existing technologies are solved, achieving efficient and stable ultra-high-definition video playback.

CN119788912BActive Publication Date: 2026-11-27YEKER INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411864566.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2026-11-27
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

Existing technologies suffer from high hardware costs, poor stability, and large memory consumption when playing ultra-high-definition videos, making it difficult to play ultra-high-definition audio and video files efficiently.

Method used

Ultra-high-definition video files are divided into slices and encoded and decoded according to a preset GOP length through a hardware decoding channel. Key I-frames are inserted to support normal and speed playback, and memory usage and decoding process are optimized.

Benefits of technology

It reduces the size of ultra-high-definition audio and video files, improves playback efficiency and stability, and supports users to watch and quickly browse video content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788912B_ABST
    Figure CN119788912B_ABST
Patent Text Reader

Abstract

The application discloses an ultra-high-definition video playing method and system, embedded equipment and medium, comprising: dividing an acquired ultra-high-definition video file into at least one slice file according to a first playing instruction of a user, determining a first slice file being currently played, and encoding the first slice file according to a preset first GOP length to obtain a second slice file; mapping the second slice file to a first memory, and decoding the second slice file at a normal speed through a first hardware decoding channel to obtain a first audio-video stream; inserting a key I frame in the second slice file according to a preset second GOP length, and quickly decoding the second slice file at a preset speed through a second hardware decoding channel to obtain a second audio-video stream; and playing the first audio-video stream or the second audio-video stream based on a second playing instruction of the user. The application can reduce the size of an ultra-high-definition audio-video file and improve the playing efficiency of the ultra-high-definition audio-video file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of multimedia, and in particular to an ultra-high-definition video playback method, system, embedded device, and medium. Background Technology

[0002] With the gradual popularization of 1080p high-definition video, the next generation of ultra-high-definition video (resolution greater than 1920×1080, such as 4K, 8K, etc.) is gradually entering people's field of vision. Ultra-high-definition video brings viewers a more realistic and shocking viewing experience with its amazing resolution and delicate color performance. However, because ultra-high-definition video files contain more pixel information and higher data compression rates, they occupy a large amount of space. Therefore, when playing ultra-high-definition video, more powerful hardware support is needed to cope with the huge amount of data.

[0003] During the playback of ultra-high-definition (UHD) videos, decoding primarily relies on external storage devices, peripheral interfaces, or direct loading into memory. However, each of these methods has its drawbacks. Specifically, while using external storage devices is feasible, it incurs additional costs, and their stability directly affects the smoothness of UHD video playback. When playing UHD videos using peripheral interfaces, the exposed interfaces are susceptible to interference from external environmental factors, leading to playback instability. As for loading the entire UHD video file into memory in I-frame, P-frame, and B-frame encoding formats, this would consume a significant amount of memory space, thereby increasing storage costs.

[0004] Application content

[0005] This application provides an ultra-high-definition video playback method, system, embedded device, and medium to reduce the size of ultra-high-definition audio and video files and improve the playback efficiency of ultra-high-definition audio and video files.

[0006] Firstly, this application provides a method for playing ultra-high-definition video, including:

[0007] The acquired ultra-high-definition video file is divided into at least one slice file according to the user's first playback command. The first slice file to be played is determined, and the first slice file is encoded according to the preset first GOP length to obtain the second slice file.

[0008] The second slice file is mapped to the first memory, and the second slice file is decoded at normal speed through the first hardware decoding channel to obtain the first audio and video stream;

[0009] The second slice file is quickly decoded at a preset speed through the second hardware decoding channel, and key I-frames are inserted into the second slice file according to the preset second GOP length to obtain the second audio and video stream;

[0010] Based on the user's second playback command, the first audio / video stream or the second audio / video stream is played.

[0011] This application embodiment divides the ultra-high-definition video file into several slice files, facilitating subsequent encoding of the first slice file. Encoding the first slice file according to a preset first GOP length reduces the number of I-frames in the first slice file, thus reducing the size of the ultra-high-definition audio and video file. Decoding the second slice file at normal speed through a first hardware decoding channel meets the user's needs for normal viewing of ultra-high-definition video files. Inserting key I-frames into the second slice file according to a preset second GOP length ensures smooth decoding of the subsequent second slice file. Fast decoding of the second slice file at a preset speed through a second hardware decoding channel supports fast browsing of video content and ensures that the user can locate key frames when dragging playback. Based on the user's second playback command, the first or second audio and video stream is played, allowing playback of normal speed or multi-speed video according to the user's playback command, improving the playback efficiency of ultra-high-definition audio and video files. Compared with the prior art, this application can reduce the size of ultra-high-definition audio and video files and improve their playback efficiency.

[0012] Furthermore, the step of dividing the acquired ultra-high-definition video file into at least one segment file according to the user's first playback command specifically involves:

[0013] Obtain the user's first playback command, parse the first playback command, and obtain the corresponding position playback parameters;

[0014] The slicing strategy is determined based on the ultra-high-definition video file and the position playback parameters;

[0015] The ultra-high-definition video file is sliced ​​based on the slicing strategy to obtain at least one sliced ​​file.

[0016] By dividing the ultra-high-definition video file in this way, it can be divided into several slice files, which facilitates the subsequent encoding of the first slice file.

[0017] Furthermore, the step of inserting key I-frames into the second slice file according to a preset second GOP length to obtain the second audio / video stream specifically involves:

[0018] The second slice file is analyzed to determine the corresponding first GOP length and I-frame position;

[0019] Based on the second slice file and the second GOP length, determine the I-frame insertion point of the second slice file;

[0020] A key I-frame is inserted at the I-frame insertion point, and the modified second slice file is re-encoded to obtain the second audio and video stream.

[0021] By inserting key I-frames into the second slice file according to the preset second GOP length, and by padding the I-frames, the smooth decoding of the subsequent second slice file can be ensured.

[0022] Furthermore, the step of playing the first audio / video stream or the second audio / video stream based on the user's second playback command specifically involves:

[0023] Obtain the user's second playback command and parse the first playback command to obtain the speed playback parameters;

[0024] Based on the speed playback parameters, play the first audio / video stream or the second audio / video stream.

[0025] Based on the user's second playback command, the first or second audio / video stream can be played. This allows for the playback of videos at normal or accelerated speeds, improving the playback efficiency of ultra-high-definition audio / video files.

[0026] Furthermore, the ultra-high-definition video playback method also includes:

[0027] The third slice file is mapped to the second memory, the third slice file is quickly decoded through the third hardware decoding channel, and key I-frames are inserted into the third slice file according to the preset second GOP length to obtain the third audio and video stream that is dragged backward.

[0028] The user's third playback command is parsed to obtain the first drag playback parameters;

[0029] Based on the first drag playback parameters, it is determined whether the user is dragging backward to play the video. If the user is dragging backward to play the video, then the third audio and video stream is played.

[0030] By processing the third audio and video stream in advance to allow the user to drag it backward, we can prepare for the user's dragging and improve the stability and efficiency of ultra-high-definition video file playback.

[0031] Furthermore, the ultra-high-definition video playback method also includes:

[0032] The fourth slice file is mapped to the third memory, the fourth slice file is quickly decoded through the fourth hardware decoding channel, and key I-frames are inserted into the fourth slice file according to the preset second GOP length to obtain the forward-dragging fourth audio and video stream.

[0033] The user's fourth playback command is parsed to obtain the second drag playback parameters;

[0034] Based on the second drag playback parameters, it is determined whether the user is dragging forward to play the video. If the user is dragging forward to play the video, then the fourth audio and video stream is played.

[0035] By processing the fourth audio and video stream in advance, the system prepares the user for dragging the video forward, thus improving the stability and efficiency of playing ultra-high-definition video files.

[0036] Furthermore, after playing the first audio / video stream or the second audio / video stream, the method further includes:

[0037] Determine whether the first audio / video stream or the second audio / video stream has finished playing;

[0038] If playback is complete, the first memory is replaced with the second memory, and the third audio and video stream is played.

[0039] This method of replacing and updating memory after playback is complete facilitates direct and rapid loading of subsequent video segments, improving the stability and efficiency of ultra-high-definition video file playback.

[0040] Secondly, this application also provides an ultra-high-definition video playback system suitable for embedded devices, the system comprising: a slicing module, a first decoding module, a second decoding module, and a playback module;

[0041] The slicing module is used to divide the acquired ultra-high-definition video file into at least one slice file according to the user's first playback instruction, determine the first slice file currently being played, and encode the first slice file according to a preset first GOP length to obtain a second slice file.

[0042] The first decoding module is used to map the second slice file to the first memory, and decode the second slice file at normal speed through the first hardware decoding channel to obtain the first audio and video stream;

[0043] The second decoding module is used to quickly decode the second slice file at a preset speed through the second hardware decoding channel, and insert key I-frames into the second slice file according to a preset second GOP length to obtain the second audio and video stream;

[0044] The playback module is used to play the first audio / video stream or the second audio / video stream based on the user's second playback command.

[0045] This application embodiment divides the ultra-high-definition video file into several slice files, facilitating subsequent encoding of the first slice file. Encoding the first slice file according to a preset first GOP length reduces the number of I-frames in the first slice file, thus reducing the size of the ultra-high-definition audio and video file. Decoding the second slice file at normal speed through a first hardware decoding channel meets the user's needs for normal viewing of ultra-high-definition video files. Inserting key I-frames into the second slice file according to a preset second GOP length ensures smooth decoding of the subsequent second slice file. Fast decoding of the second slice file at a preset speed through a second hardware decoding channel supports fast browsing of video content and ensures that the user can locate key frames when dragging playback. Based on the user's second playback command, the first or second audio and video stream is played, allowing playback of normal speed or multi-speed video according to the user's playback command, improving the playback efficiency of ultra-high-definition audio and video files. Compared with the prior art, this application can reduce the size of ultra-high-definition audio and video files and improve their playback efficiency.

[0046] Thirdly, this application also provides an embedded device, comprising: the embedded device being configured to perform the ultra-high-definition video playback method as described in this application.

[0047] Fourthly, this application also provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the ultra-high-definition video playback method as described in this application. Attached Figure Description

[0048] Figure 1 This is a flowchart illustrating one embodiment of an ultra-high-definition video playback method provided in this application;

[0049] Figure 2 This is a schematic diagram of the GOP length provided in this application;

[0050] Figure 3 This is a schematic diagram showing the positional relationship of the slice files provided in this application;

[0051] Figure 4 This is a schematic diagram of one embodiment of an ultra-high-definition video playback system provided in this application. Detailed Implementation

[0052] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0053] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.

[0054] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0055] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0056] The term “and / or” refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes these combinations.

[0057] Ultra-high-definition (UHD) video is gradually entering people's lives, providing a truly immersive viewing experience with stunning resolution and exquisite colors. However, due to its rich pixel information and high data compression rate, it occupies a large amount of space. Therefore, more powerful hardware support is needed to handle the massive data volume of UHD video during playback. During UHD video playback, decoding mainly relies on external storage devices, peripheral interfaces, or direct loading into memory. However, each of these methods has its drawbacks: using external storage devices increases costs; peripheral interfaces are susceptible to external interference, potentially leading to playback instability; and loading the entire frame into memory consumes a significant amount of memory space, thus increasing storage costs.

[0058] Next, the terms used in this application will be explained:

[0059] Ultra-high definition video refers to a new generation of video formats with a resolution greater than 1920×1080, possessing 4K or 8K resolution, and conforming to cutting-edge technical standards such as high frame rate, high bit depth, wide color gamut, and high dynamic range.

[0060] Audio and video files contain I-frames, P-frames, and B-frames. An I-frame is a complete video frame, the first frame to be decoded, also known as a keyframe, and has a large data size. A P-frame is a spatiotemporal prediction frame, with P-frames filling the gaps between two I-frames. A B-frame is a bidirectional prediction frame. The purpose of a B-frame is to push forward to the preceding I-frame or P-frame. Therefore, the encoding frame rate can be IBBPBBPBBI, with P-frames filling the gaps between I-frames. B-frames can be used to derive P-frames or I-frames. In traditional video playback methods, I-frames account for more than three-quarters of the data volume, resulting in a large file size. In other words, the number of I-frames directly determines the file size.

[0061] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.

[0062] Based on this, embodiments of this application provide an ultra-high-definition video playback method, system, embedded device, and medium, which can reduce the size of ultra-high-definition audio and video files and improve the playback efficiency of ultra-high-definition audio and video files.

[0063] This application provides an ultra-high-definition video playback method, system, embedded device, and medium, which are specifically described through the following embodiments. First, the ultra-high-definition video playback method in this application embodiment is described.

[0064] The ultra-high-definition video playback method provided in this application relates to the multimedia field. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing an ultra-high-definition video playback method, but is not limited to the above forms.

[0065] This application can also be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0066] Example 1

[0067] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of an ultra-high-definition video playback method provided in this application, applicable to embedded devices. The method includes steps S101 to S104.

[0068] Step S101: Divide the acquired ultra-high-definition video file into at least one slice file according to the user's first playback instruction, determine the first slice file currently being played, and encode the first slice file according to the preset first GOP length to obtain the second slice file;

[0069] In some embodiments, obtaining an ultra-high-definition video file specifically involves: obtaining the ultra-high-definition video file from a video source (such as a file, network stream, etc.), that is, directly downloading the ultra-high-definition video file to be played from the network, or determining the ultra-high-definition video file to be played from a database.

[0070] In some embodiments, dividing an acquired ultra-high-definition video file into at least one segment file according to a user's first playback command includes: acquiring the user's first playback command and parsing the first playback command to obtain corresponding position playback parameters; determining a slicing strategy based on the ultra-high-definition video file and the position playback parameters; and slicing the ultra-high-definition video file according to the slicing strategy to obtain at least one segment file. Specifically, firstly, the user issues a first playback command through a user interface or command-line interface in some way (such as clicking a play button, entering a command, etc.). Upon receiving the user's first playback command, the position playback parameters in the first playback command are extracted using regular expressions or a parser. Secondly, a slicing strategy is determined based on the parsed position playback parameters and ultra-high-definition video file metadata (such as total duration, frame rate, resolution, etc.), wherein the slicing strategy includes the number of segments, the segment size, and the segment time interval. Finally, the start and end positions of each segment are determined according to the slicing strategy, and each segment is extracted by a computer program according to the start and end positions of each segment and saved as a new video file. For example, if a user wants to start playing an ultra-high-definition video file from a specific point in time and only play it for a short period of time, then the start and end points of the slices need to be determined based on this information.

[0071] By dividing the ultra-high-definition video file in this way, it can be divided into several slice files, which facilitates the subsequent encoding of the first slice file.

[0072] In some embodiments, the first playback instruction includes the video position (such as timestamp, chapter, frame number, etc.) that the user wants to start playing and the possible playback range (such as start position and end position).

[0073] In some embodiments, the slice can be a 15-second slice, a 30-second slice, or a 90-second slice, and this application does not impose any restrictions.

[0074] In some embodiments, the slicing strategy can slice according to a time range, that is, the ultra-high-definition video file is divided into one or more slices from the start position to the end position according to a preset time range.

[0075] In some embodiments, the slicing strategy can slice according to the number of frames, that is, the ultra-high-definition video file is divided into slices from a specified start frame to the end frame (or until the end of the video) according to a preset number of frames.

[0076] In some embodiments, the slicing strategy can slice according to a fixed size, that is, to divide the ultra-high-definition video file into multiple slices of a fixed size.

[0077] In some embodiments, determining the first segment file currently being played specifically involves extracting the position playback parameters from the first playback instruction and then determining the first segment file currently being played based on the position playback parameters.

[0078] In some embodiments, the first slice file is encoded according to a preset first GOP length to obtain a second slice file. Specifically, the first GOP length is preset and used as an encoding parameter, while other necessary encoding parameters are set to encode the first slice file based on the encoding parameters. Secondly, during the encoding process, the first slice file is divided into multiple GOP units according to the GOP length, and each GOP unit is encoded to obtain a second slice file containing encoded video data.

[0079] In some embodiments, the length of the first GOP can be 450, 500, 600, and 700, etc., and this application does not impose any limitation.

[0080] In some embodiments, encoding parameters may also include encoding format (such as H.264 / H.265), bit rate, frame rate, and GOP length.

[0081] It should be noted that the GOP length is the number of frames between I-frames. A diagram illustrating the GOP length is shown below. Figure 2 As shown, there are 8 B-frames or P-frames between I-frames, which means there are 10 frames per second. GOP=10, GOP=450 means there are 450 B-frames or P-frames between two I-frames.

[0082] Step S102: Map the second slice file to the first memory, and decode the second slice file at normal speed through the first hardware decoding channel to obtain the first audio and video stream;

[0083] In some embodiments, mapping the second slice file to the first memory involves: opening the second slice file and obtaining its total size, and then using the mapping API to map the second slice file to the memory space of the embedded device, i.e., the first memory, to ensure that the hardware decoding channel of the decoder can be accessed.

[0084] In some embodiments, the second segment file is decoded at a normal speed through a first hardware decoding channel to obtain a first audio and video stream. Specifically, the first decoding channel is configured according to the encoding format and parameters (such as resolution and frame rate) of the second segment file. Then, the second segment file in the first memory is submitted to the first decoding channel, and the first decoding channel is controlled to decode the second segment file at a normal speed to obtain the first audio and video stream. The first audio and video stream is then displayed on the screen to play the second segment file normally, satisfying the user's need to watch the video normally. The normal speed is neither accelerated nor decelerated.

[0085] Step S103: The second slice file is quickly decoded through the second hardware decoding channel at a preset speed, and key I-frames are inserted into the second slice file according to the preset second GOP length to obtain the second audio and video stream;

[0086] In some embodiments, in order to meet the user's needs for accelerated playback and drag-and-drop playback, the second segment file needs to be quickly decoded by a second hardware decoding channel at a preset speed. Specifically, the second decoding channel is configured according to the encoding format and parameters (such as resolution and frame rate) of the second segment file. Then, the second segment file in the first memory is submitted to the second decoding channel, and the second decoding channel is controlled to quickly decode the second segment file at a preset speed to obtain the decoded file. The preset speed is faster than the normal speed, and can be, but is not limited to, 5x, 10x, and 15x speeds, etc. This application does not impose any restrictions.

[0087] In some embodiments, to ensure rapid positioning of the correct frame during fast dragging, and since dragging playback relies on I-frames, key I-frames need to be inserted into the second slice file according to a preset second GOP length. This includes: analyzing the second slice file to determine the corresponding first GOP length and I-frame position; determining the I-frame insertion point of the second slice file based on the second slice file and the second GOP length; inserting a key I-frame at the I-frame insertion point; and re-encoding the modified second slice file to obtain the second audio / video stream. Specifically, firstly, the second slice file is analyzed to determine the GOP length and I-frame position for convenient subsequent dragging playback; secondly, the target GOP length, i.e., the second GOP length, is determined, and the position where additional I-frames need to be inserted within each second GOP length period, i.e., the I-frame insertion point, is calculated based on the first GOP length and frame rate; finally, a new I-frame is inserted at the determined I-frame insertion point. This may cause content duplication or inconsistency in the second slice file, so the modified second slice file needs to be re-encoded to ensure audio and video synchronization, resulting in the second audio / video file. For example, if the first GOP length is 450 and the second GOP length is 30, then I-frames need to be inserted at the position of 30 frames per second during fast decoding, so that the video can be played every second without affecting the user experience.

[0088] By inserting key I-frames into the second slice file according to the preset second GOP length, and by padding the I-frames, the smooth decoding of the subsequent second slice file can be ensured.

[0089] Step S104: Based on the user's second playback command, play the first audio / video stream or the second audio / video stream.

[0090] In some embodiments, the second playback instruction includes, but is not limited to, the operation that the user wishes to perform (such as play, pause, fast forward, etc.).

[0091] In some embodiments, playing the first audio / video stream or the second audio / video stream based on a user's second playback command includes: obtaining the user's second playback command and parsing the first playback command to obtain speed playback parameters; and playing the first audio / video stream or the second audio / video stream based on the speed playback parameters. Specifically, the user's second playback command is received from a user interface or command-line interface, and the second playback command is parsed to obtain speed playback parameters, that is, determining the playback speed the user wants for the current second segment file. If the user wants normal speed playback, the first audio / video stream is played; if the user wants accelerated playback, the second audio / video stream is played.

[0092] It should be noted that when the second hardware decoding channel decodes the second slice file quickly at a preset speed, the resulting second audio and video stream corresponds to the preset speed. If the playback speed parameters do not correspond to the preset speed, the second audio and video stream will be adjusted and played.

[0093] Based on the user's second playback command, the first or second audio / video stream can be played. This allows for the playback of videos at normal or accelerated speeds, improving the playback efficiency of ultra-high-definition audio / video files.

[0094] In some embodiments, the method further includes: mapping a third slice file to a second memory, quickly decoding the third slice file through a third hardware decoding channel, and inserting a key I-frame into the third slice file according to a preset second GOP length to obtain a third audio and video stream that is dragged backward; parsing the user's third playback command to obtain a first drag playback parameter; determining whether the user is dragging backward based on the first drag playback parameter, and if the user is dragging backward, then playing the third audio and video stream. Specifically, to meet the user's need for dragging backwards, the third slice file following the second slice file needs to be mapped to the second memory, and a corresponding third hardware decoding channel needs to be configured for the third slice file to quickly decode it. Then, the third slice file is analyzed to determine its GOP length and I-frame position. Based on the third slice file and the second GOP length, the I-frame insertion point of the third slice file is determined, and a key I-frame is inserted at the insertion point. The modified third slice file is then re-encoded to obtain the third audio / video stream. Next, the user's third playback command is obtained and parsed to obtain the first drag playback parameters. Finally, based on the first drag playback parameters, it is determined whether the user is dragging backwards. If the user is dragging backwards, the third audio / video stream is played.

[0095] By processing the third audio and video stream in advance to allow the user to drag it backward, we can prepare for the user's dragging and improve the stability and efficiency of ultra-high-definition video file playback.

[0096] In some embodiments, the method further includes: mapping a fourth slice file to a third memory, quickly decoding the fourth slice file through a fourth hardware decoding channel, and inserting a key I-frame into the fourth slice file according to a preset second GOP length to obtain a forward-dragging fourth audio and video stream; parsing the user's fourth playback command to obtain second drag playback parameters; determining whether the user is dragging forward based on the second drag playback parameters, and if the user is dragging forward, playing the fourth audio and video stream. Specifically, to meet the user's need for forward dragging, the fourth slice file preceding the second slice file needs to be mapped to the third memory, and a corresponding fourth hardware decoding channel needs to be configured for the fourth slice file to quickly decode it. Then, the fourth slice file is analyzed to determine its GOP length and I-frame position. Based on the fourth slice file and the second GOP length, the I-frame insertion point of the fourth slice file is determined, and a key I-frame is inserted at the insertion point. The modified fourth slice file is then re-encoded to obtain the fourth audio / video stream. Next, the user's fourth playback command is obtained and parsed to obtain the second drag playback parameters. Finally, based on the second drag playback parameters, it is determined whether the user is dragging forward. If the user is dragging forward, the fourth audio / video stream is played.

[0097] By processing the fourth audio and video stream in advance, the system prepares the user for dragging the video forward, thus improving the stability and efficiency of playing ultra-high-definition video files.

[0098] It should be noted that whether you drag forward or backward is relative to the currently playing segment. Dragging forward will play the video content before the current segment, and dragging backward will play the video content after the current segment.

[0099] In some embodiments, after playing the first audio / video stream or the second audio / video stream, the method further includes: determining whether the first audio / video stream or the second audio / video stream has finished playing; if playback is complete, replacing the first memory with the second memory and playing the third audio / video stream. Specifically: if the first audio / video stream or the second audio / video stream has finished playing, it indicates that the video content of the second segment file has finished playing. Therefore, the second memory corresponding to the subsequent third segment file needs to replace the first memory, and the third audio / video stream needs to be played. Simultaneously, the fifth segment file following the third segment file is imported into the fourth memory, and fast decoding and I-frame insertion are performed. This process is repeated until the ultra-high-definition video file finishes playing.

[0100] This method of replacing and updating memory after playback is complete facilitates direct and rapid loading of subsequent video segments, improving the stability and efficiency of ultra-high-definition video file playback.

[0101] In some embodiments, if the user drags the file backward beyond the third slice, the fifth slice file following the third slice is imported into the fifth memory and quickly decoded and I-frames are inserted to facilitate the user's dragging.

[0102] In some embodiments, if the user drags forward beyond the fourth slice file, the sixth slice file preceding the fourth slice is imported into the sixth memory and quickly decoded and I-frames are inserted to facilitate the user's forward dragging.

[0103] It should be noted that the terms "first slice file," "second slice file," "third slice file," "fourth slice file," "fifth slice file," and "sixth slice file" can all be understood as terms. The first slice file represents the video content the user currently wants to play; the second slice file represents the video content encoded from the first slice file; the third slice file represents the video content following the second slice file; the fourth slice file represents the video content preceding the second slice file; the fifth slice file represents the video content following the third slice file; and the sixth slice file represents the video content preceding the fourth slice file. The positional relationship of each slice file is illustrated in the diagram below. Figure 3 As shown.

[0104] It should be noted that the terms "first memory," "second memory," "third memory," "fourth memory," "fifth memory," and "sixth memory" can all be understood as nouns. The memory locations are independent of each other. Also, once the video content in the first memory has finished playing, the content in it will be released to facilitate the storage of subsequent playback segment files.

[0105] This application embodiment divides the ultra-high-definition video file into several slice files, facilitating subsequent encoding of the first slice file. Encoding the first slice file according to a preset first GOP length reduces the number of I-frames in the first slice file, thus reducing the size of the ultra-high-definition audio and video file. Decoding the second slice file at normal speed through a first hardware decoding channel meets the user's needs for normal viewing of ultra-high-definition video files. Inserting key I-frames into the second slice file according to a preset second GOP length ensures smooth decoding of the subsequent second slice file. Fast decoding of the second slice file at a preset speed through a second hardware decoding channel supports fast browsing of video content and ensures that the user can locate key frames when dragging playback. Based on the user's second playback command, the first or second audio and video stream is played, allowing playback of normal speed or multi-speed video according to the user's playback command, improving the playback efficiency of ultra-high-definition audio and video files. Compared with the prior art, this application can reduce the size of ultra-high-definition audio and video files and improve their playback efficiency.

[0106] Example 2

[0107] Please refer to Figure 4 , Figure 4 This is a schematic diagram of an embodiment of an ultra-high-definition video playback system provided in this application, which is suitable for embedded devices. The system includes: a slicing module 100, a first decoding module 200, a second decoding module 300, and a playback module 400.

[0108] The slicing module 100 is used to divide the acquired ultra-high-definition video file into at least one slice file according to the user's first playback instruction, determine the first slice file currently being played, and encode the first slice file according to a preset first GOP length to obtain a second slice file.

[0109] The first decoding module 200 is used to map the second slice file to the first memory, and decode the second slice file at normal speed through the first hardware decoding channel to obtain the first audio and video stream;

[0110] The second decoding module 300 is used to quickly decode the second slice file at a preset speed through the second hardware decoding channel, and insert key I-frames into the second slice file according to a preset second GOP length to obtain the second audio and video stream;

[0111] The playback module 400 is used to play the first audio / video stream or the second audio / video stream based on the user's second playback command.

[0112] The information interaction and execution process between the modules in the above-mentioned ultra-high-definition video playback system are based on the same concept as the embodiment of the ultra-high-definition video playback method of the first aspect of the present invention, and the technical effects achieved are basically the same. For details, please refer to the description in the first embodiment of the method of the present invention, which will not be repeated here.

[0113] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the method in this embodiment, depending on actual needs.

[0114] The present invention also provides an embedded device, comprising: the embedded device being configured to perform the ultra-high-definition video playback method as described in Embodiment 1.

[0115] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the ultra-high-definition video playback method as described in Embodiment 1 above.

[0116] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0117] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application.

[0118] In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application for those skilled in the art.

Claims

1. A method for playing ultra-high-definition video, characterized in that, Suitable for embedded devices, the method includes: The acquired ultra-high-definition video file is divided into at least one slice file according to the user's first playback command. The first slice file to be played is determined, and the first slice file is encoded according to the preset first GOP length to obtain the second slice file. The second slice file is mapped to the first memory, and the second slice file is decoded at normal speed through the first hardware decoding channel to obtain the first audio and video stream; The second segment file is rapidly decoded at a preset speed using a second hardware decoding channel, and key I-frames are inserted into the second segment file according to a preset second GOP length to obtain a second audio and video stream. Specifically, inserting key I-frames into the second segment file according to the preset second GOP length to obtain the second audio and video stream involves: analyzing the second segment file to determine the corresponding first GOP length; calculating the position where additional I-frames need to be inserted within each second GOP length period based on the first GOP length and the frame rate, and determining the I-frame insertion point of the second segment file; inserting key I-frames at the I-frame insertion points, and re-encoding the modified second segment file to obtain the second audio and video stream, wherein the frame rate is one of the encoding parameters of the second segment file. Based on the user's second playback command, the first audio / video stream or the second audio / video stream is played.

2. The ultra-high-definition video playback method according to claim 1, characterized in that, The process of dividing the acquired ultra-high-definition video file into at least one slice file according to the user's first playback command specifically involves: Obtain the user's first playback command, parse the first playback command, and obtain the corresponding position playback parameters; The slicing strategy is determined based on the ultra-high-definition video file and the position playback parameters; The ultra-high-definition video file is sliced ​​based on the slicing strategy to obtain at least one sliced ​​file.

3. The ultra-high-definition video playback method according to claim 1, characterized in that, The step of playing the first audio / video stream or the second audio / video stream based on the user's second playback command specifically involves: Obtain the user's second playback command, parse the second playback command, and obtain the speed playback parameters; Based on the speed playback parameters, play the first audio / video stream or the second audio / video stream.

4. The ultra-high-definition video playback method according to claim 1, characterized in that, Also includes: The third slice file is mapped to the second memory, the third slice file is quickly decoded through the third hardware decoding channel, and key I-frames are inserted into the third slice file according to the preset second GOP length to obtain the third audio and video stream that is dragged backward. The user's third playback command is parsed to obtain the first drag playback parameters; Based on the first drag playback parameters, it is determined whether the user is dragging backward to play the video. If the user is dragging backward to play the video, then the third audio and video stream is played.

5. The ultra-high-definition video playback method according to claim 1, characterized in that, Also includes: The fourth slice file is mapped to the third memory, the fourth slice file is quickly decoded through the fourth hardware decoding channel, and key I-frames are inserted into the fourth slice file according to the preset second GOP length to obtain the forward-dragging fourth audio and video stream. The user's fourth playback command is parsed to obtain the second drag playback parameters; Based on the second drag playback parameters, it is determined whether the user is dragging forward to play the video. If the user is dragging forward to play the video, then the fourth audio and video stream is played.

6. The ultra-high-definition video playback method according to claim 4, characterized in that, After playing the first audio / video stream or the second audio / video stream, the method further includes: Determine whether the first audio / video stream or the second audio / video stream has finished playing; If playback is complete, the first memory is replaced with the second memory, and the third audio and video stream is played.

7. An ultra-high-definition video playback system, characterized in that, Suitable for embedded devices, the system includes: a slicing module, a first decoding module, a second decoding module, and a playback module; The slicing module is used to divide the acquired ultra-high-definition video file into at least one slice file according to the user's first playback instruction, determine the first slice file currently being played, and encode the first slice file according to a preset first GOP length to obtain a second slice file. The first decoding module is used to map the second slice file to the first memory, and decode the second slice file at normal speed through the first hardware decoding channel to obtain the first audio and video stream; The second decoding module is used to quickly decode the second slice file at a preset speed through the second hardware decoding channel, and insert key I-frames into the second slice file according to a preset second GOP length to obtain a second audio and video stream. Specifically, inserting key I-frames into the second slice file according to the preset second GOP length to obtain the second audio and video stream involves: analyzing the second slice file to determine the corresponding first GOP length; calculating the position where an additional I-frame needs to be inserted within each second GOP length period based on the first GOP length and the frame rate, and determining the I-frame insertion point of the second slice file; inserting key I-frames at the I-frame insertion points; and re-encoding the modified second slice file to obtain the second audio and video stream. The frame rate is one of the encoding parameters of the second slice file. The playback module is used to play the first audio / video stream or the second audio / video stream based on the user's second playback command.

8. An embedded device, characterized in that, include: The embedded device is configured to perform the ultra-high-definition video playback method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the ultra-high-definition video playback method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image processing method

    CN102469309A

  • Data processing method and device, server and storage medium

    CN111770390A

  • Video data playback method and device, storage medium and electronic device

    CN112929706A

  • Video processing method and apparatus, and computer readable storage medium

    WO2021114305A1