WO2021147461A1 - 展示字幕信息的方法、装置、电子设备和计算机可读介质 - Google Patents

展示字幕信息的方法、装置、电子设备和计算机可读介质 Download PDF

Info

Publication number
WO2021147461A1
WO2021147461A1 PCT/CN2020/127221 CN2020127221W WO2021147461A1 WO 2021147461 A1 WO2021147461 A1 WO 2021147461A1 CN 2020127221 W CN2020127221 W CN 2020127221W WO 2021147461 A1 WO2021147461 A1 WO 2021147461A1
Authority
WO
WIPO (PCT)
Prior art keywords
display area
information
video
subtitle
video display
Prior art date
Application number
PCT/CN2020/127221
Other languages
English (en)
French (fr)
Inventor
孙颖昭
李兴东
王海婷
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Priority to BR112022014283A priority Critical patent/BR112022014283A2/pt
Priority to EP20915002.8A priority patent/EP4080900A4/en
Priority to KR1020227028146A priority patent/KR20220124797A/ko
Priority to JP2022543693A priority patent/JP7334355B2/ja
Publication of WO2021147461A1 publication Critical patent/WO2021147461A1/zh
Priority to US17/868,503 priority patent/US11678024B2/en

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
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/02Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
    • G11B27/031Electronic editing of digitised analogue information signals, e.g. audio or video signals
    • G11B27/036Insert-editing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/172Processing image signals image signals comprising non-image signal components, e.g. headers or format information
    • H04N13/183On-screen display [OSD] information, e.g. subtitles or menus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/233Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234336Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by media transcoding, e.g. video is transformed into a slideshow of still pictures or audio is converted into text
    • 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/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
    • H04N21/4316Generation 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 for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
    • 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/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • 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/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47205End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
    • 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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation

Definitions

  • the present disclosure relates to the field of computer technology. Specifically, the present disclosure relates to a method, apparatus, electronic device, and computer-readable medium for displaying subtitle information.
  • the corresponding subtitles are generally displayed.
  • the user can edit the subtitles before publishing the video. It often happens that the display area of the subtitles after editing exceeds the range of the video display area, so that after the video is released ,
  • the application display page can only display the subtitle information within the video display area, and the subtitle information outside the video display area cannot be displayed, resulting in incomplete display of the subtitle information.
  • the first aspect of the present disclosure provides a method for displaying subtitle information, including:
  • the video display area Correspondingly expand the video display area based on the first expansion length and the first expansion direction within the area range corresponding to the application display page, so that the expanded video display area includes the subtitle display area;
  • the edited subtitle information is displayed in the subtitle display area.
  • a second aspect of the present disclosure provides a device for displaying subtitle information, including:
  • the first determining module is configured to determine the video display area in the application display page and the edited subtitle display area when the user's editing operation on the initial subtitle information of the video information is detected;
  • the second determining module is configured to determine the first extension for each side length of the video display area based on the area information of the video display area and the area information of the subtitle display area if the subtitle display area does not belong to the sub-area included in the video display area Length and first expansion direction;
  • An expansion module configured to expand the video display area based on the first expansion length and the first expansion direction within the area range corresponding to the application display page, so that the expanded video display area includes the subtitle display area;
  • the display module is used to display the edited subtitle information in the subtitle display area.
  • a third aspect of the present disclosure provides an electronic device, including:
  • Electronic equipment includes memory and processor
  • a computer program is stored in the memory
  • the processor is configured to execute any one of the methods in the first aspect when running a computer program.
  • a fourth aspect of the present disclosure provides a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, the method of any one of the first aspects is executed.
  • the video display area and the edited subtitle display area can be determined. If the subtitle display area does not belong to the sub-areas included in the video display area, it can be based on the video
  • the area information of the display area and the subtitle display area determines the first expansion length and the first expansion direction for each side length of the video display area, so that the area range corresponding to the application display page is based on the first expansion length and the first expansion direction
  • the expanded video display area can include the subtitle display area, so that after the video is released, the complete subtitle information can be displayed to the user in the subtitle display area.
  • the video display area is expanded so that the expanded video display area includes the subtitle display area, so that complete subtitle information can be displayed, the integrity of the subtitle display is ensured, and the display requirements of diversified subtitle information can be adapted to more The scene, which improves the user experience.
  • FIG. 1 is a schematic diagram of an embodiment of a method for displaying caption information in the present disclosure
  • FIG. 2 is a schematic diagram of an embodiment of the expansion of the video display area of the present disclosure
  • Figure 3 is a schematic diagram of an embodiment of an application scenario of the present disclosure
  • FIG. 4 is a schematic diagram of the structure of a device for displaying caption information in the present disclosure
  • FIG. 5 is a schematic diagram of the structure of the electronic device of the present disclosure.
  • the present disclosure includes:
  • Step S101 When the user's editing operation on the initial subtitle information of the video information is detected, the video display area in the application display page and the edited subtitle display area are determined;
  • the client When the client detects that the user edits the initial subtitle information of the video information, it can automatically trigger the function of expanding the video display area, and the client determines the video display area in the application display page (in this embodiment, the video display area is as Without special instructions, it refers to the video display area before expansion) and the subtitle display area after the user edits.
  • the video display area is generated by the client adaptively to the size of the application display page.
  • Step S102 If the caption display area does not belong to the sub-areas included in the video display area, based on the area information of the video display area and the area information of the caption display area, determine the first extension length and the first extension length for each side length of the video display area. Expansion direction
  • the subtitle display area (the subtitle display area in this embodiment refers to the edited subtitle display area unless otherwise specified) does not belong to any sub-area included in the video display area.
  • a possible situation is that the video The display area overlaps with the subtitle display area, and the video display area and the subtitle display area are both within the area of the canvas.
  • the size of the canvas is generally the size of the application display page; another possible situation is that the video display area and the subtitle display The area is two independent areas, and both the video display area and the subtitle display area are within the area of the canvas.
  • the client can determine the first extension direction and first extension length of each side length of the video display area based on the area information of the video display area and the edited subtitle display area.
  • the side length of the video display area can be the video display
  • the first expansion direction can be to expand the height upward or downward, or to expand the width to the left or right.
  • Step S103 correspondingly expand the video display area based on the first expansion length and the first expansion direction within the area range corresponding to the application display page, so that the expanded video display area includes the subtitle display area;
  • Step S104 Display the edited subtitle information in the subtitle display area.
  • the client can expand the length of each side of the video display area in the corresponding expansion direction based on the first expansion length and the first expansion direction of each side length within the area range corresponding to the application display page (that is, the area range corresponding to the canvas)
  • the length of the video display area is completed, so that the expanded video display area includes the above-mentioned edited subtitle display area, that is, the subtitle display area belongs to the sub-areas included in the extended video display area, so that after the video is released
  • the client can display the edited subtitle information in the subtitle display area, and the subtitle information can be fully displayed at the same time.
  • the video display area and the edited subtitle display area can be determined. If the subtitle display area does not belong to the sub-areas included in the video display area, it can be based on the video
  • the area information of the display area and the subtitle display area determines the first expansion length and the first expansion direction for each side length of the video display area, so that the area range corresponding to the application display page is based on the first expansion length and the first expansion direction
  • the expanded video display area can include the subtitle display area, so that after the video is released, the complete subtitle information can be displayed to the user in the subtitle display area.
  • the video display area is expanded so that the expanded video display area includes the subtitle display area, so that complete subtitle information can be displayed, the integrity of the subtitle display is ensured, and the display requirements of diversified subtitle information can be adapted to more The scene, which improves the user experience.
  • the editing operation includes at least one of the following:
  • Adjust the font color of the subtitles adjust the font size of the subtitles, adjust the text content of the subtitles, adjust the position of the subtitle display area, adjust the size of the subtitle display area, and adjust the shape of the subtitle display area.
  • the user's editing operation for subtitle information can be to adjust the color of the font; it can also be to adjust the size of the font.
  • the subtitle display area will be expanded accordingly; it can also be performed on the text content of the subtitles. Any one or more operations such as addition, deletion, and modification. Adding, deleting or modifying text content may cause the size of the subtitle display area to change; it can also adjust the position of the subtitle display area, for example, it will be located in the video display area Drag the subtitle display area outside the video display area; you can also adjust the size of the subtitle display area, such as expanding the subtitle display area. In this case, part of the subtitle display area may exceed the area of the video display area; also It can be to adjust the shape of the subtitle display area, such as changing the height and width of the subtitle display area.
  • the area information of any display area includes the coordinates of each end point of the display area
  • determining the first extension length and the first extension direction for each side length of the video display area includes:
  • the first target end point coordinates are determined from the end point coordinates of the video display area, and the second target end point coordinates are determined from the end point coordinates of the caption display area.
  • the first target end point coordinates and the second target end point coordinates determine the first extended length of the side length.
  • the area information of the video display area refers to the video display area before expansion in this embodiment
  • the subtitle display area refers to the edited subtitle display area in this embodiment
  • the area information of the video display area may be the video display area Or the coordinates of each end point of the subtitle display area.
  • the position relationship between the video display area and the subtitle display area can be determined according to the coordinates of the endpoints of the video display area and the coordinates of the captions display area, so that based on the position relationship, the video display area can be determined
  • the first target end point coordinates can be determined from the end point coordinates of the video display area
  • the second target end point coordinates can be determined from the end point coordinates of the caption display area.
  • the coordinate expansion distance corresponding to the dimension of the side length is determined based on the first target endpoint coordinates and the second target endpoint coordinates, and the coordinate expansion distance is converted into the first expansion length on the application display page.
  • the coordinates of the first target end point is the smallest coordinate on the y-axis among the coordinates of the end points of the video display area
  • the coordinates of the second target end point are The smallest coordinate on the y-axis among the endpoint coordinates of the caption display area
  • the coordinates of the first target end point are the coordinates of each end point of the video display area.
  • the maximum coordinate on the x-axis, and the coordinate of the second target endpoint is the maximum coordinate on the x-axis among the endpoint coordinates of the caption display area.
  • the newly-added area obtained by expanding the video display area may be rendered as a specific background color, for example, filling the newly-added area with black.
  • the method before detecting a user's editing operation on the initial subtitle information, the method further includes:
  • the client obtains the video data to be processed.
  • the video data can be the video data uploaded by the user or the video data obtained from the video stream of the server.
  • the client can send the video data to be processed.
  • a text recognition model obtained by training is preset in the server.
  • the text recognition model can perform text recognition on the audio information in the video data, thereby identifying the initial caption information, or the client can extract the audio information from the video data.
  • the client sends the audio information to the server.
  • the same server uses the text recognition model to perform text recognition on the audio data to obtain the initial subtitle information.
  • the way the client extracts the audio information can reduce the data processing pressure of the server and speed up the return to the client.
  • the speed of subtitle information reduces the time delay of data processing.
  • the client can process the video data to be processed to obtain the video information.
  • the specific processing process is to encode and render the video data, so that the video information and initial subtitle information can be displayed on the application display page, and the video information can be displayed in the application.
  • Preview and display in the video display area before the expansion of the page, the initial subtitle information can be previewed and displayed in the subtitle display area before editing in the application display page, which is equivalent to the preview display to the user, the video after the video is released, and the display of the subtitles.
  • the display of the video and subtitles provided for preview display can also only provide the relative positional relationship between the display area of the video and the subtitles, that is, the correlation between the two display areas (the video display area before expansion and the subtitle display area before editing) The positional relationship remains unchanged, and the size of the two display areas after the actual release may be different from the size of the two display areas provided for preview.
  • the user Before the video is released, the user can edit the initial subtitle information based on the previewed video information and the initial subtitle information. After the user edits, the client will also preview the displayed video information and the edited initial subtitle information.
  • the same video information can Preview and display in the video display area before the expansion of the above application display page.
  • the edited initial subtitle information can be previewed and displayed in the edited subtitle display area on the application display page, or two display areas (the video display area before expansion and The relative positional relationship of the edited subtitle display area) remains unchanged, and the size of the two display areas after the actual release may be different from the size of the two display areas provided for preview. At this time, the edited subtitle display area may not belong to the sub-areas included in the video display area.
  • the video display area expansion function described in the embodiment of the present disclosure needs to be triggered.
  • the method further includes:
  • the edited subtitle information is determined based on the editing operation and the initial subtitle information
  • the client When receiving a video release instruction, in general, in order to prevent the user from changing the relevant attributes of the video information, the client needs to obtain the video data again, and the video data is also encoded and rendered to obtain the video information, and the video information is combined with the video information.
  • the edited original subtitle information is synthesized to obtain the video information carrying the edited original subtitle information.
  • the video data has been processed before the editing to obtain the video information, or it can be directly based on the video information and the edited video information.
  • the initial caption information is synthesized, and the video information carrying the edited initial caption information is synthesized.
  • the method after performing video synthesis based on video data and edited subtitle information, and after synthesizing the video information carrying the edited subtitle information, the method further includes:
  • the above editing operation of the initial subtitle information triggers the client to expand the video display area.
  • the video display area before the expansion is generated by the client adapting to the size of the application display page to ensure that the user can watch the video.
  • the display area of the video information will not change, that is, the video information is displayed in the video display area before the expansion, so that the change of the subtitle display area will not affect the change of the video display area, avoiding the video
  • the deformation and other phenomena of the video ensure the display effect of the video.
  • the video information and initial subtitle information are obtained, and the video information and initial subtitle information are previewed and displayed.
  • the video information can be previewed and displayed in the video display area before the expansion, and the initial subtitle information can be previewed and displayed in the subtitle display area before editing.
  • Subtitle information
  • the subtitle display area (before editing) is inside the video display area (before expansion), so that after the video is released, the initial subtitle information in the subtitle display area (before editing) can be fully displayed;
  • the user can edit the initial subtitle information, such as adjusting the font size of the subtitles, adjusting the specific text content of the subtitles, tilting the subtitle display area (before editing), etc.
  • the edited subtitle display area is shown in the figure, and the same can be expanded
  • the video information is previewed and displayed in the previous video display area, and the edited initial subtitle information is previewed and displayed in the edited subtitle display area, but part of the (edited) subtitle display area at this time is in the (pre-expanded) video Outside the display area, the subtitles displayed outside the video display area after the video is released (before expansion) cannot be presented to users;
  • the user's editing operations on the subtitles in this disclosure will automatically trigger the client to perform the video display area expansion function, as shown in the figure (extended) video display area includes (edited) subtitle display Area, the newly added area can be filled with black, so that after detecting the user’s video release instruction, the client synthesizes the video information and the edited initial subtitle information to obtain the video information carrying the edited initial subtitle information, and then The application display page displays the video information that carries the edited initial subtitle information.
  • the final display situation after the specific video is released is: the video display area remains unchanged, that is, the video is still displayed in the video display area before editing, avoiding the video
  • the expansion of the display area causes the deformation of the video and other situations, and the subtitles are completely displayed in the edited subtitle display area.
  • FIG. 4 is a schematic structural diagram of a device for displaying subtitle information provided by an embodiment of the disclosure, and the device includes:
  • the first determining module 401 is configured to determine the video display area in the application display page and the edited subtitle display area when the user's editing operation on the initial subtitle information of the video information is detected;
  • the second determining module 402 is configured to determine the first length of each side of the video display area based on the area information of the video display area and the area information of the subtitle display area if the caption display area does not belong to the sub-area included in the video display area. Extension length and first extension direction;
  • the expansion module 403 is configured to expand the video display area based on the first expansion length and the first expansion direction within the area range corresponding to the application display page, so that the expanded video display area includes the subtitle display area;
  • the display module 404 is used to display the edited subtitle information in the subtitle display area.
  • the editing operation includes at least one of the following:
  • Adjust the font color of the subtitles adjust the font size of the subtitles, adjust the text content of the subtitles, adjust the position of the subtitle display area, adjust the size of the subtitle display area, and adjust the shape of the subtitle display area.
  • the area information of any display area includes the coordinates of each end point of the display area
  • the second determining module 402 is specifically configured to:
  • the first target end point coordinates are determined from the end point coordinates of the video display area, and the second target end point coordinates are determined from the end point coordinates of the caption display area.
  • the first target end point coordinates and the second target end point coordinates determine the first extended length of the side length.
  • the device further includes an acquiring module, a sending module, and a receiving module;
  • the obtaining module is configured to obtain the video data to be processed, and obtain audio information based on the video data;
  • the sending module is used to send the audio information to the server, so that the server can perform text recognition on the audio information to obtain the initial caption information;
  • the receiving module is used to receive the initial caption information returned by the server.
  • the device further includes a third determination module and a synthesis module
  • the third determining module is used to detect the video release instruction based on the editing Operation and initial subtitle information, confirm the edited subtitle information;
  • the synthesis module is used to perform video synthesis based on the video data and the edited subtitle information, and synthesize to obtain the video information carrying the edited subtitle information.
  • the display module is also used for displaying the video area before the expansion. Show video information in.
  • FIG. 5 shows a schematic structural diagram of an electronic device (such as the client in FIG. 1) 600 suitable for implementing embodiments of the present disclosure.
  • the client in the embodiments of the present disclosure can be applied to mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle terminals (e.g., vehicle navigation Terminals) and other mobile terminals and fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 5 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device includes a memory and a processor.
  • the processor here may be referred to as the processing device 601 below, and the memory may include a read-only memory (ROM) 602, a random access memory (RAM) 603, and a storage device 608 below.
  • ROM read-only memory
  • RAM random access memory
  • storage device 608 At least one item of, as follows:
  • the electronic device 600 may include a processing device (such as a central processing unit, a graphics processor, etc.) 601, which can be loaded into a random access device according to a program stored in a read-only memory (ROM) 602 or from a storage device 608.
  • the program in the memory (RAM) 603 executes various appropriate actions and processing.
  • various programs and data required for the operation of the electronic device 600 are also stored.
  • the processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to the bus 604.
  • the following devices can be connected to the I/O interface 605: including input devices 606 such as touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; including, for example, liquid crystal displays (LCD), speakers, vibration An output device 607 such as a device; a storage device 608 such as a magnetic tape and a hard disk; and a communication device 609.
  • the communication device 609 may allow the electronic device 600 to perform wireless or wired communication with other devices to exchange data.
  • FIG. 5 shows an electronic device 600 having various devices, it should be understood that it is not required to implement or have all of the illustrated devices. It may be implemented alternatively or provided with more or fewer devices.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602.
  • the processing device 601 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above.
  • Computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein.
  • This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
  • the client and server can communicate with any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
  • Communication e.g., communication network
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (e.g., the Internet), and end-to-end networks (e.g., adhoc end-to-end networks), as well as any currently known or future research and development The internet.
  • LAN local area networks
  • WAN wide area networks
  • the Internet e.g., the Internet
  • end-to-end networks e.g., adhoc end-to-end networks
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs.
  • the electronic device When the above-mentioned one or more programs are executed by the electronic device, the electronic device: When detecting the user's editing operation on the initial subtitle information of the video information, determine the application display The video display area and the edited subtitle display area within the page; if the subtitle display area does not belong to the sub-areas included in the video display area, based on the area information of the video display area and the area information of the subtitle display area, determine the video display area The first expansion length and the first expansion direction of each side length; within the area corresponding to the application display page, the video display area is correspondingly expanded based on the first expansion length and the first expansion direction, so that the expanded video is displayed The area includes a subtitle display area; the edited subtitle information is displayed in the subtitle display area.
  • the computer program code used to perform the operations of the present disclosure can be written in one or more programming languages or a combination thereof.
  • the above-mentioned programming languages include but are not limited to object-oriented programming languages such as Java, Smalltalk, C++, and Including conventional procedural programming languages-such as "C" language or similar programming languages.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the modules or units involved in the embodiments described in the present disclosure can be implemented in software or hardware. Among them, the name of the module or unit does not constitute a limitation on the unit itself under certain circumstances.
  • the first determining module can also be described as "when the user's editing operation on the initial subtitle information of the video information is detected, it is determined The module of the video display area in the application display page and the edited subtitle display area".
  • exemplary types of hardware logic components include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logical device (CPLD) and so on.
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • ASSP Application Specific Standard Product
  • SOC System on Chip
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium, which may contain or store a program for use by the instruction execution system, apparatus, or device or in combination with the instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • the machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing.
  • machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • a method for displaying subtitle information including:
  • the subtitle display area does not belong to the sub-areas included in the video display area, based on the area information of the video display area and the area information of the subtitle display area, determine the first extension length and the first extension direction for each side length of the video display area;
  • the video display area Correspondingly expand the video display area based on the first expansion length and the first expansion direction within the area range corresponding to the application display page, so that the expanded video display area includes the subtitle display area;
  • the edited subtitle information is displayed in the subtitle display area.
  • the editing operation includes at least one of the following:
  • Adjust the font color of the subtitles adjust the font size of the subtitles, adjust the text content of the subtitles, adjust the position of the subtitle display area, adjust the size of the subtitle display area, and adjust the shape of the subtitle display area.
  • the area information of any display area includes the coordinates of each end point of the display area
  • determining the first extension length and the first extension direction for each side length of the video display area includes:
  • the first target end point coordinates are determined from the end point coordinates of the video display area, and the second target end point coordinates are determined from the end point coordinates of the caption display area.
  • the first target end point coordinates and the second target end point coordinates determine the first extended length of the side length.
  • the method before the user's editing operation on the initial subtitle information is detected, the method further includes:
  • the method further includes:
  • the edited subtitle information is determined based on the editing operation and the initial subtitle information
  • the method after performing video synthesis based on video data and edited subtitle information, and after synthesizing the video information carrying the edited subtitle information, the method further includes:
  • a device for displaying subtitle information including:
  • the first determining module is configured to determine the video display area in the application display page and the edited subtitle display area when the user's editing operation on the initial subtitle information of the video information is detected;
  • the second determining module is configured to determine the first extension for each side length of the video display area based on the area information of the video display area and the area information of the subtitle display area if the subtitle display area does not belong to the sub-area included in the video display area Length and first expansion direction;
  • An expansion module configured to expand the video display area based on the first expansion length and the first expansion direction within the area range corresponding to the application display page, so that the expanded video display area includes the subtitle display area;
  • the display module is used to display the edited subtitle information in the subtitle display area.
  • the editing operation includes at least one of the following:
  • Adjust the font color of the subtitles adjust the font size of the subtitles, adjust the text content of the subtitles, adjust the position of the subtitle display area, adjust the size of the subtitle display area, and adjust the shape of the subtitle display area.
  • the area information of any display area includes the coordinates of each end point of the display area
  • the second determining module is specifically used for:
  • the first target end point coordinates are determined from the end point coordinates of the video display area, and the second target end point coordinates are determined from the end point coordinates of the caption display area.
  • the first target end point coordinates and the second target end point coordinates determine the first extended length of the side length.
  • the device further includes an acquiring module, a sending module, and a receiving module;
  • the acquiring module is configured to acquire the video data to be processed, and obtain audio information based on the video data;
  • the sending module is used to send the audio information to the server, so that the server can perform text recognition on the audio information to obtain the initial caption information;
  • the receiving module is used to receive the initial caption information returned by the server.
  • the device further includes a third determination module and a synthesis module
  • the third determining module is used to detect the video release instruction based on the editing operation And the initial subtitle information to determine the edited subtitle information;
  • the synthesis module is used to perform video synthesis based on the video data and the edited subtitle information, and synthesize to obtain the video information carrying the edited subtitle information.
  • the display module is also used for displaying the video area before the expansion. Show video information in.

Abstract

本公开提供了一种展示字幕信息的方法、装置、电子设备以及计算机可读介质。该方法包括:检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域;如果字幕展示区域不属于视频展示区域包括的子区域,则基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度以及第一扩展方向;在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括字幕展示区域;在字幕展示区域展示编辑后的字幕信息。本公开实现了字幕信息的完整展示。

Description

展示字幕信息的方法、装置、电子设备和计算机可读介质
相关申请的交叉引用
本公开要求于2020年01月21日在中国国家知识产权局提交的申请号为202010072502.0的中国专利申请的权益,其全部内容通过引用整体并入本文。
技术领域
本公开涉及计算机技术领域,具体而言,本公开涉及一种展示字幕信息的方法、装置、电子设备和计算机可读介质。
背景技术
通过应用程序播放视频时一般都会展示相应的字幕,用户在发布视频前可以对字幕进行编辑,常常发生的一种情况是编辑后字幕的展示区域超出了视频展示的区域范围,这样在视频发布后,应用展示页面上只能展示在视频展示区域范围内的字幕信息,对于视频展示区域范围外的字幕信息无法展示,导致字幕信息展示不完整。
发明内容
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
本公开的第一方面提供了一种展示字幕信息的方法,包括:
检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域;
如果字幕展示区域不属于视频展示区域包括的子区域,则基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的 各边长的第一扩展长度以及第一扩展方向;
在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括字幕展示区域;
在字幕展示区域展示编辑后的字幕信息。
本公开的第二方面提供了一种展示字幕信息的装置,包括:
第一确定模块,用于检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域;
第二确定模块,用于如果字幕展示区域不属于视频展示区域包括的子区域,则基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度以及第一扩展方向;
扩展模块,用于在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括字幕展示区域;
展示模块,用于在字幕展示区域展示编辑后的字幕信息。
本公开第三方面提供了一种电子设备,包括:
电子设备包括存储器和处理器;
存储器中存储有计算机程序;
处理器,用于在运行计算机程序时执行第一方面中任一项的方法。
本公开第四方面提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被处理器执行时执行第一方面中任一项的方法。
本公开提供的技术方案带来的有益效果是:
在本实施例中,当检测到用户针对初始字幕信息的编辑操作时,可以确定视频展示区域以及编辑后的字幕展示区域,如果字幕展示区域不属于视频展示区域包括的子区域,则可以基于视频展示区域和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度和第一扩展方向,这样基于第一扩展长度和第一扩展方向在应用程序展示页面对应的区域范围内对视频展示区域进行相应的扩展后,可以使得扩展后的视频展示 区域中包括字幕展示区域,这样视频发布后就可以在字幕展示区域中向用户展示完整的字幕信息,可见,本公开通过对视频展示区域进行扩展,使得扩展后的视频展示区域包括字幕展示区域,这样就可以展示完整的字幕信息,保证了字幕展示的完整性,可适应多样化的字幕信息的展示需求,适用于更多的场景,提升了用户体验。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开展示字幕信息的方法的一个实施例示意图;
图2为本公开视频展示区域扩展的实施例示意图;
图3为本公开应用场景的实施例示意图;
图4为本公开展示字幕信息的装置的结构示意图;
图5为本公开电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语 “一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对装置、模块或单元进行区分,并非用于限定这些装置、模块或单元一定为不同的装置、模块或单元,也并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
请参照图1,本公开的方法具体可以由客户端执行,本公开包括:
步骤S101、检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域;
当客户端检测到用户针对视频信息的初始字幕信息的编辑操作时,可以自动触发对视频展示区域进行扩展的功能,客户端确定应用展示页面内视频展示区域(在本实施例中视频展示区域如无特殊说明均指扩展前的视频展示区域)以及用户编辑完成后的字幕展示区域,该视频展示区域是客户端自适应应用展示页面的大小生成的。
步骤S102、如果字幕展示区域不属于视频展示区域包括的子区域,则基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度以及第一扩展方向;
在本实施例中字幕展示区域(在本实施例中字幕展示区域如无特殊说明均指编辑后的字幕展示区域)不属于视频展示区域包括的任一子区域的一种可能的情况是,视频展示区域与字幕展示区域部分重合,且视频展示区域和字幕展示区域都在画布的区域范围内,画布的大小一般为应用展示页面的大小;另一种可能的情况是,视频展示区域与字幕展示区域为两个相互独立的区域,且视频展示区域和字幕展示区域都在画布的区域范围内。
客户端可以基于视频展示区域的区域信息和编辑后的字幕展示区域的区域信息,确定视频展示区域的各边长的第一扩展方向和第一扩展长度,视频展示区域的边长可以是视频展示区域的高和宽,第一扩展方向可以是将高向上或向下扩展,也可以是将宽向左或向右扩展。
步骤S103、在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括字幕展示区域;
步骤S104、在字幕展示区域展示编辑后的字幕信息。
客户端可以在应用展示页面对应的区域范围(即画布对应的区域范围)内,基于各边长的第一扩展长度和第一扩展方向对视频展示区域的各边长在相应的扩展方向扩展相应的长度,从而完成视频展示区域的扩展,这样可以使得扩展后的视频展示区域中包括上述编辑后的字幕展示区域,即字幕展示区域属于扩展后的视频展示区域包括的子区域,从而视频发布后客户端可以在字幕展示区域展示编辑后的字幕信息,同时该字幕信息可以完整展示。
在本实施例中,当检测到用户针对初始字幕信息的编辑操作时,可以确定视频展示区域以及编辑后的字幕展示区域,如果字幕展示区域不属于视频展示区域包括的子区域,则可以基于视频展示区域和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度和第一扩展方向,这样基于第一扩展长度和第一扩展方向在应用程序展示页面对应的区域范围内对视频展示区域进行相应的扩展后,可以使得扩展后的视频展示区域中包括字幕展示区域,这样视频发布后就可以在字幕展示区域中向用户展示完整的字幕信息,可见,本公开通过对视频展示区域进行扩展,使得扩展后的视频展示区域包括字幕展示区域,这样就可以展示完整的字幕信息,保证了字幕展示的完整性,可适应多样化的字幕信息的展示需求,适用于更多的场景,提升了用户体验。
根据本公开的实施例,编辑操作包括以下至少一项:
调整字幕的字体颜色、调整字幕的字体大小、调整字幕的文字内容、调整字幕展示区域的位置、调整字幕展示区域的大小、调整字幕展示区域 的形状。
在本实施中,用户针对字幕信息的编辑操作可以是调整字体的颜色;也可以是调整字体的大小,一般字体变大后字幕展示区域就会相应的扩大;还可以是对字幕的文字内容进行增加、删除以及修改等任意一项或多项的操作,增加、删除或修改文字内容均可能导致字幕展示区域的大小发生变化;还可以是调整字幕展示区域的位置,例如将位于视频展示区域内的字幕展示区域拖动到视频展示区域外;还可以是调整字幕展示区域的大小,例如扩大字幕展示区域,这种情况下也可能导致字幕展示区域的部分区域超出视频展示区域的区域范围;还可以是调整字幕展示区域的形状,例如改变字幕展示区域高和宽的长度。
根据本公开的实施例,任一展示区域的区域信息包括展示区域的各端点坐标;
基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度以及第一扩展方向,包括:
基于视频展示区域的各端点坐标和字幕展示区域的各端点坐标,确定视频展示区域和字幕展示区域的位置关系;
基于位置关系,确定针对视频展示区域的各边长的第一扩展方向;
对于视频展示区域的各边长,基于边长的第一扩展方向,从视频展示区域的端点坐标中确定第一目标端点坐标,同时从字幕展示区域的端点坐标中确定第二目标端点坐标,基于第一目标端点坐标和第二目标端点坐标,确定边长的第一扩展长度。
在本实施例中,视频展示区域(本实施例中指的是扩展前的视频展示区域)或字幕展示区域(本实施例中指的是编辑后的字幕展示区域)的区域信息可以是该视频展示区域或字幕展示区域的各端点坐标。
在应用展示页面对应的坐标系中,可以根据视频展示区域的各端点坐标以及字幕展示区域的各端点坐标确定视频展示区域和字幕展示区域的位置关系,从而基于该位置关系,可以确定视频展示区域的各边长的第一扩展方向,例如,如图2,在纵向维度上,字幕展示区域在视频展示区域的下方,则将可以将视频展示区域的高向下扩展。
对于视频展示区域的各边长,基于该边长的第一扩展方向可以从视频展示区域的端点坐标中确定第一目标端点坐标,同时从字幕展示区域的端点坐标中确定第二目标端点坐标,基于第一目标端点坐标和第二目标端点坐标确定该边长所在维度对应的坐标扩展距离,将该坐标扩展距离转化为应用展示页面上的第一扩展长度。例如,如图2,对于将视频展示区域的高向下扩展的场景,第一目标端点的坐标即为视频展示区域的各端点坐标中y轴上的最小坐标,第二目标端点的坐标即为字幕展示区域的各端点坐标中y轴上的最小坐标,计算第一目标端点坐标与第二目标端点坐标在y轴上的差值,该差值即为高的坐标扩展距离,将该坐标扩展距离转化为高的第一扩展长度,同样的,对于图2中视频展示区域还需要向右扩展,则对于视频展示区域的宽,第一目标端点的坐标即为视频展示区域的各端点坐标中x轴上的最大坐标,第二目标端点的坐标即为字幕展示区域的各端点坐标中x轴上的最大坐标,计算第一目标端点坐标与第二目标端点坐标在x轴上的差值,即为宽的坐标扩展距离,将该坐标扩展距离转化为宽的第一扩展长度。
在本实施中,还可以对各端点坐标进行归一化处理,将各端点坐标的x值和y值限制在0至1的范围内。
在本实施例中,可以将扩展视频展示区域得到的新增区域渲染为特定的背景色,例如用黑色填充新增区域。
根据本公开的实施例,在检测到用户针对初始字幕信息的编辑操作之前,该方法还包括:
获取待处理的视频数据,并基于视频数据得到音频信息;
将音频信息发送至服务器,以便于服务器对音频信息进行文字识别得到初始字幕信息;
接收服务器返回的初始字幕信息。
在本实施例中,客户端获取待处理的视频数据,该视频数据可以是用户上传的视频数据,也可以是从服务器的视频流中获取的视频数据,客户端可以将待处理的视频数据发送给服务器,服务器中预置有训练得到的文字识别模型,文字识别模型可以对视频数据中的音频信息进行文字识别, 从而识别得到初始字幕信息,还可以是客户端提取视频数据中的音频信息,客户端将音频信息发送给服务器,同样的服务器通过文字识别模型对音频数据进行文字识别得到初始字幕信息,客户端提取得到音频信息的方式可以减小服务器的数据处理压力,加快向客户端返回初始字幕信息的速度,减小了数据处理的时延。
客户端可以对待处理的视频数据进行处理从而得到视频信息,具体的处理过程是对视频数据进行编码和渲染等,从而可以在应用展示页面上展示视频信息和初始字幕信息,视频信息可以在应用展示页面的上述扩展前的视频展示区域中预览展示,初始字幕信息可以在应用展示页面中编辑前的字幕展示区域中预览展示,相当于向用户预览展示、视频发布后视频以及字幕的展示情况,可以理解的是,提供预览展示的视频以及字幕的展示情况也可以只提供视频和字幕的展示区域的相对位置关系,即两展示区域(扩展前的视频展示区域以及编辑前的字幕展示区域)的相关位置关系不变,实际发布后的两展示区域的大小与提供预览的两展示区域的大小可以不同。
在视频发布前,用户可以基于预览展示的视频信息和初始字幕信息,对初始字幕信息进行编辑,用户编辑完成后,客户端同样预览展示视频信息以及编辑后的初始字幕信息,同样的视频信息可以在上述应用展示页面的扩展前的视频展示区域中预览展示,编辑后的初始字幕信息可以在应用展示页面中编辑后的字幕展示区域中预览展示,或两展示区域(扩展前的视频展示区域以及编辑后的字幕展示区域)的相对位置关系不变,实际发布后的两展示区域的大小与提供预览的两展示区域的大小可以不同。这时编辑后的字幕展示区域有可能不属于视频展示区域包括的子区域,为了使得视频发布后,编辑后的初始字幕信息能够完全展示,需要触发本公开实施例描述的视频展示区域扩展功能。
根据本公开的实施例,在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展之后,该方法还包括:
检测到视频发布指令时,基于编辑操作和初始字幕信息,确定编辑后 的字幕信息;
基于视频数据和编辑后的字幕信息进行视频合成,合成得到携带有编辑后的字幕信息的视频信息。
在接收到视频发布指令时,一般情况下,为防止用户对视频信息的相关属性有所更改,客户端需要重新获取视频数据,同样的将视频数据进行编码和渲染得到视频信息,将视频信息与编辑后的初始字幕信息进行合成,合成得到携带有编辑后的初始字幕信息的视频信息,当然,如上述在编辑前已经对视频数据处理得到视频信息,也可以直接基于该视频信息和编辑后的初始字幕信息进行合成,合成得到携带有编辑后的初始字幕信息的视频信息。
根据本公开的实施例,基于视频数据和编辑后的字幕信息进行视频合成,合成得到携带有编辑后的字幕信息的视频信息之后,该方法还包括:
在扩展前的视频展示区域中展示视频信息。
如上述对初始字幕信息的编辑操作触发客户端对视频展示区域进行了扩展,在本实施中,扩展前的视频展示区域是客户端自适应应用展示页面的大小生成的,为保证用户观看视频的体验,视频展示区域扩展后,视频信息的展示区域不会发生变化,即在扩展前的视频展示区域中展示视频信息,这样字幕展示区域的变化不会影响到视频展示区域的变化,避免了视频的变形等现象,保证了视频的展示效果。
下面,结合图3,对本公开实施例的应用场景进行描述。
待处理的视频数据处理后得到视频信息和初始字幕信息,预览展示视频信息和初始字幕信息,可以在上述扩展前的视频展示区域中预览展示视频信息,在编辑前的字幕展示区域中预览展示初始字幕信息;
编辑前,如图(编辑前的)字幕展示区域在(扩展前的)视频展示区域内部,这样视频发布后,(编辑前的)字幕展示区域中的初始字幕信息可以完整展示;
用户可以编辑初始字幕信息,例如调整字幕的字体大小、调整字幕的具体文字内容、将(编辑前的)字幕展示区域倾斜等,编辑后的字幕展示区域如图所示,同样的,可以在扩展前的视频展示区域中预览展示视频信 息,在编辑后的字幕展示区域中预览展示编辑后的初始字幕信息,但是这时的(编辑后的)字幕展示区域的部分区域在(扩展前的)视频展示区域的外部,视频发布后(扩展前的)视频展示区域外部展示的字幕无法向用户呈现;
为了使得视频发布后可以展示完整字幕,本公开中用户针对字幕的编辑操作会自动触发客户端进行视频展示区域扩展功能,如图中(扩展后的)视频展示区域包括(编辑后的)字幕展示区域,可以将新增的区域用黑色填充,这样检测到用户的视频发布指令后,客户端将视频信息和编辑后的初始字幕信息合成得到携带有编辑后的初始字幕信息的视频信息,并在应用展示页面上展示携带有编辑后的初始字幕信息的视频信息,具体的视频发布后最终的展示情况是:视频展示区域不变,即视频还是在编辑前的视频展示区域中展示,避免了视频展示区域的扩展导致视频的变形等情况的发生,字幕在编辑后的字幕展示区域中完全展示。
图4为本公开实施例提供的一种展示字幕信息的装置的结构示意图,该装置包括:
第一确定模块401,用于检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域;
第二确定模块402,用于如果字幕展示区域不属于视频展示区域包括的子区域,则基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度以及第一扩展方向;
扩展模块403,用于在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括字幕展示区域;
展示模块404,用于在字幕展示区域展示编辑后的字幕信息。
根据本公开的实施例,编辑操作包括以下至少一项:
调整字幕的字体颜色、调整字幕的字体大小、调整字幕的文字内容、调整字幕展示区域的位置、调整字幕展示区域的大小、调整字幕展示区域的形状。
根据本公开的实施例,任一展示区域的区域信息包括展示区域的各端点坐标;
第二确定模块402,具体用于:
基于视频展示区域的各端点坐标和字幕展示区域的各端点坐标,确定视频展示区域和字幕展示区域的位置关系;
基于位置关系,确定针对视频展示区域的各边长的第一扩展方向;
对于视频展示区域的各边长,基于边长的第一扩展方向,从视频展示区域的端点坐标中确定第一目标端点坐标,同时从字幕展示区域的端点坐标中确定第二目标端点坐标,基于第一目标端点坐标和第二目标端点坐标,确定边长的第一扩展长度。
根据本公开的实施例,该装置还包括获取模块、发送模块以及接收模块;
在第一确定模块401检测到用户针对初始字幕信息的编辑操作之前,获取模块,用于获取待处理的视频数据,并基于视频数据得到音频信息;
发送模块,用于将音频信息发送至服务器,以便于服务器对音频信息进行文字识别得到初始字幕信息;
接收模块,用于接收服务器返回的初始字幕信息。
根据本公开的实施例,该装置还包括第三确定模块和合成模块;
在扩展模块在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展之后,第三确定模块,用于在检测到视频发布指令时,基于编辑操作和初始字幕信息,确定编辑后的字幕信息;
合成模块,用于基于视频数据和编辑后的字幕信息进行视频合成,合成得到携带有编辑后的字幕信息的视频信息。
根据本公开的实施例,在合成模块基于视频数据和编辑后的字幕信息进行视频合成,合成得到携带有编辑后的字幕信息的视频信息之后,展示模块,还用于在扩展前的视频展示区域中展示视频信息。
下面参考图5,其示出了适于用来实现本公开实施例的电子设备(例如图1中的客户端)600的结构示意图。本公开实施例中的客户端可以应 用于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
电子设备包括:存储器以及处理器,其中,这里的处理器可以称为下文的处理装置601,存储器可以包括下文中的只读存储器(ROM)602、随机访问存储器(RAM)603以及存储装置608中的至少一项,具体如下所示:
如图5所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,adhoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编 辑后的字幕展示区域;如果字幕展示区域不属于视频展示区域包括的子区域,则基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度以及第一扩展方向;在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括字幕展示区域;在字幕展示区域展示编辑后的字幕信息。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块或单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块或单元的名称在某种情 况下并不构成对该单元本身的限定,例如,第一确定模块还可以被描述为“检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域的模块”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,提供了一种展示字幕信息的方法,包括:
检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域;
如果字幕展示区域不属于视频展示区域包括的子区域,则基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度以及第一扩展方向;
在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括字幕展示区域;
在字幕展示区域展示编辑后的字幕信息。
根据本公开的实施例,编辑操作包括以下至少一项:
调整字幕的字体颜色、调整字幕的字体大小、调整字幕的文字内容、调整字幕展示区域的位置、调整字幕展示区域的大小、调整字幕展示区域的形状。
根据本公开的实施例,任一展示区域的区域信息包括展示区域的各端点坐标;
基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度以及第一扩展方向,包括:
基于视频展示区域的各端点坐标和字幕展示区域的各端点坐标,确定视频展示区域和字幕展示区域的位置关系;
基于位置关系,确定针对视频展示区域的各边长的第一扩展方向;
对于视频展示区域的各边长,基于边长的第一扩展方向,从视频展示区域的端点坐标中确定第一目标端点坐标,同时从字幕展示区域的端点坐标中确定第二目标端点坐标,基于第一目标端点坐标和第二目标端点坐标,确定边长的第一扩展长度。
根据本公开的实施例,检测到用户针对初始字幕信息的编辑操作之前,方法还包括:
获取待处理的视频数据,并基于视频数据得到音频信息;
将音频信息发送至服务器,以便于服务器对音频信息进行文字识别得到初始字幕信息;
接收服务器返回的初始字幕信息。
根据本公开的实施例,在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展之后,方法还包括:
检测到视频发布指令时,基于编辑操作和初始字幕信息,确定编辑后的字幕信息;
基于视频数据和编辑后的字幕信息进行视频合成,合成得到携带有编辑后的字幕信息的视频信息。
根据本公开的实施例,基于视频数据和编辑后的字幕信息进行视频合成,合成得到携带有编辑后的字幕信息的视频信息之后,方法还包括:
在扩展前的视频展示区域中展示视频信息。
根据本公开的一个或多个实施例,还提供了一种展示字幕信息的装置的结构示意图,该装置包括:
第一确定模块,用于检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域;
第二确定模块,用于如果字幕展示区域不属于视频展示区域包括的子区域,则基于视频展示区域的区域信息和字幕展示区域的区域信息,确定针对视频展示区域的各边长的第一扩展长度以及第一扩展方向;
扩展模块,用于在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括字幕展示区域;
展示模块,用于在字幕展示区域展示编辑后的字幕信息。
根据本公开的实施例,编辑操作包括以下至少一项:
调整字幕的字体颜色、调整字幕的字体大小、调整字幕的文字内容、调整字幕展示区域的位置、调整字幕展示区域的大小、调整字幕展示区域的形状。
根据本公开的实施例,任一展示区域的区域信息包括展示区域的各端点坐标;
第二确定模块,具体用于:
基于视频展示区域的各端点坐标和字幕展示区域的各端点坐标,确定视频展示区域和字幕展示区域的位置关系;
基于位置关系,确定针对视频展示区域的各边长的第一扩展方向;
对于视频展示区域的各边长,基于边长的第一扩展方向,从视频展示区域的端点坐标中确定第一目标端点坐标,同时从字幕展示区域的端点坐标中确定第二目标端点坐标,基于第一目标端点坐标和第二目标端点坐标,确定边长的第一扩展长度。
根据本公开的实施例,该装置还包括获取模块、发送模块以及接收模块;
在第一确定模块检测到用户针对初始字幕信息的编辑操作之前,获取模块,用于获取待处理的视频数据,并基于视频数据得到音频信息;
发送模块,用于将音频信息发送至服务器,以便于服务器对音频信息进行文字识别得到初始字幕信息;
接收模块,用于接收服务器返回的初始字幕信息。
根据本公开的实施例,该装置还包括第三确定模块和合成模块;
在扩展模块在应用展示页面对应的区域范围内、基于第一扩展长度和第一扩展方向对视频展示区域进行相应的扩展之后,第三确定模块,用于检测到视频发布指令时,基于编辑操作和初始字幕信息,确定编辑后的字幕信息;
合成模块,用于基于视频数据和编辑后的字幕信息进行视频合成,合成得到携带有编辑后的字幕信息的视频信息。
根据本公开的实施例,在合成模块基于视频数据和编辑后的字幕信息进行视频合成,合成得到携带有编辑后的字幕信息的视频信息之后,展示模块,还用于在扩展前的视频展示区域中展示视频信息。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所 限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (10)

  1. 一种展示字幕信息的方法,包括:
    检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域;
    如果所述字幕展示区域不属于所述视频展示区域包括的子区域,则基于所述视频展示区域的区域信息和所述字幕展示区域的区域信息,确定针对所述视频展示区域的各边长的第一扩展长度以及第一扩展方向;
    在所述应用展示页面对应的区域范围内、基于所述第一扩展长度和所述第一扩展方向对所述视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括所述字幕展示区域;
    在所述字幕展示区域展示编辑后的字幕信息。
  2. 根据权利要求1所述的方法,其中,所述编辑操作包括以下至少一项:
    调整字幕的字体颜色、调整字幕的字体大小、调整字幕的文字内容、调整字幕展示区域的位置、调整字幕展示区域的大小、调整字幕展示区域的形状。
  3. 根据权利要求1或2所述的方法,其中,任一展示区域的区域信息包括展示区域的各端点坐标;
    所述基于所述视频展示区域的区域信息和所述字幕展示区域的区域信息,确定针对所述视频展示区域的各边长的第一扩展长度以及第一扩展方向,包括:
    基于所述视频展示区域的各端点坐标和所述字幕展示区域的各端点坐标,确定所述视频展示区域和所述字幕展示区域的位置关系;
    基于所述位置关系,确定针对所述视频展示区域的各边长的第一扩展方向;
    对于所述视频展示区域的各边长,基于所述边长的第一扩展方向,从所述视频展示区域的端点坐标中确定第一目标端点坐标,同时从所述字幕展示区域的端点坐标中确定第二目标端点坐标,基于所述第一目标端点坐 标和所述第二目标端点坐标,确定所述边长的第一扩展长度。
  4. 根据权利要求1或2所述的方法,其中,所述检测到用户针对初始字幕信息的编辑操作之前,所述方法还包括:
    获取待处理的视频数据,并基于所述视频数据得到音频信息;
    将所述音频信息发送至服务器,以便于所述服务器对所述音频信息进行文字识别得到初始字幕信息;
    接收所述服务器返回的所述初始字幕信息。
  5. 根据权利要求4所述的方法,其中,在所述应用展示页面对应的区域范围内、基于所述第一扩展长度和所述第一扩展方向对所述视频展示区域进行相应的扩展之后,所述方法还包括:
    检测到视频发布指令时,基于所述编辑操作和所述初始字幕信息,确定所述编辑后的字幕信息;
    基于所述视频数据和所述编辑后的字幕信息进行视频合成,合成得到携带有所述编辑后的字幕信息的视频信息。
  6. 根据权利要求5所述的方法,其中,在合成得到携带有所述编辑后的字幕信息的视频信息之后,所述方法还包括:
    在扩展前的所述视频展示区域中展示所述视频信息。
  7. 一种展示字幕信息的装置,包括:
    第一确定模块,用于检测到用户针对视频信息的初始字幕信息的编辑操作时,确定应用展示页面内的视频展示区域以及编辑后的字幕展示区域;
    第二确定模块,用于如果所述字幕展示区域不属于所述视频展示区域包括的子区域,则基于所述视频展示区域的区域信息和所述字幕展示区域的区域信息,确定针对所述视频展示区域的各边长的第一扩展长度以及第一扩展方向;
    扩展模块,用于在所述应用展示页面对应的区域范围内、基于所述第一扩展长度和所述第一扩展方向对所述视频展示区域进行相应的扩展,以使得扩展后的视频展示区域中包括所述字幕展示区域;
    展示模块,用于在所述字幕展示区域展示编辑后的字幕信息。
  8. 根据权利要求7所述的装置,其中,所述装置还包括:
    获取模块,用于获取待处理的视频数据,并基于所述视频数据得到音频信息;
    发送模块,用于将所述音频信息发送至服务器,以便于所述服务器对所述音频信息进行文字识别得到初始字幕信息;
    接收模块,用于接收所述服务器返回的所述初始字幕信息。
  9. 一种电子设备,包括:
    所述电子设备包括存储器和处理器;
    所述存储器中存储有计算机程序;
    所述处理器,用于在运行所述计算机程序时执行权利要求1-6任一项所述的方法。
  10. 一种计算机可读介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一项所述的方法。
PCT/CN2020/127221 2020-01-21 2020-11-06 展示字幕信息的方法、装置、电子设备和计算机可读介质 WO2021147461A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
BR112022014283A BR112022014283A2 (pt) 2020-01-21 2020-11-06 Método e aparelho para exibir informações de legenda, dispositivo eletrônico e meio legível por computador
EP20915002.8A EP4080900A4 (en) 2020-01-21 2020-11-06 METHOD AND APPARATUS FOR DISPLAYING SUBTITLE INFORMATION, ELECTRONIC DEVICE AND COMPUTER READABLE MEDIA
KR1020227028146A KR20220124797A (ko) 2020-01-21 2020-11-06 자막 정보 표시 방법 및 장치, 전자 디바이스 및 컴퓨터 판독 가능 매체
JP2022543693A JP7334355B2 (ja) 2020-01-21 2020-11-06 字幕情報の表示方法、装置、電子デバイス、及びコンピュータ可読媒体
US17/868,503 US11678024B2 (en) 2020-01-21 2022-07-19 Subtitle information display method and apparatus, and electronic device, and computer readable medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010072502.0A CN111225288A (zh) 2020-01-21 2020-01-21 展示字幕信息的方法、装置以及电子设备
CN202010072502.0 2020-01-21

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/868,503 Continuation US11678024B2 (en) 2020-01-21 2022-07-19 Subtitle information display method and apparatus, and electronic device, and computer readable medium

Publications (1)

Publication Number Publication Date
WO2021147461A1 true WO2021147461A1 (zh) 2021-07-29

Family

ID=70829613

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/127221 WO2021147461A1 (zh) 2020-01-21 2020-11-06 展示字幕信息的方法、装置、电子设备和计算机可读介质

Country Status (7)

Country Link
US (1) US11678024B2 (zh)
EP (1) EP4080900A4 (zh)
JP (1) JP7334355B2 (zh)
KR (1) KR20220124797A (zh)
CN (1) CN111225288A (zh)
BR (1) BR112022014283A2 (zh)
WO (1) WO2021147461A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114268829A (zh) * 2021-12-22 2022-04-01 中电金信软件有限公司 视频处理方法、装置、电子设备及计算机可读存储介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225288A (zh) * 2020-01-21 2020-06-02 北京字节跳动网络技术有限公司 展示字幕信息的方法、装置以及电子设备
CN112738629B (zh) * 2020-12-29 2023-03-10 北京达佳互联信息技术有限公司 视频展示方法、装置、电子设备和存储介质
CN112954441B (zh) * 2021-03-02 2023-06-06 北京字节跳动网络技术有限公司 视频编辑及播放方法、装置、设备、介质
CN113873221B (zh) * 2021-08-27 2023-07-18 深圳市九洲电器有限公司 字幕失真性检测方法、多媒体终端、服务器以及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11261890A (ja) * 1998-03-11 1999-09-24 Nippon Telegr & Teleph Corp <Ntt> 映像字幕挿入方法および装置並びに該映像字幕挿入方法を記録した記録媒体
CN102210162A (zh) * 2008-11-12 2011-10-05 富士通株式会社 反射式字幕移动处理装置、方法以及程序
CN102379122A (zh) * 2009-03-30 2012-03-14 Nec显示器解决方案株式会社 图像显示装置以及图像处理方法
CN103503455A (zh) * 2011-05-02 2014-01-08 华为技术有限公司 针对视频自适应和重定目标进行视频字幕重新覆盖的系统和方法
CN110177295A (zh) * 2019-06-06 2019-08-27 北京字节跳动网络技术有限公司 字幕越界的处理方法、装置和电子设备
CN111225288A (zh) * 2020-01-21 2020-06-02 北京字节跳动网络技术有限公司 展示字幕信息的方法、装置以及电子设备

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004038512A (ja) * 2002-07-03 2004-02-05 Nec Corp 情報処理端末及びそれに用いる指定タグ位置移動方法並びにそのプログラム
JP2007316613A (ja) 2006-04-26 2007-12-06 Matsushita Electric Ind Co Ltd 字幕表示制御装置
US8817188B2 (en) 2007-07-24 2014-08-26 Cyberlink Corp Systems and methods for automatic adjustment of text
JP2010157961A (ja) 2009-01-05 2010-07-15 Kadokawa Marketing Co Ltd 字幕作成システム及びプログラム
US20140240472A1 (en) * 2011-10-11 2014-08-28 Panasonic Corporation 3d subtitle process device and 3d subtitle process method
US20130308922A1 (en) * 2012-05-15 2013-11-21 Microsoft Corporation Enhanced video discovery and productivity through accessibility
CN102724458B (zh) * 2012-06-18 2016-04-06 深圳Tcl新技术有限公司 视频画面全屏显示的字幕处理方法及视频终端
CN103533256A (zh) * 2013-10-28 2014-01-22 广东威创视讯科技股份有限公司 一种字幕的处理方法,装置及字幕显示系统
CN107736032A (zh) * 2015-06-30 2018-02-23 索尼公司 接收装置、接收方法、传输装置和传输方法
US10511882B2 (en) 2016-01-26 2019-12-17 Sony Corporation Reception apparatus, reception method, and transmission apparatus
CN106210838B (zh) * 2016-07-14 2019-05-24 腾讯科技(深圳)有限公司 字幕显示方法及装置
US11070891B1 (en) 2019-12-10 2021-07-20 Amazon Technologies, Inc. Optimization of subtitles for video content

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11261890A (ja) * 1998-03-11 1999-09-24 Nippon Telegr & Teleph Corp <Ntt> 映像字幕挿入方法および装置並びに該映像字幕挿入方法を記録した記録媒体
CN102210162A (zh) * 2008-11-12 2011-10-05 富士通株式会社 反射式字幕移动处理装置、方法以及程序
CN102379122A (zh) * 2009-03-30 2012-03-14 Nec显示器解决方案株式会社 图像显示装置以及图像处理方法
CN103503455A (zh) * 2011-05-02 2014-01-08 华为技术有限公司 针对视频自适应和重定目标进行视频字幕重新覆盖的系统和方法
CN110177295A (zh) * 2019-06-06 2019-08-27 北京字节跳动网络技术有限公司 字幕越界的处理方法、装置和电子设备
CN111225288A (zh) * 2020-01-21 2020-06-02 北京字节跳动网络技术有限公司 展示字幕信息的方法、装置以及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114268829A (zh) * 2021-12-22 2022-04-01 中电金信软件有限公司 视频处理方法、装置、电子设备及计算机可读存储介质
CN114268829B (zh) * 2021-12-22 2024-01-16 中电金信软件有限公司 视频处理方法、装置、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
EP4080900A1 (en) 2022-10-26
EP4080900A4 (en) 2023-01-04
CN111225288A (zh) 2020-06-02
JP7334355B2 (ja) 2023-08-28
US11678024B2 (en) 2023-06-13
BR112022014283A2 (pt) 2022-09-20
JP2023510942A (ja) 2023-03-15
KR20220124797A (ko) 2022-09-14
US20220353586A1 (en) 2022-11-03

Similar Documents

Publication Publication Date Title
WO2021147461A1 (zh) 展示字幕信息的方法、装置、电子设备和计算机可读介质
CN109168026B (zh) 即时视频显示方法、装置、终端设备及存储介质
WO2020077856A1 (zh) 视频拍摄方法、装置、电子设备及计算机可读存储介质
WO2021179882A1 (zh) 图像的绘制方法、装置、可读介质和电子设备
WO2020253453A1 (zh) 图像切换方法、装置、电子设备及存储介质
WO2020200173A1 (zh) 文档输入内容的处理方法、装置、电子设备和存储介质
WO2020220773A1 (zh) 图片预览信息的显示方法、装置、电子设备及计算机可读存储介质
WO2020233142A1 (zh) 多媒体文件播放方法、装置、电子设备和存储介质
WO2020151599A1 (zh) 视频同步发布方法、装置、电子设备及可读存储介质
WO2020062685A1 (zh) 视频处理方法、装置、终端和介质
WO2022042389A1 (zh) 搜索结果的展示方法、装置、可读介质和电子设备
WO2020244553A1 (zh) 字幕越界的处理方法、装置和电子设备
US20240119082A1 (en) Method, apparatus, device, readable storage medium and product for media content processing
WO2022022689A1 (zh) 交互方法、装置和电子设备
EP3438852B1 (en) Electronic device and control method thereof
CN109168027B (zh) 即时视频展示方法、装置、终端设备及存储介质
JP2013542649A (ja) 仮想ビデオ・キャプチャ・デバイス
WO2024051536A1 (zh) 直播特效渲染方法、装置、设备、可读存储介质及产品
WO2021227953A1 (zh) 图像特效配置方法、图像识别方法、装置及电子设备
WO2024022179A1 (zh) 媒体内容的显示方法、装置、电子设备和存储介质
WO2023098576A1 (zh) 图像处理方法、装置、设备及介质
WO2022237810A1 (zh) 信息的显示方法、装置、电子设备及程序产品
WO2022213801A1 (zh) 视频处理方法、装置及设备
WO2021233379A1 (zh) 配置视频特效方法、装置、设备及存储介质
WO2021073204A1 (zh) 对象的显示方法、装置、电子设备及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20915002

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022543693

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2020915002

Country of ref document: EP

Effective date: 20220720

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112022014283

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 20227028146

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 112022014283

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20220719