Video file output method and device and video file playing method
By obtaining the buffered data stream and response parameters output by the image processing unit, and outputting the video file, the problem of inaccurate output of the video file is solved, and the accurate output of the video file and a better user experience are achieved.
Patent Information
- Application Number
- CN202411155137.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-08
AI Technical Summary
When an electronic device outputs a video file, the relevant content in the video file cannot be accurately presented, resulting in a decrease in the accuracy and user experience effect of the video file output.
By acquiring the buffered data stream and output response parameters output by the image processing unit, the video file is output based on these data, so that the playback effect of the video file is the same or similar to the output effect corresponding to the output response parameters, including recording the brightness of the display screen and the audio output parameters. to ensure accurate output of video files.
It improves the output accuracy and user experience of video files, ensures that the video files can truly restore the scenes output by the image processing unit during playback, and improves the playback effect.
Smart Images

Figure CN118921531A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and more specifically to a video file output method, device and video file playback method. Background Art
[0002] With the development and application of electronic devices, video files in an electronic device can be shared or transferred to another electronic device for playback by the other electronic device. For example, the content on the screen of the electronic device can be recorded to form a video through the screen recording function on the electronic device. The user can view the recorded content by watching the video, or transfer the recorded content to other users. However, when the electronic device outputs the corresponding video file, there is a problem that the relevant content in the video file cannot be accurately presented, which reduces the accuracy of the video file output and the user experience. Summary of the invention
[0003] In view of this, this application provides the following technical solutions:
[0004] A video file output method, comprising:
[0005] Get the buffered data stream output by the image processing unit;
[0006] Obtaining output response parameters during the process of the image processing unit outputting the buffered data stream;
[0007] Outputting a video file based on the buffered data stream and the output response parameters;
[0008] The output effect of playing the video file is the same as or similar to the output effect corresponding to the output response parameter.
[0009] Optionally, the buffered data stream is composed of a plurality of display data with a time sequence, and each display data is used to form display content on a display screen;
[0010] The timing of the display data included in the buffered data stream is determined by the time when each frame of the display data is obtained.
[0011] Optionally, the video file includes a video data file and an output parameter file;
[0012] The step of outputting a video file based on the buffered data stream and the output response parameter comprises:
[0013] Based on the buffered data stream, output the video data file;
[0014] Based on the output response parameters, output the output parameter file;
[0015] The output parameter file is used to control the data response parameters during the playing of the video data file.
[0016] Optionally, outputting a video file based on the buffered data stream and the output response parameter includes:
[0017] Based on the output response parameter, changing the data value of the buffered data stream according to a preset strategy;
[0018] A video file is output based on the buffered data stream after the data value is changed.
[0019] Optionally, the obtaining of an output response parameter in a process in which the image processing unit outputs the buffered data stream includes:
[0020] The output response parameter corresponding to each display data output by the image processing unit is obtained.
[0021] Optionally, the output response parameter is selected from one of the following combinations:
[0022] Audio output parameters of the speaker;
[0023] Image display parameters of the display.
[0024] Optionally, the method further comprises:
[0025] In response to the video output instruction, obtaining an output mode of the video file;
[0026] If the output mode representation includes an output response parameter, obtaining the output response parameter in the process of the image processing unit outputting the buffered data stream, and outputting the video file based on the buffered data stream and the output response parameter;
[0027] If the output mode representation does not include the output response parameter, the video file is output based on the buffered data stream.
[0028] A video file playing method, comprising:
[0029] In response to a play instruction of a target video file, obtaining the target video file;
[0030] Play the target video file;
[0031] The target video file is a video file output based on the output response parameters in the process of the buffered data stream and the image processing unit outputting the buffered data stream; the output effect of the target video file is the same or similar to the output effect corresponding to the output response parameters.
[0032] Optionally, the target video file includes a video data file and an output parameter file, and playing the target video file includes:
[0033] Obtaining first response configuration information of a first device that outputs the target video file and second response configuration information of a second device that plays the target video file;
[0034] The video data file is played, and based on the first response configuration information, the second response configuration information, and the output parameter file, an output response parameter of playing the video data file is controlled.
[0035] A video file output device, comprising:
[0036] A first acquisition unit, used for acquiring a buffered data stream output by the image processing unit;
[0037] A second acquisition unit, used for acquiring an output response parameter in a process in which the image processing unit outputs the buffered data stream;
[0038] An output unit, configured to output a video file based on the buffered data stream and the output response parameter;
[0039] The output effect of playing the video file is the same as or similar to the output effect corresponding to the output response parameter.
[0040] A video file playing device, comprising:
[0041] A third acquisition unit, configured to obtain the target video file in response to a play instruction of the target video file;
[0042] A playing unit, used for playing the target video file;
[0043] The target video file is a video file output based on the output response parameters in the process of the buffered data stream and the image processing unit outputting the buffered data stream; the output effect of the target video file is the same or similar to the output effect corresponding to the output response parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0045] Figure 1 A flowchart of a method for outputting a video file provided in an embodiment of the present application;
[0046] Figure 2 A flowchart of another video file output method provided in an embodiment of the present application;
[0047] Figure 3 A schematic diagram of a screen recording application scenario provided in an embodiment of the present application;
[0048] Figure 4 A flowchart of a method for playing a video file provided in an embodiment of the present application;
[0049] Figure 5 A schematic diagram of the structure of a video file output device provided in an embodiment of the present application;
[0050] Figure 6 A schematic diagram of the structure of a video file playback device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] The terms "first" and "second" etc. in this application 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 may include steps or units that are not listed.
[0053] See also Figure 1 , is a flow chart of a method for outputting a video file provided in an embodiment of the present application, the method may include the following steps:
[0054] S101. Obtain a buffered data stream output by an image processing unit.
[0055] S102: Obtain output response parameters in the process of the image processing unit outputting the buffered data stream.
[0056] S103: Output a video file based on the buffered data stream and the output response parameters.
[0057] The video file output method in this embodiment is applied to an electronic device with image display, processing and output functions. The image processing unit of the electronic device may be a functional unit capable of processing the information to be displayed output by the display screen, such as the image processing unit may be a graphics card of the electronic device. In step S101, the buffered data stream may be a data stream composed of a series of image frames, and the buffered data stream is used to generate a video file to be output by the electronic device. The buffered data stream output by the image processing unit refers to the data that the image processing unit temporarily stores the rendered data in the buffer when processing the image or video data. These data will be transmitted to the display through the video controller to complete the display of the image. When screen recording is required, the buffered data stream output by the image processing unit to the buffer is obtained as the screen recording data stream, and at the same time, the buffered data stream also forms the display content on the display screen. Specifically, the buffered data stream output by the image processing unit can be obtained when a screen recording instruction is received, or the buffered data stream output by the image processing unit can be automatically obtained based on a pre-set target instruction. For example, based on a pre-set time acquisition instruction, the buffered data stream output by the image processing unit corresponding to the time acquisition instruction can be automatically obtained. For example, if the screen recording function needs to be turned on in a certain time period, the buffered data stream output by the image processing unit corresponding to the time period will be obtained.
[0058] In one implementation of the embodiment of the present application, the buffered data stream is composed of a plurality of display data with timing, and each display data is used to form display content on a display screen. Among them, the timing of the display data included in the buffered data stream is determined by the moment of obtaining each frame of display data. Each display data can be the display content that has been output on the current display screen, or it can be the display content to be output on the current display screen. For example, in an application scenario of screen recording of an electronic device, it is necessary to record the display content currently output by the display screen of the electronic device. Correspondingly, the buffered data stream is composed of a plurality of display data with timing currently output by the display screen, and the timing of the current display data is determined by the moment when the display screen displays each frame of display data during the screen recording, that is, the timing is determined according to the timing of outputting the buffered data stream to the display screen.
[0059] If the corresponding video file is directly output based on the buffered data stream, the problem may occur that only the image content of the display data corresponding to the buffered data stream is retained in the video file, and it cannot be guaranteed that the output effect when playing the video file matches the output effect of the buffered data stream output by the image processing unit. This is because the buffered data stream is raw pixel data, and the buffered data of each frame may include pixel information of each pixel in the frame buffer data, such as the color information of each pixel. The color of each pixel is usually determined by the values of the three color channels of red, green, and blue (RGB), which define the color and brightness of the pixel. It should be noted that the brightness here is only the brightness information of the pixel, which is related to the RGB value. It can be seen that if the video file is output only based on the buffered data stream, each video frame in the video file is displayed only based on the pixel information of the corresponding pixel. That is, the buffered data stream does not record the display response parameters of the device where the image processing unit is located. Therefore, the buffered data stream output by the image processing unit captured by the screen recording software is only the original pixel data, which will not be affected by the device system brightness setting. Therefore, if the video file is output directly according to the buffered data stream, the output effect of the played video file cannot be matched with the output response parameters of the device, and the real scene effect of the device when displaying the buffered data stream cannot be restored.
[0060] For example, in the application scenario of screen recording, if only the buffered data stream corresponding to the display image of the current screen is used as the screen recording file, the output effect of the display parameters generated during recording will not be matched when the screen recording file is played. Specifically, if the screen brightness is adjusted during screen recording, if the influence of the screen brightness is not considered, the display image in the finally generated screen recording file will not be able to present the effect of the screen brightness change, thereby reducing the accuracy of the screen recording file and the user experience.
[0061] Therefore, in step S102 of the embodiment of the present application, an output response parameter of the image processing unit in the process of outputting the buffered data stream is also obtained, and the output response parameter can characterize the output effect when the buffered data stream is output. For example, the output response parameter may include a display brightness parameter, which can characterize the display brightness of each frame of display data when the buffered data stream is output. For example, the buffered data stream includes n frames of display data, and the corresponding output response parameter may include n response sub-parameters corresponding to each frame of display data, such as a display brightness parameter corresponding to the first frame of display data, and e display brightness parameter for the fifth frame of display data. Specifically, when the first frame of display data is output, the screen brightness parameter of the display screen is a, and when the fifth frame of display data is output, the screen brightness parameter of the display screen is e.
[0062] Specifically, in one implementation of the embodiments of the present application, the output response parameter is selected from one of the following combinations: an audio output parameter of a speaker; an image display parameter of a display screen. Correspondingly, the output response parameter may be an audio output parameter of a speaker, or an image display parameter of a display screen. The type or composition of the output response parameter may be determined based on the current application scenario. When the output response parameter is an image display parameter of a display screen, obtaining the output response parameter in the process of the image processing unit outputting a buffered data stream includes: obtaining the image display parameter of the display screen in the process of the image processing unit outputting a buffered data stream, specifically, obtaining the image display brightness parameter of the display screen when displaying the buffered data stream, the resolution of the display screen, the contrast and other parameters. In this way, a video file may be output based on the buffered data stream and the image display parameters of the display screen, so that the output effect of playing the video file is the same or similar to the output effect corresponding to the image display parameters of the display screen.
[0063] When the output response parameter is an audio output parameter of a speaker, obtaining the output response parameter in the process of the image processing unit outputting the buffered data stream includes: obtaining the audio output parameter of the speaker in the process of the image processing unit outputting the buffered data stream. Among them, the audio output parameter of the speaker refers to the audio output parameter of the speaker of the device itself, such as the volume, sound effect, number of channels and other parameters of the device itself. For example, when the buffered data stream is a video stream, the video stream will be obtained during the screen recording process, and the video stream will also be output to the display screen for playback. At this time, if the volume of the device is adjusted, the volume parameter will be obtained, and the video file of the screen recording will be output based on the video stream and the volume parameter. If the video file is generated directly based on the buffered data stream, only the original audio stream of the buffered data stream is captured, and the audio output parameter of the speaker of the recording device itself is not recorded, so that no matter how the volume is adjusted during the screen recording process, the screen recording application captures the original, unmodified audio stream. Therefore, when the video file is played, it cannot match the output effect of the volume of the speaker of the device during the screen recording process. In an embodiment of the present application, the audio output parameters of the speaker are obtained during the process of the image processing unit outputting a buffered data stream, and a video file is output based on the buffered data stream and the audio output parameters, so that the output effect of playing the video file is the same as or similar to the output effect corresponding to the audio output parameters of the speaker.
[0064] In this way, a video file can be output based on a buffered data stream representing image content and an output response parameter representing an output effect, so that the output effect of playing the video file is the same or similar to the output effect corresponding to the output response parameter, thereby meeting the need for accurate output of the video file. When the electronic device where the image processing unit is located is exactly the same as the configuration information of the electronic device used to play the video file, or the display configuration information presenting the display processing and playback functions is exactly the same, the output effect of playing the video file is the same as the output effect corresponding to the output response parameter. When the electronic device where the image processing unit is located is not exactly the same as the configuration information of the electronic device used to play the video file, for example, the screen resolution or screen configuration parameters of the two are different, the output effect of playing the video file is similar to the output effect corresponding to the output response parameter. For example, the output response parameters in the process of outputting the buffered data stream include a display brightness parameter of 10% for the first video frame and a display brightness parameter of 20% for the third video frame. If the display screen of the electronic device that plays the video file cannot be accurately adjusted to the display brightness parameter of 20%, if it can reach 18%, then when the electronic device plays the third video frame of the video file, the display brightness of its display screen is adjusted to 18%. The screen display brightness parameter when the third video frame is played will also be greater than the screen display brightness parameter when the first video frame is played, so that the output effect of playing the video file is similar to the output effect corresponding to the output response parameter.
[0065] For example, taking the mobile phone screen recording scene as an example, the image processing unit is the graphics card of the mobile phone. When receiving the screen recording instruction, the buffered data stream output by the graphics card is obtained. The buffered data stream is used to form the display content on the mobile phone display screen, that is, to realize the recording process of the display content on the mobile phone display screen. In the process of recording the buffered data stream, the output response parameters of the graphics card outputting the buffered data stream are recorded. The output response parameters may include screen brightness parameters, audio output parameters of the device speaker, etc., so that the output video file may include the buffered data stream and the output response parameters. Further, these two parts of content can be stored separately as sub-data of the video file, or the display data in the buffered data stream can be processed by the output response parameters, and the obtained processed display data are composed of the video file. Taking the output response parameter as the screen brightness parameter as an example, if the user operates the display brightness adjustment bar to adjust the screen brightness during the screen recording process, the screen recording file can restore the scene of the brightness adjustment, that is, each display data in the screen recording file can correspond to the display brightness parameter item adjusted during recording, and when playing the recorded file, the user can also perceive the change in brightness in the picture, thereby accurately restoring the recording scene and improving the user experience effect.
[0066] In the implementation of the present application, when outputting a video file, not only the buffered data stream output by the image processing unit is utilized, but also the output response parameters in the process of the image processing unit outputting the buffered data stream are utilized, so that the output effect of playing the video file is the same as or similar to the output effect corresponding to the output response parameters. In this way, it can be ensured that while recording the buffered data stream, the corresponding output response parameters are recorded, so that the output effect of the output video file during playback can match the output effect corresponding to the output response parameters, so that the output video file can truly restore the scene of the image processing unit outputting the buffered video stream, improve the accuracy of the video file, and make the playback effect of the video file more realistic, thereby improving the user experience.
[0067] The following describes the video file output method of the embodiment of the present application in combination with actual application scenarios.
[0068] In one implementation of the embodiment of the present application, the video file includes a video data file and an output parameter file; wherein, based on the buffered data stream and the output response parameter, the video file is output, including:
[0069] Output video data files based on buffered data streams;
[0070] Based on the output response parameters, the output parameter file is output.
[0071] Among them, the output parameter file is used to control the data response parameters in the process of playing the video data file. In this embodiment, the buffered data stream and the output response parameters are stored in different files, so that the output video file includes the video data file corresponding to the buffered data stream and the output parameter file corresponding to the output response parameters. In order to facilitate the playback end to play the video file, each frame of data in the buffered data stream in the video data file can be generated, and the matching identification information of the corresponding output response parameters in the output parameter file can be generated. In this way, when the video data file is output, the output response parameters corresponding to the current frame data can be read according to the matching identification information, so as to control the data response parameters of the current frame data according to the output response parameters.
[0072] For example, the output response parameter includes a display brightness parameter. When the electronic device plays the first video frame in the video data file, it reads the output parameter file and adjusts the display brightness of the display screen to a brightness value corresponding to the first display brightness parameter according to the first display brightness parameter corresponding to the first video frame in the output parameter file, and then displays the first video frame. When playing the second video frame, it adjusts the display brightness of the display screen to a brightness value corresponding to the second display brightness parameter according to the second display brightness parameter corresponding to the second video frame, and then displays the second video frame, and the above method is used until the video data file is played.
[0073] Through this implementation, the video data file corresponding to the buffered data stream and the output parameter file corresponding to the output response parameter are output separately, which can reduce the occupation of the processing resources of the output end electronic device of the output video file, so that the output end electronic device only needs to record the buffered data stream and the corresponding output response parameter, and does not need to be processed through a more complex processing mode, thereby improving the output efficiency of the output end of the output video file. However, such a processing mode will increase the occupation of the processing resources of the playback end, that is, when the playback end plays the video data file, it needs to control the data response parameters in the process of playing the video file according to the output parameter file, such as the need to adjust the relevant parameters of the display screen of the video display, etc. Therefore, this processing method can be selected when the load on the playback end is small, so as to achieve the output effect of the playback video file being the same or similar to the output effect corresponding to the output response parameter, thereby improving the user experience effect.
[0074] In another embodiment of the present application, see Figure 2 , is a flow chart of another video file output method provided in an embodiment of the present application, the method may include the following steps:
[0075] S201. Obtain a buffered data stream output by an image processing unit.
[0076] S202: Obtain output response parameters in the process of outputting buffered data stream by the image processing unit.
[0077] S203: Based on the output response parameter, change the data value of the buffered data stream according to a preset strategy.
[0078] S204: Output a video file based on the buffered data stream after the data value is changed.
[0079] In this embodiment, after obtaining the output response parameter in the process of outputting the buffered data stream, the data value of the buffered data stream is changed according to the output response parameter. Then, based on the buffered data stream after the value is changed, the video file is output, so that the playback end does not need to make relevant adjustments to any playback parameters of the playback end when directly playing the video file, and can also achieve the output effect of the playback video file being the same or similar to the output effect corresponding to the output response parameter. Among them, when changing the data value of the buffered data based on the output response parameter, it can be changed according to a preset strategy. The preset strategy can be determined based on the type of the output response parameter, or it can be determined based on the playback configuration information of the playback end that plays the video file, or it can be determined based on the characteristics of the buffered data stream, such as the size of the display data included in the buffered data stream, and the screen refresh rate during the output of the buffered data stream. Taking the screen recording scenario as an example, the output response parameters include the audio output parameters of the speaker, such as the volume parameters when the speaker outputs the corresponding data, and then according to the various volume values corresponding to the output response parameters and the output characteristics of the speaker at the playback end, such as the current playback end volume is set to 40, if the volume corresponding to the output response parameters includes the range of 40-60, the preset strategy can be determined according to the volume range corresponding to the output response parameters and the volume value of the current playback end, that is, the strategy for adjusting the basic volume of each frame of data in the buffered data stream is determined. Specifically, according to the volume value in the output response parameter, the basic volume value of the data in the corresponding buffered data stream is adjusted, and then the video file is output based on the buffered data stream after the basic volume value is changed. The output video file can be played directly on the playback end, and the output volume of the corresponding video file when the playback end plays the video file is the same as the volume corresponding to the output response parameter. In this implementation, the data value of the buffered data stream is changed according to a preset strategy based on the output response parameters at the output end of the video file, thereby obtaining a processing process for the video file. When the video file is subsequently played at the playback end, the playback end does not need to perform any further processing and can directly play the video file, thereby reducing the occupancy of processing resources at the playback end, improving playback efficiency, and ensuring that the playback effect matches the output response parameters of the output video file, thereby improving the user experience.
[0080] In one implementation of the embodiment of the present application, the buffered data stream is composed of a plurality of display data with a time sequence, and each display data is used to form display content on a display screen. The time sequence of the display data included in the buffered data stream is determined by the moment of obtaining each frame of display data. Further, obtaining the output response parameter of the image processing unit in the process of outputting the buffered data stream includes: obtaining the corresponding output response parameter of the image processing unit in the process of outputting each display data.
[0081] Among them, the output response parameter in the process of the image processing unit outputting each display data may be the default setting parameter of the image processing unit outputting each display data, or the output response parameter determined based on the current adjustment instruction for adjusting the output response parameter, or the output response parameter determined by the image processing unit for each display data output process according to the current output environment. Among them, the default parameter may be a fixed response parameter for the current image processing unit to output the display data, or a pre-set target response parameter, etc., that is, if the output response parameter is a default parameter, the output response parameter corresponding to each display data may be the same. If the output response parameter is a parameter determined based on the adjustment instruction, the output response parameter of each display data output by the image processing unit before the adjustment instruction may be the previous default output response parameter, and the output response parameter after the adjustment instruction is the target response parameter matching the adjustment instruction. For example, during the screen recording process, the user adjusts the screen brightness, then the screen brightness parameter corresponding to the display data before the screen brightness adjustment operation in the screen recording file is the default brightness parameter of the previous electronic device, and the screen brightness parameter corresponding to the display data after receiving the adjustment instruction matches the brightness parameter corresponding to the adjustment instruction. The output response parameter may also be the output response parameter determined by the image processing unit for each display data output process according to the current output environment. If it is detected that the current environment is dark, the screen brightness parameters will be automatically adjusted. At this time, the output response parameters of the display data output process will match the screen brightness parameters adjusted based on the ambient light. This ensures that the output video file can truly restore the scene in which the video file was generated, and ensures that the video file playback effect matches the output effect of the output response parameters, thereby improving the user experience.
[0082] In one implementation of the embodiment of the present application, the video file output method further includes:
[0083] In response to the video output instruction, an output mode of the video file is acquired.
[0084] If the output mode is guaranteed to include the output response parameter, the output response parameter is obtained during the image processing unit outputting the buffered data stream, and the video file is output based on the buffered data stream and the output response parameter. If the output mode is guaranteed not to include the output response parameter, the video file is output based on the buffered data stream.
[0085] In this embodiment, the output mode of the video file can be determined based on the video output instruction, and the output mode is mainly determined based on whether the output response parameter is included. If the video file that the user expects to record only records the buffered data stream representing the relevant data content, the output video file is determined based on the buffered data stream. If the video file that the user expects to record includes not only the buffered data stream representing the relevant data content, but also the output response parameter representing the output effect of the output buffered data stream, the video file will be output based on the buffered data stream and the output response parameter.
[0086] For example, in a screen recording scenario, the output response parameters include screen brightness information. Whether to restore the screen brightness information in the screen recording file can be determined according to the actual scenario requirements. The output method of the screen recording file, that is, whether to restore the screen brightness information in the screen recording file, can be determined. If the user needs to record the process of screen brightness changes, then the screen recording file is output based on the display content and screen brightness information displayed on the screen during the screen recording. If the user does not expect to record the process of screen brightness changes caused by changes in ambient light during the screen recording process, then the screen recording file is output based on the display content displayed on the screen during the screen recording, so that the screen brightness information is not included in the screen recording file.
[0087] Furthermore, in order to facilitate the acquisition of the output mode of the video file, corresponding prompt information can be generated when recording the relevant content in the video file to prompt the user whether to record the output response parameters. For example, a prompt box can be added when starting video recording to allow the user to manually control whether to include screen brightness information when recording the screen. In this embodiment, the video file is output based on the output mode of the video file, which can meet the actual video file output requirements and improve the user experience.
[0088] See also Figure 3 , which is a schematic diagram of a screen recording application scenario provided in an embodiment of the present application. When the user starts screen recording, multiple display data with time sequence corresponding to the display content on the current display screen will be recorded, and these display data will be composed into a buffered data stream. At the same time, if it is detected that during the screen recording process, the user has changed the brightness of the display screen by adjusting the brightness control bar, the output response parameters that ensure the display brightness will be recorded. The data value of the buffered data stream can be changed according to a preset strategy based on the output response parameters, and a video file can be output based on the buffered data stream after the higher data value. It can also be like Figure 3 As shown, the video data file corresponding to the buffered data stream and the output parameter file corresponding to the screen display parameter are output to the playback end respectively, so that when the playback end plays the video data file, the data response parameters in the process of playing the video data file can be controlled based on the output parameter file. Figure 3As shown in the figure, when playing the fifth frame of video data, the display screen brightness of the current player is adjusted to the display brightness corresponding to the fifth frame of video data. Therefore, the recorded video file can truly restore the screen brightness changes at the time of recording, and record the screen truthfully, so that the user can perceive the changes in screen brightness during the playback of the recorded file, which improves the user experience.
[0089] In another embodiment of the present application, a video file playing method is also provided. Figure 4 , the method may include the following steps:
[0090] S401. In response to a play instruction of a target video file, obtain a target video file.
[0091] S402: Play the target video file.
[0092] The target video file playback instruction may be an open instruction for the target video file, etc. The target video file is a video file based on the output response parameters in the process of the buffered data stream and the image processing unit outputting the buffered data stream. The output effect of the target video file is the same or similar to the output effect corresponding to the output response parameters.
[0093] If the target video file includes a video data file and an output parameter file, wherein the video data file is a file that can characterize the video content determined based on the buffered data stream, and the output parameter file is a file that can characterize the output effect determined based on the output response parameter. When playing the target video file, it is necessary to control the data response parameters in the process of playing the video data file based on the output parameter file. For example, if the output response parameter includes the volume parameter of the speaker, when playing each frame of video data, it is necessary to adjust the volume of the current speaker to the volume parameter corresponding to the frame of video data, and then play the video data of the current frame.
[0094] If the target video file is a file output based on the buffered data stream after the value is changed, wherein the buffered data stream after the value is changed refers to a data stream obtained by changing the data value of the buffered data stream according to a preset strategy based on the output response parameter, then the playback end can directly play the target video file without adjusting the relevant playback parameters.
[0095] Further, in one implementation of the embodiment of the present application, the target video file includes a video data file and an output parameter file, and playing the target video file includes:
[0096] Obtain first response configuration information of a first device that outputs a target video file, and second response configuration information of a second device that plays the target video file; play the video data file, and control the output response parameters of the played video data file based on the first response configuration information, the second response configuration information, and the output parameter file.
[0097] In this embodiment, the first device that outputs the target video file and the second device that plays the target video file may be different devices. If they are different devices, the configuration information of the two may be different. It is necessary to adjust the output response parameters in the output parameter file according to the first response configuration information of the first device and the second response configuration information of the second device to obtain the target output response parameters suitable for the second device. For example, in the screen recording scene, the configuration parameters of the display screen of the electronic device that performs screen recording and the electronic device that plays the screen recording file are not the same. If the display parameters of the electronic device that plays the screen recording file are adjusted directly based on the display parameters of the electronic device that records the screen, problems such as unclear display screen or failure to achieve the expected output effect may occur. Therefore, it is necessary to adjust the output response parameters during screen recording according to the characteristics of the display screens of the two electronic devices to obtain the target output response parameters that can be applied to the electronic device that plays the screen recording file, so as to ensure that the playback effect is the same or similar to the output effect corresponding to the target output response parameters.
[0098] For example, the output response parameter is a screen brightness parameter, the device for recording the screen content is the first device, and the device for playing the screen recording file is the second device. If the screen brightness ranges of the first device and the second device are different, and the brightness adjustment scales are also different, if the saved response parameter indicates the adjustment information, it can be specifically information such as the adjustment step size for the brightness bar. There will be a difference between recording and playing, so when playing, it is necessary to adjust the output response parameter during playback according to the screen configuration difference between the first device and the second device, that is, adjust the screen brightness parameter during playback. Specifically, if the first device and the second device both display a brightness of 500 nits, the first device needs to adjust the brightness bar to 70%, and the second device needs to adjust the brightness bar to 80%. When recording, it is necessary to measure according to the same unit of measurement, that is, according to the proportional difference between the adjustment brightness bars of the first device and the second device to perform the corresponding display loudness conversion to ensure that the screen brightness of the screen recording file played matches the screen brightness during recording.
[0099] Specifically, the processing method of the target video file applied to the video file playing method can refer to the video file output method described in the above embodiment, which will not be described in detail here.
[0100] See also Figure 5, is a schematic diagram of the structure of a video file output device provided in an embodiment of the present application, and the video file output device may include:
[0101] A first acquisition unit 501 is used to acquire a buffered data stream output by an image processing unit;
[0102] A second acquisition unit 502 is used to acquire an output response parameter of the image processing unit in the process of outputting the buffered data stream;
[0103] An output unit 503, configured to output a video file based on the buffered data stream and the output response parameter;
[0104] The output effect of playing the video file is the same as or similar to the output effect corresponding to the output response parameter.
[0105] Optionally, the buffered data stream is composed of a plurality of display data with a time sequence, and each display data is used to form display content on a display screen;
[0106] The timing of the display data included in the buffered data stream is determined by the time when each frame of the display data is obtained.
[0107] Optionally, the video file includes a video data file and an output parameter file;
[0108] The output unit comprises:
[0109] A first output subunit, configured to output the video data file based on the buffered data stream;
[0110] A second output subunit, configured to output the output parameter file based on the output response parameter;
[0111] The output parameter file is used to control the data response parameters during the playing of the video data file.
[0112] Optionally, the output unit includes:
[0113] A data changing subunit, configured to change the data value of the buffered data stream according to a preset strategy based on the output response parameter;
[0114] The third output subunit is used to output a video file based on the buffered data stream after the data value is changed.
[0115] Optionally, the second acquiring unit is configured to:
[0116] The output response parameter corresponding to each display data output by the image processing unit is obtained.
[0117] Optionally, the output response parameter is selected from one of the following combinations:
[0118] Audio output parameters of the speaker;
[0119] Image display parameters of the display.
[0120] Optionally, the video file output device further includes:
[0121] A third acquisition unit, configured to acquire an output mode of the video file in response to a video output instruction;
[0122] A first file output unit, configured to obtain the output response parameter in the process of the image processing unit outputting the buffered data stream if the output mode representation includes an output response parameter, and output the video file based on the buffered data stream and the output response parameter;
[0123] The second file output unit is used to output the video file based on the buffered data stream if the output mode representation does not include the output response parameter.
[0124] It should be noted that the specific implementation of each unit and sub-unit in this embodiment can refer to the corresponding content of the video file output method in the previous text, and will not be described in detail here.
[0125] See also Figure 6 , is a structural diagram of a video file playback device provided in an embodiment of the present application, and the video file playback device may include:
[0126] The file acquisition unit 601 is used to obtain the target video file in response to a play instruction of the target video file;
[0127] A file playing unit 602 plays the target video file;
[0128] The target video file is a video file output based on the output response parameters in the process of the buffered data stream and the image processing unit outputting the buffered data stream; the output effect of the target video file is the same or similar to the output effect corresponding to the output response parameters.
[0129] Optionally, the target video file includes a video data file and an output parameter file, and the file playing unit includes:
[0130] An information acquisition subunit, used to obtain first response configuration information of a first device that outputs the target video file, and second response configuration information of a second device that plays the target video file;
[0131] The control subunit is used to play the video data file and control the output response parameters of playing the video data file based on the first response configuration information, the second response configuration information, and the output parameter file.
[0132] In another embodiment of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the video file output method or the video file playback method as described in any one of the above items is implemented.
[0133] In another embodiment of the present application, an output device is also provided, including:
[0134] A memory, used to store applications and data generated by the operation of the applications;
[0135] The processor is used to execute the application program to implement the video file output method as described in any one of the above.
[0136] In another embodiment of the present application, a playback device is also provided, including:
[0137] A memory, used to store applications and data generated by the operation of the applications;
[0138] The processor is used to execute the application program to implement the video file playing method as described in any one of the above.
[0139] It should be noted that the specific implementation of the processor in this embodiment can refer to the corresponding content in the previous text and will not be described in detail here.
[0140] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0141] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0142] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0143] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A video file output method, include: Get the buffered data stream output by the image processing unit; Obtaining output response parameters during the process of the image processing unit outputting the buffered data stream; Outputting a video file based on the buffered data stream and the output response parameters; The output effect of playing the video file is the same as or similar to the output effect corresponding to the output response parameter.
2. The video file output method according to claim 1, wherein the buffered data stream is composed of a plurality of display data with a time sequence, and each display data is used to form display content on a display screen; The timing of the display data included in the buffered data stream is determined by the time when each frame of the display data is obtained.
3. The video file output method according to claim 1, wherein the video file comprises a video data file and an output parameter file; The step of outputting a video file based on the buffered data stream and the output response parameter comprises: Based on the buffered data stream, output the video data file; Based on the output response parameters, output the output parameter file; The output parameter file is used to control the data response parameters during the playing of the video data file.
4. The video file output method according to claim 1, wherein the video file is output based on the buffered data stream and the output response parameter. include: Based on the output response parameter, changing the data value of the buffered data stream according to a preset strategy; A video file is output based on the buffered data stream after the data value is changed.
5. The video file output method according to claim 2, wherein the output response parameter of the image processing unit in the process of outputting the buffered data stream is obtained. include: The output response parameter corresponding to each display data output by the image processing unit is obtained.
6. The video file output method according to claim 1, wherein the output response parameter is selected from one of the following combinations: Audio output parameters of the speaker; Image display parameters of the display.
7. The video file output method according to claim 1, wherein the method further comprises: include: In response to the video output instruction, obtaining an output mode of the video file; If the output mode representation includes an output response parameter, obtaining the output response parameter in the process of the image processing unit outputting the buffered data stream, and outputting the video file based on the buffered data stream and the output response parameter; If the output mode representation does not include the output response parameter, the video file is output based on the buffered data stream.
8. A method for playing a video file, include: In response to a play instruction of a target video file, obtaining the target video file; Play the target video file; The target video file is a video file output based on the output response parameters in the process of the buffered data stream and the image processing unit outputting the buffered data stream; the output effect of the target video file is the same or similar to the output effect corresponding to the output response parameters.
9. The video file playing method according to claim 8, wherein the target video file comprises a video data file and an output parameter file, and the target video file is played. include: Obtaining first response configuration information of a first device that outputs the target video file and second response configuration information of a second device that plays the target video file; The video data file is played, and based on the first response configuration information, the second response configuration information, and the output parameter file, an output response parameter of playing the video data file is controlled.
10. A video file output device, include: A first acquisition unit, used for acquiring a buffered data stream output by the image processing unit; A second acquisition unit, used for acquiring an output response parameter in a process in which the image processing unit outputs the buffered data stream; An output unit, configured to output a video file based on the buffered data stream and the output response parameter; The output effect of playing the video file is the same as or similar to the output effect corresponding to the output response parameter.
