CN113542903A - Subtitle generating method and device supporting font size self-adaption - Google Patents

Subtitle generating method and device supporting font size self-adaption Download PDF

Info

Publication number
CN113542903A
CN113542903A CN202110804191.7A CN202110804191A CN113542903A CN 113542903 A CN113542903 A CN 113542903A CN 202110804191 A CN202110804191 A CN 202110804191A CN 113542903 A CN113542903 A CN 113542903A
Authority
CN
China
Prior art keywords
size
caption
user
screen
display interface
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.)
Pending
Application number
CN202110804191.7A
Other languages
Chinese (zh)
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.)
Sixiang Zhihui Hainan Technology Co ltd
Original Assignee
Sixiang Zhihui Hainan Technology 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 Sixiang Zhihui Hainan Technology Co ltd filed Critical Sixiang Zhihui Hainan Technology Co ltd
Priority to CN202110804191.7A priority Critical patent/CN113542903A/en
Publication of CN113542903A publication Critical patent/CN113542903A/en
Pending legal-status Critical Current

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/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles
    • 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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • 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
    • H04N21/4858End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention relates to the technical field of multimedia, in particular to a caption generating method and a device supporting font size self-adaptation.A off-screen caption picture is generated according to characters and font information input by a user and the size of a caption area in a display interface; the dynamic calculation of off-screen caption font size is as follows: 1. setting the default font size as F1, and calculating the width W1 of the converted off-screen caption by using F1 and font information; 2. setting the width of a subtitle area in a display interface as W, and calculating an estimated target character size F2 by using a formula F2-F1W/W1; 3. calculating the width W2 of the converted off-screen subtitles by using the F2 and the font information; 4. calculating a final character number F by using a formula F-F2 (1- (W2-W)/W); 5. and obtaining the off-screen caption picture stored in the memory. The off-screen caption word size is obtained by dynamic calculation, and the method has wide application range and high definition.

Description

Subtitle generating method and device supporting font size self-adaption
Technical Field
The invention relates to the technical field of multimedia, in particular to a subtitle generating method and device supporting font size self-adaptation.
Background
With the continuous development of multimedia related technologies, many multimedia software such as live broadcast platforms and video production platforms have the function of adding and adjusting subtitles on a display interface. For example, in some live platforms, the anchor may add subtitles to illustrate the currently live content, enhancing the interaction with the audience. Meanwhile, the anchor can adjust and set the size of the added captions so as to be convenient for the audience to watch.
In the prior art, when a user adjusts the size of an added subtitle, the size is usually adjusted by dragging a subtitle area on a display interface with a mouse. The size of the subtitle in the subtitle area can be changed correspondingly with the change of the size of the subtitle area, and the subtitle can be adjusted to the size required by the user only by adjusting the subtitle area to the size required by the user. However, when the subtitle region is dragged, the subtitle in the subtitle region is actually enlarged in the form of a picture, and the font size of the subtitle itself is not changed, and cannot be generated adaptively.
Disclosure of Invention
It is an object of the present invention to provide a method and apparatus for generating subtitles that support font size adaptation that overcomes some or all of the deficiencies of the prior art.
According to the title generation method supporting font size self-adaptation, an off-screen title picture is generated according to characters and font information input by a user and the size of a title area in a display interface; the word size of the off-screen caption is obtained by dynamic calculation;
the dynamic calculation method of the word size used by the off-screen caption comprises the following steps:
1) setting the default font size as F1, calculating the width of the off-screen caption after the conversion by using the default font size F1 and the font information specified by the user, and setting the width as W1;
2) setting the width of a subtitle area in a display interface as W, and calculating an estimated target character size F2 by using a formula F2-F1W/W1;
3) calculating the width of the off-screen character caption after the conversion into the off-screen character caption by using the estimated target character size F2 and the character font information designated by the user, and setting the width as W2;
4) calculating a final character number F by using a formula F-F2 ═ (1- (W2-W)/W);
5) and obtaining the off-screen caption picture stored in the memory.
Preferably, the size of the finally generated off-screen caption is exactly matched with the size of the caption area in the display interface. Because the size of the finally generated off-screen caption is exactly matched with the size of the caption area in the display interface, the definition loss and the performance loss caused by zooming are avoided.
Preferably, after the off-screen caption picture is generated, the size of the off-screen caption picture is reduced to the size of the caption area of the display interface adjusted by the user, so as to obtain the final caption picture.
Preferably, the calculation method of the size of the subtitle area of the display interface adjusted by the user includes:
calculating the size of the subtitle area of the display interface adjusted by the user according to the distance moved by the user when the user executes the dragging operation, wherein the dragging operation of the user is used for adjusting the size of the subtitle area of the display interface.
Preferably, after the size is adjusted, the final caption picture is displayed in the caption area of the display interface adjusted by the user.
Preferably, in step 1), the text input by the user is first sent to the context of the device, and then the width W1 after the text is converted into the off-screen caption is calculated.
Preferably, in step 3), the characters input by the user are sent to the context of the device, and then the width W2 after being converted into the off-screen subtitle is calculated by using the estimated target font size F2 and the font information designated by the user.
Preferably, in step 5), the final font size F and the font information specified by the user are used to send the characters input by the user into the context of the device, so as to obtain the off-screen subtitle picture stored in the memory.
The invention also provides a caption generating device supporting font size self-adaptation, which adopts the caption generating method supporting font size self-adaptation.
According to the method and the device, the off-screen caption picture is generated according to the characters and font information input by the user and the size of the caption area in the display interface, and the font size of the off-screen caption is obtained by dynamic calculation, so that the font size of the caption can be generated in a self-adaptive manner, the application range is wide, and the definition is high.
Drawings
FIG. 1 is a flow chart of dynamic calculation of off-screen caption font size in embodiment 1;
Detailed Description
For a further understanding of the invention, reference should be made to the following detailed description taken in conjunction with the accompanying drawings and examples. It is to be understood that the examples are illustrative of the invention and not limiting.
Example 1
As shown in fig. 1, the present embodiment provides a subtitle generating method supporting font size adaptation, which generates an off-screen subtitle picture according to characters and font information input by a user and a size of a subtitle region in a display interface; the word size of the off-screen caption is obtained by dynamic calculation;
the dynamic calculation method of the word size used by the off-screen caption comprises the following steps:
1) setting the default font size as F1, sending characters input by a user into the context of the equipment by using the default font size F1 and font information specified by the user, calculating the width of the characters after the characters are converted into the off-screen font, and setting the width as W1;
2) setting the width of a subtitle area in a display interface as W, and calculating an estimated target character size F2 by using a formula F2-F1W/W1;
3) sending characters input by a user into the context of the equipment by using the estimated target character size F2 and the font information designated by the user, calculating the width of the converted characters after the characters are turned into the off-screen character screen, and setting the width as W2;
4) calculating a final character number F by using a formula F-F2 ═ (1- (W2-W)/W);
5) and sending the characters input by the user into the context of the equipment by using the final character size F and the font information specified by the user to obtain the off-screen caption picture stored in the memory.
The size of the finally generated off-screen caption is exactly matched with the size of a caption area in the display interface. Because the size of the finally generated off-screen caption is exactly matched with the size of the caption area in the display interface, the definition loss and the performance loss caused by zooming are avoided. And after the off-screen caption picture is generated, reducing the size of the off-screen caption picture to the size of the caption area of the display interface adjusted by the user to obtain the final caption picture. The calculation method of the size of the caption area of the display interface adjusted by the user comprises the following steps: calculating the size of the subtitle area of the display interface adjusted by the user according to the distance moved by the user when the user executes the dragging operation, wherein the dragging operation of the user is used for adjusting the size of the subtitle area of the display interface. And after the size is adjusted, finally displaying the caption picture in the caption area of the display interface adjusted by the user.
The invention also provides a caption generating device supporting font size self-adaptation, which adopts the caption generating method supporting font size self-adaptation.
The present invention and its embodiments have been described above schematically, without limitation, and what is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. Therefore, if the person skilled in the art receives the teaching, without departing from the spirit of the invention, the person skilled in the art shall not inventively design the similar structural modes and embodiments to the technical solution, but shall fall within the scope of the invention.

Claims (9)

1. A subtitle generating method supporting font size self-adaptation is characterized in that: generating an off-screen caption picture according to characters and font information input by a user and the size of a caption area in a display interface; the word size of the off-screen caption is obtained by dynamic calculation;
the dynamic calculation method of the word size used by the off-screen caption comprises the following steps:
1) setting the default font size as F1, calculating the width of the off-screen caption after the conversion by using the default font size F1 and the font information specified by the user, and setting the width as W1;
2) setting the width of a subtitle area in a display interface as W, and calculating an estimated target character size F2 by using a formula F2-F1W/W1;
3) calculating the width of the off-screen character caption after the conversion into the off-screen character caption by using the estimated target character size F2 and the character font information designated by the user, and setting the width as W2;
4) calculating a final character number F by using a formula F-F2 ═ (1- (W2-W)/W);
5) and obtaining the off-screen caption picture stored in the memory.
2. The method for generating subtitles according to claim 1, wherein the method comprises the following steps: the size of the finally generated off-screen caption is exactly matched with the size of a caption area in the display interface.
3. The method for generating subtitles according to claim 2, wherein the method comprises the following steps: and after the off-screen caption picture is generated, reducing the size of the off-screen caption picture to the size of the caption area of the display interface adjusted by the user to obtain the final caption picture.
4. The method for generating subtitles according to claim 3, wherein the method comprises the steps of: the calculation method of the size of the caption area of the display interface adjusted by the user comprises the following steps:
calculating the size of the subtitle area of the display interface adjusted by the user according to the distance moved by the user when the user executes the dragging operation, wherein the dragging operation of the user is used for adjusting the size of the subtitle area of the display interface.
5. The method for generating subtitles according to claim 4, wherein the method comprises the following steps: and after the size is adjusted, finally displaying the caption picture in the caption area of the display interface adjusted by the user.
6. The method for generating subtitles according to claim 5, wherein the method comprises: in the step 1), firstly, characters input by a user are sent into the context of the equipment, and then the width W1 after the characters are converted into off-screen subtitles is calculated.
7. The method for generating subtitles according to claim 6, wherein the method comprises: in step 3), firstly, the characters input by the user are sent into the context of the equipment, and then the width W2 after the characters are converted into off-screen subtitles is calculated by using the estimated target character size F2 and the font information specified by the user.
8. The method for generating subtitles according to claim 7, wherein the method comprises: and 5) sending the characters input by the user into the context of the equipment by using the final character size F and the font information specified by the user to obtain the off-screen caption picture stored in the memory.
9. A subtitle generating apparatus supporting font size adaptation, characterized in that: which employs a method of subtitle generation supporting font size adaptation as claimed in any of claims 1-8.
CN202110804191.7A 2021-07-16 2021-07-16 Subtitle generating method and device supporting font size self-adaption Pending CN113542903A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110804191.7A CN113542903A (en) 2021-07-16 2021-07-16 Subtitle generating method and device supporting font size self-adaption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110804191.7A CN113542903A (en) 2021-07-16 2021-07-16 Subtitle generating method and device supporting font size self-adaption

Publications (1)

Publication Number Publication Date
CN113542903A true CN113542903A (en) 2021-10-22

Family

ID=78099637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110804191.7A Pending CN113542903A (en) 2021-07-16 2021-07-16 Subtitle generating method and device supporting font size self-adaption

Country Status (1)

Country Link
CN (1) CN113542903A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115052126A (en) * 2022-08-12 2022-09-13 深圳市稻兴实业有限公司 Ultra-high definition video conference analysis management system based on artificial intelligence

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158940A (en) * 2007-11-21 2008-04-09 金蝶软件(中国)有限公司 Method and device for dwindling character stuffing in target region
CN102799398A (en) * 2012-06-27 2012-11-28 用友软件股份有限公司 Table body scaling device and table body scaling method
CN106331828A (en) * 2016-08-19 2017-01-11 暴风集团股份有限公司 Method and system for adjusting subtitle according to picture
CN110363832A (en) * 2019-07-24 2019-10-22 广州华多网络科技有限公司 Method for generating captions and device
CN111984351A (en) * 2020-08-07 2020-11-24 中移(杭州)信息技术有限公司 Page adaptation method, electronic device and computer-readable storage medium
CN112055261A (en) * 2020-07-14 2020-12-08 北京百度网讯科技有限公司 Subtitle display method and device, electronic equipment and storage medium
CN112437354A (en) * 2019-08-26 2021-03-02 海信视像科技股份有限公司 Subtitle display control method and display equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158940A (en) * 2007-11-21 2008-04-09 金蝶软件(中国)有限公司 Method and device for dwindling character stuffing in target region
CN102799398A (en) * 2012-06-27 2012-11-28 用友软件股份有限公司 Table body scaling device and table body scaling method
CN106331828A (en) * 2016-08-19 2017-01-11 暴风集团股份有限公司 Method and system for adjusting subtitle according to picture
CN110363832A (en) * 2019-07-24 2019-10-22 广州华多网络科技有限公司 Method for generating captions and device
CN112437354A (en) * 2019-08-26 2021-03-02 海信视像科技股份有限公司 Subtitle display control method and display equipment
CN112055261A (en) * 2020-07-14 2020-12-08 北京百度网讯科技有限公司 Subtitle display method and device, electronic equipment and storage medium
CN111984351A (en) * 2020-08-07 2020-11-24 中移(杭州)信息技术有限公司 Page adaptation method, electronic device and computer-readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115052126A (en) * 2022-08-12 2022-09-13 深圳市稻兴实业有限公司 Ultra-high definition video conference analysis management system based on artificial intelligence

Similar Documents

Publication Publication Date Title
US11418832B2 (en) Video processing method, electronic device and computer-readable storage medium
US9836437B2 (en) Screencasting for multi-screen applications
CN111541930B (en) Live broadcast picture display method and device, terminal and storage medium
US20140143691A1 (en) User interface generating apparatus and associated method
WO2016150281A1 (en) Method, mobile terminal and system for displaying preview video file
US10462415B2 (en) Systems and methods for generating a video clip and associated closed-captioning data
WO2022126773A1 (en) Text display method and system, electronic device, and storage medium
CN102843603A (en) Intelligent television and method for controlling caption thereof
CN105808733A (en) Display method and apparatus
US20150138210A1 (en) Method and system for controlling display parameters through multiple pipelines
US9774821B2 (en) Display apparatus and control method thereof
CN113542903A (en) Subtitle generating method and device supporting font size self-adaption
CN115022703B (en) Rolling caption display method and device
JP2024513380A (en) Subtitle processing methods, devices, devices and storage media
JP7164637B2 (en) Volume display method, device, terminal device and storage medium
JP2009053664A (en) Method for controlling video content display, display and storage medium
JP2013161205A5 (en)
CN101600082A (en) High definition shows the method and the device of captions in the TV conference system
US10785386B1 (en) DP to HDMI converter and associated signal conversion method
US20040212629A1 (en) Drawing processing apparatus, drawing processing method, drawing processing program and teleconference system equipped therewith
CN105025386A (en) Subtitle processing method and device
JP7363772B2 (en) Information processing device, information processing method, image processing device, image processing method, and program
CN103853318A (en) User interface generating device and relevant method
CN112312196A (en) Video subtitle making method
CN102118584B (en) Method and device for generating caption moving pictures with curve extension dynamic effect

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20211022