Search

CN-122002076-A - Subtitle adjusting method and device, storage medium and electronic equipment

CN122002076ACN 122002076 ACN122002076 ACN 122002076ACN-122002076-A

Abstract

The application discloses a subtitle adjusting method, a device, a storage medium and electronic equipment, which relate to the technical field of video processing and comprise the steps of obtaining video stream data and subtitle stream data corresponding to a target video; the method comprises the steps of carrying out alignment processing on video stream data and subtitle stream data to obtain a plurality of video frames corresponding to a target video and subtitle windows corresponding to the video frames, carrying out color similarity analysis on the video frames and the subtitle windows to determine target video frames meeting color similarity conditions in the video frames, generating operation prompt information of the subtitle windows based on the target video frames, and prompting to adjust the subtitle windows under the condition that the target video plays the target video frames. Compared with the prior art, the method and the device can prompt the user to carry out targeted adjustment on the caption if the condition that the color of the caption is similar to that of the video picture is identified in the video playing process, thereby improving the readability of the caption and further improving the user experience.

Inventors

  • HUANG CHANGWEN
  • BAI FAN
  • SONG GUODONG
  • RAO MINGQUAN
  • WANG LINXIN

Assignees

  • 咪咕文化科技有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260508
Application Date
20251223

Claims (10)

  1. 1. A subtitle adjustment method, comprising: Acquiring video stream data and subtitle stream data corresponding to a target video; performing alignment processing on the video stream data and the subtitle stream data to obtain a plurality of video frames corresponding to the target video and subtitle windows corresponding to the plurality of video frames; Performing color similarity analysis on the plurality of video frames and the subtitle window, and determining target video frames which meet color similarity conditions in the plurality of video frames; and generating operation prompt information of the subtitle window based on the target video frame, wherein the operation prompt information is used for prompting to adjust the subtitle window under the condition that the target video plays the target video frame.
  2. 2. The method of claim 1, wherein generating the operation prompt for the subtitle window based on the target video frame comprises: Determining a target position of the caption window based on the historical movement information of the caption window; Determining a target area covered by the caption window at the target position in the target video frame; Generating position operation prompt information of the caption window according to the target position, and generating color operation prompt information of the caption window according to the target area.
  3. 3. The method of claim 2, wherein generating the color operation prompt message for the caption window based on the target area comprises: Determining at least one target replacement color corresponding to the subtitle in the subtitle window based on the target area; and generating color operation prompt information corresponding to the subtitle window according to the at least one target replacement color.
  4. 4. The method of claim 3, wherein the determining at least one target replacement color corresponding to a subtitle in the subtitle window based on the target area comprises: determining brightness data of at least one pixel corresponding to the target area; Determining brightness average value and contrast data corresponding to the target area according to the brightness data; And determining at least one target replacement color corresponding to the caption in the caption window based on the brightness average value and the contrast data.
  5. 5. The method according to claim 3, wherein the generating the color operation prompt message corresponding to the caption window according to the at least one target replacement color includes: dividing the caption window into at least one text block; Determining the subtitle color and the video background color corresponding to each text block in the at least one text block; and carrying out color similarity analysis on each text block according to the subtitle color and the video background color, and generating color operation prompt information of each text block in the subtitle window based on an analysis result.
  6. 6. The method according to any one of claims 1 to 5, wherein after the aligning the video stream data and the subtitle stream data to obtain a plurality of video frames corresponding to the target video and subtitle windows corresponding to the plurality of video frames, the method further comprises: And respectively sending the aligned video stream data and the caption stream data to a client, wherein the client is used for displaying a caption window corresponding to the caption stream data on the upper layer of a video frame picture corresponding to the video stream data.
  7. 7. A subtitle adjusting apparatus, comprising: The acquisition module is configured to acquire video stream data and subtitle stream data corresponding to the target video; the alignment module is configured to perform alignment processing on the video stream data and the subtitle stream data to obtain a plurality of video frames corresponding to the target video and subtitle windows corresponding to the plurality of video frames; the determining module is configured to perform color similarity analysis on the plurality of video frames and the subtitle window, and determine a target video frame which meets the color similarity condition in the plurality of video frames; the generating module is configured to generate operation prompt information of the subtitle window based on the target video frame, wherein the operation prompt information is used for prompting to adjust the subtitle window when the target video plays the target video frame.
  8. 8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1 to 6.
  9. 9. An electronic device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 6 when executing the computer program.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Description

Subtitle adjusting method and device, storage medium and electronic equipment Technical Field The present application relates to the field of video processing technologies, and in particular, to a subtitle adjustment method, a subtitle adjustment device, a storage medium, and an electronic apparatus. Background Video subtitles are interpreted, interpreted or enhanced by text information, and typically appear at the bottom of a video frame, either embedded in a video file or in an external file, such as an SRT or ASS format, and may support multiple languages to help hearing impaired or users viewing video in noisy environments. At present, the adjustment of the caption is mainly realized by modifying the display information of the caption by a user, however, by using the mode, the user can only perform integral adjustment aiming at the display condition of the caption, if the condition that the color of the caption is similar to that of a video picture appears in the video playing process, the user cannot perform targeted adjustment on the caption, which can lead to the reduced readability of the caption and influence the user experience. Disclosure of Invention In view of this, the present application provides a method, an apparatus, a storage medium and an electronic device for adjusting subtitles, which mainly aims to improve the technical problems that in the prior art, a user can only perform overall adjustment for the display condition of the subtitles, if the colors of the subtitles are similar to those of video pictures in the video playing process, the user cannot perform targeted adjustment on the subtitles, which can cause the readability of the subtitles to be reduced and affect the user experience. In a first aspect, the present application provides a subtitle adjustment method, including: Acquiring video stream data and subtitle stream data corresponding to a target video; performing alignment processing on the video stream data and the subtitle stream data to obtain a plurality of video frames corresponding to the target video and subtitle windows corresponding to the plurality of video frames; Performing color similarity analysis on the plurality of video frames and the subtitle window, and determining target video frames which meet color similarity conditions in the plurality of video frames; And generating operation prompt information of the subtitle window based on the target video frame, wherein the operation prompt information is used for prompting to adjust the subtitle window under the condition that the target video plays the target video frame. In a second aspect, the present application provides a subtitle adjusting apparatus, including: The acquisition module is configured to acquire video stream data and subtitle stream data corresponding to the target video; the alignment module is configured to perform alignment processing on the video stream data and the subtitle stream data to obtain a plurality of video frames corresponding to the target video and subtitle windows corresponding to the plurality of video frames; the determining module is configured to perform color similarity analysis on the plurality of video frames and the subtitle window, and determine a target video frame which meets the color similarity condition in the plurality of video frames; the generating module is configured to generate operation prompt information of the subtitle window based on the target video frame, wherein the operation prompt information is used for prompting to adjust the subtitle window when the target video plays the target video frame. In a third aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the subtitle adjustment method of the first aspect. In a fourth aspect, the present application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, where the processor implements the subtitle adjustment method according to the first aspect when executing the computer program. In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the subtitle adjustment method of the first aspect. The subtitle adjusting method, the device, the storage medium and the electronic equipment comprise the steps of obtaining video stream data and subtitle stream data corresponding to a target video, conducting alignment processing on the video stream data and the subtitle stream data to obtain a plurality of video frames corresponding to the target video and subtitle windows corresponding to the video frames, conducting color similarity analysis on the video frames and the subtitle windows to determine the target video frames meeting color similarity conditions in the video frames, and generating operati