Video synthesis method and device, equipment and medium
By generating GIF images in the vehicle infotainment system and parsing color mapping and frame display parameters, a continuous video of interface changes is generated, solving the problem of accurately reproducing vehicle information system crashes, reducing hardware costs and improving positioning efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-03-10
AI Technical Summary
During the testing and debugging of vehicle information systems, existing technologies are unable to accurately reproduce system crashes, making it difficult to locate problems. Furthermore, relying on external cameras to record videos presents challenges such as high hardware costs, susceptibility to environmental interference, and untimely manual intervention.
By capturing screenshots during vehicle-mounted infotainment system operation to generate GIF images, detecting crash events, extracting target image sets, and parsing color mapping and frame display parameters, a continuous video of interface changes is generated.
It achieves complete recording of changes in the user interface before and after a crash, reduces hardware dependence and deployment costs, avoids human error, and improves the accuracy and reliability of crash scenario reproduction.
Smart Images

Figure CN121644852A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a video synthesis method, device, equipment and medium. BACKGROUND
[0002] In the testing and debugging process of a vehicle information system (vehicle machine), when the system crashes with phenomena such as black screen, flower screen or freezing, accurately reproducing the problem site is the key to locating and solving the problem. The existing technology usually relies on an external camera to record the video of the vehicle machine screen to capture the operating interface state before and after the crash occurs. However, this method has obvious limitations: on the one hand, the layout of the camera is limited by hardware cost and physical space, and it is difficult to deploy on a large scale; on the other hand, the video captured by the camera is easily disturbed by external factors such as environmental light and angle obstruction, resulting in unstable picture quality and affecting the identification of operation details. In addition, since the crash occurrence time is random, manual operation is difficult to trigger recording in time, often leading to the missing of key operation fragments and the inability to form a complete record of the behavior before and after the crash.
[0003] In the absence of effective video recording means, testers usually rely on system logs or screenshots for problem analysis. However, these static or discrete data forms are difficult to intuitively reflect the dynamic interaction process between the user and the vehicle machine interface before the crash, especially in the case of continuous changes in the graphical user interface (GUI) state, a single screenshot or log fragment cannot restore the complete operation link. In addition, existing methods rely on manual intervention for data extraction and template configuration, which not only is inefficient, but also easily introduces human error, further increasing the complexity and time cost of problem positioning. Therefore, there is an urgent need for a video synthesis method to solve the above problems. SUMMARY
[0004] A series of simplified concepts are introduced in the summary section, which will be further described in detail in the specific embodiments section. The summary section of the present application does not mean to attempt to limit the key features and necessary technical features of the claimed technical solution, nor to attempt to determine the protection scope of the claimed technical solution.
[0005] In a first aspect, the present application provides a video synthesis method, comprising: During the running of the vehicle machine, a plurality of GIF pictures generated by screenshots are obtained; When a crash event of the vehicle machine is detected, a target picture set is extracted from the plurality of GIF pictures, wherein the target picture set contains GIF pictures of a preset time period before and after the crash event; Each GIF picture in the target picture set is analyzed to determine the color mapping parameters and frame display parameters of the each GIF picture; Based on the color mapping parameters and frame display parameters of all GIF images, all GIF images in the target image set are uniformly encoded to generate a target video file containing changes in the user interface before and after the crash.
[0006] In some implementations, acquiring multiple GIF images generated from screenshots during the operation of the vehicle's infotainment system includes: During the operation of the vehicle's infotainment system, a sequence of screenshots of the vehicle's interface is captured. Based on a preset time window, the screenshot sequence is divided into multiple screenshot sub-sequences; A GIF image is generated based on each screenshot subsequence, resulting in the multiple GIF images.
[0007] In some implementations, extracting a target image set from the plurality of GIF images when a crash event is detected in the vehicle infotainment system includes: A target time window is determined based on the occurrence time of the crash event and the preset time period; Based on the generation timestamp of each GIF image, GIF images whose generation timestamps fall within the target time window are selected from the multiple GIF images to generate the target image set.
[0008] In some implementations, parsing each GIF image in the target image set to determine the color mapping parameters and frame display parameters of each GIF image includes: For each GIF image in the target image set, obtain the file header encoding information and frame sequence encoding information of the GIF image; determine the color mapping parameters of the GIF image based on the file header encoding information; and determine the frame display parameters of the GIF image based on the frame sequence encoding information.
[0009] In some implementations, the file header encoding information includes a logical screen descriptor and a file header color table. Determining the color mapping parameters of the GIF image based on the file header encoding information includes: For each GIF image in the target image set, based on the logical screen descriptor contained in the file header encoding information of the GIF image, the color table usage flag and color resolution of the GIF image are determined; based on the color table usage flag, the color resolution, and the file header color table, the color mapping parameters of the GIF image are determined.
[0010] In some implementations, the frame sequence encoding information includes an image descriptor and a graphics control extension block, and determining the frame display parameters of the GIF image based on the frame sequence encoding information includes: For each GIF image in the target image set, the frame attribute information of the GIF image is determined based on the image descriptor contained in the frame sequence encoding information of the GIF image; the frame control parameters of the GIF image are determined based on the graphics control extension block contained in the frame sequence encoding information of the GIF image; and the frame display parameters of the GIF image are determined based on the frame attribute information and the frame control parameters.
[0011] In some implementations, the step of uniformly encoding all GIF images in the target image set based on the color mapping parameters and frame display parameters of all GIF images to generate a target video file containing changes to the user interface before and after the crash includes: Based on the color mapping parameters of all GIF images, determine the target color mapping table; The target frame rate is determined based on the frame display parameters of all GIF images; Based on the target color mapping table and the target frame rate, each GIF image in the target image set is subjected to frame conversion processing to generate a target video frame sequence for each GIF image; The target video file is generated based on the target video frame sequence of all GIF images.
[0012] Secondly, this application proposes a video synthesis apparatus, comprising: The GIF image acquisition unit is used to acquire multiple GIF images generated from screen screenshots during the operation of the vehicle system; The target image extraction unit is used to extract a set of target images from the plurality of GIF images when a crash event is detected in the vehicle system. The set of target images includes GIF images from a preset time period before and after the crash event. The image parameter acquisition unit is used to parse each GIF image in the target image set and determine the color mapping parameters and frame display parameters of each GIF image; The target video generation unit is used to perform unified encoding processing on all GIF images in the target image set based on the color mapping parameters and frame display parameters of all GIF images, and generate a target video file containing changes in the operation interface before and after the crash.
[0013] Thirdly, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the video synthesis method of any of the first aspects.
[0014] Fourthly, this application also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the video synthesis methods of the first aspect.
[0015] In summary, the video synthesis method provided in this application achieves a complete record of changes in the user interface before and after a crash by directly acquiring multiple GIF images generated from screenshots during the operation of the vehicle's infotainment system and automatically extracting a set of images from the relevant time period when a crash event is detected. By parsing the color mapping parameters and frame display parameters of each GIF image and performing unified encoding based on all parameters, a continuous MP4 video file is ultimately generated. This method effectively replaces the traditional recording method that relies on external cameras, reducing hardware dependence and deployment costs. Simultaneously, the automated extraction and synthesis process avoids operational errors caused by manual intervention, improving the accuracy and reliability of crash scene reproduction and providing a visual basis for problem localization and optimization of the vehicle's infotainment system. Attached Figure Description
[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit this specification. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic flowchart of a video synthesis method provided in an embodiment of this application; Figure 2 This is a schematic diagram of a video synthesis device provided in an embodiment of this application; Figure 3 This is a schematic diagram of a video synthesis electronic device provided in an embodiment of this application. Detailed Implementation
[0017] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0018] Please see Figure 1 This is a schematic diagram of a video synthesis method provided in an embodiment of this application, which may specifically include: S110. During the operation of the vehicle's infotainment system, acquire multiple GIF images generated from screen screenshots; For example, during the operation of the vehicle's infotainment system, screenshots of the user interface are periodically taken according to a preset strategy, forming a continuous sequence of screenshots. To optimize storage and construct intermediate data with temporal logic, this screenshot sequence is divided into multiple sub-sequences based on a preset time window. Each sub-sequence is encoded to generate a GIF image, combining multiple static screenshots into an animation unit containing brief dynamic operations. In this way, multiple GIF images are continuously generated and stored during operation, serving as data recording the interface state and user actions.
[0019] S120. When a crash event is detected in the vehicle infotainment system, a target image set is extracted from multiple GIF images, wherein the target image set contains GIF images from a preset time period before and after the crash event. For example, when a crash is detected in the vehicle's infotainment system, a target time window is determined based on the time of the crash. This window covers a period of time before and after the crash, ensuring that the sequence of operations that caused the crash and the interface state at the moment of the crash are fully captured. Subsequently, all generated GIF images are iterated through, and images falling within the target time window are selected based on their timestamp information to form a target image set.
[0020] S130. Parse each GIF image in the target image set to determine the color mapping parameters and frame display parameters of each GIF image; For example, the structure of each GIF image within the target set is parsed, reading the encoded information from its file header and frame sequence. By analyzing the logical screen descriptor and color table data, the color range and mapping relationship used by the image are determined, i.e., color mapping parameters. Simultaneously, the image descriptor and graphics control extension block are parsed to obtain the size, position, and display control information of each frame, thereby determining frame display parameters such as frame delay time and playback characteristics. This parsing process provides the parameter basis for subsequently converting all GIF images into a standard video format.
[0021] S140. Based on the color mapping parameters and frame display parameters of all GIF images, perform unified encoding on all GIF images in the target image set to generate a target video file containing changes in the user interface before and after the crash.
[0022] For example, a unified video encoding process is performed based on the color mapping parameters and frame display parameters parsed from all target GIF images. This process establishes a unified color expression benchmark by integrating the color information of each image and coordinates the temporal playback characteristics of each image to determine the frame rate of the synthesized video. Subsequently, each GIF image in the set is format-converted and data-reassembled according to the aforementioned benchmark parameters, converting its original compressed animation data into a continuous frame sequence that conforms to the target video specifications. Finally, all processed video frames are integrated in chronological order to generate a target video file that completely records the continuous changes in the user interface before and after the crash.
[0023] In summary, this application's embodiments construct a complete video synthesis mechanism by directly acquiring multiple GIF images generated from screen screenshots during the vehicle's operation and automatically extracting a set of images from key time periods before and after the crash for unified processing when a crash event is detected. This method parses each GIF image to obtain its color mapping and frame display parameters, and performs unified encoding based on the parameters of all images, ultimately generating a target video file that coherently displays the changes in the user interface. This effectively replaces the traditional recording method relying on external cameras, reducing hardware costs and deployment complexity. Furthermore, the fully automated image parsing and parameter-unified video synthesis process avoids errors that may be introduced by manual intervention, enabling backtracking of the operation path before and after the crash. This improves the accuracy of locating vehicle system crashes and provides data support for vehicle system stability testing.
[0024] In some instances, during the operation of the vehicle's infotainment system, multiple GIF images generated from screenshots are captured, including: During the operation of the vehicle's infotainment system, a sequence of screenshots of the vehicle's interface is captured. Based on a preset time window, the screenshot sequence is divided into multiple screenshot subsequences; Based on each screenshot subsequence, a GIF image is generated, resulting in multiple GIF images.
[0025] For example, during the operation of the vehicle's infotainment system, a screenshot operation is first performed to obtain a continuous record of the interface's state. This process involves calling the system's underlying graphics interface to capture the contents of the current display buffer at a preset sampling frequency, thereby forming a sequence of screenshots arranged in chronological order. This sequence completely records the visual state of the vehicle's infotainment system interface at different points in time.
[0026] After acquiring the screenshot sequence, the sequence is structurally divided based on a preset time window. The preset time window is a pre-defined duration parameter used to define the duration range of each dynamic segment. According to this parameter, the continuous screenshot sequence is divided into multiple screenshot subsequences, each containing multiple screenshots captured within adjacent time periods. This division operation transforms the lengthy continuous screenshot data into multiple independent data units with temporal logic.
[0027] Based on the obtained screenshot subsequences, a GIF image generation operation is performed on each subsequence. This operation uses an image encoder to combine multiple static screenshots from the subsequence into a single GIF animation file. During this process, the encoder sets inter-frame delay parameters according to the time sequence of the screenshots and generates a color palette based on the color characteristics of all screenshots in the subsequence, ensuring that the generated GIF image maintains the dynamic continuity of the operation while optimizing storage space. Through this processing, multiple GIF images are output, each recording the interface state changes of the vehicle's infotainment system within a specific time period.
[0028] In summary, this application, through the GIF image generation mechanism described above, converts a continuous sequence of screenshots into multiple independent dynamic animation units. This effectively reduces the storage space occupied by the original screenshot data while preserving the dynamic context information of the operation process. This structured processing method provides a data foundation for subsequent crash event analysis, while avoiding the large file storage problem caused by continuous video recording in traditional methods, thus improving data management efficiency.
[0029] In some instances, upon detecting a crash in the vehicle's infotainment system, a target image set is extracted from multiple GIF images, including: Determine the target time window based on the occurrence time of the crash event and a preset time period; Based on the generation timestamp of each GIF image, select GIF images whose generation timestamps fall within the target time window from multiple GIF images to generate the target image set.
[0030] For example, when a vehicle system crash is detected, a target time window is determined based on the time of the crash and a preset time period. This preset time period is a pre-configured duration parameter that defines the length of time before the crash that needs to be traced and the length of time after the crash that needs to be recorded. Using the crash occurrence time as a baseline, the window is traced backward by the duration indicated by the preset time period and then extended backward by the same duration to determine the complete target time window. The start time of this window is the crash occurrence time minus the preset time period, and the end time is the crash occurrence time plus the preset time period, ensuring that the time window covers the critical operational phases and state changes before and after the crash.
[0031] After determining the target time window, the target image set is selected from the multiple generated GIF images based on the generation timestamp of each GIF image. Each GIF image is assigned a timestamp during its generation, which records the end or intermediate time point of the screenshot subsequence corresponding to that GIF image. All available GIF images are iterated through, and the generation timestamp of each GIF image is compared with the start and end times of the target time window. GIF images whose generation timestamps are greater than or equal to the start time of the target time window and less than or equal to the end time of the target time window are selected. All GIF images that meet this time condition are grouped together to form the target image set.
[0032] In summary, this application's embodiments achieve the location and extraction of GIF images within the time period associated with a crash event. This process is entirely automated, based on timestamps, requiring no manual intervention. This ensures both the accuracy of data extraction and that the acquired set of target images fully covers the critical operational intervals before and after the crash event. This time-window-based extraction mechanism provides a data foundation for subsequently generating coherent crash analysis videos, improving the completeness of crash scene reproduction.
[0033] In some instances, each GIF image in the target image set is parsed to determine the color mapping parameters and frame display parameters for each GIF image, including: For each GIF image in the target image set, obtain the file header encoding information and frame sequence encoding information of the GIF image; determine the color mapping parameters of the GIF image based on the file header encoding information; and determine the frame display parameters of the GIF image based on the frame sequence encoding information.
[0034] For example, for each GIF image in the target image set, its file header encoding information and frame sequence encoding information are first obtained. The file header encoding information includes a logical screen descriptor and a global color table. The logical screen descriptor defines the logical screen size, color table presence flag, and color resolution of the GIF image. The frame sequence encoding information includes an image descriptor and a graphics control extension block. The image descriptor records the position and size of each frame on the logical screen, while the graphics control extension block defines the inter-frame delay time, transparency index, and frame handling method. Based on the file header encoding information, by parsing the color table usage flag and color resolution in the logical screen descriptor and combining it with the specific color entries in the global color table, the color range and index mapping relationship used by the GIF image are determined, i.e., the color mapping parameters. Based on the frame sequence encoding information, by extracting the frame position and size attributes in the image descriptor and the frame delay and handling code in the graphics control extension block, the display timing and visual characteristics of each frame in the GIF image are comprehensively determined, i.e., the frame display parameters.
[0035] In summary, this application's embodiments, through the aforementioned analysis process, accurately extract key attributes related to color and frame display from the encoding structure of each GIF image, providing parameter basis for subsequently converting all GIF images to the same video format. This step ensures that differences in color expression and playback timing among different GIF images can be effectively coordinated, laying a technical foundation for generating a coherent crash analysis video and avoiding problems such as color distortion or playback asynchrony in the synthesized video due to inconsistent source data formats.
[0036] In some instances, the file header encoding information includes a logical screen descriptor and a file header color table. Based on this file header encoding information, the color mapping parameters of the GIF image are determined, including: For each GIF image in the target image set, the color table usage flag and color resolution of the GIF image are determined based on the logical screen descriptor contained in the file header encoding information of the GIF image; the color mapping parameters of the GIF image are determined based on the color table usage flag, color resolution, and file header color table.
[0037] For example, for each GIF image in the target image set, the color table usage flag and color resolution of the GIF image are determined based on the logical screen descriptor contained in the file header encoding information of that GIF image. The logical screen descriptor, as a component of the GIF file format, defines the existence status of the global color table and the bit depth of the color index through its internal fields. The color table usage flag indicates whether the GIF image is accompanied by a global color table, and its value directly determines the basis for subsequent color data processing. The color resolution characterizes the richness of the original image's color information, and its value is related to the actual number of colors that the global color table can accommodate.
[0038] Based on the obtained color table usage flags, color resolution, and file header color table, the color mapping parameters of the GIF image are determined. When the color table usage flag indicates the existence of a global color table, the specific color entries contained in the file header color table are read. These entries define each color in the palette in RGB format. Color resolution is used to help understand the scale of the color table and its color reproduction capability. The color mapping parameters are ultimately constructed into a mapping table from pixel index values to actual RGB colors, which fully defines the color space used by the GIF image. This process transforms the representation of indexed colors in the GIF format into a clear color lookup structure that can be directly used by subsequent video encoding processes, ensuring the accurate transmission and consistency of image color information during format conversion.
[0039] In summary, the embodiments of this application can restore the color system of a GIF file from its encoded information. This method obtains color parameters by parsing a standardized file structure. The determined color mapping parameters provide a technical basis for unifying the color representation of all GIF images and generating visually consistent target video files, effectively preventing color distortion in the synthesized video caused by differences in the color palette of the source files.
[0040] In some instances, frame sequence encoding information includes image descriptors and graphics control extension blocks. Based on this frame sequence encoding information, the frame display parameters of the GIF image are determined, including: For each GIF image in the target image set, the frame attribute information of the GIF image is determined based on the image descriptor contained in the frame sequence encoding information of the GIF image; the frame control parameters of the GIF image are determined based on the graphics control extension block contained in the frame sequence encoding information of the GIF image; and the frame display parameters of the GIF image are determined based on the frame attribute information and the frame control parameters.
[0041] For example, for each GIF image in the target image set, the frame attribute information of the GIF image is determined based on the image descriptor contained in the frame sequence encoding information of that GIF image. The image descriptor, as a structure defining the basic attributes of each frame image in the GIF data stream, contains the starting coordinates of the image on the logical screen, as well as the image's width and height. These parameters together determine the position and area occupied by the frame image in the final displayed screen. In addition, the image descriptor also contains a local color table flag and an interlacing flag. The local color table flag indicates whether the frame uses a dedicated color mapping independent of the global color table, while the interlacing flag defines whether the pixel data of the frame uses an interlaced scanning storage method. These flags affect the order of color mapping and data reading during the decoding process. By parsing these fields in the image descriptor, the basic spatial attributes and data organization characteristics constituting each frame of the GIF image can be obtained, thus forming a complete understanding of the frame attribute information of the GIF image.
[0042] Based on the Graphics Control Extension Block (GCP) contained in the frame sequence encoding information of the GIF image, the frame control parameters of the GIF image are determined. The GCP is a structure in the GIF format used to control the visual appearance and timing behavior of frames. It encapsulates a handling method, a user input flag, a transparency color flag, and a delay time parameter. The handling method defines how to update the canvas after the current frame is displayed. The user input flag indicates whether to wait for user input before continuing playback. The transparency color flag, together with its associated transparency color index, specifies the color that should be considered transparent in the current frame. The delay time parameter sets the duration of the frame in 0.1-second increments. By decoding the GCP, the display duration of each frame, the canvas update logic, and the transparency handling method can be extracted, thereby determining the frame control parameters of the GIF image.
[0043] Based on frame attribute information and frame control parameters, the frame display parameters of the GIF image are determined. This determination process involves information fusion and standardization. The frame spatial layout information provided by the image descriptor is integrated with the temporal behavior control information provided by the graphics control extension block. Specifically, the frame size and position attributes, combined with the processing method, jointly determine the dynamic update effect of the image during frame sequence playback; the delay time parameter is converted into a unified millisecond or frame rate unit to quantify the display duration of each frame; and the transparency color information is converted into transparency channels or key values recognizable by subsequent video processing. Through this integration and transformation, a set of standardized frame display parameters that comprehensively describes the playback behavior of the GIF image is finally generated. This parameter set provides a basis for the subsequent unified encoding of all GIF images into the target video format regarding timing, visual transitions, and compositing.
[0044] In summary, this application's embodiments quantify the display characteristics of GIF image frames by parsing the image descriptors and graphics control extension blocks in the GIF file structure and fusing their spatial attributes and behavioral control information. This method avoids playback asynchrony or visual errors that may result from relying on estimations or default values, ensuring that the display time, positional relationships, and visual transition effects of each frame can be accurately reproduced when synthesizing a single video from multiple GIF source files.
[0045] In some instances, based on the color mapping parameters and frame display parameters of all GIF images, all GIF images in the target image set are uniformly encoded to generate a target video file containing changes to the user interface before and after the crash, including: Determine the target color mapping table based on the color mapping parameters of all GIF images; The target frame rate is determined based on the frame display parameters of all GIF images; Based on the target color mapping table and the target frame rate, each GIF image in the target image set is subjected to frame conversion processing to generate a target video frame sequence for each GIF image. Generate the target video file based on the target video frame sequence of all GIF images.
[0046] For example, a target color map is determined based on the color mapping parameters of all GIF images. This step analyzes the color mapping parameters of each GIF image in the target image set. These parameters originate from the logical screen descriptor and file header color table in the encoding information of each GIF file header, collectively defining the original color space of each image. The determination process integrates the color table usage flags, color resolutions, and specific color entries of all images to construct a unified global color query structure that can cover the color information of all source images—the target color map. This target color map serves as a unified color reference for subsequent frame conversion processing, aiming to eliminate the problem of inconsistent or distorted colors in the synthesized video that may be caused by different GIF images using independent color palettes, ensuring the consistency of color representation in the final video.
[0047] The target frame rate is determined based on the frame display parameters of all GIF images. This step coordinates the frame display parameters parsed from the frame sequence encoding information (mainly image descriptors and graphics control extension blocks) of each GIF image. These frame display parameters contain timing control information such as the frame delay time of each image. The determination process calculates a representative frame rate value by analyzing the frame delay distribution of all images. For example, it takes the statistical median or average of the frame delay times and converts it to frames per second, or directly sets a preset frame rate that conforms to video standards as the playback rate of the entire synthesized video, i.e., the target frame rate. This target frame rate provides a timing standard for unifying all GIF animation sequences onto the same timeline, ensuring the smoothness of the final video playback and avoiding video skipping or stuttering caused by differences in playback rate.
[0048] Based on the aforementioned target color map and target frame rate, each GIF image in the target image set undergoes frame conversion processing to generate a target video frame sequence corresponding to each GIF image. Frame conversion processing is a decoding and re-encoding process for individual GIF images. Specifically, it includes: according to the target color map, performing color remapping on the pixel index data obtained after decoding the GIF image, converting the color indices in the original GIF based on its own color palette to color values based on the target color map; simultaneously, adjusting the display duration of each frame in the original GIF according to the target frame rate to adapt to a unified video playback rhythm. This processing converts each original GIF animation into a sequence of continuous image frames that conforms to the target color and timing specifications, i.e., the target video frame sequence. This step ensures that all source GIF images are standardized in color system and playback timing, preparing uniformly formatted intermediate data for the final synthesized video file.
[0049] Based on the target video frame sequence obtained after frame conversion of all GIF images, the final target video file is generated. This step performs video encapsulation, specifically including: sorting and splicing the image frames in all target video frame sequences according to the chronological order determined by the original timestamps of each GIF image, forming a complete video frame stream arranged chronologically; adding file header information, metadata, and video track parameters conforming to MP4 container format to this video frame stream; and finally writing the encapsulated data stream to a file to generate the target video file. This file completely records the continuous state changes of the vehicle's operating interface within a preset time period before and after the crash event, forming a record that can be used for problem backtracking and analysis.
[0050] In summary, this application's embodiments establish a unified color and timing benchmark, and perform standardized format conversion and data integration on all source GIF images to ultimately generate a coherent and visually consistent target video file. This method effectively overcomes the inherent inconsistencies in color and frame rate among multiple GIF source files, ensuring the quality of the synthesized video in terms of color reproduction and playback smoothness, thereby providing video evidence for the reproduction and problem localization of vehicle infotainment system crash scenarios.
[0051] Please see Figure 2 The image shows a schematic diagram of a video synthesis device provided in an embodiment of this application, comprising: The GIF image acquisition unit 21 is used to acquire multiple GIF images generated from screen screenshots during the operation of the vehicle system; The target image extraction unit 22 is used to extract a set of target images from multiple GIF images when a crash event is detected in the vehicle system. The set of target images includes GIF images from a preset time period before and after the crash event. Image parameter acquisition unit 23 is used to parse each GIF image in the target image set and determine the color mapping parameters and frame display parameters of each GIF image; The target video generation unit 24 is used to perform unified encoding processing on all GIF images in the target image set based on the color mapping parameters and frame display parameters of all GIF images, and generate a target video file containing changes in the operation interface before and after the crash.
[0052] Please see Figure 3 This application also provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor. When the processor 320 executes the computer program 311, it implements the steps of the video synthesis method.
[0053] Since the electronic device described in this embodiment is the device used to implement a video synthesis apparatus in the embodiments of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in the embodiments of this application. Therefore, how the electronic device implements the method in the embodiments of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiments of this application falls within the scope of protection of this application.
[0054] In practice, when the computer program 311 is executed by the processor, it can implement any of the embodiments corresponding to the first aspect.
[0055] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0056] Those skilled in the art will understand that embodiments of this application can provide methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media containing computer-readable program code.
[0057] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0058] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0060] This application also provides a computer program product, which includes computer software instructions that, when executed on a processing device, cause the processing device to perform... Figure 1 The flowchart of a video synthesis method in the corresponding embodiment.
[0061] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, computer instructions may be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium may be any usable medium that a computer can store or a data storage device such as a server or data center that integrates one or more usable media. The usable medium may be a magnetic medium, an optical medium, or a semiconductor medium, etc.
[0062] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0063] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Furthermore, the mutual couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0064] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0065] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in the form of hardware and / or software functional units.
[0066] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, magnetic disks, or optical disks.
[0067] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
[0068] Obviously, those skilled in the art can make various modifications to this specification without departing from its spirit and scope. Therefore, this specification also intends to include any modifications that fall within the scope of the claims and their equivalents.
Claims
1. A method of video compositing, the method comprising: Comprise: In the process of running the car machine, a plurality of GIF pictures generated by screen capture are acquired; When a crash event of the car machine is detected, a target picture set is extracted from the plurality of GIF pictures, wherein the target picture set contains GIF pictures in a preset time period before and after the crash event; Each GIF picture in the target picture set is parsed to determine the color mapping parameter and the frame display parameter of the GIF picture; Based on the color mapping parameter and the frame display parameter of all GIF pictures, all GIF pictures in the target picture set are uniformly encoded to generate a target video file containing changes in the operation interface before and after the crash.
2. The method of claim 1, wherein, The plurality of GIF pictures generated by screen capture are acquired in the process of running the car machine, comprising: In the process of running the car machine, a screen capture sequence of the car machine operation interface is acquired; Based on a preset time window, the screen capture sequence is divided into a plurality of screenshot subsequences; Based on each screenshot subsequence, a GIF picture is generated to obtain the plurality of GIF pictures.
3. The method of claim 1, wherein, When a crash event of the car machine is detected, a target picture set is extracted from the plurality of GIF pictures, comprising: Based on the occurrence time of the crash event and the preset time period, a target time window is determined; Based on the generation timestamp of each GIF picture, GIF pictures with generation timestamps within the target time window are filtered from the plurality of GIF pictures to generate the target picture set.
4. The method of claim 1, wherein, Each GIF picture in the target picture set is parsed to determine the color mapping parameter and the frame display parameter of the GIF picture, comprising: For each GIF picture in the target picture set, file header encoding information and frame sequence encoding information of the GIF picture are acquired; based on the file header encoding information, the color mapping parameter of the GIF picture is determined; based on the frame sequence encoding information, the frame display parameter of the GIF picture is determined.
5. The method of claim 4, wherein, The file header encoding information includes a logical screen descriptor and a file header color table, and the color mapping parameter of the GIF picture is determined based on the file header encoding information, comprising: For each GIF picture in the target picture set, based on the logical screen descriptor contained in the file header encoding information of the GIF picture, the color table usage flag and the color resolution of the GIF picture are determined; based on the color table usage flag, the color resolution and the file header color table, the color mapping parameter of the GIF picture is determined.
6. The method of claim 4, wherein, The frame sequence encoding information includes an image descriptor and a graphics control extension block, and the frame display parameter of the GIF picture is determined based on the frame sequence encoding information, comprising: For each GIF picture in the target picture set, determine frame attribute information of the GIF picture based on the image descriptor contained in the frame sequence encoding information of the GIF picture; determine frame control parameters of the GIF picture based on the graphic control extension block contained in the frame sequence encoding information of the GIF picture; and determine frame display parameters of the GIF picture based on the frame attribute information and the frame control parameters.
7. The method of claim 1, wherein, The uniform encoding processing of all GIF pictures in the target picture set based on the color mapping parameters and the frame display parameters of all GIF pictures generates a target video file containing changes in the operation interface before and after the crash, including: determining a target color mapping table based on the color mapping parameters of all GIF pictures; determining a target frame rate based on the frame display parameters of all GIF pictures; performing frame conversion processing on each GIF picture in the target picture set based on the target color mapping table and the target frame rate to generate a target video frame sequence of the GIF picture; and generating the target video file based on the target video frame sequence of all GIF pictures.
8. A video compositing apparatus characterized by comprising: It includes: a GIF picture acquisition unit configured to acquire a plurality of GIF pictures generated by screenshots during operation of the car machine; a target picture extraction unit configured to extract a target picture set from the plurality of GIF pictures when a crash event of the car machine is detected, wherein the target picture set contains GIF pictures in a preset time period before and after the crash event; a picture parameter acquisition unit configured to analyze each GIF picture in the target picture set to determine color mapping parameters and frame display parameters of the GIF picture; a target video generation unit configured to perform uniform encoding processing on all GIF pictures in the target picture set based on the color mapping parameters and the frame display parameters of all GIF pictures to generate a target video file containing changes in the operation interface before and after the crash.
9. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the steps of the video synthesis method according to any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the video synthesis method according to any one of claims 1 to 7.