Local video playing method and device and medium
Through the local video playback method, local video areas are calculated and decoded, cropped and rendered, which solves the problems of video quality degradation, large computing power consumption and long waiting time in video stitching, and realizes efficient and high-definition video stitching display.
Patent Information
- Application Number
- CN202510508612.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-07-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing video stitching technology, the problems of video quality damage, large computing resources consumption and long waiting time are mainly caused by the video transcoding process.
Through the local video playback method, the splicing configuration information is obtained, the local video area is calculated, the video frame decoding process is processed, and the local video area is cropped and rendered, so that the video splicing display is realized, avoiding video transcoding operations.
Improve video quality, save computing resources, reduce waiting time, reduce hardware costs and operation and maintenance complexity, and improve video presentation efficiency.
Smart Images

Figure CN120238674A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of video playback, and particularly relates to a method, device and medium for playing local videos. Background Art
[0002] With the rapid development of multimedia technology, in scenarios where ultra-high definition and large-screen videos need to be presented, single-screen display can no longer meet the effect requirements, and video splicing display technology has emerged accordingly. Users can obtain better video presentation effects and viewing experiences by splicing multiple screens to expand the display range.
[0003] The currently commonly used video splicing method is to pre-segment video files with the help of video transcoding tools, and then distribute the segmented video files to corresponding terminals for decoding, playback and presentation. However, this method has at least the following technical problems:
[0004] Video quality is damaged: Video segmentation processing requires secondary transcoding of the original video, and the video transcoding process is a lossy coding process, which will inevitably lead to a decline in video image quality and affect the viewing experience;
[0005] High consumption of computing power resources: The video transcoding process consumes a large amount of computing power resources and requires a powerful server as support, which undoubtedly increases the hardware purchase cost and the system operation and maintenance workload;
[0006] Long waiting time: The video resources used in the splicing scenario are generally high-definition or ultra-high definition videos. The video segmentation and transcoding process requires a large amount of computing, and it often takes a long time to see the final effect. Summary of the Invention
[0007] In view of this, on the one hand, some embodiments disclose a method for playing local videos, including the steps of:
[0008] Obtain the splicing configuration information of the video to be displayed, and calculate the local video area to be displayed according to the obtained splicing configuration information;
[0009] Read the video file to be displayed in units of video frames, decode the video frames, and obtain the video pixel data for display;
[0010] Based on the calculated local video area, crop the decoded video pixel data to obtain the local video area data to be displayed;
[0011] Render the cropped local video area data and display the local video area.
[0012] Further, the method for playing local videos disclosed in some embodiments further includes the steps of:
[0013] The displayed partial video regions are stitched according to the stitching configuration information to display the overall video.
[0014] Some embodiments disclose a method for playing a partial video, including the steps of:
[0015] The display terminal obtains the stitching configuration information of the video to be displayed, and calculates the partial video regions that the display terminal needs to display according to the obtained stitching configuration information;
[0016] The display terminal reads the video file to be displayed in units of video frames, performs decoding processing on the video frames, and obtains video pixel data for display;
[0017] The display terminal clips the decoded video pixel data based on the calculated partial video regions to obtain the partial video region data that needs to be displayed;
[0018] The display terminal renders the partial video region data obtained by clipping and displays the partial video region.
[0019] Furthermore, some embodiments disclose a method for playing a partial video, further including the steps of:
[0020] Multiple display terminals are stitched according to the stitching configuration information to display the overall video.
[0021] Some embodiments disclose a method for playing a partial video, where the stitching configuration information includes a stitching layout, a display terminal identifier, the row and column positions where the display terminal is located.
[0022] Some embodiments disclose a method for playing a partial video, and the clipping process of the video pixel data includes:
[0023] The display terminal processes the decoded pixel data, clips out the video region data that the current display terminal needs to display from the decoded pixel data according to the partial video regions, and writes the data into the display buffer; the video region range is determined by the abscissa, ordinate, video region width, and height of the display terminal.
[0024] On the other hand, some embodiments disclose a device for playing a partial video, configured to execute the method for playing a partial video disclosed in the embodiments of the present invention.
[0025] Some embodiments disclose a device for playing a partial video, including a display terminal and a server, where:
[0026] The display terminal is configured to obtain the stitching configuration information of the video to be displayed from the server, and calculate the partial video regions that the display terminal needs to display according to the obtained stitching configuration information;
[0027] The display terminal is configured to read the video file to be displayed in units of video frames, decode the video frames, and obtain video pixel data for display;
[0028] The display terminal is configured to crop the decoded video pixel data based on the calculated local video area to obtain the local video area data to be displayed;
[0029] The display terminal is configured to render the cropped local video area data and display the local video area.
[0030] Furthermore, for the playback device of the local video disclosed in some embodiments, multiple display terminals are spliced according to the splicing configuration information to display the overall video.
[0031] On the other hand, some embodiments disclose a computer-readable storage medium, on which executable instructions are stored. When the executable instructions are processed by a processor, the playback method of the local video disclosed in the embodiments of the present invention is executed.
[0032] The playback method of the local video disclosed in the embodiments of the present invention performs rendering and presentation only on a local area of the video according to specific presentation requirements of the user during the rendering link after video decoding, thereby achieving the video splicing display effect. This method does not require transcoding and splitting operations on the video, can effectively save computing power resources, reduce the user waiting time, and improve the video presentation quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 Flowchart of the playback method of the local video disclosed in some embodiments;
[0034] Figure 2 Schematic diagram of the video splicing layout disclosed in some embodiments;
[0035] Figure 3 Schematic diagram of the video splicing effect disclosed in some embodiments. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] The special term "embodiment" here, any embodiment described as "exemplary" does not have to be construed as superior to or better than other embodiments. For the performance index tests in the embodiments of the present invention, unless otherwise specified, the conventional test methods in the art are used. It should be understood that the terms described in the embodiments of the present invention are only for describing specific embodiments and are not used to limit the content disclosed in the embodiments of the present invention.
[0037] Unless otherwise specified, the technical and scientific terms used herein have the same meanings as those commonly understood by those of ordinary skill in the technical field to which the embodiments of the present invention belong; other test methods and technical means not specifically noted in the embodiments of the present invention refer to the test methods and technical means commonly used by those of ordinary skill in the art.
[0038] As used herein, the terms "substantially" and "about" are used to describe minor fluctuations. For example, they can refer to less than or equal to ±5%, such as less than or equal to ±2%, such as less than or equal to ±1%, such as less than or equal to ±0.5%, such as less than or equal to ±0.2%, such as less than or equal to ±0.1%, such as less than or equal to ±0.05%. Numerical data presented or represented herein in a range format is used only for convenience and brevity and should therefore be interpreted flexibly as including not only the values explicitly recited as the bounds of the range, but also all individual values or sub-ranges included within that range. For example, a numerical range of "1 to 5%" should be interpreted as including not only the explicitly recited values of 1% to 5%, but also the individual values and sub-ranges within the indicated range. Thus, individual values such as 2%, 3.5%, and 4% are included in this numerical range, and sub-ranges such as 1% to 3%, 2% to 4%, and 3% to 5% etc. This principle also applies to ranges that list only one numerical value. In addition, such an interpretation applies regardless of the width of the range or the characteristics described.
[0039] In this document, including in the claims, conjunctions such as "comprising", "including", "carrying", "having", "containing", "involving", "accommodating", etc. are understood to be open-ended, that is, meaning "including but not limited to". Only the conjunctions "consisting of" and "composed of" are closed conjunctions.
[0040] To better illustrate the content of the present invention, numerous specific details are given in the following specific embodiments. Those skilled in the art should understand that the present invention can also be implemented without some specific details. In the embodiments, some methods, means, instruments, devices, etc. well-known to those skilled in the art are not described in detail in order to highlight the gist of the present invention.
[0041] On the premise of no conflict, the technical features disclosed in the embodiments of the present invention can be combined arbitrarily, and the obtained technical solutions belong to the content disclosed in the embodiments of the present invention.
[0042] In some embodiments, as Figure 1 shown, the method for playing a local video includes the steps of:
[0043] Obtain the splicing configuration information of the video to be displayed, and calculate the local video area to be displayed according to the obtained splicing configuration information;
[0044] Read the video file to be displayed in units of video frames, perform decoding processing on the video frames, and obtain video pixel data for display;
[0045] Based on the calculated local video area, crop the decoded video pixel data to obtain the local video area data to be displayed;
[0046] Render the cropped local video region data to display the local video region;
[0047] The displayed local video regions are stitched according to the stitching configuration information to display the overall video.
[0048] The method for playing a local video disclosed in some embodiments includes the steps of:
[0049] The display terminal obtains the stitching configuration information of the video to be displayed, and accurately calculates the local video region that the current display terminal needs to display according to the obtained stitching configuration information; Generally, the stitching configuration information includes the stitching layout, the display terminal identifier, the row and column positions where the display terminal is located; The local video region of the current device is determined by its abscissa, ordinate, video region width, and height;
[0050] The display terminal reads the video file to be displayed in units of video frames, decodes the video frames, and obtains the video pixel data for display;
[0051] Based on the calculated local video region, the display terminal crops the decoded video pixel data to obtain the local video region data to be displayed; Generally, the cropping process of the video pixel data includes: The display terminal processes the decoded pixel data, crops out the video region data that the current display terminal needs to display from the decoded pixel data according to the local video region, and writes the data into the display buffer; The video region range is determined by the abscissa, ordinate, video region width, and height of the display terminal;
[0052] The display terminal renders and presents the cropped local video region data, and finally displays the local video region to be presented on the display terminal;
[0053] Multiple display terminals are stitched according to the stitching configuration information to display the overall video.
[0054] Some embodiments disclose a device for playing a local video, configured to execute the method for playing a local video disclosed in the embodiments of the present invention.
[0055] In some embodiments, the device for playing a local video includes a display terminal and a server, wherein:
[0056] The display terminal is configured to obtain the stitching configuration information of the video to be displayed from the server, and calculate the local video region that the display terminal needs to display according to the obtained stitching configuration information;
[0057] The display terminal is configured to read the video file to be displayed in units of video frames, decode the video frames, and obtain the video pixel data for display;
[0058] The display terminal is configured to clip the decoded video pixel data based on the calculated local video area to obtain the local video area data to be displayed;
[0059] The display terminal is configured to render the local video area data obtained by clipping and display the local video area;
[0060] Multiple display terminals are spliced according to the splicing configuration information to display the overall video.
[0061] Generally, in the common scenario of video splicing display, multiple display terminals are spliced with each other to form an overall display device. Usually, the total number of display terminals is calculated in the way of M×N, where M represents the number of rows of display terminals, N represents the number of columns of display terminals, and M×N represents the total number of display terminals. Each display terminal is configured to present different video contents and finally jointly splice into an overall video picture.
[0062] Generally, the display terminal includes a display screen and a playback terminal. Multiple display screens are spliced with each other to form a large screen. Usually, during the video presentation process, first, after the playback terminal corresponding to the display screen is powered on and started, it connects to the server to obtain the splicing layout configuration file, which contains key information such as the splicing layout, screen identifier, row where the screen is located, and column where the screen is located;
[0063] Then the playback terminal calculates the range of the local video area to be rendered and presented according to the splicing layout configuration. Next, the playback terminal reads the video for decoding. After decoding a frame of image, it clips out the video area to be locally displayed. Finally, it sends the clipped pixel data to the display screen for rendering and display. Multiple playback terminals process according to their own splicing layouts and display their respective local video areas on the display screen, so as to overall achieve the video splicing display effect.
[0064] A computer-readable storage medium disclosed in some embodiments stores executable instructions. When the executable instructions are processed by a processor, the playback method of the local video disclosed in the embodiments of the present invention is executed.
[0065] The following further exemplarily illustrates the technical details in conjunction with embodiments.
[0066] In some embodiments, the playback method of the local video includes:
[0067] The playback terminal is powered on and started, establishes a connection with the server to obtain the splicing layout configuration file, and updates the splicing layout configuration to the local;
[0068] The key points included in the splicing layout configuration include:
[0069] {
[0070] "Device ID": "",
[0071] "Number of splicing rows": "",
[0072] "Row where the device is located": "",
[0073] "Number of splicing columns": ""
[0074] "Column where the device is located": ""
[0075] }
[0076] If the connection to the server fails, read the local splicing layout configuration, and the key points of the configuration information are the same as those on the server side;
[0077] The current playback terminal obtains its row and column in the overall splicing layout through the splicing layout configuration file; assuming that the overall splicing layout is set to M rows and N columns, the width of the complete video to be presented is W, and the height is H. This video will be presented as a whole by M×N terminal devices, and each terminal device presents 1 / (M×N) part of the video; obtaining the row where the screen layout of the current device is located as P and the column as Q from the splicing layout configuration file, the four-tuple of the video rendering area of the current device can be calculated as (X, Y, Width, Height), and the schematic diagram is as follows Figure 2 ;
[0078] The calculation formula is:
[0079]
[0080] Among them, X represents the abscissa of the upper left corner of the video rendering area of the current terminal device, Y represents the ordinate of the upper left corner of the video rendering area of the current terminal device, Width represents the width of the video rendering area of the current terminal device, and Height represents the height of the video rendering area of the current terminal device;
[0081] The terminal device reads a frame of video, calls the video decoder to decode the video, and decodes the video frame image into pixel data;
[0082] After the terminal device prepares the pixel data of the video frame image, the terminal selects to call the CPU or GPU according to the hardware capabilities of the device (if the terminal device has GPU hardware acceleration capabilities, give priority to calling the GPU to improve the efficiency of image rendering) to process the decoded data. According to the four-tuple of the video area range (X, Y, Width, Height) obtained from the previous video rendering area calculation steps, cut out the video area data that the current terminal needs to display in the overall splicing layout from the decoded pixel data, and write the data into the display buffer;
[0083] The screen display system of the terminal device displays the data written into the display buffer on the screen, completing the display of the current frame of the image. The terminal device continuously reads the image data in the video file frame by frame for image decoding, cropping, and rendering until the entire video file is displayed. At this time, the video played by the current terminal device is a partial area of the overall video that needs to be displayed in the splicing layout of the terminal device.
[0084] Multiple terminal devices play the partial areas of the overall video respectively according to their configuration descriptions in the splicing layout and the same process described above, thus realizing the overall video splicing effect.
[0085] In some embodiments, the splicing effect of multiple terminal devices playing partial videos Figure 3 .
[0086] The method for playing partial videos disclosed in the embodiments of the present invention only renders and presents a partial area of the video according to specific presentation requirements of the user in the rendering link after video decoding, thus realizing the video splicing display effect. It abandons the operation of pre-transcoding and splitting the video, effectively avoiding the problem of video picture quality degradation caused by video transcoding, presenting a higher-definition and better-quality video picture for the user; significantly saving the server computing power resource requirements, reducing the strict requirements for server performance, and reducing the hardware investment cost and operation and maintenance complexity; without the secondary video transcoding step, effectively reducing the user waiting time and improving the overall operation efficiency of the system.
[0087] The technical solutions disclosed in the embodiments of the present invention and the technical details disclosed in the embodiments are only exemplary illustrations of the inventive concept of the present invention and do not constitute a limitation on the technical solutions of the embodiments of the present invention. Any conventional changes, substitutions, or combinations made to the technical details disclosed in the embodiments of the present invention have the same inventive concept as the present invention and are within the protection scope of the claims of the present invention.
Claims
1. A method for playing a partial video, characterized in that: Includes steps: Obtaining the splicing configuration information of the video to be displayed, and calculating the local video area to be displayed according to the obtained splicing configuration information; Read the video file to be displayed in units of video frames, decode the video frames, and obtain video pixel data for display; Based on the calculated local video area, the decoded video pixel data is clipped to obtain the local video area data to be displayed; The cropped local video area data is rendered to display the local video area.
2. The method for playing a partial video according to claim 1, characterized in that: Also includes the steps: The displayed partial video areas are spliced according to the splicing configuration information to display the overall video.
3. The method for playing a partial video according to claim 1, characterized in that: Includes steps: The display terminal obtains the splicing configuration information of the video to be displayed, and calculates the local video area that the display terminal needs to display according to the obtained splicing configuration information; The display terminal reads the video file to be displayed in units of video frames, decodes the video frames, and obtains video pixel data for display; The display terminal cuts the decoded video pixel data based on the calculated local video area to obtain the local video area data to be displayed; The display terminal renders the cropped local video area data and displays the local video area.
4. The method for playing a partial video according to claim 3, characterized in that: Also includes the steps: Multiple display terminals are spliced together according to the splicing configuration information to display the overall video.
5. According to the method for playing partial videos of claim 3, the splicing configuration information includes a splicing layout, a display terminal identifier, and a row and column position of the display terminal.
6. The method for playing a partial video according to claim 3, characterized in that: The video pixel data clipping process includes: The display terminal processes the decoded pixel data, cuts out the video area data that the current display terminal needs to display from the decoded pixel data according to the local video area, and writes the data into the display buffer; the video area range is determined by the horizontal coordinate, vertical coordinate, video area width and height of the display terminal.
7. A device for playing a partial video, characterized in that: The device is configured to execute the method for playing a partial video as described in any one of claims 1 to 6.
8. The device for playing partial video according to claim 7, characterized in that: It includes a display terminal and a server, including: The display terminal is configured to obtain splicing configuration information of the video to be displayed from the server, and calculate the local video area that the display terminal needs to display according to the obtained splicing configuration information; The display terminal is configured to read the video file to be displayed in units of video frames, decode the video frames, and obtain video pixel data for display; The display terminal is configured to clip the decoded video pixel data based on the calculated local video area to obtain the local video area data to be displayed; The display terminal is configured to render the cropped local video area data and display the local video area.
9. The device for playing partial video according to claim 8, characterized in that: Multiple display terminals are spliced together according to the splicing configuration information to display the overall video.
10. A computer-readable storage medium having executable instructions stored thereon, characterized in that: When the executable instruction is processed by the processor, the method for playing the partial video according to any one of claims 1 to 6 is executed.
Citation Information
Patent Citations
Large screen splicing method and system
CN101807389A
Image processing method and device applied to tiled display equipment
CN103985373A
Video processing method and apparatus, and video player, electronic device and readable medium
WO2022218042A1