Ultrahigh-definition video playing method and system, embedded device and medium

By dividing the ultra-high-definition video file into slice files and encoding, using the hardware decoding channel for normal and fast decoding, and inserting key I-frames, the problems of insufficient hardware support and high cost in ultra-high-definition video playback are solved, and efficient video file decoding and playback are achieved.

CN119788912APending Publication Date: 2025-04-08YEKER INFORMATION TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411864566.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

When playing ultra-high-definition videos, the existing technology has problems such as insufficient hardware support, high cost and poor stability. Especially during the decoding process, external storage devices increase costs, peripheral interfaces are easily disturbed, and the memory space for full-frame loading is large.

Method used

By dividing the ultra-high-definition video file into slice files and encoding according to the preset GOP length, the hardware decoding channel is used for normal and fast decoding, and key I-frames are inserted to achieve efficient decoding and playback of video files.

Benefits of technology

It reduces the size of ultra-high-definition audio and video files, improves playback efficiency, meets users' normal viewing and quick browsing needs, and improves the stability and efficiency of playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788912A_ABST
    Figure CN119788912A_ABST
Patent Text Reader

Abstract

The invention discloses an ultra-high-definition video playing method and system, embedded equipment and a medium, and the method comprises the steps: dividing an obtained ultra-high-definition video file into at least one slice file according to a first playing instruction of a user, determining a currently played first slice file, and coding the first slice file according to a preset first GOP length, obtaining a second slice file; mapping the second slice file to a first memory, and decoding the second slice file according to a normal speed through a first hardware decoding channel to obtain a first audio and video stream; inserting a key I frame into the second slice file according to a preset second GOP length, and quickly decoding the second slice file according to a preset speed through a second hardware decoding channel to obtain a second audio and video stream; and playing the first audio and video stream or the second audio and video stream based on a second playing instruction of the user. According to the invention, the size of the ultra-high-definition audio and video file can be reduced, and the playing efficiency of the ultra-high-definition audio and video file is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[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, with its amazing resolution and delicate color performance, brings a more realistic and shocking viewing experience to the audience. However, since ultra-high-definition video files contain more pixel information and higher data compression rates, they occupy a large space. Therefore, when playing, more powerful hardware support is required to cope with the huge amount of data of ultra-high-definition video.

[0003] In the process of playing ultra-high-definition videos, decoding work mainly relies on external storage devices, peripheral interfaces or direct loading into memory. However, each of these methods has some shortcomings. Specifically, although the use of external storage devices is feasible, it will increase the cost expenditure, and its stability is directly related to the smoothness of ultra-high-definition video playback; when playing ultra-high-definition videos using peripheral interfaces, since the interfaces are exposed to the outside, they are easily interfered by external environmental factors, resulting in unstable playback; as for the method of loading all ultra-high-definition video files into memory according to the encoding format of I frames, P frames and B frames, it will greatly occupy memory space, thereby increasing storage costs.

[0004] Application Contents

[0005] The present 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] In a first aspect, the present application provides an ultra-high-definition video playback method, comprising:

[0007] Divide the acquired ultra-high-definition video file into at least one slice file according to the user's first play 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;

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

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

[0010] Based on the user's second play instruction, the first audio and video stream or the second audio and video stream is played.

[0011] The embodiment of the present application can divide the ultra-high-definition video file into several slice files by dividing the ultra-high-definition video file, so as to facilitate the subsequent encoding of the first slice file; the first slice file can be encoded according to the preset first GOP length, so as to reduce the number of I frames in the first slice file and reduce the size of the ultra-high-definition audio and video file; the second slice file can be decoded at a normal speed through the first hardware decoding channel, so as to meet the user's demand for normal viewing of the ultra-high-definition video file; the key I frame is inserted into the second slice file according to the preset second GOP length, and the smooth decoding of the subsequent second slice file can be ensured by filling the I frame; the second slice file can be quickly decoded at a preset speed through the second hardware decoding channel, so as to support the user to quickly browse the video content and ensure that the user can locate the key frame when dragging and playing; based on the user's second playback instruction, the first audio and video stream or the second audio and video stream is played, and the normal speed video or the speed video can be played according to the user's playback instruction, so as to improve the playback efficiency of the ultra-high-definition audio and video file. Compared with the prior art, the present application can reduce the size of the ultra-high-definition audio and video file and improve the playback efficiency of the ultra-high-definition audio and video file.

[0012] Furthermore, the step of dividing the acquired ultra-high-definition video file into at least one slice file according to the user's first play instruction is as follows:

[0013] Obtaining a first playback instruction from a user, and parsing the first playback instruction to obtain corresponding position playback parameters;

[0014] Determining a slicing strategy 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 slice file.

[0016] In this way, by dividing the ultra-high-definition video file, the ultra-high-definition video file can be divided into several slice files, which is convenient for subsequent encoding of the first slice file.

[0017] Further, inserting a key I frame into the second slice file according to the preset second GOP length to obtain the second audio and video stream is specifically:

[0018] Analyze the second slice file to determine the corresponding first GOP length and I frame position;

[0019] Determining an I frame insertion point of the second slice file based on the second slice file and the second GOP length;

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

[0021] In this way, a key I frame is inserted into the second slice file according to the preset second GOP length, and the smooth decoding of the subsequent second slice file can be ensured by completing the I frame.

[0022] Further, the playing of the first audio and video stream or the second audio and video stream based on the second playing instruction of the user is specifically:

[0023] Acquire a second play instruction from the user, and parse the first play instruction to obtain a speed play parameter;

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

[0025] In this way, based on the user's second playback instruction, the first audio and video stream or the second audio and video stream is played, and normal-speed video or double-speed video can be played according to the user's playback instruction, thereby improving the playback efficiency of ultra-high-definition audio and video files.

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

[0027] Mapping the third slice file to the second memory, quickly decoding the third slice file through the third hardware decoding channel, and inserting a key I frame into the third slice file according to the preset second GOP length to obtain a third audio and video stream dragged backward;

[0028] Parsing the third play instruction of the user to obtain the first drag play parameter;

[0029] Based on the first drag play parameter, determine whether the user is dragging the play backwards; if the user is dragging the play backwards, play the third audio and video stream.

[0030] In this way, by processing in advance the user dragging the third audio and video stream backward, preparation can be made for the user to drag backward, thereby improving the stability and efficiency of ultra-high-definition video file playback.

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

[0032] Mapping the fourth slice file to the 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 fourth audio and video stream dragged forward;

[0033] Parsing the fourth play instruction of the user to obtain a second drag play parameter;

[0034] Based on the second drag play parameter, determine whether the user is dragging forward to play, and if the user is dragging forward to play, play the fourth audio and video stream.

[0035] In this way, by processing in advance the fourth audio and video stream that the user drags forward, preparation can be made for the user to drag forward, thereby improving the stability and efficiency of ultra-high-definition video file playback.

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

[0037] Determine whether the first audio and video stream or the second audio and video stream has been played;

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

[0039] In this way, by replacing and updating the memory after the playback is completed, it is convenient to directly and quickly load the subsequent video clips, thereby improving the stability and efficiency of ultra-high-definition video file playback.

[0040] In a second aspect, the present application further 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 play 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 a normal speed through the first hardware decoding channel to obtain a first audio and video stream;

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

[0044] The playing module is used to play the first audio and video stream or the second audio and video stream based on a second playing instruction of a user.

[0045] The embodiment of the present application can divide the ultra-high-definition video file into several slice files by dividing the ultra-high-definition video file, so as to facilitate the subsequent encoding of the first slice file; the first slice file can be encoded according to the preset first GOP length, so as to reduce the number of I frames in the first slice file and reduce the size of the ultra-high-definition audio and video file; the second slice file can be decoded at a normal speed through the first hardware decoding channel, so as to meet the user's demand for normal viewing of the ultra-high-definition video file; the key I frame is inserted into the second slice file according to the preset second GOP length, and the smooth decoding of the subsequent second slice file can be ensured by filling the I frame; the second slice file can be quickly decoded at a preset speed through the second hardware decoding channel, so as to support the user to quickly browse the video content and ensure that the user can locate the key frame when dragging and playing; based on the user's second playback instruction, the first audio and video stream or the second audio and video stream is played, and the normal speed video or the speed video can be played according to the user's playback instruction, so as to improve the playback efficiency of the ultra-high-definition audio and video file. Compared with the prior art, the present application can reduce the size of the ultra-high-definition audio and video file and improve the playback efficiency of the ultra-high-definition audio and video file.

[0046] In a third aspect, the present application also provides an embedded device, including: the embedded device is configured to execute the ultra-high-definition video playback method as described in the present application.

[0047] In a fourth aspect, the present application also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the ultra-high-definition video playback method described in the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a flowchart of an embodiment of an ultra-high-definition video playback method provided by the present application;

[0049] Figure 2 It is a schematic diagram of GOP length provided by this application;

[0050] Figure 3 It is a schematic diagram of the positional relationship of each slice file provided in this application;

[0051] Figure 4 It is a structural schematic diagram of an embodiment of an ultra-high-definition video playback system provided by the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0053] It should be understood that the step numbers used in this article are only for the convenience of description and are not intended to limit the order in which the steps are executed.

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

[0055] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0056] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.

[0057] Ultra-high-definition video is gradually entering people's field of vision, providing a truly shocking viewing experience with amazing resolution and delicate colors. However, due to its rich pixel information and high data compression rate, it occupies a large space. Therefore, more powerful hardware support is needed to cope with the huge amount of data of ultra-high-definition video during playback. In the process of playing ultra-high-definition video, decoding work mainly relies on external storage devices, peripheral interfaces or direct loading into memory. However, each of these methods has some shortcomings: the use of external storage devices will increase the cost expenditure, the peripheral interface is susceptible to external interference and can easily lead to unstable playback, and full-frame loading into memory will greatly occupy memory space, thereby increasing storage costs.

[0058] Next, the nouns involved in this application are analyzed:

[0059] Ultra-high-definition video refers to a new generation of video format with a resolution greater than 1920×1080, 4K or 8K resolution, and meets 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. I frames are complete frames of the video and are the first frame to be decoded, that is, key frames, with large data size. P frames are spatiotemporal prediction frames, which are filled between two I frames. B frames are bidirectional prediction frames. The purpose of B frames is to push B frames to the previous I frames or P frames, so the encoding frame rate can be IBBPBPBBI for encoding, P frames are filled between I frames, and B frames can be used to derive P frames or I frames forward or backward. In traditional video playback methods, I frames account for more than three-quarters of the data volume, and the file size is large, that is, the number of I frames directly determines the file size.

[0061] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0062] Based on this, the embodiments of the present 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] An ultra-high-definition video playback method, system, embedded device and medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the ultra-high-definition video playback method in the embodiments of the present application is described.

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

[0065] The present application can also be used in numerous general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present 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. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0066] Embodiment 1

[0067] Please refer to Figure 1 , Figure 1 It is a flowchart of an embodiment of an ultra-high-definition video playback method provided by the present application, which is applicable to embedded devices, and the method includes steps S101 to S104;

[0068] Step S101, dividing the acquired ultra-high-definition video file into at least one slice file according to the user's first play instruction, determining the first slice file currently played, and encoding the first slice file according to a preset first GOP length to obtain a second slice file;

[0069] In some embodiments, obtaining an ultra-high-definition video file specifically involves: obtaining an ultra-high-definition video file from a video source (such as a file, a 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, the obtained ultra-high-definition video file is divided into at least one slice file according to the user's first play instruction, including: obtaining the user's first play instruction, parsing the first play instruction to obtain the corresponding position play parameter; determining a slice strategy based on the ultra-high-definition video file and the position play parameter; slicing the ultra-high-definition video file based on the slice strategy to obtain at least one slice file. Specifically, first, the user issues a first play instruction in a user interface or a command line interface in a certain way (such as clicking a play button, inputting a command, etc.), and after receiving the user's first play instruction, a regular expression or a parser is used to extract the position play parameter in the first play instruction; secondly, the slice strategy is determined based on the parsed position play parameter and the ultra-high-definition video file metadata (such as total duration, frame rate, resolution, etc.), wherein the slice strategy includes the number of slices, the slice size, and the slice time interval; finally, the starting position and the ending position of each slice are determined according to the slice strategy, and each slice is extracted according to the starting position and the ending position of each slice by a computer program, 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 time point and only play it for a period of time, then it is necessary to determine the starting point and ending point of the slice based on this information.

[0071] In this way, by dividing the ultra-high-definition video file, the ultra-high-definition video file can be divided into several slice files, which is convenient for subsequent encoding of the first slice file.

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

[0073] In some embodiments, the slices may be 15-second slices, 30-second slices, or 90-second slices, which is not limited in the present application.

[0074] In some embodiments, the slicing strategy may be performed based on a time range, that is, the ultra-high-definition video file may be sliced ​​from a starting position to an end position into one or more slices based on a preset time range.

[0075] In some embodiments, the slicing strategy can be performed based on the number of frames, that is, the ultra-high-definition video file is sliced ​​into slices based on a preset number of frames from a specified start frame to an end frame (or until the end of the video).

[0076] In some embodiments, the slicing strategy may perform slicing according to a fixed size, that is, the ultra-high-definition video file may be divided into multiple slices of fixed sizes.

[0077] In some embodiments, determining the first slice file currently being played includes, specifically, extracting the position playback parameter in the first playback instruction, and then determining the first slice file currently being played based on the position playback parameter.

[0078] In some embodiments, the first slice file is encoded according to a preset first GOP length to obtain a second slice file, specifically: first, the first GOP length is set in advance, and the first GOP length is used as an encoding parameter, and other necessary encoding parameters are set at the same time 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 may be 450, 500, 600, 700, etc., which is not limited in this application.

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

[0081] It should be noted that the GOP length is the number of frames between I frames. The GOP length diagram is as follows: Figure 2 As shown, there are 8 B frames or P frames between I frames, that is, there are 10 frames per second GOP=10, and GOP=450 means there are 450 B frames or P frames between two I frames.

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

[0083] In some embodiments, the second slice file is mapped to the first memory, specifically: the second slice file is opened, and the total size of the second slice file is obtained, and then the second slice file is mapped to the memory space of the embedded device, that is, the first memory, using a mapping API to ensure that the hardware decoding channel of the decoder can access it.

[0084] In some embodiments, the second slice 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, frame rate) of the second slice file, and then the second slice file in the first memory is submitted to the first decoding channel, and the first decoding channel is controlled to decode the second slice file at a normal speed to obtain the first audio and video stream, and the first audio and video stream is displayed on the screen to play the second slice file normally to meet the user's needs for watching videos normally, wherein the normal speed is neither accelerated nor decelerated.

[0085] Step S103, quickly decoding the second slice file at a preset speed through a second hardware decoding channel, and inserting a key I frame into the second slice file according to a preset second GOP length to obtain a second audio and video stream;

[0086] In some embodiments, in order to meet the user's needs for high-speed playback and drag-and-drop playback, it is necessary to quickly decode the second slice file at a preset speed through a second hardware decoding channel. Specifically, the second decoding channel is configured according to the encoding format and parameters (such as resolution, frame rate) of the second slice file, and then the second slice file in the first memory is submitted to the second decoding channel, and the second decoding channel is controlled to quickly decode the second slice file at a preset speed to obtain a decoded file, wherein the preset speed is faster than the normal speed, which can be but is not limited to 5 times, 10 times and 15 times, etc., and is not limited to this application.

[0087] In some embodiments, in order to ensure that the correct picture can be quickly located during fast dragging, and because it is necessary to rely on I frames for dragging and playing, it is also necessary to insert key I frames into the second slice file according to the preset second GOP length, including: 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 the key I frame at the I frame insertion point, and re-encoding the modified second slice file to obtain the second audio and video stream. Specifically, first, the second slice file is analyzed to determine the GOP length and I frame position of the second slice file to facilitate subsequent drag and play; second, the target GOP length, i.e., the second GOP length, is determined, and according to the first GOP length and frame rate, the position where an additional I frame needs to be inserted in each second GOP length period, i.e., the I frame insertion point, is calculated; finally, a new I frame is inserted at the determined I frame insertion point, which will cause content duplication or inconsistency in the second slice file, so it is necessary to re-encode the modified second slice file to ensure audio and video synchronization to obtain the second audio and video file. For example, if the length of the first GOP is 450 and the length of the second GOP is 30, then it is necessary to insert an I frame 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] In this way, a key I frame is inserted into the second slice file according to the preset second GOP length, and the smooth decoding of the subsequent second slice file can be ensured by completing the I frame.

[0089] Step S104: based on a second play instruction from the user, play the first audio and video stream or the second audio and video stream.

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

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

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

[0093] In this way, based on the user's second playback instruction, the first audio and video stream or the second audio and video stream is played, and normal-speed video or double-speed video can be played according to the user's playback instruction, thereby improving the playback efficiency of ultra-high-definition audio and video files.

[0094] In some embodiments, it also 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 dragged backward; parsing the user's third playback instruction to obtain a first drag playback parameter; judging whether the user is dragging the playback backward based on the first drag playback parameter, and if the user is dragging the playback backward, playing the third audio and video stream. Specifically, in order to meet the user's demand for dragging backward, the third slice file behind the second slice file needs to be mapped to the second memory, and the corresponding third hardware decoding channel is configured for the third slice file to quickly decode the third slice file. After that, the third slice file is analyzed to determine the GOP length of the third slice file and the position of the I frame, and based on the third slice file and the second GOP length, the I frame insertion point of the third slice file is determined, and the key I frame is inserted into the I frame insertion point, and the modified third slice file is re-encoded to obtain the third audio and video stream; secondly, the user's third play instruction is obtained and parsed to obtain the first drag play parameter; finally, based on the first drag play parameter, it is determined whether the user is dragging and playing backward. If the user is dragging and playing backward, the third audio and video stream is played.

[0095] In this way, by processing in advance the user dragging the third audio and video stream backward, preparation can be made for the user to drag backward, thereby improving the stability and efficiency of ultra-high-definition video file playback.

[0096] In some embodiments, it also 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 fourth audio and video stream that is dragged forward; parsing the user's fourth play instruction to obtain a second drag play parameter; judging whether the user is dragging forward based on the second drag play parameter, and if the user is dragging forward, playing the fourth audio and video stream. Specifically, in order to meet the user's demand for dragging forward, it is necessary to map the fourth slice file in front of the second slice file to the third memory, and configure the corresponding fourth hardware decoding channel for the fourth slice file to quickly decode the fourth slice file. After that, the fourth slice file is analyzed to determine the GOP length of the fourth slice file and the position of the I frame, and based on the fourth slice file and the second GOP length, the I frame insertion point of the fourth slice file is determined, and the key I frame is inserted into the I frame insertion point, and the modified fourth slice file is re-encoded to obtain a fourth audio and video stream; secondly, the user's fourth play instruction is obtained and parsed to obtain a second drag play parameter; finally, based on the second drag play parameter, it is determined whether the user is dragging forward to play, and if the user is dragging forward to play, the fourth audio and video stream is played.

[0097] In this way, by processing in advance the fourth audio and video stream that the user drags forward, preparation can be made for the user to drag forward, thereby improving the stability and efficiency of ultra-high-definition video file playback.

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

[0099] In some embodiments, after playing the first audio and video stream or the second audio and video stream, it also includes: determining whether the first audio and video stream or the second audio and video stream has been played; if the playback is completed, the first memory is replaced with the second memory, and the third audio and video stream is played. Specifically: if the first audio and video stream or the second audio and video stream has been played, it means that the video content of the second slice file has been played, and it is necessary to replace the first memory with the second memory corresponding to the third slice file, and play the third audio and video stream, and at the same time import the fifth slice file behind the third slice file into the fourth memory, and perform fast decoding and I frame insertion, and repeat until the ultra-high-definition video file is played.

[0100] In this way, by replacing and updating the memory after the playback is completed, it is convenient to directly and quickly load the subsequent video clips, thereby improving the stability and efficiency of ultra-high-definition video file playback.

[0101] In some embodiments, if the user drags backward beyond the third slice file, the fifth slice file behind the third slice is imported into the fifth memory, and fast decoding and I frame insertion are performed to facilitate the user to drag backward.

[0102] In some embodiments, if the user drags forward beyond the fourth slice file, the sixth slice file before the fourth slice is imported into the sixth memory, and fast decoding and I frame insertion are performed to facilitate the user to drag forward.

[0103] It should be noted that the first slice file, the second slice file, the third slice file, the fourth slice file, the fifth slice file and the sixth slice file can all be understood as nouns. The first slice file is the video content that the user currently wants to play, the second slice file is the video content played after encoding the first slice file, the third slice file is the video content after the second slice file, the fourth slice file is the video content before the second slice file, the fifth slice file is the video content after the third slice file, and the sixth slice file is the video content before the fourth slice file. The schematic diagram of the position relationship of each slice file is as follows Figure 3 shown.

[0104] It should be noted that the first memory, the second memory, the third memory, the fourth memory, the fifth memory and the sixth memory can all be understood as nouns. The memories are independent of each other. At the same time, when the video content in the first memory is played, the content inside will be released to facilitate the storage of subsequent playback slice files.

[0105] The embodiment of the present application can divide the ultra-high-definition video file into several slice files by dividing the ultra-high-definition video file, so as to facilitate the subsequent encoding of the first slice file; the first slice file can be encoded according to the preset first GOP length, so as to reduce the number of I frames in the first slice file and reduce the size of the ultra-high-definition audio and video file; the second slice file can be decoded at a normal speed through the first hardware decoding channel, so as to meet the user's demand for normal viewing of the ultra-high-definition video file; the key I frame is inserted into the second slice file according to the preset second GOP length, and the smooth decoding of the subsequent second slice file can be ensured by filling the I frame; the second slice file can be quickly decoded at a preset speed through the second hardware decoding channel, so as to support the user to quickly browse the video content and ensure that the user can locate the key frame when dragging and playing; based on the user's second playback instruction, the first audio and video stream or the second audio and video stream is played, and the normal speed video or the speed video can be played according to the user's playback instruction, so as to improve the playback efficiency of the ultra-high-definition audio and video file. Compared with the prior art, the present application can reduce the size of the ultra-high-definition audio and video file and improve the playback efficiency of the ultra-high-definition audio and video file.

[0106] Embodiment 2

[0107] Please refer to Figure 4 , Figure 4 It is a structural schematic diagram of an embodiment of an ultra-high-definition video playback system provided by the present application, which is applicable to embedded devices, and 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 play 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 a normal speed through the first hardware decoding channel to obtain a 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 a second hardware decoding channel, and insert a key I frame into the second slice file according to a preset second GOP length to obtain a second audio and video stream;

[0111] The playing module 400 is used to play the first audio and video stream or the second audio and video stream based on a second playing instruction of a user.

[0112] The information interaction, execution process and other contents 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 specific contents, please refer to the description in the first embodiment of the method of the present invention, and will not be repeated here.

[0113] The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, i.e., may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the method of this embodiment.

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

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

[0116] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-monitorable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0117] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application.

[0118] It is particularly pointed out that for those skilled in the art, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for playing ultra-high definition video, characterized in that: Applicable to embedded devices, the method comprises: Divide the acquired ultra-high-definition video file into at least one slice file according to the user's first play 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; Mapping the second slice file to the first memory, and decoding the second slice file at a normal speed through the first hardware decoding channel to obtain a first audio and video stream; The second slice file is quickly decoded at a preset speed through a second hardware decoding channel, and a key I frame is inserted into the second slice file according to a preset second GOP length to obtain a second audio and video stream; Based on the user's second play instruction, the first audio and video stream or the second audio and video stream is played.

2. The ultra-high definition video playback method according to claim 1, characterized in that: The step of dividing the acquired ultra-high-definition video file into at least one slice file according to the first play instruction of the user is specifically: Obtaining a first playback instruction from a user, and parsing the first playback instruction to obtain corresponding position playback parameters; Determining a slicing strategy 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 slice file.

3. The ultra-high definition video playback method according to claim 1, characterized in that: The inserting of a key I frame into the second slice file according to the preset second GOP length to obtain the second audio and video stream is specifically as follows: Analyze the second slice file to determine the corresponding first GOP length and I frame position; Determining an I frame insertion point of the second slice file based on the second slice file and the second GOP length; A key I frame is inserted into the I frame insertion point, and the modified second slice file is re-encoded to obtain a second audio and video stream.

4. The ultra-high definition video playback method according to claim 1, characterized in that: The playing of the first audio and video stream or the second audio and video stream based on the second playing instruction of the user is specifically: Acquire a second play instruction from the user, and parse the first play instruction to obtain a speed play parameter; Based on the speed playback parameter, play the first audio and video stream or the second audio and video stream.

5. The ultra-high definition video playback method according to claim 1, characterized in that: Also includes: Mapping the third slice file to the second memory, quickly decoding the third slice file through the third hardware decoding channel, and inserting a key I frame into the third slice file according to the preset second GOP length to obtain a third audio and video stream dragged backward; Parsing the third play instruction of the user to obtain the first drag play parameter; Based on the first drag play parameter, determine whether the user is dragging the play backwards; if the user is dragging the play backwards, play the third audio and video stream.

6. The ultra-high definition video playback method according to claim 1, characterized in that: Also includes: Mapping the fourth slice file to the 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 fourth audio and video stream dragged forward; Parsing the fourth play instruction of the user to obtain a second drag play parameter; Based on the second drag play parameter, determine whether the user is dragging forward to play, and if the user is dragging forward to play, play the fourth audio and video stream.

7. The ultra-high definition video playback method according to claim 5, characterized in that: After playing the first audio and video stream or the second audio and video stream, the method further includes: Determine whether the first audio and video stream or the second audio and video stream has been played; If the playback is completed, the first memory is replaced by the second memory, and the third audio and video stream is played.

8. An ultra-high definition video playback system, characterized in that: Applicable to embedded devices, the system comprises: a slicing module, a first decoding module, a second decoding module and a playing 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 play 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 a normal speed through the first hardware decoding channel to obtain a first audio and video stream; The second decoding module is used to quickly decode the second slice file at a preset speed through a second hardware decoding channel, and insert a key I frame into the second slice file according to a preset second GOP length to obtain a second audio and video stream; The playing module is used to play the first audio and video stream or the second audio and video stream based on a second playing instruction of a user.

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

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the ultra-high-definition video playback method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image processing method

    CN102469309A

  • Method and device for realizing time shift function

    CN109413443A

  • Safety and protection high-definition video reverse playing method and device

    CN110830838A

  • Data processing method and device, server and storage medium

    CN111770390A

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

    CN112929706A