CN109525899A - The method and device that subtitle and audio video synchronization are presented - Google Patents

The method and device that subtitle and audio video synchronization are presented Download PDF

Info

Publication number
CN109525899A
CN109525899A CN201811376338.1A CN201811376338A CN109525899A CN 109525899 A CN109525899 A CN 109525899A CN 201811376338 A CN201811376338 A CN 201811376338A CN 109525899 A CN109525899 A CN 109525899A
Authority
CN
China
Prior art keywords
subtitle
data
show
drawn
state
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
CN201811376338.1A
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.)
Qingdao Hisense Media Network Technology Co Ltd
Original Assignee
Qingdao Hisense Media Network 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 Qingdao Hisense Media Network Technology Co Ltd filed Critical Qingdao Hisense Media Network Technology Co Ltd
Priority to CN201811376338.1A priority Critical patent/CN109525899A/en
Publication of CN109525899A publication Critical patent/CN109525899A/en
Pending legal-status Critical Current

Links

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/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • 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/4318Generation of visual interfaces for content selection or interaction; Content or additional data rendering by altering the content in the rendering process, e.g. blanking, blurring or masking an image region
    • 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
    • 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/278Subtitling

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Circuits (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides the method and device of a kind of subtitle and audio video synchronization presentation.This method comprises: when video starts to play, the display of a subtitle is carried out according to following Subtitle Demonstration process: the data of a subtitle are taken out from the queue of storage caption data, the data of one subtitle include at least the time started, end time and caption content, the data of one subtitle are rendered and drawn, after drafting, the transparency that current subtitle is arranged is 0, when determining that a subtitle needs to show, initial value is set by the transparency of current subtitle to show a subtitle, when judging to have the data of next subtitle in queue, the display of next subtitle is carried out according to the Subtitle Demonstration process.To reduce between video and subtitle synchronous error, it can be achieved that synchronization between video and subtitle, improves user experience.

Description

The method and device that subtitle and audio video synchronization are presented
Technical field
This application involves the method and devices that field of communication technology more particularly to a kind of subtitle and audio video synchronization are presented.
Background technique
Currently, for the conventional process of subtitle and audio video synchronization are as follows: the data for downloading and parsing subtitle first will solve The data for analysing the subtitle completed are stored in a queue, after video playing starts, obtain current video play time, will be current At the beginning of video playback time and next subtitle or the end time of current subtitle compares, if current video plays At the beginning of time is greater than or equal to next subtitle or the end time of current subtitle, then a subtitle is removed from queue Data rendered and drawn, then show.
As can be seen that also needing to carry out the rendering and drafting of subtitle after video arrival play time in above-mentioned treatment process Operation, causes the display of subtitle to have some delays, especially in the biggish subtitle of processing data volume, such as certain science popularization sections Mesh may draw the subtitle of multiple regions simultaneously in a program to carry out science popularization, have when drawing the subtitle of multiple regions several Hundred milliseconds of time delay, so that the display delay of subtitle is it is obvious that cause asynchronous between video and subtitle, large effect User experience.
Summary of the invention
The method and device that the application provides a kind of subtitle and audio video synchronization is presented is, it can be achieved that same between video and subtitle Step improves user experience.
In a first aspect, the application provides the method for a kind of subtitle and audio video synchronization presentation, comprising:
When video starts to play, the display of a subtitle is carried out according to following Subtitle Demonstration process:
The data of a subtitle are taken out from the queue of storage caption data, the data of a subtitle, which include at least, to be opened Begin time, end time and caption content;
The data of one subtitle are rendered and drawn;
After drawing to the data of a subtitle, the transparency that drawn subtitle is arranged is 0;
When determining that a subtitle needs to show, initial value is set by the transparency of current subtitle to show described one Subtitle;
When judging there are the data of next subtitle in the queue, next subtitle is carried out according to the Subtitle Demonstration process Display.
Optionally, the determination one subtitle needs to show, comprising:
Current video play time is obtained, if at the beginning of current video play time is greater than or equal to a subtitle Between, it is determined that a subtitle needs to show.
Optionally, the determination one subtitle needs to show, comprising:
Receive Subtitle Demonstration request, it is determined that a subtitle needs to show.
Optionally, the method also includes:
From the data procedures for taking out a subtitle in the queue or the data of a subtitle are rendered When with having subtitle to need to show during drafting, described one is directly displayed after drawing to the data of a subtitle Subtitle.
Optionally, the method also includes:
Receive Subtitle Demonstration request;
When judging that Subtitle Demonstration process is currently at first state, initial value is set with aobvious by the transparency of current subtitle Show a subtitle, the first state are as follows: after drawing to the data of a subtitle, drawn subtitle is set Transparency is 0;
When judging that Subtitle Demonstration process is currently at the second state or the third state, into thread is waited, to described one The data of subtitle directly display a subtitle, second state are as follows: taken out one from the queue after drawing The data of subtitle;The third state are as follows: the data of a subtitle are rendered and drawn.
Second aspect, the application provide the device of a kind of subtitle and audio video synchronization presentation, comprising:
First display module, for carrying out a subtitle according to following Subtitle Demonstration process when video starts to play Display:
The data of a subtitle are taken out from the queue of storage caption data, the data of a subtitle, which include at least, to be opened Begin time, end time and caption content;
The data of one subtitle are rendered and drawn;
After drawing to the data of a subtitle, the transparency that drawn subtitle is arranged is 0;
When determining that a subtitle needs to show, initial value is set by the transparency of current subtitle to show described one Subtitle;
Second display module, it is aobvious according to the subtitle when for there is the data of next subtitle in judging the queue Show that process carries out the display of next subtitle.
Optionally, first display module is used for:
Current video play time is obtained, if at the beginning of current video play time is greater than or equal to a subtitle Between, it is determined that a subtitle needs to show.
Optionally, first display module is used for:
Receive Subtitle Demonstration request, it is determined that a subtitle needs to show.
Optionally, first display module is also used to:
From the data procedures for taking out a subtitle in the queue or the data of a subtitle are rendered When with having subtitle to need to show during drafting, described one is directly displayed after drawing to the data of a subtitle Subtitle.
Optionally, described device further include:
Receiving module, for receiving Subtitle Demonstration request;
First display module is used for: when judging that Subtitle Demonstration process is currently at first state, by current subtitle Transparency is set as initial value to show a subtitle, the first state are as follows: draws to the data of a subtitle After, the transparency that drawn subtitle is arranged is 0;
When judging that Subtitle Demonstration process is currently at the second state or the third state, into thread is waited, to described one The data of subtitle directly display a subtitle, second state are as follows: taken out one from the queue after drawing The data of subtitle;The third state are as follows: the data of a subtitle are rendered and drawn.
The third aspect, the application provide a kind of electronic equipment, comprising:
Memory, for storing program instruction;
Processor, for calling and executing the program instruction in the memory, to realize the subtitle and view of first aspect The synchronous method presented of frequency.
Fourth aspect, the application provide a kind of readable storage medium storing program for executing, are stored with computer program in readable storage medium storing program for executing, when When at least one processor of electronic equipment executes the computer program, the subtitle and video of electronic equipment execution first aspect are same Walk the method presented.
5th aspect, the application provide a kind of program product, which includes computer program, the computer program It is stored in readable storage medium storing program for executing.At least one processor of electronic equipment can read the computer journey from readable storage medium storing program for executing Sequence, at least one processor execute subtitle and the audio video synchronization presentation that the computer program makes electronic equipment implement first aspect Method.
The method and device that subtitle provided by the present application and audio video synchronization are presented, by when video starts to play, from depositing The data for taking out a subtitle in the queue of caption data are put, then the data of a subtitle are rendered and drawn, are drawn After, the transparency that drawn subtitle is arranged is 0, when determining that a subtitle needs to show, by the transparency of current subtitle Initial value is set as to show a subtitle, when judging to have the data of next subtitle in queue, repeat subtitle flow for displaying into The display of next subtitle of row.By the way that time-consuming more rendering and drawing process are shifted to an earlier date, the interval for making full use of subtitle to play Time carries out the relatively time-consuming operation such as rendering and drafting of subtitle, and subtitle has drawn the transparent of the drawn subtitle of setting Degree is 0, when needing to show subtitle, it is only necessary to which the setting for carrying out transparency reduces same between video and subtitle The error of step realizes the synchronization between video and subtitle, improves user experience.
Detailed description of the invention
In order to clearly demonstrate the application or technical solution in the prior art, embodiment or the prior art will be retouched below Attached drawing needed in stating is briefly described, it should be apparent that, the accompanying drawings in the following description is some of the application Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the flow chart of the embodiment of the method for a kind of subtitle provided by the present application and audio video synchronization presentation;
Fig. 2 is the flow diagram continuously played the video and subtitle;
Fig. 3 is a kind of subtitle provided by the present application and the flow diagram that audio video synchronization is presented;
Fig. 4 is the flow diagram of the embodiment of the method for a kind of subtitle provided by the present application and audio video synchronization presentation;
Fig. 5 is to switch schematic diagram for the state under different situations;
Fig. 6 is the structural schematic diagram of the Installation practice of a kind of subtitle provided by the present application and audio video synchronization presentation;
Fig. 7 is the structural schematic diagram of the Installation practice of a kind of subtitle provided by the present application and audio video synchronization presentation;
Fig. 8 is the structural schematic diagram of a kind of electronic equipment embodiment provided by the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the attached drawing in the application, to this Technical solution in application is clearly and completely described, it is clear that and described embodiment is some embodiments of the present application, Instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making creative labor Every other embodiment obtained under the premise of dynamic, shall fall in the protection scope of this application.
In the related technology, in processing caption and video synchronization process, video reaches the wash with watercolours of progress subtitle after play time Dye and drafting operation, having drawn could show, the display of subtitle is caused to have some delays, cause different between video and subtitle Step, large effect user experience, the method and device that the application provides a kind of subtitle and audio video synchronization is presented can be applied to In the electronic equipment of the playable audio-video such as TV, computer, video starts just to take the data of subtitle to carry out from queue when playing Rendering and drafting, the transparency that drawn subtitle is arranged after drafting is 0, and time-consuming more rendering and drawing process are mentioned Before, when needing to show subtitle, it is only necessary to which the setting for carrying out transparency reduces mistake synchronous between video and subtitle Difference improves user experience, it can be achieved that synchronization between video and subtitle.The technical side of the application is described in detail with reference to the accompanying drawing Case.
Fig. 1 is the flow chart of the embodiment of the method for a kind of subtitle provided by the present application and audio video synchronization presentation, the present embodiment Executing subject can for electronic equipment or it is any have the function of the subtitle of the present embodiment and audio video synchronization presentation software or Hardware, as shown in Figure 1, the method for the present embodiment may include:
When S101, video start to play, the aobvious of a subtitle is carried out according to the Subtitle Demonstration process of following S1011-S1014 Show:
Specifically, before video starts broadcasting, the data of subtitle are downloaded and parsed first, the caption data that will be parsed It is stored in a queue, queue is First Input First Output, when video starts to play, i.e., according to the word of following S1011-S1014 Curtain flow for displaying carries out the display of a subtitle.
S1011, the data that a subtitle is taken out from the queue of storage caption data, the data of a subtitle include at least Time started, end time and caption content.
Specifically, take out a subtitle, show a subtitle, the data of a subtitle can also include the font of subtitle, The information such as color, title back color, time started start to show that time, end time are that the end of subtitle is shown for subtitle Time.
S1012, the data of a subtitle are rendered and is drawn.
S1013, after being drawn to the data of subtitle, the transparency that drawn subtitle is arranged is 0.
Specifically, the transparency that drawn subtitle is arranged is 0, i.e., is hidden to the subtitle currently drawn and does not show.
S1014, when determining that a subtitle needs to show, it is described to show to set initial value for the transparency of current subtitle One subtitle.
Specifically, it is determined that a subtitle needs to show, there are two types of enforceable modes:
Mode one obtains current video play time, if current video play time is greater than or equal to opening for a subtitle Begin the time, it is determined that this subtitle needs to show.
Mode two receives Subtitle Demonstration request, it is determined that this subtitle needs to show.
It should be noted that the initial value of transparency can be 100 or other.
S102, it when judging to have the data of next subtitle in queue, is carried out according to the Subtitle Demonstration process of S1011-S1014 The display of next subtitle.
In particular it is required that after current subtitle is successfully shown, carrying out queuing data amount when continuously playing the video and subtitle and sentencing It is disconnected, that is, when judging there are the data of next subtitle in the queue, carried out according to the Subtitle Demonstration process of above-mentioned S1011-S1014 The display of next subtitle takes out the data of next subtitle from queue, is then rendered and drawn, drafting terminates Afterwards, the transparency that drawn subtitle is arranged is 0, since the subtitle transparency newly drawn out is 0, so will not influence current subtitle Display, Fig. 2 is the flow diagram continuously played the video and subtitle, as shown in Fig. 2, after video program starts broadcasting, first The data of subtitle 1 are rendered and are drawn, after drafting, current word is arranged by the data that a subtitle 1 is taken out from queue The transparency of curtain is 0, i.e., hides subtitle 1, when not determining that subtitle 1 needs to show, video program normal play, and no subtitle, When determine subtitle 1 need show (such as current video play time be greater than or equal to subtitle 1 at the beginning of, it is determined that subtitle 1 need It has been shown that, alternatively, receiving Subtitle Demonstration request, it is determined that subtitle 1 needs to show), set initial for the transparency of subtitle 1 After value is to show that subtitle 1, subtitle 1 are shown successfully, continue the data that a subtitle 2 is taken out from queue, to the data of subtitle 2 into It row rendering and draws, after drafting, the transparency that current subtitle is arranged is 0, i.e., hides subtitle 2, when determining 2 needs of subtitle Display is (at the beginning of such as current video play time is greater than or equal to subtitle 2, it is determined that subtitle 2 needs to show, alternatively, connecing Receive Subtitle Demonstration request, it is determined that subtitle 2 needs to show), initial value is set by the transparency of subtitle 2 to show subtitle 2, After subtitle 2 is shown successfully, continues the data for taking out a subtitle 3 from queue, the data of subtitle 3 is rendered and drawn, After drafting, the transparency that current subtitle is arranged is 0, i.e., hides subtitle 3, as long as judging there be next subtitle in queue Data carry out the display of subtitle according to above-mentioned Subtitle Demonstration process, since the subtitle transparency newly drawn out is 0, so will not Influence the display of current subtitle, and rendering and the drafting etc. for carrying out subtitle by making full use of the interval time of subtitle broadcasting Relatively time-consuming operation, when needing to show subtitle, it is only necessary to the setting of transparency is carried out, shared by subtitle Area size pattern, the font and style of caption character etc. all do not need to repaint, and reduce synchronous between video and subtitle Error, improve user experience, enhance the competitiveness of product.
In actual video display process, there may be special circumstances, the number of a subtitle is taken out such as from the queue There is subtitle to need to show during according to being rendered and being drawn in the process or to the data of a subtitle, for example, from The mistake in the data procedures of a subtitle or the data of a subtitle being rendered and being drawn is taken out in the queue Subtitle Demonstration request is received in journey, directly displays a word after drawing at this time to the data of a subtitle Curtain, the setting without transparency.Fig. 3 is the flow diagram of a kind of subtitle provided by the present application and audio video synchronization presentation, depending on After frequency program starts broadcasting, the data of a subtitle are taken out from queue, the data of subtitle are rendered and drawn, are being rendered It in drawing process, determines that the subtitle needs to show, such as receives Subtitle Demonstration request or current video play time is greater than Or at the beginning of being equal to subtitle, then the subtitle is directly displayed after drafting, without the setting of transparency, the situation one As appear in video program start play initial time.
In the embodiment of the present application, optionally, whether directly displayed for subtitle under different situations, the method for the present embodiment exists After S102, can also include:
S103, Subtitle Demonstration request is received;
S104, when judging that Subtitle Demonstration process is currently at first state, set initial for the transparency of current subtitle Value is to show a subtitle, the first state are as follows: after drawing to the data of a subtitle, setting is drawn The transparency of subtitle is 0;
S105, when judging that Subtitle Demonstration process is currently at the second state or the third state, into thread is waited, to described The data of one subtitle directly display a subtitle, second state are as follows: taken from the queue after drawing The data of a subtitle out;The third state are as follows: the data of a subtitle are rendered and drawn.
The method that subtitle provided in this embodiment and audio video synchronization are presented, by when video starts to play, from storage word The data of one subtitle are then rendered and are drawn, drafting terminates by the data that a subtitle is taken out in the queue of curtain data Afterwards, the transparency that drawn subtitle is arranged is 0, and when determining that a subtitle needs to show, the transparency of current subtitle is arranged It is initial value to show a subtitle, when judging there are the data of next subtitle in queue, repeats subtitle flow for displaying and carry out down The display of one subtitle.By the way that time-consuming more rendering and drawing process are shifted to an earlier date, the interval time for making full use of subtitle to play Come the relatively time-consuming operation such as rendering and drafting for carrying out subtitle, subtitle, which has been drawn, to be arranged the transparency of drawn subtitle and is 0, when needing to show subtitle, it is only necessary to which the setting for carrying out transparency reduces synchronization between video and subtitle Error realizes the synchronization between video and subtitle, improves user experience.
A specific embodiment is used below, and method shown in FIG. 1 is described in detail.
Fig. 4 is the flow diagram of the embodiment of the method for a kind of subtitle provided by the present application and audio video synchronization presentation, such as Fig. 4 Shown, the method for the present embodiment may include:
S201, downloading and the data for parsing subtitle.
S202, the caption data being parsed is stored in a queue.
When S203, video start to play, the data that a subtitle is taken out from queue are rendered.
Subtitle drafting is carried out after S204, rendering, the transparency that drawn subtitle is arranged after drafting is 0.
S205, poll obtain current video play time.
At the beginning of if S206, current video play time are greater than or equal to drawn subtitle, by the saturating of current subtitle Lightness is set as initial value, successfully shows this subtitle.
S207, when judging there are the data of next subtitle in queue, the process of next round S203-S206 is executed, is carried out down The display of one subtitle.
In the embodiment of the present application, optionally, whether is directly displayed for subtitle under different situations, one is provided in the present embodiment Kind enforceable mode, adoption status machine mode judge that status is not to Subtitle Demonstration process state in which Together, determine whether subtitle directly displays.It is described in detail below with reference to Fig. 5.
The following state in subtitle flow for displaying is defined first:
First state: after drawing to the data of a subtitle, the transparency that drawn subtitle is arranged is 0.
Second state: the data of a subtitle have been taken out from queue.
The third state: the data of a subtitle are rendered and is drawn.
4th state: subtitle is successfully shown.
Fig. 5 be under different situations state switch schematic diagram, as shown in figure 5, the method for the present embodiment S207 it After can also include:
S208, Subtitle Demonstration request is received.
When needing to show subtitle, Subtitle Demonstration request is sent by system to request display subtitle.
S209, judge the state that Subtitle Demonstration process is presently in, if Subtitle Demonstration process is currently at first state, Initial value is set by the transparency of current subtitle to show a subtitle.
If S210, Subtitle Demonstration process are currently at the second state or the third state, into thread is waited, to a word The data of curtain directly display a subtitle after drawing.
Specifically, it if Subtitle Demonstration process is currently at the second state or the third state, can be into waiting thread, It waits thread to be waken up immediately after subtitle is drawn, carries out Subtitle Demonstration.
The method that subtitle provided in this embodiment and audio video synchronization are presented, adoption status machine mode are come to Subtitle Demonstration process State in which is judged that the difference of status determines whether subtitle directly displays, after receiving Subtitle Demonstration request, If Subtitle Demonstration process is currently at first state, initial value is set by the transparency of current subtitle to show a word Curtain, into thread is waited, is drawn the data of a subtitle if Subtitle Demonstration process is currently at the second state or the third state A subtitle is directly displayed after system, and time-consuming more rendering and drawing process are shifted to an earlier date, and carries out for different situations Different Subtitle Demonstrations reduces error synchronous between video and subtitle, realizes the synchronization between video and subtitle, improves User experience.
Fig. 6 is the structural schematic diagram of the Installation practice of a kind of subtitle provided by the present application and audio video synchronization presentation, such as Fig. 6 Shown, the device of the present embodiment may include: the first display module 11 and the second display module 12, wherein
First display module 11 is used to carry out a subtitle according to following Subtitle Demonstration process when video starts to play Display:
The data of a subtitle are taken out from the queue of storage caption data, the data of a subtitle, which include at least, to be opened Begin time, end time and caption content;
The data of one subtitle are rendered and drawn;
After drawing to the data of a subtitle, the transparency that drawn subtitle is arranged is 0;
When determining that a subtitle needs to show, initial value is set by the transparency of current subtitle to show described one Subtitle;
It is aobvious according to the subtitle when second display module 12 is used to have the data of next subtitle in judging the queue Show that process carries out the display of next subtitle.
Optionally, first display module 11 is used for:
Current video play time is obtained, if at the beginning of current video play time is greater than or equal to a subtitle Between, it is determined that a subtitle needs to show.
Optionally, first display module 11 is used for:
Receive Subtitle Demonstration request, it is determined that a subtitle needs to show.
Optionally, first display module 11 is also used to:
From the data procedures for taking out a subtitle in the queue or the data of a subtitle are rendered When with having subtitle to need to show during drafting, described one is directly displayed after drawing to the data of a subtitle Subtitle.
The device of the present embodiment can be used for executing the technical solution of embodiment of the method shown in Fig. 1, realization principle and skill Art effect is similar, and details are not described herein again.
The device that subtitle provided in this embodiment and audio video synchronization are presented passes through rendering and drawing process that time-consuming is more In advance, the relatively time-consuming operation such as rendering and drafting that the interval time for making full use of subtitle to play carries out subtitle, word Curtain has drawn be arranged drawn subtitle transparency be 0, when needing to show subtitle, it is only necessary to carry out the setting of transparency , error synchronous between video and subtitle is reduced, the synchronization between video and subtitle is realized, improves user's body It tests.
Fig. 7 is the structural schematic diagram of the Installation practice of a kind of subtitle provided by the present application and audio video synchronization presentation, such as Fig. 7 It is shown, it can also include: receiving module 13, this connects further on the basis of the device of the present embodiment device shown in Fig. 6 Module 13 is received for receiving Subtitle Demonstration request.
First display module 11 is used for: when judging that Subtitle Demonstration process is currently at first state, by the saturating of current subtitle Lightness is set as initial value to show a subtitle, the first state are as follows: draws knot to the data of a subtitle Shu Hou, the transparency that drawn subtitle is arranged is 0;
When judging that Subtitle Demonstration process is currently at the second state or the third state, into thread is waited, to described one The data of subtitle directly display a subtitle, second state are as follows: taken out one from the queue after drawing The data of subtitle;The third state are as follows: the data of a subtitle are rendered and drawn.
The device of the present embodiment can be used for executing the technical solution of embodiment of the method shown in Fig. 1, realization principle and skill Art effect is similar, and details are not described herein again.
Fig. 8 is the structural schematic diagram of a kind of electronic equipment embodiment provided by the present application, as shown in figure 8, the present embodiment Device may include: memory 201 and processor 202,
Memory 201, for storing program instruction, which can be flash (flash memory).
Processor 202, for calling and executing the program instruction in memory, with realize Fig. 1 or subtitle shown in Fig. 4 and Each step in method that audio video synchronization is presented.It specifically may refer to the associated description in previous methods embodiment.
It can also include input/output interface 203.Input/output interface 203 may include independent output interface and defeated Incoming interface, or the integrated integrated interface output and input.Wherein, output interface is used for output data, and input interface is used In the data for obtaining input, the data of above-mentioned output are the general designation exported in above method embodiment, and the data of input are above-mentioned The general designation inputted in embodiment of the method.
The application also provides a kind of readable storage medium storing program for executing, is stored with computer program in readable storage medium storing program for executing, when electronics is set When at least one standby processor executes the computer program, electronic equipment executes the subtitle of first aspect and audio video synchronization is presented Method.
The application also provides a kind of program product, which includes computer program, which is stored in In readable storage medium storing program for executing.At least one processor of electronic equipment can read the computer program from readable storage medium storing program for executing, until A few processor executes the computer program and makes the side that electronic equipment implements the subtitle of first aspect and audio video synchronization is presented Method.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or The various media that can store program code such as person's CD.
Finally, it should be noted that the above various embodiments is only to illustrate the technical solution of the application, rather than its limitations;To the greatest extent Pipe is described in detail the application referring to foregoing embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, each embodiment technology of the application that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (12)

1. a kind of method that subtitle and audio video synchronization are presented characterized by comprising
When video starts to play, the display of a subtitle is carried out according to following Subtitle Demonstration process:
The data that a subtitle is taken out from the queue of storage caption data, when the data of a subtitle include at least beginning Between, end time and caption content;
The data of one subtitle are rendered and drawn;
After drawing to the data of a subtitle, the transparency that drawn subtitle is arranged is 0;
When determining that a subtitle needs to show, initial value is set by the transparency of current subtitle to show a word Curtain;
When judging there are the data of next subtitle in the queue, the aobvious of next subtitle is carried out according to the Subtitle Demonstration process Show.
2. the method according to claim 1, wherein the determination one subtitle needs to show, comprising:
Current video play time is obtained, if at the beginning of current video play time is greater than or equal to a subtitle, Then determine that a subtitle needs to show.
3. the method according to claim 1, wherein the determination one subtitle needs to show, comprising:
Receive Subtitle Demonstration request, it is determined that a subtitle needs to show.
4. the method according to claim 1, wherein the method also includes:
From the data procedures for taking out a subtitle in the queue or the data of a subtitle are rendered and drawn When having subtitle to need to show during system, a word is directly displayed after drawing to the data of a subtitle Curtain.
5. the method according to claim 1, wherein the method also includes:
Receive Subtitle Demonstration request;
When judging that Subtitle Demonstration process is currently at first state, initial value is set to show by the transparency of current subtitle State a subtitle, the first state are as follows: after drawing to the data of a subtitle, the transparent of drawn subtitle is set Degree is 0;
When judging that Subtitle Demonstration process is currently at the second state or the third state, into thread is waited, to a subtitle Data draw after directly display a subtitle, second state are as follows: a word has been taken out from the queue The data of curtain;The third state are as follows: the data of a subtitle are rendered and drawn.
6. the device that a kind of subtitle and audio video synchronization are presented characterized by comprising
First display module, for carrying out the display of a subtitle according to following Subtitle Demonstration process when video starts to play:
The data that a subtitle is taken out from the queue of storage caption data, when the data of a subtitle include at least beginning Between, end time and caption content;
The data of one subtitle are rendered and drawn;
After drawing to the data of a subtitle, the transparency that drawn subtitle is arranged is 0;
When determining that a subtitle needs to show, initial value is set by the transparency of current subtitle to show a word Curtain;
Second display module, when for there is the data of next subtitle in judging the queue, according to the Subtitle Demonstration stream The display of next subtitle of Cheng Jinhang.
7. device according to claim 6, which is characterized in that first display module is used for:
Current video play time is obtained, if at the beginning of current video play time is greater than or equal to a subtitle, Then determine that a subtitle needs to show.
8. device according to claim 6, which is characterized in that first display module is used for:
Receive Subtitle Demonstration request, it is determined that a subtitle needs to show.
9. device according to claim 6, which is characterized in that first display module is also used to:
From the data procedures for taking out a subtitle in the queue or the data of a subtitle are rendered and drawn When having subtitle to need to show during system, a word is directly displayed after drawing to the data of a subtitle Curtain.
10. device according to claim 6, which is characterized in that described device further include:
Receiving module, for receiving Subtitle Demonstration request;
First display module is used for: when judging that Subtitle Demonstration process is currently at first state, by the transparent of current subtitle Degree is set as initial value to show a subtitle, the first state are as follows: terminates to the data drafting of a subtitle Afterwards, the transparency that drawn subtitle is arranged is 0;
When judging that Subtitle Demonstration process is currently at the second state or the third state, into thread is waited, to a subtitle Data draw after directly display a subtitle, second state are as follows: a word has been taken out from the queue The data of curtain;The third state are as follows: the data of a subtitle are rendered and drawn.
11. a kind of electronic equipment characterized by comprising
Memory, for storing program instruction;
Processor, for calling and executing the program instruction in the memory, to realize that claim 1-5 is described in any item The method that subtitle and audio video synchronization are presented.
12. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program in the readable storage medium storing program for executing, work as electronics When at least one processor of equipment executes the computer program, the electronic equipment perform claim is required described in any one of 1-5 Subtitle and audio video synchronization present method.
CN201811376338.1A 2018-11-19 2018-11-19 The method and device that subtitle and audio video synchronization are presented Pending CN109525899A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811376338.1A CN109525899A (en) 2018-11-19 2018-11-19 The method and device that subtitle and audio video synchronization are presented

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811376338.1A CN109525899A (en) 2018-11-19 2018-11-19 The method and device that subtitle and audio video synchronization are presented

Publications (1)

Publication Number Publication Date
CN109525899A true CN109525899A (en) 2019-03-26

Family

ID=65776262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811376338.1A Pending CN109525899A (en) 2018-11-19 2018-11-19 The method and device that subtitle and audio video synchronization are presented

Country Status (1)

Country Link
CN (1) CN109525899A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110381358A (en) * 2019-06-20 2019-10-25 视联动力信息技术股份有限公司 A kind of caption managed method, apparatus and storage medium
CN113596355A (en) * 2020-04-14 2021-11-02 瑞昱半导体股份有限公司 Caption image generating device and method
CN114640874A (en) * 2022-03-09 2022-06-17 湖南国科微电子股份有限公司 Subtitle synchronization method and device, set top box and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040075668A1 (en) * 1994-12-14 2004-04-22 Van Der Meer Jan Subtitling transmission system
CN101604545A (en) * 2008-06-10 2009-12-16 索尼株式会社 Generation equipment, generation method and program
CN102547146A (en) * 2010-12-29 2012-07-04 新奥特(北京)视频技术有限公司 System and method for interacting subtitle data
CN102572298A (en) * 2010-12-29 2012-07-11 新奥特(北京)视频技术有限公司 System and method for rendering subtitle in advance
US20130076981A1 (en) * 2011-09-27 2013-03-28 Cisco Technology, Inc. Optimizing timed text generation for live closed captions and subtitles
TW201613339A (en) * 2014-09-18 2016-04-01 Mstar Semiconductor Inc Subtitle processing device and its associated method and method of parsing subtitle
CN108833963A (en) * 2018-05-31 2018-11-16 腾讯科技(上海)有限公司 Method, computer equipment, readable storage medium storing program for executing and the system of display interface picture

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040075668A1 (en) * 1994-12-14 2004-04-22 Van Der Meer Jan Subtitling transmission system
CN101604545A (en) * 2008-06-10 2009-12-16 索尼株式会社 Generation equipment, generation method and program
CN102547146A (en) * 2010-12-29 2012-07-04 新奥特(北京)视频技术有限公司 System and method for interacting subtitle data
CN102572298A (en) * 2010-12-29 2012-07-11 新奥特(北京)视频技术有限公司 System and method for rendering subtitle in advance
US20130076981A1 (en) * 2011-09-27 2013-03-28 Cisco Technology, Inc. Optimizing timed text generation for live closed captions and subtitles
TW201613339A (en) * 2014-09-18 2016-04-01 Mstar Semiconductor Inc Subtitle processing device and its associated method and method of parsing subtitle
CN108833963A (en) * 2018-05-31 2018-11-16 腾讯科技(上海)有限公司 Method, computer equipment, readable storage medium storing program for executing and the system of display interface picture

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110381358A (en) * 2019-06-20 2019-10-25 视联动力信息技术股份有限公司 A kind of caption managed method, apparatus and storage medium
CN110381358B (en) * 2019-06-20 2022-04-26 视联动力信息技术股份有限公司 Subtitle management method and device and storage medium
CN113596355A (en) * 2020-04-14 2021-11-02 瑞昱半导体股份有限公司 Caption image generating device and method
CN113596355B (en) * 2020-04-14 2024-04-16 瑞昱半导体股份有限公司 Subtitle image generating apparatus and method
CN114640874A (en) * 2022-03-09 2022-06-17 湖南国科微电子股份有限公司 Subtitle synchronization method and device, set top box and computer readable storage medium
WO2023169240A1 (en) * 2022-03-09 2023-09-14 湖南国科微电子股份有限公司 Subtitle synchronization method and apparatus, set-top box and computer readable storage medium

Similar Documents

Publication Publication Date Title
US20240121479A1 (en) Multimedia processing method, apparatus, device, and medium
CN109525899A (en) The method and device that subtitle and audio video synchronization are presented
US20230300403A1 (en) Video processing method and apparatus, device, and storage medium
US20130212514A1 (en) Method and Device for Displaying Start-Up Interface of Multimedia Terminal
KR20070037919A (en) Method of guiding menu and picture processing apparatus thereof
EP4346218A1 (en) Audio processing method and apparatus, and electronic device and storage medium
CN109889877A (en) Car multi-screen display control method and device
US11641512B2 (en) Video recording method, apparatus, electronic device and non-transitory storage medium
CN104615432B (en) Splash screen information processing method and client
TWI492632B (en) Method for performing video display control within a video display system, and associated video processing circuit and video display system
CN106980503A (en) Page processing method, device and equipment
CN111405337A (en) Method, device, equipment and medium for realizing double-screen abnormal sound of android system
CN107864393A (en) The method and device that video is shown with captioning synchronization
CN108491178A (en) Information browsing method, browser and server
WO2024140239A1 (en) Page display method and apparatus, device, computer readable storage medium and product
CN106940722A (en) A kind of image display method and device
CN107820127B (en) Video switching method based on multi-channel decoding
CN117959703A (en) Interactive method, device, computer readable storage medium and computer program product
CN108334339A (en) A kind of bluetooth equipment driving method and device
CN113825022B (en) Method and device for detecting play control state, storage medium and electronic equipment
CN110087120A (en) The same window switching method and calculating equipment of online list and local list
CN106921886A (en) The multimedia data playing method and device of a kind of terminal
CN112017261A (en) Sticker generation method and device, electronic equipment and computer readable storage medium
CN109616117A (en) A kind of mobile phone games control system and method based on speech recognition technology
US20150058394A1 (en) Method for processing data and electronic apparatus

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

Application publication date: 20190326

RJ01 Rejection of invention patent application after publication