CN109756788B - Video subtitle automatic adjustment method and device, terminal and readable storage medium - Google Patents

Video subtitle automatic adjustment method and device, terminal and readable storage medium Download PDF

Info

Publication number
CN109756788B
CN109756788B CN201711071450.XA CN201711071450A CN109756788B CN 109756788 B CN109756788 B CN 109756788B CN 201711071450 A CN201711071450 A CN 201711071450A CN 109756788 B CN109756788 B CN 109756788B
Authority
CN
China
Prior art keywords
brightness
video
subtitle
distance
font
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711071450.XA
Other languages
Chinese (zh)
Other versions
CN109756788A (en
Inventor
何涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201711071450.XA priority Critical patent/CN109756788B/en
Priority to PCT/CN2018/113559 priority patent/WO2019085980A1/en
Publication of CN109756788A publication Critical patent/CN109756788A/en
Application granted granted Critical
Publication of CN109756788B publication Critical patent/CN109756788B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a method and a device for automatically adjusting video subtitles, a terminal and a readable storage medium, wherein the method comprises the following steps: when the video is played, determining a target distance between a viewer watching the video and a terminal playing the video; and adjusting the font size of the caption when the video is played on the terminal according to the target distance. When the video is played, the brightness value of the current environment is determined by utilizing the brightness data acquired by the brightness sensor at preset time intervals; and adjusting the font brightness of the subtitles when the video is played on the terminal according to the brightness value of the current environment. Compared with the prior art, the method and the device have the advantages that the automatic adjustment of the font size of the subtitle can be realized based on the target distance between the viewer and the terminal, the automatic adjustment of the font brightness of the subtitle can be realized based on the brightness value of the current environment, the requirements of the user on the font size and the font brightness when the user watches the video are met, and the watching experience of the user is improved.

Description

Video subtitle automatic adjustment method and device, terminal and readable storage medium
Technical Field
The present invention relates to the field of video subtitles, and in particular, to a method and an apparatus for automatically adjusting video subtitles, a terminal, and a readable storage medium.
Background
In the video playing process, the subtitles exist in a form that is convenient for users to receive video content information besides video voice, and the users can watch videos conveniently.
In general, during video playing, subtitles are displayed below a video picture, and no matter what external changes occur (for example, the distance from a viewer to view a video becomes longer or the light is not good), the subtitles are displayed in a static state, and parameters such as the size of the subtitles and the brightness of the subtitles do not change.
However, since the current display of subtitles is static, the current display of subtitles is not automatically adjusted to meet the requirements of viewers (for example, the requirement on the font size of subtitles or the requirement on the subtitle brightness of subtitles, etc.), and the viewing experience of users is not good.
Disclosure of Invention
The invention mainly aims to provide a method and a device for automatically adjusting video subtitles, a terminal and a readable storage medium, and aims to solve the technical problems that in the prior art, subtitles are displayed statically, cannot be automatically adjusted to meet the requirements of viewers, and the viewing experience of users is poor.
In order to achieve the above object, a first aspect of the present invention provides a method for automatically adjusting video subtitles, the method comprising:
when a video is played, determining a target distance between a viewer watching the video and a terminal playing the video;
and adjusting the font size of the subtitles when the video is played on the terminal according to the target distance.
In order to achieve the above object, a second aspect of the present invention provides an automatic video subtitle adjustment method, including:
when the video is played, the brightness value of the current environment is determined by utilizing the brightness data collected by the brightness sensor at preset time intervals;
and adjusting the font brightness of the subtitles when the video is played on the terminal according to the brightness value of the current environment.
In order to achieve the above object, a third aspect of the present invention provides an automatic video caption adjusting apparatus, including:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a target distance between a viewer watching a video and a terminal playing the video when the video is played;
and the size adjusting module is used for adjusting the font size of the subtitles when the video is played on the terminal according to the target distance.
In order to achieve the above object, a fourth aspect of the present invention provides an automatic video caption adjusting apparatus, including:
the brightness determining module is used for determining the brightness value of the current environment by utilizing the brightness data acquired by the brightness sensor at preset time intervals when the video is played;
and the brightness adjusting module is used for adjusting the font brightness of the subtitles when the video is played on the terminal according to the brightness value of the current environment.
In order to achieve the above object, a fifth aspect of the present invention provides a terminal, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the automatic video subtitle adjustment method according to the first aspect and/or the second aspect.
To achieve the above object, a sixth aspect of the present invention provides a readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the automatic video subtitle adjustment method according to the first aspect and/or the second aspect.
The invention provides a video subtitle automatic adjustment method, which comprises the following steps: when a video is played, determining a target distance between a viewer watching the video and a terminal playing the video, and adjusting the font size of a subtitle when the video is played on the terminal according to the target distance. Compared with the prior art, the font size of the subtitle can be automatically adjusted based on the distance between the viewer and the terminal, for example, when the distance is large, the font size of the subtitle is correspondingly adjusted to be large, and when the distance is small, the font size of the subtitle is correspondingly adjusted to be small, so that the requirement of the user on the size of the subtitle when the user watches videos can be met under the condition of different distances, and the watching experience of the user is improved.
In addition, the invention also provides another automatic video subtitle adjusting method, which comprises the following steps: when the video is played, the brightness value of the current environment is determined by utilizing the brightness data acquired by the brightness sensor at preset time intervals, and the font brightness of the subtitles when the video is played on the terminal is adjusted according to the brightness value of the current environment. Compared with the prior art, the font brightness of the subtitle can be automatically adjusted based on the brightness value of the current environment, for example, when the brightness value of the current environment is large, the font brightness of the subtitle is correspondingly increased, and when the brightness value of the current environment is small, the font brightness of the subtitle is correspondingly reduced, so that the requirements of users on the font brightness when watching videos can be met under the condition of different environment brightness, and the watching experience of the users is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is also possible for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a method for automatically adjusting video subtitles according to an embodiment of the invention;
FIG. 2 is a schematic flow chart illustrating an exemplary method for automatically adjusting subtitles according to an embodiment of the invention;
FIG. 3 is a schematic flow chart illustrating an exemplary method for automatically adjusting subtitles according to an embodiment of the invention;
FIG. 4 is a schematic flow chart illustrating an exemplary method for automatically adjusting subtitles according to an embodiment of the invention;
FIG. 5 is a block diagram of program modules of an apparatus for automatically adjusting subtitles according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of program modules of an automatic video subtitle adjustment apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of program modules of an automatic video subtitle adjustment apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of program modules of an automatic video subtitle adjustment apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a terminal in an embodiment of the present invention;
FIG. 10a is a diagram illustrating a scenario of a viewer watching TV according to an embodiment of the present invention;
fig. 10b and 10c are schematic diagrams of display interfaces of a television set viewed by a viewer according to an embodiment of the present invention;
FIG. 10d is a diagram illustrating another scenario in which a viewer watches TV according to an embodiment of the present invention;
fig. 10e and fig. 10f are schematic diagrams of display interfaces of a television set viewed by a viewer in the embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Because the display of subtitles in the prior art is static, the subtitles cannot be automatically adjusted to meet the requirements of viewers, and the technical problem of poor viewing experience of users exists.
In order to solve the technical problem, the invention provides an automatic video subtitle adjustment method, which can automatically adjust the font size of a subtitle based on the distance between a viewer and a terminal by adjusting the font size of the subtitle when a video is played on the terminal according to the target distance between the viewer and the terminal, and/or adjust the font brightness of the subtitle when the video is played on the terminal according to the acquired brightness value of the current environment, so that the font brightness of the subtitle can be automatically adjusted based on the brightness value of the current environment. By the mode, the requirements of the user on the font size and/or the font brightness when watching the video can be met under the conditions of different distances and/or different ambient brightness, and the watching experience of the user is improved.
Please refer to fig. 1, which is a schematic flow chart of a method for automatically adjusting video subtitles according to an embodiment of the present invention, the method includes:
step 101, when playing a video, determining a target distance between a viewer watching the video and a terminal playing the video;
and step 102, adjusting the font size of the subtitles when the video is played on the terminal according to the target distance.
In the embodiment of the present invention, the method for automatically adjusting a video subtitle may be implemented by an automatic video subtitle adjusting apparatus (hereinafter, simply referred to as an adjusting apparatus), which may be a television or a mobile terminal, or a part of the television or the mobile terminal, and the adjusting apparatus may specifically be a program module, stored in a computer-readable storage medium of the television or the mobile terminal, and invoked by a processor for execution.
When playing a video, the adjusting device determines a target distance between the viewer and the terminal playing the video, where the adjusting device may determine the target distance once every preset time interval, where the preset time interval may be a default value of the system or a value set by a user, for example, the preset time interval may be 5s, that is, the adjusting device executes the technical solution in the embodiment of the present invention once every 5 s.
The viewer refers to a user within the viewing range of the terminal, and if the user is within the viewing range of the terminal, the user can see the content played on the display interface of the terminal. The terminal is the terminal to which the adjusting device belongs.
After the target distance between the viewer and the terminal is obtained, the font size of the subtitles when the video is played on the terminal is adjusted according to the target distance.
The video subtitle mode includes three modes, namely a soft subtitle mode, a hard subtitle mode and a subtitle-free mode.
The soft subtitle mode refers to that subtitles of a video exist independently, and in the soft subtitle mode, the carriers of the subtitles are commonly as follows: external subtitle files and subtitle streams within video files. The external subtitle file refers to a video file and an external subtitle file, wherein subtitles are stored in a digital text file independent of a video file, and the video file and the external subtitle file are required to be acquired when a video is played. A subtitle stream within a video file is a subtitle organized in a data track along with an audio track and a video track within the video file. In the soft subtitle mode, when a video is played, the subtitle of the video can be directly obtained, and the font size of the subtitle is adjusted.
The hard subtitle mode refers to the fact that subtitles are already superposed on video image frames corresponding to video data during audio production and are used as a part of the video image frames, and a video file is generated after compression and audio and video confluence. In the hard caption mode, if the font size of the caption needs to be adjusted, the caption needs to be extracted by using a caption encoding tool, such as an Optical Character Recognition (OCR) technique, so as to synchronously display the extracted caption and adjust the font size of the extracted caption.
The subtitle-free mode means that neither soft subtitles nor hard subtitles exist, and when a video is played normally, a displayed image has no subtitles. However, in the non-subtitle mode, if the viewer wants to view the subtitle, a preset subtitle extraction method may be started, for example, the ASR technology may be used to perform subtitle extraction processing on the audio data of the video file, obtain the subtitle of the video based on the audio data, and synchronously display the subtitle when the video is played, so that the subtitle can still be displayed for the viewer in the non-subtitle mode. Further, the font size of the subtitles obtained based on the audio data may be adjusted.
In the embodiment of the invention, when the video is played, the target distance between a viewer watching the video and a terminal playing the video is determined, and the font size of the subtitle when the video is played on the terminal is adjusted according to the target distance. Compared with the prior art, the font size of the subtitle can be automatically adjusted based on the distance between the viewer and the terminal, for example, when the distance is large, the font size of the subtitle is correspondingly adjusted to be large, and when the distance is small, the font size of the subtitle is correspondingly adjusted to be small, so that the requirement of the user on the size of the subtitle when the user watches videos can be met under the condition of different distances, and the watching experience of the user is improved.
Please refer to fig. 2, which is a schematic flow chart of a method for automatically adjusting video subtitles according to an embodiment of the present invention, the method includes:
step 201, when playing a video, detecting whether an obstacle exists in a watching range of the terminal at preset time intervals;
step 202, if an obstacle exists, detecting whether a viewer exists in the obstacle;
step 203, if the observer exists, determining a target distance between the observer and the terminal by using an ultrasonic ranging technology;
in the embodiment of the present invention, steps 201 to 203 are the refinement steps of step 101 shown in fig. 1.
When the video is played, the adjusting device detects whether an obstacle exists in a viewing range of the terminal at preset time intervals, the obstacle detection can be that a camera of the terminal is started, images are shot through the camera, the adjusting device analyzes the shot images, whether the images contain the obstacle or not can be determined by means of image analysis, and under the condition that the image contains the obstacle, the position, the shape and other information of each obstacle are located. The image range which can be shot by the camera when shooting is consistent with the watching range of the terminal.
Wherein, the barrier can be a viewer, and can also be a sofa, a vase and the like.
Wherein, in case of the presence of an obstacle, it will be further determined whether the observer is contained in the obstacle, for example: the method comprises the steps of detecting whether barriers containing human eyes exist in all the barriers by utilizing an iris recognition technology, specifically, carrying out iris recognition on regions where the barriers exist in sequence to determine whether sub-regions which accord with human eye characteristics exist in the regions where the barriers exist, determining that the barriers contain the human eyes if the regions where the barriers exist contain the regions which accord with the human eye characteristics, and further determining that the barriers are viewers.
It is understood that, in practical applications, besides the iris recognition technology, other technologies may be used to detect whether the obstacle is a viewer, for example, after obtaining information such as a position and a shape of the obstacle, the face recognition technology is used to perform face recognition, and if the obstacle includes a face, the obstacle is determined to be the viewer, or, human shapes of different postures of the human body may be preset, and the shape of the obstacle may be matched with the preset human shape, where the shape of the obstacle may be enlarged or reduced based on a human body ratio, for example, when the preset human shape is set based on a normal adult, and when the obstacle is a child, the shape of the obstacle may be enlarged based on the human body ratio. And if the matching degree of the shape of the obstacle in the preset human body shapes is more than or equal to the preset numerical human body shape, determining the obstacle as the viewer. Therefore, in practical applications, an appropriate manner may be selected according to specific situations to detect whether the obstacle is a viewer, which is not limited herein.
In the embodiment of the present invention, after detecting the viewer, the adjusting device determines the target distance between the viewer and the terminal by using an ultrasonic ranging technique, specifically: the terminal is provided with an ultrasonic transmitter and an ultrasonic receiver, and under the condition that the observer is confirmed to exist, the adjusting device calls the ultrasonic transmitter to transmit an ultrasonic signal to the direction of the observer, wherein the ultrasonic receiver receives the ultrasonic signal reflected from the observer, the adjusting device obtains the time of transmitting the signal by the ultrasonic generator and the time of receiving the signal by the ultrasonic receiver, the transmission duration of the ultrasonic is confirmed, the transmission distance of the ultrasonic signal is calculated by utilizing the transmission duration and the transmission speed of the ultrasonic signal, and the transmission distance is the target distance between the terminal and the observer.
It is to be understood that, if only one viewer is detected, the distance between the viewer and the terminal may be set as the target distance, and if a plurality of viewers are detected, the distances between the plurality of viewers and the terminal may be averaged to set the average as the target distance, or, if a plurality of viewers are present, the maximum distance may be determined from the distances between the plurality of viewers and the terminal, and the maximum distance may be set as the target distance.
Step 204, searching a plurality of preset distance ranges, and determining whether the distance between the viewer and the terminal determined last time and the target distance are in the same distance range;
step 205, if the distance is within the same distance range, displaying the subtitle according to the font size determined last time;
and step 206, if the distance is not within the same distance range, adjusting the font size of the subtitles when the video is played on the terminal according to the target distance.
In the embodiment of the present invention, in order to adjust the font size better, a plurality of distance ranges are set in advance, for example, a plurality of distance ranges are set at intervals of 0.5 m. And the distance ranges are continuous, for example, if the distance ranges are three distance ranges, (0, a 1), (a1, a 2) and (a2, a 3), the adjusting device searches the preset distance ranges, and determines whether the last determined distance between the viewer and the terminal and the target distance are in the same distance range.
If the distance between the viewer and the terminal determined last time and the currently obtained target distance are within the same distance range, it is indicated that the distance is not changed greatly and the condition of adjusting the font size is not achieved, and at this time, the subtitle is still displayed according to the font size determined last time. If the distance is not within the same distance range, the fact that the font size of the subtitles when the video is played on the terminal needs to be adjusted according to the target distance is indicated.
In the embodiment of the present invention, not only the plurality of different distance ranges described above are preset, but also the correspondence between the plurality of different distance ranges and the font size of the subtitle is preset, for example, when the distance range is a, the corresponding font size is a, and when the distance range is B, the corresponding font size is B. Under the condition that the distance between the viewer and the terminal determined last time and the target distance are not in the same distance range, the corresponding relation between the distance range and the font size of the subtitle is searched, the distance range to which the target distance belongs is determined, the font size corresponding to the distance range to which the target distance belongs is further determined, and after the font size is determined, the subtitle is displayed according to the font size.
It is to be understood that, after determining the font size, the font size in the display parameter may be modified to the font size determined based on the target distance by modifying the subtitle display parameter, so that the subtitle can be displayed in the font size determined based on the currently detected target distance.
It should be noted that, the maximum distance in the above-mentioned multiple different distance ranges is limited and related to the type of the terminal, for example, if the terminal is a television, the maximum distance is limited to 4 meters, that is, the total length of the multiple different distance ranges may be 4 meters, and if the terminal is divided into 5 different distance ranges, the maximum distance will correspond to 5 different font sizes respectively, and the 5 font sizes generally increase with the increase of the distance, so that the user can still clearly see the displayed subtitles on the television when the user is far away from the terminal, for example, 3.5 meters. The font size can be designed based on the size of the display screen of the terminal and the limitation of the maximum distance, so as to provide better viewing experience for the user.
In the embodiment of the invention, when a video is played, whether an obstacle exists in a viewing range of a terminal is detected at intervals of preset duration, if so, the iris is used for detecting whether the obstacle including human eyes exists by a technology, if so, the obstacle is determined as a viewer, a target distance between the viewer and the terminal is determined by using an ultrasonic ranging technology, a preset distance range is searched, the last determined distance between the viewer and the terminal and whether the target distance is in the same distance range are determined, if so, subtitles are displayed according to the previous font size, and if not, the font size of the subtitles when the video is played on the terminal is adjusted according to the target distance. Through the mode, the adjustment of the font size of the subtitle can be realized based on the distance between the viewer and the terminal, so that the subtitle displayed by the terminal can better meet the viewing requirement of the viewer, and the viewing experience is effectively improved.
To better understand the technical solution in the embodiments shown in fig. 1 and fig. 2, a specific application scenario of the technical solution will be described below, please refer to fig. 10a, which is a schematic view of a scenario in which a viewer watches a television in an embodiment of the present invention, wherein, the viewer A is watching TV, the TV 1001 is provided with a detecting device 1002, the detecting device 1002 can be located at the lower right corner or the lower left corner of the television 1001 or at any position of the lower edge of the display interface of the television, in figure 10a the detection means 1002 is illustrated as being located in the lower right corner of the television 1001, the detection device comprises a camera, an ultrasonic transmitter and an ultrasonic receiver, after the camera detects the existence of the viewer A, the distance between viewer a and the television 1001 can be determined using an ultrasonic transmitter and an ultrasonic receiver, as shown in fig. 10a, the dashed line between the tv 1001 and the viewer a is the distance C determined by the ultrasonic wave.
If the last detected distance is the distance B, the television 1001 searches a plurality of preset distance ranges by using the distance C, and determines whether the distance B and the distance C are within the same distance range, and if the distance B is within the first distance range, the distance C is within the second distance range, and since the first distance range is larger than the second distance range, it indicates that the distance between the viewer a and the television 1001 is increased and the condition for adjusting the font size of the subtitle is achieved, and therefore, the television 1001 increases the font size of the subtitle displayed by the television 1001 to the font size corresponding to the second distance range. Please refer to fig. 10B and 10C, which are schematic diagrams of a display interface of a television set viewed by a viewer according to an embodiment of the present invention, in fig. 10B, a font size of a displayed subtitle is a font size corresponding to a first distance range to which a distance B belongs, in fig. 10C, a font size of a displayed subtitle is a font size corresponding to a first distance range to which a distance C belongs, and as can be seen from fig. 10B and 10C, a subtitle "asking a person to ask about home? "is larger than the font size of the subtitle" asking someone to ask for home "in fig. 10 b.
The embodiments described in fig. 1 and fig. 2 describe a manner of adjusting the font size of the subtitle based on the distance between the viewer and the terminal, which can effectively solve the problem in the prior art that the font size of the subtitle is fixed no matter how far the viewer is from the terminal, which may cause the viewer to see the subtitle unclear. In addition, in another scheme for automatically adjusting video subtitles, the font brightness of subtitles may also be adjusted based on the ambient brightness, and the method can effectively solve the problem in the prior art that the subtitle may not be clearly seen by a viewer due to the fact that the font brightness of subtitles is fixed no matter how much the ambient brightness is, specifically, refer to fig. 3, which is a schematic flow diagram of a method for automatically adjusting video subtitles in an embodiment of the present invention, and the method includes:
step 301, when a video is played, determining the brightness value of the current environment by using brightness data acquired by a brightness sensor at preset time intervals;
and step 302, adjusting the font brightness of the subtitles when the video is played on the terminal according to the brightness value of the current environment.
In the embodiment of the present invention, the method for automatically adjusting video subtitles may be implemented by an automatic video subtitle adjusting apparatus (hereinafter, simply referred to as an adjusting apparatus), where the adjusting apparatus may be a television or a mobile terminal, or a part of the television or the mobile terminal, and the adjusting apparatus may specifically be a program module, stored in a readable storage medium of the television or the mobile terminal, and invoked by a processor for execution.
When the terminal plays a video, the terminal is provided with a brightness sensor which is used for acquiring brightness data of the current environment, the adjusting device acquires the brightness data acquired by the brightness sensor at preset time intervals, and the brightness data is used for acquiring the brightness value of the current environment.
The preset time length may be a default value of the system, or a value set by a user, for example, the preset time length may be 5s, that is, the adjusting device acquires the brightness data acquired by the brightness sensor within the last 5s every 5 s.
After the brightness value of the current environment is obtained, the font brightness of the subtitles when the video is played on the terminal is adjusted by using the brightness value of the current environment.
The video subtitle mode includes three modes, namely a soft subtitle mode, a hard subtitle mode and a subtitle-free mode.
The soft subtitle mode refers to that subtitles of a video exist independently, and in the soft subtitle mode, the carriers of the subtitles are commonly as follows: external subtitle files and subtitle streams within video files. The external subtitle file refers to a video file and an external subtitle file, wherein subtitles are stored in a digital text file independent of a video file, and the video file and the external subtitle file are required to be acquired when a video is played. A subtitle stream within a video file is a subtitle organized in a data track along with an audio track and a video track within the video file. In the soft subtitle mode, when a video is played, the subtitle of the video can be directly obtained, and the font brightness of the subtitle is adjusted.
The hard subtitle mode refers to the fact that subtitles are already superposed on video image frames corresponding to video data during audio production and are used as a part of the video image frames, and a video file is generated after compression and audio and video confluence. In the hard caption mode, if the font brightness of the caption needs to be adjusted, the caption needs to be extracted by using a caption encoding tool and displayed synchronously, so as to adjust the font brightness of the extracted caption.
The subtitle-free mode means that neither soft subtitles nor hard subtitles exist, and when the video is played normally, the displayed image has no subtitles. However, in the subtitle-less mode, if the viewer wants to view the subtitles, a preset subtitle extraction method may be started, for example, the ASR technology may be utilized to perform subtitle extraction processing on the audio data of the video file, obtain the subtitles of the video based on the audio data, and synchronously display the subtitles during video playing, so that the subtitles can still be displayed for the viewer in the subtitle-less mode. Further, the font brightness of the subtitles obtained based on the audio data may be adjusted.
In the embodiment of the invention, when the video is played, the brightness value of the current environment is determined by utilizing the brightness data acquired by the brightness sensor at preset time intervals, and the font brightness of the subtitles when the video is played on the terminal is adjusted according to the brightness value of the current environment. Compared with the prior art, the font brightness of the subtitle can be automatically adjusted based on the brightness value of the current environment, for example, when the brightness value of the current environment is large, the font brightness of the subtitle is correspondingly increased, and when the brightness value of the current environment is small, the font brightness of the subtitle is correspondingly decreased, so that the requirements of users on the font brightness when watching videos can be met under the condition of different environment brightness, and the watching experience of the users is improved.
Please refer to fig. 4, which is another schematic flow chart illustrating an automatic video subtitle adjustment method according to an embodiment of the present invention, including:
step 401, when a video is played, determining a brightness value of a current environment by using brightness data acquired by a brightness sensor at preset time intervals;
step 402, searching a plurality of preset environment brightness ranges, and determining whether the brightness value of the environment determined last time and the brightness value of the current environment are in the same environment brightness range;
step 403, if the subtitle is in the same ambient brightness range, displaying the subtitle according to the last determined font brightness;
step 404, if the current environment brightness value is not within the same environment brightness range, searching a preset corresponding relationship between the environment brightness range and the font brightness of the subtitle, and determining the font brightness corresponding to the environment brightness range to which the current environment brightness value belongs;
and step 405, displaying the subtitles according to the corresponding font brightness.
In the embodiment of the present invention, in order to better adjust the font brightness, a plurality of environment brightness ranges are preset, and the plurality of environment brightness ranges are continuous, and the adjusting device searches the plurality of environment brightness ranges, and determines whether the brightness value of the last determined environment and the brightness value of the current environment are in the same environment brightness range, wherein the brightness value of the last determined environment is stored in the memory.
If the brightness value of the environment determined last time is within the same distance range as the brightness value of the current environment, it is indicated that the brightness change is not large, and the condition of adjusting the font brightness is not reached, and at this time, the subtitle is still displayed according to the font brightness determined last time. If the current brightness value is not within the same distance range, the font brightness of the subtitles when the video is played on the terminal is adjusted according to the current brightness value.
In the embodiment of the present invention, not only the plurality of environment brightness ranges are preset, but also the corresponding relationship between the plurality of different environment brightness ranges and the font brightness of the subtitle is preset, and in the case that the brightness value of the environment determined last time and the brightness value of the current environment are not in the same environment brightness range, the adjusting device searches the corresponding relationship between the environment brightness range and the font brightness of the subtitle, determines the environment brightness range to which the brightness value of the current environment belongs, further determines the font brightness corresponding to the environment brightness range to which the brightness value of the current environment belongs, and displays the subtitle according to the font brightness after determining the font brightness.
It is to be understood that after the font brightness is determined, the font brightness in the display parameter may be modified to the font brightness determined based on the brightness value of the current environment by modifying the subtitle display parameter, so that the subtitle can be displayed according to the font brightness determined based on the brightness value of the current environment. It can be understood that the adjustment of the font brightness in the display parameter may specifically be the adjustment of the brightness of the entire area of the subtitle display area, and the latter may be the adjustment of only the brightness of the subtitle itself, and may be set according to specific situations in practical applications, which is not limited herein.
It should be noted that the division of the multiple ambient brightness ranges may be set according to repeated experiments or experiences, and the correspondence between the multiple ambient brightness ranges and the font brightness may also be set according to repeated experiments or experiences, so as to obtain the font brightness with the best effect corresponding to different ambient brightness ranges, and provide better viewing experience for the user.
In the embodiment of the invention, when a video is played, the brightness value of the current environment is determined by utilizing the brightness data acquired by the brightness sensor at intervals of preset duration, a plurality of preset environment brightness ranges are searched, whether the brightness value of the environment determined last time and the brightness value of the current environment are in the same environment brightness range is determined, if the brightness value of the environment determined last time and the brightness value of the current environment are in the same environment brightness range, a subtitle is displayed according to the font brightness determined last time, if the brightness value of the environment determined last time and the brightness value of the current environment are not in the same environment brightness range, the corresponding relation between the preset environment brightness range and the font brightness of the subtitle is searched, the font brightness corresponding to the environment brightness range to which the brightness value of the current environment belongs is determined, and the subtitle is displayed according to the corresponding font brightness. Through the mode, the font brightness of the subtitles can be adjusted based on the brightness value of the current environment, so that the brightness of the subtitles displayed by the terminal can better meet the watching requirement of a viewer, and the watching experience is effectively improved.
It can be understood that the adjustment of the font size of the subtitle based on the distance and the adjustment of the font brightness of the subtitle based on the brightness value of the current environment belong to mutually independent technical solutions, and can be performed simultaneously on the same terminal.
To better understand the technical solutions in the embodiments shown in fig. 3 and fig. 4, a specific application scenario of the above technical solutions will be described below, please refer to fig. 10d, which is a schematic view of a scenario in which a user watches a television in an embodiment of the present invention, wherein a viewer a watches the television, a luminance sensor 1003 is disposed on the television 1001, the luminance sensor 1003 may be located at any position of the television 1001, the luminance sensor 1003 is illustrated in fig. 10d by taking the location on the right side of the television 1001 as an example, and the television acquires luminance data acquired by the luminance sensor every preset time interval 1001 and determines a luminance value of a current environment as luminance E.
If the brightness detected last time is brightness F, the television 1001 searches a plurality of preset ambient brightness ranges by using the brightness E, and determines whether the brightness E and the brightness F are within the same ambient brightness range, and if the brightness E is within a first ambient brightness range, the brightness F is within a second ambient brightness range, since the first ambient brightness range is smaller than the second ambient brightness range, it indicates that the brightness value of the current environment is darkened, and in order to facilitate a user to see a subtitle clearly, the brightness of a font played on a display interface needs to be adjusted to be bright at this time, so that the television 1001 increases the brightness of a subtitle region of a subtitle displayed by the television 1001 to the font brightness corresponding to the first ambient brightness range. Please refer to fig. 10E and fig. 10F, which are schematic diagrams of a display interface of a television according to an embodiment of the present invention, where in fig. 10E, the display interface is viewed by a user when the font brightness of the display screen is still displayed according to the second environment brightness range to which the brightness F belongs when the brightness value of the current environment is the brightness E, and in fig. 10F, the display interface is viewed by the user after the font brightness of the display screen is adjusted to the font brightness corresponding to the first environment brightness range to which the brightness E belongs when the brightness value of the current environment is the brightness E. As can be seen from fig. 10e and 10f, the font brightness of the subtitle "this look good" in fig. 10e is smaller than the font brightness of the subtitle "this look good" in fig. 10 f.
Please refer to fig. 5, which is a schematic structural diagram of a program module of an automatic video subtitle adjustment apparatus according to an embodiment of the present invention, the apparatus includes:
a determining module 501, configured to determine, when playing a video, a target distance between a viewer watching the video and a terminal playing the video;
a size adjusting module 502, configured to adjust a font size of a subtitle when the video is played on the terminal according to the target distance.
The video subtitle mode includes three modes, namely a soft subtitle mode, a hard subtitle mode and a subtitle-free mode.
The soft subtitle mode refers to that subtitles of a video exist independently, and in the soft subtitle mode, carriers of the subtitles are common: external subtitle files and subtitle streams within video files. The external subtitle file refers to a video file and an external subtitle file, wherein subtitles are stored in a digital text file independent of a video file, and the video file and the external subtitle file are required to be acquired when a video is played. A subtitle stream within a video file is a subtitle organized within the video file in a data track along with an audio track, a video track. In the soft subtitle mode, when a video is played, the subtitle of the video can be directly obtained, and the font size of the subtitle is adjusted.
The hard subtitle mode refers to the fact that subtitles are already superposed on video image frames corresponding to video data during audio production and are used as a part of the video image frames, and a video file is generated after compression and audio and video confluence. In the hard subtitle mode, if the font size of the subtitle needs to be adjusted, the subtitle needs to be extracted by using a subtitle encoding tool so as to adjust the font size of the extracted subtitle and display the subtitle in synchronization with the video file.
The subtitle-free mode means that neither soft subtitles nor hard subtitles exist, and when a video is played normally, a displayed image has no subtitles. However, in the subtitle-less mode, if the viewer wants to view the subtitles, a preset subtitle extraction method may be started, for example, the ASR technology may be utilized to perform subtitle extraction processing on the audio data of the video file, obtain the subtitles of the video based on the audio data, and synchronously display the subtitles during video playing, so that the subtitles can still be displayed for the viewer in the subtitle-less mode. Further, the font size of the subtitles obtained based on the audio data may be adjusted.
In the embodiment of the invention, when the video is played, the target distance between a viewer watching the video and a terminal playing the video is determined, and the font size of the subtitle when the video is played on the terminal is adjusted according to the target distance. Compared with the prior art, the font size of the subtitle can be automatically adjusted based on the distance between the viewer and the terminal, for example, when the distance is large, the font size of the subtitle is correspondingly adjusted to be large, and when the distance is small, the font size of the subtitle is correspondingly adjusted to be small, so that the requirement of the user on the size of the subtitle when the user watches videos can be met under the condition of different distances, and the watching experience of the user is improved.
Please refer to fig. 6, which is a schematic structural diagram of a program module of an automatic video subtitle adjustment apparatus according to an embodiment of the present invention, the apparatus includes: the determining module 501 and the resizing module 502 in the embodiment shown in fig. 5 are similar to those described in the embodiment shown in fig. 5, and are not repeated here.
Wherein, the determining module 501 comprises:
the detection module 601 is configured to detect whether an obstacle exists in a viewing range of the terminal every preset time interval when a video is played;
a human eye detection module 602, configured to detect whether a viewer exists in an obstacle if the obstacle exists;
a distance determining module 603, configured to determine a target distance between a viewer and the terminal by using an ultrasonic ranging technique if the viewer exists.
Further, the apparatus comprises:
a distance searching module 604, configured to search a plurality of preset distance ranges after the determining module 501, and determine whether the distance between the viewer and the terminal determined last time and the target distance are within the same distance range;
a first display module 605, configured to display the subtitles according to the font size determined last time if the subtitles are within the same distance range;
an executing module 606, configured to execute the size adjusting module if the distance is not within the same distance range.
The resizing module 502 includes:
a size searching module 607, configured to search a correspondence between a preset distance range and a font size of a subtitle, and determine a font size corresponding to a distance range to which the target distance belongs;
a second display module 608, configured to display the subtitles according to the corresponding font size.
It is to be understood that, if only one viewer is detected, the distance between the viewer and the terminal may be set as the target distance, and if a plurality of viewers are detected, the distances between the plurality of viewers and the terminal may be averaged to set the average as the target distance, or, if a plurality of viewers are present, the maximum distance may be determined from the distances between the plurality of viewers and the terminal, and the maximum distance may be set as the target distance.
In the embodiment of the present invention, in order to adjust the font size better, a plurality of distance ranges are set in advance, for example, a plurality of distance ranges are set at intervals of 0.5 m. The distance ranges are continuous, for example, if the distance ranges are three, the distance ranges are (0, a 1), (a1, a 2) and (a2, a 3).
It should be noted that, the maximum distance in the above-mentioned multiple different distance ranges is limited and related to the type of the terminal, for example, if the terminal is a television, the maximum distance is limited to 4 meters, that is, the total length of the multiple different distance ranges may be 4 meters, and if the terminal is divided into 5 different distance ranges, the maximum distance will correspond to 5 different font sizes respectively, and the 5 font sizes generally increase with the increase of the distance, so that the user can still clearly see the displayed subtitles on the television when the user is far away from the terminal, for example, 3.5 meters. The font size can be designed based on the size of the display screen of the terminal and the limitation of the maximum distance, so as to provide better viewing experience for the user.
In the embodiment of the invention, when a video is played, whether an obstacle exists in a viewing range of a terminal is detected at intervals of preset duration, if so, the iris is used for detecting whether the obstacle including human eyes exists by a technology, if so, the obstacle is determined as a viewer, a target distance between the viewer and the terminal is determined by using an ultrasonic ranging technology, a preset distance range is searched, the last determined distance between the viewer and the terminal and whether the target distance is in the same distance range are determined, if so, subtitles are displayed according to the previous font size, and if not, the font size of the subtitles when the video is played on the terminal is adjusted according to the target distance. Through the mode, the adjustment of the font size of the subtitle can be realized based on the distance between the viewer and the terminal, so that the subtitle displayed by the terminal can better meet the viewing requirement of the viewer, and the viewing experience is effectively improved.
Please refer to fig. 7, which is a schematic structural diagram of a program module of an automatic video subtitle adjustment apparatus according to an embodiment of the present invention, the apparatus includes:
the brightness determining module 701 is configured to determine a brightness value of the current environment by using brightness data acquired by a brightness sensor every preset time interval when a video is played;
a brightness adjusting module 702, configured to adjust font brightness of subtitles when the video is played on the terminal according to the brightness value of the current environment.
There are three video subtitle modes, namely a soft subtitle mode, a hard subtitle mode and a subtitle-free mode.
The soft subtitle mode refers to that subtitles of a video exist independently, and in the soft subtitle mode, the carriers of the subtitles are commonly as follows: external subtitle files and subtitle streams within video files. The external subtitle file refers to a video file and an external subtitle file, wherein subtitles are stored in a digital text file independent of a video file, and the video file and the external subtitle file are required to be acquired when a video is played. A subtitle stream within a video file is a subtitle organized within the video file in a data track along with an audio track, a video track. In the soft subtitle mode, when a video is played, the subtitle of the video can be directly obtained, and the font brightness of the subtitle is adjusted.
The hard subtitle mode refers to the fact that subtitles are already superposed on video image frames corresponding to video data during audio production and are used as a part of the video image frames, and a video file is generated after compression and audio and video confluence. In the hard caption mode, if the font brightness of the caption needs to be adjusted, the caption needs to be extracted by using a caption encoding tool so as to adjust the font brightness of the extracted caption and display the caption synchronously with the video file.
The subtitle-free mode means that neither soft subtitles nor hard subtitles exist, and when the video is played normally, the displayed image has no subtitles. However, in the subtitle-less mode, if the viewer wants to view the subtitles, a preset subtitle extraction method may be started, for example, the ASR technology may be utilized to perform subtitle extraction processing on the audio data of the video file, obtain the subtitles of the video based on the audio data, and synchronously display the subtitles during video playing, so that the subtitles can still be displayed for the viewer in the subtitle-less mode. Further, the font brightness of the subtitles obtained based on the audio data may be adjusted.
In the embodiment of the invention, when the video is played, the brightness value of the current environment is determined by utilizing the brightness data acquired by the brightness sensor at preset time intervals, and the font brightness of the subtitles when the video is played on the terminal is adjusted according to the brightness value of the current environment. Compared with the prior art, the font brightness of the subtitle can be automatically adjusted based on the brightness value of the current environment, for example, when the brightness value of the current environment is large, the font brightness of the subtitle is correspondingly increased, and when the brightness value of the current environment is small, the font brightness of the subtitle is correspondingly reduced, so that the requirements of users on the font brightness when watching videos can be met under the condition of different environment brightness, and the watching experience of the users is improved.
Please refer to fig. 8, which is another schematic structural diagram of program modules of an automatic video subtitle adjustment apparatus according to an embodiment of the present invention, the apparatus includes a brightness determining module 701 and a brightness adjusting module 702 shown in fig. 7, and is similar to the contents described in the embodiment shown in fig. 7, and will not be repeated here.
In the embodiment of the present invention, the brightness adjusting module 702 includes:
a brightness searching module 801, configured to search a correspondence between a preset environment brightness range and font brightness of a subtitle, and determine font brightness corresponding to an environment brightness range to which the brightness value of the current environment belongs;
and a display module 802, configured to display subtitles according to the corresponding font brightness.
In an embodiment of the present invention, the apparatus further comprises:
a range searching module 803, configured to search a plurality of preset environment brightness ranges, and determine whether the brightness value of the environment determined last time and the brightness value of the current environment are within the same environment brightness range;
the brightness display module 804 is configured to display the subtitles according to the font brightness determined last time if the subtitles are in the same ambient brightness range;
the triggering module 805 is configured to continue to execute the brightness adjusting module 702 if the ambient brightness is not within the same ambient brightness range.
It should be noted that the division of the multiple ambient brightness ranges may be set according to repeated experiments or experiences, and the correspondence between the multiple ambient brightness ranges and the font brightness may also be set according to repeated experiments or experiences, so as to obtain the font brightness with the best effect corresponding to different ambient brightness ranges, and provide better viewing experience for the user.
In the embodiment of the invention, when a video is played, the brightness value of the current environment is determined by utilizing the brightness data acquired by the brightness sensor at intervals of preset duration, a plurality of preset environment brightness ranges are searched, whether the brightness value of the environment determined last time and the brightness value of the current environment are in the same environment brightness range is determined, if the brightness value of the environment determined last time and the brightness value of the current environment are in the same environment brightness range, a subtitle is displayed according to the font brightness determined last time, if the brightness value of the environment determined last time and the brightness value of the current environment are not in the same environment brightness range, the corresponding relation between the preset environment brightness range and the font brightness of the subtitle is searched, the font brightness corresponding to the environment brightness range to which the brightness value of the current environment belongs is determined, and the subtitle is displayed according to the corresponding font brightness. Through the mode, the font brightness of the subtitles can be adjusted based on the brightness value of the current environment, so that the brightness of the subtitles displayed by the terminal can better meet the watching requirement of a viewer, and the watching experience is effectively improved.
The embodiment of the present invention further provides a terminal, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the processor implements each step in the automatic video subtitle adjustment method in any one of the embodiments shown in fig. 1 to 4.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for automatically adjusting video subtitles according to any one of fig. 1 to 4.
For better understanding of the technical solution in the embodiment of the present invention, please refer to fig. 9, which is a schematic structural diagram of a terminal 90 in the embodiment of the present invention. The terminal 90 includes a processor 901, memory 902 and a transceiver 903, the memory 902 may include both read-only memory and random access memory, and provides operational instructions and data to the processor 901. A portion of the memory 902 may also include non-volatile random access memory (NVRAM).
In some embodiments, memory 902 stores the following elements: an executable module or a data structure, or a subset thereof, or an expanded set thereof.
In the embodiment of the present invention, by calling an operation instruction stored in the memory 902 (the operation instruction may be stored in an operating system), the following processes are performed: when a video is played, determining a target distance between a viewer watching the video and a terminal playing the video; adjusting the font size of the caption when the video is played on the terminal according to the target distance, and/or executing the following processes: when the video is played, the brightness value of the current environment is determined by utilizing the brightness data collected by the brightness sensor at preset time intervals; and adjusting the font brightness of the subtitles when the video is played on the terminal according to the brightness value of the current environment.
Compared with the prior art, the terminal provided by the embodiment of the invention can realize the automatic adjustment of the font size of the subtitle based on the target distance between the viewer and the terminal and the automatic adjustment of the font brightness of the subtitle based on the brightness value of the current environment, meets the requirements of the user on the font size and the font brightness when the user watches the video, and improves the viewing experience of the user.
Wherein the processor 901 controls the operation of the terminal 90, the processor 901 may also be referred to as a CPU (Central Processing Unit). Memory 902 may include both read-only memory and random access memory and provides instructions and data to processor 901. A portion of the memory 902 may also include non-volatile random access memory (NVRAM). The various components of terminal 90 in a particular application are coupled together by a bus system 904, where bus system 904 may include a power bus, a control bus, a status signal bus, etc., in addition to a data bus. But for the sake of clarity the various buses are labeled in the figure as bus system 904.
The method disclosed in the above embodiments of the present invention may be applied to the processor 901, or implemented by the processor 901. The processor 901 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 901. The processor 901 may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 902, and the processor 901 reads the information in the memory 902, and completes the steps of the above method in combination with the hardware thereof.
The above terminal 90 can be understood by referring to the descriptions of fig. 1 to 8, and will not be described in detail herein.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer terminal (which may be a personal computer, a server, or a network terminal) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present invention is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no acts or modules are necessarily required of the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
In view of the above description of the method and apparatus for automatically adjusting video subtitles, the terminal and the readable storage medium provided by the present invention, those skilled in the art will appreciate that the concepts of the embodiments of the present invention may be modified in the specific implementation manners and the application ranges.

Claims (8)

1. A method for automatically adjusting video subtitles, the method comprising:
when a video is played, determining a target distance between a viewer watching the video and a terminal playing the video by using an ultrasonic ranging technology and determining a brightness value of a current environment by using brightness data acquired by a brightness sensor at preset time intervals;
searching a plurality of preset distance ranges, and determining whether the distance between the viewer and the terminal determined last time and the target distance are in the same distance range, wherein the distance ranges are continuous, and the distance range is the range of the distance between the viewer and the terminal;
if the subtitle is within the same distance range, displaying the subtitle according to the font size determined last time;
if the distance range is not within the same distance range, searching a preset corresponding relation between the distance range and the font size of the subtitle, and determining the font size corresponding to the distance range to which the target distance belongs; displaying the caption according to the corresponding font size; the preset distance range is a preset distance range between the viewer and the terminal;
searching a plurality of preset environment brightness ranges, and determining whether the brightness value of the environment determined last time and the brightness value of the current environment are in the same environment brightness range, wherein the plurality of environment brightness ranges are continuous;
if the subtitle is in the same environment brightness range, displaying the subtitle according to the font brightness determined last time;
and if the brightness of the subtitle is not in the same environment brightness range, adjusting the font brightness of the subtitle and the brightness of the whole display area of the font displaying the subtitle according to the brightness value of the current environment.
2. The method of claim 1, wherein determining the target distance between the viewer viewing the video and the terminal playing the video comprises:
detecting whether an obstacle exists in a viewing range of the terminal at preset time intervals;
if the obstacles exist, detecting whether the observers exist in the obstacles or not;
and if the observer exists, determining the target distance between the observer and the terminal by utilizing an ultrasonic ranging technology.
3. The method of claim 1, further comprising:
searching a preset corresponding relation between an environment brightness range and the font brightness of the subtitle, and determining the font brightness corresponding to the environment brightness range to which the brightness value of the current environment belongs;
and displaying the subtitles according to the corresponding font brightness.
4. An apparatus for automatically adjusting subtitles, comprising:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a target distance between a viewer watching a video and a terminal playing the video by utilizing an ultrasonic ranging technology when the video is played;
the distance searching module is used for searching a plurality of preset distance ranges, determining whether the distance between the viewer and the terminal and the target distance which are determined last time are in the same distance range or not, wherein the distance ranges are continuous, and the distance range is the range of the distance between the viewer and the terminal;
the first display module is used for displaying the subtitles according to the font size determined last time if the subtitles are positioned in the same distance range;
the size adjusting module is used for adjusting the font size of the subtitles when the video is played on the terminal according to the target distance if the video is not in the same distance range;
the brightness determining module is used for determining the brightness value of the current environment by utilizing the brightness data acquired by the brightness sensor at preset time intervals when the video is played;
the range searching module is used for searching a plurality of preset environment brightness ranges, and determining whether the brightness value of the environment determined last time and the brightness value of the current environment are in the same environment brightness range, wherein the plurality of environment brightness ranges are continuous;
the brightness display module is used for displaying the subtitles according to the font brightness determined last time if the subtitles are in the same environment brightness range;
the triggering module is used for adjusting the font brightness of the subtitle and the brightness of the whole display area of the font displaying the subtitle according to the brightness value of the current environment if the subtitle is not in the same environment brightness range;
the size adjusting module comprises a size searching module and a second display module, wherein the size searching module is used for searching a corresponding relation between a preset distance range and the font size of the subtitle and determining the font size corresponding to the distance range to which the target distance belongs; the second display module is used for displaying the subtitles according to the corresponding font size; the preset distance range is a preset range of the distance between the viewer and the terminal.
5. The apparatus of claim 4, wherein the determining module comprises:
the detection module is used for detecting whether barriers exist in the watching range of the terminal at preset time intervals when the video is played;
the human eye detection module is used for detecting whether a viewer exists in the obstacle if the obstacle exists;
and the distance determining module is used for determining the target distance between the viewer and the terminal by utilizing an ultrasonic ranging technology if the viewer exists.
6. The apparatus of claim 4, wherein the apparatus comprises:
the brightness searching module is used for searching the corresponding relation between the preset environment brightness range and the font brightness of the subtitles and determining the font brightness corresponding to the environment brightness range to which the brightness value of the current environment belongs;
and the display module is used for displaying the subtitles according to the corresponding font brightness.
7. A terminal comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the method for automatically adjusting video subtitles according to any one of claims 1 to 3.
8. A readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the method for automatically adjusting video subtitles according to any one of claims 1 to 3.
CN201711071450.XA 2017-11-03 2017-11-03 Video subtitle automatic adjustment method and device, terminal and readable storage medium Active CN109756788B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711071450.XA CN109756788B (en) 2017-11-03 2017-11-03 Video subtitle automatic adjustment method and device, terminal and readable storage medium
PCT/CN2018/113559 WO2019085980A1 (en) 2017-11-03 2018-11-02 Method and device for video caption automatic adjustment, terminal, and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711071450.XA CN109756788B (en) 2017-11-03 2017-11-03 Video subtitle automatic adjustment method and device, terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN109756788A CN109756788A (en) 2019-05-14
CN109756788B true CN109756788B (en) 2022-08-23

Family

ID=66332844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711071450.XA Active CN109756788B (en) 2017-11-03 2017-11-03 Video subtitle automatic adjustment method and device, terminal and readable storage medium

Country Status (2)

Country Link
CN (1) CN109756788B (en)
WO (1) WO2019085980A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109698913B (en) * 2018-12-29 2020-12-04 深圳市道通智能航空技术有限公司 Image display method and device and electronic equipment
CN112235911B (en) * 2019-06-26 2022-12-09 广东小天才科技有限公司 Font size-based light ray adjusting method and apparatus, terminal device, and medium
CN110891200B (en) * 2019-11-22 2022-06-17 网易(杭州)网络有限公司 Bullet screen based interaction method, device, equipment and storage medium
CN113132791A (en) * 2019-12-30 2021-07-16 中兴通讯股份有限公司 Subtitle adjusting method, device, terminal and storage medium
CN111709342B (en) * 2020-06-09 2023-05-16 北京字节跳动网络技术有限公司 Subtitle segmentation method, device, equipment and storage medium
CN112995749B (en) * 2021-02-07 2023-05-26 北京字节跳动网络技术有限公司 Video subtitle processing method, device, equipment and storage medium
CN115002554A (en) * 2022-05-13 2022-09-02 广州方硅信息技术有限公司 Live broadcast picture adjusting method, system and device and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03187687A (en) * 1989-12-18 1991-08-15 Hitachi Commun Syst Inc Near-sightedness prevention television set
CN106231079A (en) * 2016-07-21 2016-12-14 乐视控股(北京)有限公司 A kind of video playback automatic brightness adjustment method and mobile terminal
WO2017032035A1 (en) * 2015-08-25 2017-03-02 宇龙计算机通信科技(深圳)有限公司 Method and device for adjusting, and terminal
CN106658220A (en) * 2016-11-11 2017-05-10 理光图像技术(上海)有限公司 Subtitle creating device, demonstration module and subtitle creating demonstration system

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100939711B1 (en) * 2002-12-12 2010-02-01 엘지전자 주식회사 Apparatus and method for reproducing a text based subtitle
KR100599118B1 (en) * 2004-07-20 2006-07-12 삼성전자주식회사 Data reproducing device for controlling display state of subtitle and method thereof
CN101071562A (en) * 2006-05-12 2007-11-14 上海乐金广电电子有限公司 Caption size regulating method for karaoke audio device
CN101587704A (en) * 2008-05-20 2009-11-25 鸿富锦精密工业(深圳)有限公司 Portable video unit and method for adjusting display font size thereof
JP5336578B2 (en) * 2009-03-26 2013-11-06 パナソニック株式会社 Video processing device, video processing method, video processing integrated circuit, video playback device
JP5525201B2 (en) * 2009-07-28 2014-06-18 パナソニック株式会社 Image composition device, image coding device, computer program, recording medium
CN102148020B (en) * 2010-02-10 2013-11-06 元太科技工业股份有限公司 Light-to-dark transition display device, display and brightness adjusting method
CN101951445B (en) * 2010-10-09 2013-01-23 华为终端有限公司 Adaptive adjusting terminal equipment and method
CN102122499A (en) * 2011-02-23 2011-07-13 西南交通大学 Light environment adaptive regulating system for screen display equipment
CN103312863A (en) * 2012-03-08 2013-09-18 中兴通讯股份有限公司 present method and device of mobile terminal video
US8659703B1 (en) * 2012-10-23 2014-02-25 Sony Corporation Adapting layout and text font size for viewer distance from TV
US20140184638A1 (en) * 2012-12-31 2014-07-03 Sathiyaraj Ramachandran Adaptively scaling a video frame/image element rendered on a data processing device
CN105630447B (en) * 2015-12-24 2019-04-16 小米科技有限责任公司 Adjust the method and device of text importing
CN105657497B (en) * 2016-02-01 2019-08-13 华为技术有限公司 A kind of video broadcasting method and equipment
CN105681861A (en) * 2016-03-04 2016-06-15 青岛海信电器股份有限公司 Adjusting method and system for display subtitle of terminal
CN105843393A (en) * 2016-03-30 2016-08-10 苏州合欣美电子科技有限公司 Video player for self-adaptively adjusting subtitles
CN105872845A (en) * 2016-04-18 2016-08-17 深圳Tcl数字技术有限公司 Method for intelligently regulating size of subtitles and television
CN105975447A (en) * 2016-04-27 2016-09-28 乐视控股(北京)有限公司 Font adjustment method and apparatus
CN105848004A (en) * 2016-05-16 2016-08-10 乐视控股(北京)有限公司 Caption playing method and caption playing device
CN106231105A (en) * 2016-08-04 2016-12-14 成都佳荣科技有限公司 A kind of smart mobile phone adjusts the method for projection
CN106971685B (en) * 2017-01-09 2020-12-25 义乌市智享通讯设备有限公司 Display control method and system and terminal
CN106919359A (en) * 2017-04-18 2017-07-04 苏州科技大学 A kind of display screen font size automatic adjustment system
CN107239250A (en) * 2017-07-01 2017-10-10 珠海格力电器股份有限公司 One kind regulation screen display method, device and its mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03187687A (en) * 1989-12-18 1991-08-15 Hitachi Commun Syst Inc Near-sightedness prevention television set
WO2017032035A1 (en) * 2015-08-25 2017-03-02 宇龙计算机通信科技(深圳)有限公司 Method and device for adjusting, and terminal
CN106231079A (en) * 2016-07-21 2016-12-14 乐视控股(北京)有限公司 A kind of video playback automatic brightness adjustment method and mobile terminal
CN106658220A (en) * 2016-11-11 2017-05-10 理光图像技术(上海)有限公司 Subtitle creating device, demonstration module and subtitle creating demonstration system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DVB数字广播台标/字幕插入机;张奡等;《计算机与数字工程》;20070320(第03期);全文 *

Also Published As

Publication number Publication date
CN109756788A (en) 2019-05-14
WO2019085980A1 (en) 2019-05-09

Similar Documents

Publication Publication Date Title
CN109756788B (en) Video subtitle automatic adjustment method and device, terminal and readable storage medium
CN106464959B (en) Semiconductor integrated circuit and the display device and control method for having the semiconductor integrated circuit
US20110243474A1 (en) Video image processing apparatus and video image processing method
US20100134603A1 (en) Three-dimensional information output apparatus and three-dimensional information output method
CN115552916B (en) Refresh rate adjusting method and electronic equipment
US20120287235A1 (en) Apparatus and method for processing 3-dimensional image
US10749923B2 (en) Contextual video content adaptation based on target device
CN104661104A (en) Self-adaptive interface customization device and method based on multiple perception sources
CN111405339B (en) Split screen display method, electronic equipment and storage medium
US20120038744A1 (en) Automatic 3d content detection
EP3664445B1 (en) Image processing method and device therefor
US20130308829A1 (en) Still image extraction apparatus
JP2012173683A (en) Display control device, information display apparatus, and display control method
KR20180025754A (en) Display apparatus and control method thereof
CN113709566A (en) Multimedia content playing method, device, equipment and computer storage medium
CN114489549B (en) Screen projection image processing method and device, electronic equipment and storage medium
WO2018196530A1 (en) Video information processing method, terminal, and computer storage medium
US20170324921A1 (en) Method and device for displaying multi-channel video
US11509955B2 (en) Display system, display method, and program
US20130021454A1 (en) 3d display apparatus and content displaying method thereof
KR102646048B1 (en) Apparatus for converting and transmitting horizontal vertical video based on machine learning
US20120154382A1 (en) Image processing apparatus and image processing method
US11991451B2 (en) Imaging device and imaging processing method
CN116347009B (en) Video generation method and electronic equipment
US11962743B2 (en) 3D display system and 3D display method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant