Video coding and decoding method and system based on sliding window
Through sliding window technology, the transcoding strategy and window size of the video stream are adjusted in real time, which solves the problems of video playback delay and storage space requirements under the HTTP protocol, and improves the user experience and the stability of the video stream.
Patent Information
- Application Number
- CN202411262298.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-10
AI Technical Summary
File download technology based on HTTP protocol has problems such as high latency, no real-time adaptability and high storage space requirements, especially when playing videos, resulting in poor user experience.
Using sliding windows to perform video encoding and decoding methods and systems, through the collaborative work of the client and the video server, monitor network status and user behavior in real time, dynamically adjust the transcoding strategy and window size of the video stream, request and play video files frame by frame, and reduce Latency and storage requirements.
It reduces the delay in video playback, improves fluency and user experience, adapts to network changes and user operations, ensures the continuity and stability of video streams, and reduces storage needs.
Smart Images

Figure CN119255016A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication and video technology, and specifically relates to a video encoding and decoding method and system based on a sliding window. Background Art
[0002] Hypertext Transfer Protocol (HTTP) is a simple request-response protocol that usually runs on top of TCP. It specifies what messages a client may send to a server and what responses it may get. The headers of request and response messages are given in ASCII form; the message content has a MIME-like format.
[0003] Technical issues of file download based on HTTP protocol:
[0004] High latency: Users must wait for the entire file to be downloaded or to a certain extent before they can start playing. Especially for large files, the latency will be relatively high.
[0005] No real-time adaptation: The video quality cannot be adjusted in real time according to the network conditions. Once the download starts, the video quality is fixed, which may cause lag or reduced image quality when the network conditions are unstable.
[0006] Large storage space requirements: The client needs enough storage space to save the downloaded complete video file, which is not suitable for devices with limited storage space. Summary of the invention
[0007] The present application provides a video encoding and decoding method and system based on a sliding window, which can reduce the delay and storage space requirements and improve the user experience.
[0008] In a first aspect, the present application provides a video encoding and decoding method based on a sliding window, the method comprising the following steps:
[0009] The client determines a first video to be played, and receives frame file index information and a sliding window TS file generated by the video server according to video information of the first video;
[0010] The client obtains the frame file index information, and based on the frame file index information, requests TS files one by one and plays the video;
[0011] When the client plays the first video, the video server adjusts the TS size in real time according to the playback progress of the first video, network status or user operation. When the TS cache quantity reaches a first threshold, subsequent TS transcoding is suspended. When the TS cache quantity is lower than a second threshold, subsequent TS transcoding is resumed.
[0012] In a second aspect, a video encoding and decoding system based on a sliding window is provided, wherein the video encoding and decoding system based on a sliding window includes a client and a video server;
[0013] The client is used to determine a first video to be played, receive frame file index information and a sliding window TS file generated by a video server according to video information of the first video; obtain the frame file index information, and based on the frame file index information, request TS files one by one and play the video;
[0014] The video server is used to adjust the TS size in real time according to the playback progress, network status or user operation of the first video when the client plays the first video, suspend subsequent TS transcoding when the TS cache quantity reaches a first threshold, and resume subsequent TS transcoding when the TS cache quantity is lower than a second threshold.
[0015] In a third aspect, the present application provides a computer storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute some or all of the steps described in the first aspect of the present application.
[0016] The embodiments of the present application have the following beneficial effects:
[0017] The technical solution provided by the present application is that the video server dynamically adjusts the size and position of the sliding window by real-time monitoring of the network status, playback device and user behavior, so that when the user drags the playback progress bar or switches the resolution, the video server can respond quickly and adjust the corresponding transcoding strategy. For example, when it is detected that the user jumps to the second half of the video, the system will immediately adjust the position of the sliding window and recalculate the transcoding strategy in the current window to ensure the continuity and stability of the video stream. For another example, if the current network status is good, the resolution of the TS window transcoding can be increased by one level. Conversely, if the current network status is poor, the resolution of the TS window transcoding can be reduced by one level. In this way, the transcoding strategy of the TS window can be dynamically adjusted according to the network status, thereby improving the smoothness of the playback. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0020] Figure 2 This is a flow chart of a video encoding and decoding method based on a sliding window provided in an embodiment of the present application.
[0021] Figure 3 It is a flowchart of a video encoding and decoding method based on a sliding window provided in Example 1 of the present application;
[0022] Figure 4 It is a structural diagram of a video encoding and decoding system based on a sliding window provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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.
[0024] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, systems, products or devices.
[0025] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0026] The following is a schematic diagram of the structure of an electronic device involved in an embodiment of the present application.
[0027] The present application also provides a video server, such as Figure 1As shown, the video server includes: a server and multiple clients connected to the server, the clients are connected to the server in communication, and the communication connection can be a wired connection or a wireless connection. The server includes at least one processor (processor) 11 and a memory (memory) 12, and can also include a communication interface (Communications Interface) 14, a display screen 16 and a bus 13. Among them, the processor 11, the memory 12, the display screen 16 and the communication interface 14 can communicate with each other through the bus 13. The communication interface 14 can transmit information, and the communication interface 14 can have a wireless communication function, and the wireless communication function can be a short-range wireless communication or a long-range communication function (such as LTE or NR mode). The processor 11 can call the logic instructions in the memory 12 to execute or support the method in the embodiment of the present application.
[0028] The memory 12, as a computer-readable storage medium, can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the method in the embodiment of the present disclosure. The processor 11 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 12, that is, implementing or supporting the method in the embodiment of the present application.
[0029] The following introduces the main technical application scenarios of the embodiments of this application.
[0030] Video playback is a common solution for users, and there is a certain delay in video playback because the transcoded resolution of video playback is a preset fixed resolution, such as 1280P, 720P, etc. However, for users, they may slide the video, which may make it impossible for subsequent videos to be decoded in time using the above preset fixed resolution. This will cause playback delays due to untimely video decoding, reducing the user experience.
[0031] The specific methods are introduced in detail below.
[0032] The present application embodiment provides a video encoding and decoding method based on a sliding window. Figure 1 The video server shown executes, Figure 2 A schematic diagram of a process of performing video encoding and decoding based on a sliding window provided in the first embodiment of the present application is shown in FIG. Figure 2 As shown, the above method comprises the following steps:
[0033] Step S201, the client determines a first video to be played, and receives frame file index information (i.e., M3U8) and a TS (sliding window) file generated by a video server according to video information of the first video;
[0034] For example, the method for obtaining the above-mentioned frame file index information and TS (sliding window) file may specifically include: calculating the key frame interval based on the video information, constructing the frame file index information (ie, M3U8), starting asynchronous HLS transcoding, and generating TS files in real time.
[0035] Step S202: The client obtains frame file index information (i.e., M3U8), and based on the frame file index information, requests TS files one by one and plays the video;
[0036] Step S203: When the client plays the first video, the video server adjusts the TS size in real time according to the playback progress of the first video, the network status or the user operation. When the TS cache quantity reaches the first threshold, the subsequent TS transcoding is suspended. When the TS cache quantity is lower than the second threshold, the subsequent TS transcoding is resumed.
[0037] The technical solution provided by the present application is that the video server dynamically adjusts the size and position of the sliding window by real-time monitoring of the network status, playback device and user behavior, so that when the user drags the playback progress bar or switches the resolution, the video server can respond quickly and adjust the corresponding transcoding strategy. For example, when it is detected that the user jumps to the second half of the video, the system will immediately adjust the position of the sliding window and recalculate the transcoding strategy in the current window to ensure the continuity and stability of the video stream. For another example, if the current network status is good, the resolution of the TS window transcoding can be increased by one level. Conversely, if the current network status is poor, the resolution of the TS window transcoding can be reduced by one level. In this way, the transcoding strategy of the TS window can be dynamically adjusted according to the network status, thereby improving the smoothness of the playback.
[0038] For example, the video server adjusting the TS size in real time according to the playback progress of the first video may specifically include:
[0039] When the video server determines that the playback progress of the first video exceeds half of the overall progress, it dynamically adjusts the position of the TS according to the video information of the unplayed portion of the first video, and recalculates the transcoding strategy in the adjusted TS.
[0040] Among them, each of the above TSs can be configured with different transcoding strategies. For example, an odd-numbered TS can be configured with a 1280p transcoding strategy, an even-numbered TS can be configured with a 720p transcoding strategy, and so on. This application does not limit the specific forms of expression of the above transcoding strategies.
[0041] For example, the method further includes: dynamically adjusting the TS transcoding strategy according to the video information of the unplayed portion of the first video, which may specifically include:
[0042] The video server determines the current network speed, the total duration of the video of the unplayed portion, and the first resolution of the first half of the progress of the playback, and calculates the current network saturation based on the first resolution and the network speed. If the saturation is less than the saturation threshold, the TS of the video information of the unplayed portion is adjusted by one level based on the first resolution, and the first time is kept unchanged. If the saturation is greater than the saturation threshold, the TS of the video information of the unplayed portion is adjusted by one level based on the first resolution.
[0043] The calculation formula of the above saturation may specifically include:
[0044] B=F*b / S*100%, wherein F is the value of the first resolution, S is the value of the network speed, b is the frame rate per second of the first video, such as 60 frames per second, etc., and the network speed is the network speed per second.
[0045] The above scheme can dynamically adjust the TS transcoding strategy, and the above method can also be adjusted periodically, so that it can better match the current network speed and video resolution and improve fluency.
[0046] According to different playback progress, the position of TS in the video information can be dynamically adjusted in real time, and different transcoding strategies can be provided to improve the continuity and stability of the video stream.
[0047] The following is an example of a technical scenario. Assuming that half of the first video has been played, the video server can adjust the TS size of the second half of the video to 2 / 3 of the original size and increase the decoding resolution of the TS window by one level. In this way, although the decoded video file is larger, the decoding time is not greatly affected because the TS time interval is smaller. In this way, the resolution of the first video can be improved without affecting the smoothness of the video.
[0048] The above-mentioned resolution levels include but are not limited to: 1280p, 720p, 480p, 360p. The higher the resolution, the higher the level. For example, the next level of 1280 is 720p, and vice versa, the previous level of 720p is 1280p.
[0049] For example, the above method may further include:
[0050] When the playback progress of the first video changes, the identifier of the current TS is obtained, and the data in the current TS is decoded and then the video is played.
[0051] This situation occurs when the playback progress changes. Generally, after the user slides the progress, the playback progress is greatly advanced. If the previous transcoding strategy is still used, a certain delay will occur. Therefore, the TS corresponding to the current TS identifier is first transcoded and played first, thereby improving the smoothness of video playback.
[0052] For example, the above method may further include:
[0053] The video server extracts the next TS identified by the current TS, obtains the first playback time of the current TS, extracts the transcoding strategy of the next TS, and calculates the transcoding time of the transcoding strategy of the next TS based on the transcoding strategy and the current network speed. If the transcoding time is less than the first playback time, the transcoding strategy of the next TS is not adjusted. If the transcoding time is greater than the first playback time, the resolution level in the transcoding strategy is reduced by one level, and the transcoding time is calculated again to obtain the second transcoding time. If the second transcoding time is less than the first playback time, the resolution level of the transcoding strategy of the next TS is reduced by one level.
[0054] For example, the above method may further include:
[0055] The client caches and releases the TS before the current TS mark. This makes it easier to cache the TS after the TS mark, improving the smoothness of subsequent video playback.
[0056] For example, the above method may further include:
[0057] When the client stops playing or times out, the video server cleans up the TS cache and releases resources in a timely manner.
[0058] For example, the above method may further include:
[0059] After the video server obtains the progress of the user sliding the first video, it obtains the first time when the sliding progress stops, detects the second time when the user starts sliding the progress again, constructs the first time and the second time into a short video, extracts the subtitle information of the short video to obtain text information, identifies the association of the text information to determine multiple sentences with association, extracts the starting time points and the ending time points of the multiple sentences, extracts the refreshing feature data of the partial video in the time period of the starting time point and the ending time point in the short video, determines the feature attributes of the partial video based on the refreshing feature data, and adds the feature attributes to the user portrait. This makes it easier to recommend subsequent plots for the user.
[0060] For example, the above extraction of the cool feature data of the part of the video may specifically include:
[0061] A plurality of storyboard video segments contained in a partial video is obtained, subtitle content and picture information of each storyboard video segment is obtained, and the subtitle content and picture information of each storyboard video segment is used as a cool point feature data.
[0062] The above-mentioned storyboard video clips can be based on a sentence of the subtitle content, that is, each sentence corresponds to a storyboard video clip.
[0063] For example, "This kind of thing must be taken care of, if no one else cares, I can take care of it", the above has two sentences, namely "This kind of thing must be taken care of" and "If no one else cares, I can take care of it", the corresponding subtitle content and picture information are used as two storyboard video clips.
[0064] For example, determining the characteristic attributes of the portion of the video based on the excitement feature data may specifically include:
[0065] Extract a piece of exciting point feature data, perform plot analysis on the piece of exciting point feature data to obtain a type attribute of the piece of exciting point feature data, traverse all the exciting point feature data to obtain multiple type attributes, count the number of identical type attributes in the multiple type attributes, and use the attribute type whose number value is greater than a threshold as the characteristic attribute of the part of the video.
[0066] For example, performing plot analysis on a piece of exciting point feature data to obtain a type attribute of the piece of exciting point feature data may specifically include:
[0067] Perform word segmentation on the subtitle content to obtain multiple keywords, perform type matching on the multiple keywords to obtain multiple corresponding subtitle type attributes, perform scene recognition on the image information to determine the corresponding scene type attribute, perform clothing recognition on the image information to determine the corresponding clothing type attribute, select a subtitle type attribute that matches both the scene type attribute and the clothing type attribute from the multiple subtitle type attributes, and superimpose the scene type attribute, the clothing type attribute and one subtitle type attribute to obtain a type attribute.
[0068] The above classification and recognition method can be implemented by using the recognition model, which will not be described here. The above clothing type attributes may include: ancient costume type, palace type, urban type, military type, sports type, etc. The above scene type attributes may include: family type, transportation type, outdoor type, garden type, etc. The above subtitle type attributes may include: suspense, spy war, emotion, etc.
[0069] For example, if the subtitle type attributes are analyzed as spy war and emotion, the scene type attributes are analyzed as family type, and the clothing type attributes are analyzed as urban type, then it can be determined that the spy war type does not match the urban type, and it is determined that the emotion matches the family type and the urban type, then the type attribute corresponding to the cool point feature data is determined to be the emotional urban family type.
[0070] Because users are more interested in the plot between sliding the progress and sliding again to watch, the analysis of this interval can better grasp the user's preferences, and then make targeted improvements to the user portrait, which improves the accuracy of subsequent video recommendations.
[0071] See also Figure 3 , Figure 3 A flowchart of a video encoding and decoding method based on a sliding window is provided in the first embodiment of the present application, such as Figure 3 As shown, the above method may include the following steps:
[0072] Step S301: The client determines a first video to be played, and receives frame file index information and a TS file generated by a video server according to video information of the first video.
[0073] The above-mentioned TS file may specifically include: the time of each TS, such as 3 seconds, the transcoded resolution of each TS, such as 1280p, etc. The above-mentioned frame file index information may be the frame ID (ie frame number) of the key frame converted by TS, prompting which frames to convert to the next TS.
[0074] Step S302: The client plays the first video, the user slides the window to the half position of the first video, the video server extracts the current TS at the half position, processes the current TS according to the transcoding strategy of the current TS, and then plays it;
[0075] Step S303: The video server obtains the first network speed, the first resolution value of the first video, and the frame rate, calculates the saturation, and when the saturation is less than the saturation threshold, increases the first resolution value by one level to play the second half of the video.
[0076] The technical solution provided by the present application prioritizes transcoding the current TS after determining the position of the sliding window, thereby ensuring the smoothness of subsequent videos, and dynamically adjusts the resolution of subsequent TS for subsequent videos according to the current network speed, thereby improving the clarity of the video and the user experience while ensuring the smoothness of the video.
[0077] See also Figure 4 , Figure 4 A video encoding and decoding system based on a sliding window is provided, wherein the video encoding and decoding system based on a sliding window includes a client and a video server;
[0078] The client 401 is used to determine a first video to be played, receive frame file index information and a sliding window TS file generated by a video server according to video information of the first video; obtain the frame file index information, and based on the frame file index information, request TS files one by one and play the video;
[0079] The video server 402 is used to adjust the TS size in real time according to the playback progress, network status or user operation of the first video when the client plays the first video. When the TS cache quantity reaches a first threshold, the subsequent TS transcoding is suspended. When the TS cache quantity is lower than a second threshold, the subsequent TS transcoding is resumed.
[0080] For example,
[0081] The video server 402 is specifically configured to dynamically adjust the position of the TS according to the video information of the unplayed portion of the first video when determining that the playback progress of the first video exceeds half of the overall progress, and recalculate the transcoding strategy within the adjusted TS.
[0082] The video server 402 is further used to determine the current network speed, the total duration of the video of the unplayed part, and the first resolution of the first half of the progress of the playback, and calculate the current network saturation according to the first resolution and the network speed. If the saturation is less than the saturation threshold, the TS of the video information of the unplayed part is adjusted by one level based on the first resolution, and the first time is kept unchanged; if the saturation is greater than the saturation threshold, the TS of the video information of the unplayed part is adjusted by one level based on the first resolution;
[0083] The calculation formula of the above saturation specifically includes:
[0084] B=F*b / S*100%, wherein F is the value of the first resolution, S is the value of the network speed, b is the frame rate per second of the first video, such as 60 frames per second, etc., and the network speed is the network speed per second.
[0085] The video server 402 is also used to obtain the identifier of the current TS when the playback progress of the first video changes, and to play the video after decoding the data in the current TS.
[0086] The video server 402 is also used to extract the next TS identified by the current TS, obtain the first playback time of the current TS, extract the transcoding strategy of the next TS, and calculate the transcoding time of the transcoding strategy of the next TS based on the transcoding strategy and the current network speed. If the transcoding time is less than the first playback time, the transcoding strategy of the next TS is not adjusted. If the transcoding time is greater than the first playback time, the resolution level in the transcoding strategy is reduced by one level, and the transcoding time is calculated again to obtain the second transcoding time. If the second transcoding time is less than the first playback time, the resolution level of the transcoding strategy of the next TS is reduced by one level.
[0087] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.
[0088] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.
[0089] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0090] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0091] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0092] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0093] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a volatile memory or a non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM RAM (DR RAM). Various media that can store program code are available.
[0094] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present invention, and can make various changes and modifications, including the combination of the above-mentioned different functions and implementation steps, including software and hardware implementation methods, all of which are within the scope of protection of the present invention.
Claims
1. A video encoding and decoding method based on a sliding window, characterized in that: The method comprises the following steps: The client determines a first video to be played, and receives frame file index information and a sliding window TS file generated by the video server according to video information of the first video; The client obtains the frame file index information, and based on the frame file index information, requests TS files one by one and plays the video; When the client plays the first video, the video server adjusts the TS size in real time according to the playback progress of the first video, network status or user operation. When the TS cache quantity reaches a first threshold, subsequent TS transcoding is suspended. When the TS cache quantity is lower than a second threshold, subsequent TS transcoding is resumed.
2. The video encoding and decoding method based on sliding window according to claim 1, characterized in that: The video server adjusting the TS size in real time according to the playback progress of the first video specifically includes: When the video server determines that the playback progress of the first video exceeds half of the overall progress, it dynamically adjusts the position of the TS according to the video information of the unplayed portion of the first video, and recalculates the transcoding strategy within the adjusted TS.
3. The video encoding and decoding method based on sliding window according to claim 1, characterized in that: The method further includes: dynamically adjusting the TS transcoding strategy according to the video information of the unplayed portion of the first video includes: The video server determines the current network speed, the total duration of the video of the unplayed part, and the first resolution of the first half of the progress of the playback, and calculates the current network saturation according to the first resolution and the network speed. If the saturation is less than the saturation threshold, the TS of the video information of the unplayed part is adjusted by one level based on the first resolution, and the first time is kept unchanged; if the saturation is greater than the saturation threshold, the TS of the video information of the unplayed part is adjusted by one level based on the first resolution; The calculation formula of the above saturation specifically includes: B=F*b / S*100%, wherein F is the value of the first resolution, S is the value of the network speed, b is the frame rate per second of the first video, such as 60 frames per second, etc., and the network speed is the network speed per second.
4. The video encoding and decoding method based on sliding window according to claim 1, characterized in that: The method further comprises: When the playback progress of the first video changes, the identifier of the current TS is obtained, and the data in the current TS is decoded and then the video is played.
5. The video encoding and decoding method based on sliding window according to claim 4 is characterized in that: The method further comprises: The video server extracts the next TS identified by the current TS, obtains the first playback time of the current TS, extracts the transcoding strategy of the next TS, and calculates the transcoding time of the transcoding strategy of the next TS based on the transcoding strategy and the current network speed. If the transcoding time is less than the first playback time, the transcoding strategy of the next TS is not adjusted. If the transcoding time is greater than the first playback time, the resolution level in the transcoding strategy is reduced by one level, and the transcoding time is calculated again to obtain the second transcoding time. If the second transcoding time is less than the first playback time, the resolution level of the transcoding strategy of the next TS is reduced by one level.
6. A video encoding and decoding system based on a sliding window, characterized in that: The video encoding and decoding system based on sliding window: client and video server; The client is used to determine a first video to be played, and receive frame file index information and a sliding window TS file generated by a video server according to video information of the first video; Obtain frame file index information, and based on the frame file index information, request TS files one by one and play the video; The video server is used to adjust the TS size in real time according to the playback progress, network status or user operation of the first video when the client plays the first video, suspend subsequent TS transcoding when the TS cache quantity reaches a first threshold, and resume subsequent TS transcoding when the TS cache quantity is lower than a second threshold.
7. The video encoding and decoding system based on sliding window according to claim 6, characterized in that: The video server is specifically used to dynamically adjust the position of the TS according to the video information of the unplayed part of the first video when determining that the playback progress of the first video exceeds half of the overall progress, and recalculate the transcoding strategy in the adjusted TS.
8. The video encoding and decoding system based on sliding window according to claim 6, characterized in that: The video server is further used to determine the current network speed, the total duration of the video of the unplayed part, and the first resolution of the first half of the progress of the playback, calculate the current network saturation according to the first resolution and the network speed, and if the saturation is less than the saturation threshold, adjust the TS of the video information of the unplayed part by one level based on the first resolution, and keep the first time unchanged; if the saturation is greater than the saturation threshold, adjust the TS of the video information of the unplayed part by one level based on the first resolution; The calculation formula of the above saturation specifically includes: B=F*b / S*100%, wherein F is the value of the first resolution, S is the value of the network speed, b is the frame rate per second of the first video, such as 60 frames per second, etc., and the network speed is the network speed per second.
9. The video encoding and decoding system based on sliding window according to claim 5, characterized in that: The video server is also used to obtain the identifier of the current TS when the playback progress of the first video changes, and to play the video after decoding the data in the current TS.
10. The video encoding and decoding system based on sliding window according to claim 9, characterized in that: The video server is also used to extract the next TS identified by the current TS, obtain the first playback time of the current TS, extract the transcoding strategy of the next TS, and calculate the transcoding time of the transcoding strategy of the next TS based on the transcoding strategy and the current network speed. If the transcoding time is less than the first playback time, the transcoding strategy of the next TS is not adjusted. If the transcoding time is greater than the first playback time, the resolution level in the transcoding strategy is reduced by one level, and the transcoding time is calculated again to obtain the second transcoding time. If the second transcoding time is less than the first playback time, the resolution level of the transcoding strategy of the next TS is reduced by one level.
Citation Information
Patent Citations
Method and equipment for confirming playing skipping information of multimedia data on basis of statistics
CN103001925A
Self-adapting streaming media displaying method and self-adapting streaming media displaying system
CN103036889A
Video transcoding method and servers
CN106899858A
Method and device for switching video code rate, electronic equipment and medium
CN111417000A
Content analysis method and system for network short video
CN115052173A
Cited By
Storage and computing resource fused multi-screen simultaneous display method and system for cloud mobile phone
CN120835058A
A cloud mobile phone multi-screen same display method and system integrating storage and computing resources
CN120835058B