CN106792114A - The changing method and device of captions - Google Patents

The changing method and device of captions Download PDF

Info

Publication number
CN106792114A
CN106792114A CN201611127290.1A CN201611127290A CN106792114A CN 106792114 A CN106792114 A CN 106792114A CN 201611127290 A CN201611127290 A CN 201611127290A CN 106792114 A CN106792114 A CN 106792114A
Authority
CN
China
Prior art keywords
caption information
subtitle file
information bar
caption
captions
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.)
Granted
Application number
CN201611127290.1A
Other languages
Chinese (zh)
Other versions
CN106792114B (en
Inventor
周丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL New 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201611127290.1A priority Critical patent/CN106792114B/en
Publication of CN106792114A publication Critical patent/CN106792114A/en
Application granted granted Critical
Publication of CN106792114B publication Critical patent/CN106792114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • 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/4856End-user interface for client configuration for language selection, e.g. for the menu or 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/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles

Landscapes

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

Abstract

The invention discloses a kind of changing method of captions, methods described includes:Obtain the subtitle file that contains of video bag and parse, obtain caption information bar, the side-play amount in path and caption information bar according to the subtitle file sets up caption information data list;The switching subtitle instructions triggered according to user obtain the path of to be switched subtitle file;Meet pre-conditioned caption information bar in extraction caption information data list;The path identical caption information bar of lookup and to be switched subtitle file in the caption strips information extracted, and the address offset amount of the caption information bar is obtained, read the caption data of the address offset amount;The caption data that will be read carries out output display.The invention also discloses a kind of switching device of captions.The present invention can improve the efficiency of switching captions.

Description

The changing method and device of captions
Technical field
The present invention relates to internet television field, more particularly to a kind of captions changing method and device.
Background technology
In many countries and regions, especially European some video content services business, in order to preferably be different language The people of country provide video frequency request program service, and the captions of different language are all embedded in inside the video file of program.People Watch program when, by remote control, carry out the switching of different language captions.
At present, the method for carrying out captions switching usually stops for the data of current subtitle sending into caching first, empties slow Deposit space and empty the data that subtitle decoder module is cached by carrying out flush operations to subtitle decoder module;Then, The data of to be switched captions are sent into spatial cache, the data of spatial cache are sent into subtitle decoder mould by data cache module Block;Then, subtitle decoder module is decoded after the data for receiving to be switched captions.To decoded caption data After being synchronized in time with audio or video, output to output module;Finally, output module receive it is decoded After caption data, output display, captions finishing switching are carried out.Captions are switched over through the above way, it is impossible to which captions are broadcast Putting the time is quickly positioned.
The content of the invention
Changing method and device it is a primary object of the present invention to propose a kind of captions, it is intended to which solution cannot be to captions Reproduction time carries out the technical problem of quick positioning.
To achieve the above object, a kind of changing method of captions that the present invention is provided, the described method comprises the following steps:
Obtain the subtitle file that contains of video bag and parse, obtain caption information bar, path according to the subtitle file and The side-play amount of caption information bar sets up caption information data list;
The switching subtitle instructions triggered according to user obtain the path of to be switched subtitle file;
Meet pre-conditioned caption information bar in extraction caption information data list;
The path identical caption information bar with to be switched subtitle file is searched in the caption strips information extracted, and is obtained The address offset amount of the caption information bar is taken, the caption data of the address offset amount is read;
The caption data that will be read carries out output display.
Alternatively, the step of meeting pre-conditioned caption information bar in the extraction caption information data list wraps Include:
Obtain the video data current display time stamp in playing;
By between at the beginning of the caption information bar in the timestamp and caption information data list with the end time point Do not contrasted;
If there is the time started less than or equal to timestamp and end in the caption information bar in caption information data list Time more than or equal to the caption information bar of timestamp, then extracts the caption information bar;
If being less than or equal to timestamp and end in the absence of the time started in the caption information of caption information data list Time more than or equal to the caption information bar of timestamp, then extracts and the timestamp is separated by nearest caption information bar.
Alternatively, the step of caption data that the side will read carries out output display includes:
The to be switched subtitle file of output display is carried out described in obtaining, the to be switched subtitle file is parsed;
The caption information data of the to be switched subtitle file is obtained, current play time is obtained and is stabbed and described will work as It is compared successively with the end time between at the beginning of the caption information bar of preceding reproduction time stamp and the to be switched subtitle file;
Time started in the caption information bar of the to be switched subtitle file is less than or equal to the current play time Stab and current play time stamp carries out rendering display captioned test information less than or equal to the caption information bar of end time;
Word by the end time in the caption information bar of the to be switched subtitle file more than current play time stamp Curtain information bar is removed, and searches next caption data;
Word by the time started in the caption information bar of the to be switched subtitle file less than current play time stamp Curtain information bar caching.
Alternatively, it is described to obtain the subtitle file that contains of video bag and parse, caption information bar is obtained, according to captions text The step of path of part and the side-play amount of caption information bar set up caption information data list includes:
The subtitle file that video bag contains is obtained, and the subtitle file is preserved into caching, the subtitle file includes The path of subtitle file content and subtitle file;
The subtitle file is parsed, according between at the beginning of every captions and captions are split into multiple captions by the end time Information bar, obtains side-play amount, time started, end time, content of text and the renderer property of caption information bar;
The side-play amount in path and caption information bar according to subtitle file sets up caption information data list, and by captions Between at the beginning of information bar, end time, content of text and renderer property preserved into caption information data list;
The time attribute of all caption information bars for parsing of traversal, between extracting at the beginning of caption information bar and terminates It is time, described with the time attribute name of caption information bar according to ascending sort is carried out between at the beginning of the caption information bar Caption information bar is simultaneously preserved into caption information data list.
Alternatively, methods described also includes:
Judge to be switched subtitle file whether be current language subtitle file;
If so, then continuing to output the subtitle file of display current language;
If it is not, then obtaining to be switched subtitle file.
Additionally, to achieve the above object, the present invention also provides a kind of switching device of captions, and described device includes:
Module is set up, for obtaining subtitle file that video bag contains and parsing, caption information bar is obtained, according to the captions The path of file and the side-play amount of caption information bar set up caption information data list
First acquisition module, the switching subtitle instructions for being triggered according to user obtain the path of to be switched subtitle file;
Extraction module, meet pre-conditioned caption information bar in caption information data list for extracting;
Read module, for searching the path identical word with to be switched subtitle file in the caption strips information extracted Curtain information bar, and the address offset amount of the caption information bar is obtained, read the caption data of the address offset amount;
First display module, the caption data for that will read carries out output display.
Alternatively, the extraction module includes:
Acquiring unit, for obtaining the video data current display time stamp in playing;
Comparison unit, for by between at the beginning of the timestamp and the caption information of caption information data list in knot The beam time is contrasted respectively;
First extraction unit, if for exist in the caption information of caption information data list the time started be less than or wait In the caption information bar of timestamp and end time more than or equal to timestamp, then the caption information bar is extracted;
Second extraction unit, if in the caption information of caption information data list in the absence of the time started be less than or Caption information bar equal to timestamp and end time more than or equal to timestamp, then extract and the timestamp be separated by it is nearest Caption information bar.
Alternatively, first display module includes:
First resolution unit, for obtaining the to be switched subtitle file for carrying out output display, by the to be switched word Curtain file is parsed;
Comparing unit, the caption information data for obtaining the to be switched subtitle file obtains current play time Stab and by the current play time stamp and the to be switched subtitle file caption information bar at the beginning of between and at the end of Between be compared successively;
Rendering unit, it is described for the time started in the caption information bar of the to be switched subtitle file to be less than or equal to Current play time is stabbed and current play time stamp carries out rendering display less than or equal to the caption information bar of end time Captioned test information;
Searching unit, for the end time in the caption information bar of the to be switched subtitle file currently to be broadcast more than described The caption information bar for putting timestamp is removed, and searches next caption data;
Buffer unit, for the time started in the caption information bar of the to be switched subtitle file currently to be broadcast less than described Put the caption information bar caching of timestamp.
Alternatively, the module of setting up includes:
Acquiring unit, for obtaining the subtitle file that video bag contains, and the subtitle file is preserved into caching, described Subtitle file includes the path of subtitle file content and subtitle file;
Second resolution unit, for parsing the subtitle file, according between at the beginning of every captions and the end time will Captions split into multiple caption information bars, obtain the side-play amount of caption information bar, the time started, the end time, content of text and Renderer property;
Unit is set up, the side-play amount for the path according to subtitle file and caption information bar sets up caption information data List, and by between at the beginning of caption information bar, end time, content of text and renderer property preserved to caption information data In list;
Storage unit, the time attribute for traveling through all caption information bars for parsing extracts caption information bar Time started and end time, according to carrying out ascending sort between at the beginning of the caption information bar, with caption information bar when Between caption information bar described in attribute names and preserve in caption information data list.
Alternatively, described device also includes:
Judge module, for judge to be switched subtitle file whether be current language subtitle file;
Second display module, if being the subtitle file of current language for be switched subtitle file, continues to output aobvious Show the subtitle file of current language;
Second acquisition module, if not being the subtitle file of current language for be switched subtitle file, obtains to be cut Change subtitle file.
The changing method and device of the captions that example of the present invention is proposed, obtain the institute that video bag contains first before video playback There is subtitle file and parse the subtitle file, so that the caption information bar of subtitle file is obtained, then according to the captions The path of file and the side-play amount of caption information bar set up caption information data list;Switch captions when user's triggering is detected During instruction, the switching subtitle instructions triggered according to user obtain the path of to be switched subtitle file;Then caption information bar is extracted Meet pre-conditioned caption information bar in data list;Searched and to be switched subtitle file in the caption strips information extracted Path identical caption information bar, and obtain the address offset amount of the caption information bar, read the address offset amount Caption data;The caption data that will be read again carries out output display, so that when captions are switched, the captions after switching can To be quickly displayed on corresponding timestamp.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the changing method first embodiment of captions of the present invention;
Fig. 2 is to extract thin the step of meet pre-conditioned caption information bar in caption information data list in Fig. 1 Change schematic flow sheet;
Fig. 3 is the refinement schematic flow sheet the step of caption data that will be read in Fig. 1 carries out output display;
Fig. 4 is to obtain the subtitle file that contains of video bag in Fig. 1 and parse, and caption information bar is obtained, according to captions text The refinement schematic flow sheet of the step of path of part and the side-play amount of caption information bar set up caption information data list;
Fig. 5 is the schematic flow sheet of the changing method second embodiment of captions of the present invention;
Fig. 6 is the high-level schematic functional block diagram of the switching device first embodiment of captions of the present invention;
Fig. 7 is the refinement high-level schematic functional block diagram of extraction module in Fig. 6;
Fig. 8 is the refinement high-level schematic functional block diagram of the first display module in Fig. 6;
Fig. 9 is to set up the refinement high-level schematic functional block diagram of module in Fig. 6;
Figure 10 is the high-level schematic functional block diagram of the switching device second embodiment of captions of the present invention;
Figure 11 is the preservation form schematic diagram of the caption information bar after parsing;
Figure 12 is the preservation form schematic diagram of the caption information bar after being ranked up.
The realization of the object of the invention, functional characteristics and advantage will be described further referring to the drawings in conjunction with the embodiments.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of changing method of captions.
Reference picture 1, Fig. 1 is the schematic flow sheet of the changing method first embodiment of captions of the present invention.
In the present embodiment, the method includes:
Step S10, obtains the subtitle file that contains of video bag and parses, and caption information bar is obtained, according to the subtitle file Path and the side-play amount of caption information bar set up caption information data list;
In the present embodiment, it is necessary to obtain whole words that the video bag contains in advance before user plays out video Curtain file, and the subtitle file is preserved in the buffer.Then the subtitle file is parsed, obtains multiple caption informations Bar, the side-play amount in path and caption information bar further according to the subtitle file sets up caption information data list.
Step S20, the switching subtitle instructions triggered according to user obtain the path of to be switched subtitle file.
Specifically, when family is used in viewing audio/video file, the captions for finding acquiescence display are not the captions that oneself needs, then Captions switching can be carried out by equipment such as remote controls.Specifically, captions handoff functionality is selected, and in the option list of ejection The captions type of selection demand, generates captions switching command, when terminal detects the captions switching command, receives the captions and cuts Change instruction.Then according to the path of the to be switched subtitle file of captions switching command.
Step S30, pre-conditioned caption information bar is met in extraction caption information data list.
Specifically, the current play time stamp of currently playing video is obtained first, then stabs the current play time With at the beginning of the caption information bar in caption information data list between and the end time contrasted successively, obtain contrast knot Really, the time started in comparing result is less than or equal to timestamp and the end time is more than or equal to the caption information bar of timestamp Extract.
Step S40, searches in the caption strips information extracted and the path identical captions of to be switched subtitle file are believed Breath bar, and the address offset amount of the caption information bar is obtained, read the caption data of the address offset amount.
Timestamp is less than or equal in the time started extracted and the end time is more than or equal to the word of timestamp After curtain information bar, the caption information bar with to be switched subtitle file path same paths is searched in the caption information bar, And the address offset amount of the caption information bar is obtained, read the caption data of the address offset amount.
Step S50, the caption data that will be read carries out output display.
The caption data that will be read carries out output display so that during the broadcasting of captions after switching and currently playing video Between match.
The changing method of the captions that the present embodiment is proposed, obtains all captions that video bag contains first before video playback File simultaneously parses the subtitle file, so that the caption information bar of subtitle file is obtained, then according to the subtitle file The side-play amount of path and caption information bar sets up caption information data list;Switch subtitle instructions when user's triggering is detected When, the switching subtitle instructions triggered according to user obtain the path of to be switched subtitle file;Then caption information data is extracted Meet pre-conditioned caption information bar in list;The road with to be switched subtitle file is searched in the caption strips information extracted Footpath identical caption information bar, and the address offset amount of the caption information bar is obtained, read the captions of the address offset amount Data;The caption data that will be read again carries out output display, so that when captions are switched, the captions after switching can be fast Speed is displayed on corresponding timestamp.
Further, reference picture 2, Fig. 2 be Fig. 1 in extract caption information data list in meet pre-conditioned captions The refinement schematic flow sheet of the step of bar information.
Based on changing method first embodiment of the present invention based on captions of the present invention, the step S30 can include:
Step S31, obtains the video data current display time stamp in playing;
Step S32, by between at the beginning of the caption information bar in the timestamp and caption information data list with knot The beam time is contrasted respectively;
Step S33, if there is the time started in the caption information of caption information data list less than or equal to timestamp And the end time is more than or equal to the caption information bar of timestamp, then the caption information bar is extracted;
Step S34, if being less than or equal to the time in the absence of the time started in the caption information of caption information data list Stab and the end time is more than or equal to the caption information bar of timestamp, then extract and the timestamp is separated by nearest caption information Bar.
In the present embodiment, the video data current display time stamp in playing is obtained first;Then by the timestamp With at the beginning of the caption information bar in caption information data list between contrasted respectively with the end time;If caption information There is the time started in the caption information of data list is more than or equal to timestamp less than or equal to timestamp and end time Caption information bar, then extract the caption information bar;If in the absence of beginning in the caption information of caption information data list Time is less than or equal to timestamp and the end time is more than or equal to the caption information bar of timestamp, then extract and the timestamp It is separated by nearest caption information bar.
Further, reference picture 3, Fig. 3 is the refinement the step of caption data that will be read in Fig. 1 carries out output display Schematic flow sheet.
Changing method first embodiment based on captions of the present invention, the step S50 can include:
Step S51, obtain described in carry out the to be switched subtitle file of output display, the to be switched subtitle file is carried out Parsing;
Step S52, obtains the caption information data of the to be switched subtitle file, obtain current play time stamp and By the current play time stamp and the to be switched subtitle file caption information bar at the beginning of between and the end time successively It is compared;
Step S53, the time started in the caption information bar of the to be switched subtitle file is current less than or equal to described Reproduction time is stabbed and current play time stamp carries out rendering display captions less than or equal to the caption information bar of end time Text message;
Step S54, when the end time in the caption information bar of the to be switched subtitle file is more than into described currently playing Between the caption information bar that stabs remove, and search next caption data;
Step S55, when the time started in the caption information bar of the to be switched subtitle file is less than into described currently playing Between stab caption information bar caching.
In the present embodiment, after the to be switched subtitle file after navigating to side-play amount carries out output display, obtain The to be switched subtitle file for carrying out output display, the to be switched subtitle file is parsed;Obtain described to be switched The caption information data of subtitle file, obtains current play time stamp and the current play time is stabbed into be cut with described It is compared successively with the end time between changing at the beginning of the caption information bar of subtitle file;Then by the to be switched captions text The time started stabs less than or equal to the current play time and current play time stamp is less than in the caption information bar of part Or carry out rendering display captioned test information equal to the caption information bar of end time;By the captions of the to be switched subtitle file The end time removes more than the caption information bar of current play time stamp in information bar, and searches next caption data; Caption information bar by the time started in the caption information bar of the to be switched subtitle file less than current play time stamp Caching.
Further, reference picture 4, Fig. 4 is to obtain the subtitle file that contains of video bag in Fig. 1 and parse, and obtains caption information Bar is thin the step of the side-play amount in path and caption information bar according to the subtitle file sets up caption information data list Change schematic flow sheet.
Based on changing method first embodiment of the present invention based on captions of the present invention, the step S10 can include:
Step S11, obtains the subtitle file that video bag contains, and the subtitle file is preserved into caching, the captions File includes the path of subtitle file content and subtitle file;
Step S12, parses the subtitle file, splits into captions with the end time according between at the beginning of every captions Multiple caption information bars, obtain side-play amount, time started, end time, content of text and the renderer property of caption information bar;
Step S13, the side-play amount in path and caption information bar according to subtitle file sets up caption information data list, And by between at the beginning of caption information bar, end time, content of text and renderer property preserved to caption information data list In;
Step S13, travels through the time attribute of all caption information bars for parsing, at the beginning of extracting caption information bar Between and the end time, according to ascending sort is carried out between at the beginning of the caption information bar, with the time attribute of caption information bar Name the caption information bar and preserve into caption information data list.
In the present embodiment, the subtitle file that contains of video bag was obtained before player shows the first frame, and by the word Curtain file is preserved into caching, and the subtitle file includes the path of subtitle file content and subtitle file.Then successively to institute The plug-in subtitle file having is parsed, according between at the beginning of every captions and captions are split into multiple captions by the end time Information bar, is derived from side-play amount, time started, end time, content of text and the renderer property of caption information bar, Ran Hougen Caption information data list, and opening caption information bar are set up according to the path of subtitle file and the side-play amount of caption information bar Time beginning, end time, content of text and renderer property are preserved into caption information data list, and it can be word to preserve form Curtain file URL (path), the time started, the end time, content of text, renderer property, side-play amount, as shown in figure 11.Traversal institute There is a time attribute of the caption information bar for parsing, between obtaining at the beginning of every caption information bar and the end time, extract Between at the beginning of the caption information bar and the end time, according to carrying out ascending sort between at the beginning of the caption information bar, Name the caption information bar and preserve with the time attribute of caption information bar and preserve form into caption information data list Can be subtitle file URL (path), content of text, renderer property, side-play amount, as shown in figure 12.
Further, reference picture 5, Fig. 5 is the schematic flow sheet of the changing method second embodiment of captions of the present invention.
Changing method first embodiment based on captions of the present invention, methods described also includes:
Step S60, judge to be switched subtitle file whether be current language subtitle file;
Step S70, if so, then continuing to output the subtitle file of display current language;
Step S80, if it is not, then obtaining to be switched subtitle file.
In the present embodiment, user is during video is watched, it may occur that mistake presses the operation of the equipment such as remote control.When with The operation of the equipment such as remote control is pressed for switching captions in family by mistake when, it is current language that user can select switching language, to continue Watch the video of current output language.Therefore caption information data list is obtained in the switching subtitle instructions triggered according to user And before to be switched subtitle file, it is necessary first to judge to be switched subtitle file whether be current language subtitle file, such as The selected to be switched captions of fruit user can determine whether that user triggers maloperation as the captions of current language, then, without cutting Language is changed, then continues to output the captions of display current language;If the selected to be switched captions of user and current language Captions are different, then obtain to be switched subtitle file.
The present invention further provides a kind of switching device of captions.
Reference picture 6, Fig. 6 is the high-level schematic functional block diagram of the switching device first embodiment of captions of the present invention.
In the present embodiment, the device includes:
Module 10 is set up, for obtaining subtitle file that video bag contains and parsing, caption information bar is obtained, according to the word The curtain path of file and the side-play amount of caption information bar set up caption information data list.
In the present embodiment, it is necessary to obtain whole words that the video bag contains in advance before user plays out video Curtain file, and the subtitle file is preserved in the buffer.Then the subtitle file is parsed, obtains multiple caption informations Bar, the side-play amount in path and caption information bar further according to the subtitle file sets up caption information data list.
First acquisition module 20, the switching subtitle instructions for being triggered according to user obtain the road of to be switched subtitle file Footpath.
Specifically, when family is used in viewing audio/video file, the captions for finding acquiescence display are not the captions that oneself needs, then Captions switching can be carried out by equipment such as remote controls.Specifically, captions handoff functionality is selected, and in the option list of ejection The captions type of selection demand, generates captions switching command, when terminal detects the captions switching command, receives the captions and cuts Change instruction.Then according to the path of the to be switched subtitle file of captions switching command.
Extraction module 30, meet pre-conditioned caption information bar in caption information data list for extracting.
Specifically, the current play time stamp of currently playing video is obtained first, then stabs the current play time With at the beginning of the caption information bar in caption information data list between and the end time contrasted successively, obtain contrast knot Really, the time started in comparing result is less than or equal to timestamp and the end time is more than or equal to the caption information bar of timestamp Extract.
Read module 40, for searching the path identical with to be switched subtitle file in the caption strips information extracted Caption information bar, and the address offset amount of the caption information bar is obtained, read the caption data of the address offset amount.
Timestamp is less than or equal in the time started extracted and the end time is more than or equal to the word of timestamp After curtain information bar, the caption information bar with to be switched subtitle file path same paths is searched in the caption information bar, And the address offset amount of the caption information bar is obtained, read the caption data of the address offset amount.
First display module 50, the caption data for that will read carries out output display.
The caption data that will be read carries out output display so that during the broadcasting of captions after switching and currently playing video Between match.
The switching device of the captions that the present embodiment is proposed, obtains all captions that video bag contains first before video playback File simultaneously parses the subtitle file, so that the caption information bar of subtitle file is obtained, then according to the subtitle file The side-play amount of path and caption information bar sets up caption information data list;Switch subtitle instructions when user's triggering is detected When, the switching subtitle instructions triggered according to user obtain the path of to be switched subtitle file;Then caption information data is extracted Meet pre-conditioned caption information bar in list;The road with to be switched subtitle file is searched in the caption strips information extracted Footpath identical caption information bar, and the address offset amount of the caption information bar is obtained, read the captions of the address offset amount Data;The caption data that will be read again carries out output display, so that when captions are switched, the captions after switching can be fast Speed is displayed on corresponding timestamp.
Further, reference picture 7, Fig. 7 is the refinement high-level schematic functional block diagram of extraction module in Fig. 6.
Based on switching device first embodiment of the present invention based on captions of the present invention, the extraction module 30 can include:
Acquisition module 31, for obtaining the video data current display time stamp in playing;
Comparison unit 32, for by the beginning of the caption information bar in the timestamp and caption information data list Between contrasted respectively with the end time;;
First extraction unit 33, if for exist in the caption information of caption information data list the time started be less than or Caption information bar equal to timestamp and end time more than or equal to timestamp, then extract the caption information bar;
Second extraction unit 34, if for being less than in the absence of the time started in the caption information of caption information data list Or the caption information bar equal to timestamp and end time more than or equal to timestamp, then extract and the timestamp is separated by recently Caption information bar.
In the present embodiment, the video data current display time stamp in playing is obtained first;Then by the timestamp With at the beginning of the caption information bar in caption information data list between contrasted respectively with the end time;If caption information There is the time started in the caption information of data list is more than or equal to timestamp less than or equal to timestamp and end time Caption information bar, then extract the caption information bar;If in the absence of beginning in the caption information of caption information data list Time is less than or equal to timestamp and the end time is more than or equal to the caption information bar of timestamp, then extract and the timestamp It is separated by nearest caption information bar.
Further, reference picture 8, Fig. 8 is the refinement high-level schematic functional block diagram of the first display module 50 in Fig. 6.
Based on switching device first embodiment of the present invention based on captions of the present invention, first display module 50 can be wrapped Include:
First resolution unit 51, for obtaining the to be switched subtitle file for carrying out output display, will be described to be switched Subtitle file is parsed;
Comparing unit 52, the caption information data for obtaining the to be switched subtitle file, when obtaining currently playing Between stamp and by the current play time stamp and the to be switched subtitle file caption information bar at the beginning of between and terminate Time is compared successively;
Rendering unit 53, for the time started in the caption information bar of the to be switched subtitle file to be less than or equal into institute State current play time stamp and current play time stamp less than or equal to the caption information bar of end time render it is aobvious Show captioned test information;
Searching unit 54, it is described current for the end time in the caption information bar of the to be switched subtitle file to be more than The caption information bar of reproduction time stamp is removed, and searches next caption data;
Buffer unit 55, it is described current for the time started in the caption information bar of the to be switched subtitle file to be less than The caption information bar caching of reproduction time stamp.
In the present embodiment, after the to be switched subtitle file after navigating to side-play amount carries out output display, obtain The to be switched subtitle file for carrying out output display, the to be switched subtitle file is parsed;Obtain described to be switched The caption information data of subtitle file, obtains current play time stamp and the current play time is stabbed into be cut with described It is compared successively with the end time between changing at the beginning of the caption information bar of subtitle file;Then by the to be switched captions text The time started stabs less than or equal to the current play time and current play time stamp is less than in the caption information bar of part Or carry out rendering display captioned test information equal to the caption information bar of end time;By the captions of the to be switched subtitle file The end time removes more than the caption information bar of current play time stamp in information bar, and searches next caption data; Caption information bar by the time started in the caption information bar of the to be switched subtitle file less than current play time stamp Caching.
Further, reference picture 9, Fig. 9 is to set up the refinement high-level schematic functional block diagram of module in Fig. 6.
Based on switching device first embodiment of the present invention based on captions of the present invention, the module 10 of setting up can include:
Acquiring unit 11, for obtaining the subtitle file that video bag contains, and the subtitle file is preserved into caching, institute State path of the subtitle file including subtitle file content and subtitle file;
Second resolution unit 12, for parsing the subtitle file, according between at the beginning of every captions and the end time Captions are split into multiple caption information bars, side-play amount, time started, end time, the content of text of caption information bar is obtained And renderer property;
Unit 13 is set up, the side-play amount for the path according to subtitle file and caption information bar sets up caption information bar number According to list, and by between at the beginning of caption information bar, end time, content of text and renderer property preserved to caption information bar number According in list;
Storage unit 14, the time attribute for traveling through all caption information bars for parsing extracts caption information bar At the beginning of between and the end time, according to ascending sort is carried out between at the beginning of the caption information bar, with caption information bar Time attribute is named the caption information bar and is preserved into caption information data list.
In the present embodiment, the subtitle file that contains of video bag was obtained before player shows the first frame, and by the word Curtain file is preserved into caching, and the subtitle file includes the path of subtitle file content and subtitle file.Then successively to institute The plug-in subtitle file having is parsed, according between at the beginning of every captions and captions are split into multiple captions by the end time Information bar, is derived from side-play amount, time started, end time, content of text and the renderer property of caption information bar, Ran Hougen Caption information data list, and opening caption information bar are set up according to the path of subtitle file and the side-play amount of caption information bar Time beginning, end time, content of text and renderer property are preserved into caption information data list, and it can be word to preserve form Curtain file URL (path), the time started, the end time, content of text, renderer property, side-play amount, as shown in figure 11.Traversal institute There is a time attribute of the caption information bar for parsing, between obtaining at the beginning of every caption information bar and the end time, extract Between at the beginning of the caption information bar and the end time, according to carrying out ascending sort between at the beginning of the caption information bar, Name the caption information bar and preserve with the time attribute of caption information bar and preserve form into caption information data list Can be subtitle file URL (path), content of text, renderer property, side-play amount, as shown in figure 12.
Further, reference picture 10, Figure 10 is that the functional module of the switching device second embodiment of captions of the present invention is illustrated Figure.
Switching device first embodiment based on captions of the present invention, described device also includes:
Judge module 60, for judge to be switched subtitle file whether be current language subtitle file;
Second display module 70, if being the subtitle file of current language for be switched subtitle file, continues to output Show the subtitle file of current language;
Second acquisition module 80, if not being the subtitle file of current language for be switched subtitle file, acquisition is treated Switching subtitle file.
In the present embodiment, user is during video is watched, it may occur that mistake presses the operation of the equipment such as remote control.When with The operation of the equipment such as remote control is pressed for switching captions in family by mistake when, it is current language that user can select switching language, to continue Watch the video of current output language.Therefore caption information data list is obtained in the switching subtitle instructions triggered according to user And before to be switched subtitle file, it is necessary first to judge to be switched subtitle file whether be current language subtitle file, such as The selected to be switched captions of fruit user can determine whether that user triggers maloperation as the captions of current language, then, without cutting Language is changed, then continues to output the captions of display current language;If the selected to be switched captions of user and current language Captions are different, then obtain to be switched subtitle file.
The preferred embodiments of the present invention are these are only, the scope of the claims of the invention is not thereby limited, it is every to utilize this hair Equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of changing method of captions, it is characterised in that the described method comprises the following steps:
Obtain the subtitle file that contains of video bag and parse, obtain caption information bar, path and captions according to the subtitle file The side-play amount of information bar sets up caption information data list;
The switching subtitle instructions triggered according to user obtain the path of to be switched subtitle file;
Meet pre-conditioned caption information bar in extraction caption information data list;
The path identical caption information bar with to be switched subtitle file is searched in the caption strips information extracted, and obtains institute The address offset amount of caption information bar is stated, the caption data of the address offset amount is read;
The caption data that will be read carries out output display.
2. the changing method of captions as claimed in claim 1, it is characterised in that in the extraction caption information data list The step of meeting pre-conditioned caption information bar includes:
Obtain the video data current display time stamp in playing;
To respectively enter with the end time between at the beginning of caption information bar in the timestamp and caption information data list Row contrast;
If there is the time started less than or equal to timestamp and end time in the caption information bar in caption information data list More than or equal to the caption information bar of timestamp, then the caption information bar is extracted;
If being less than or equal to timestamp and end time in the absence of the time started in the caption information of caption information data list More than or equal to the caption information bar of timestamp, then extract and the timestamp is separated by nearest caption information bar.
3. the changing method of captions as claimed in claim 1, it is characterised in that the caption data that the side will read is carried out The step of output display, includes:
The to be switched subtitle file of output display is carried out described in obtaining, the to be switched subtitle file is parsed;
The caption information data of the to be switched subtitle file is obtained, current play time stamp is obtained and is currently broadcast described It is compared successively with the end time between putting at the beginning of the caption information bar of timestamp and the to be switched subtitle file;
By the time started in the caption information bar of the to be switched subtitle file less than or equal to the current play time stab and The current play time stamp carries out rendering display captioned test information less than or equal to the caption information bar of end time;
Captions letter by the end time in the caption information bar of the to be switched subtitle file more than current play time stamp Breath bar is removed, and searches next caption data;
Captions letter by the time started in the caption information bar of the to be switched subtitle file less than current play time stamp Breath bar caching.
4. the changing method of captions as claimed in claim 1, it is characterised in that the subtitle file that the acquisition video bag contains is simultaneously Parsing, obtains caption information bar, and the side-play amount in path and caption information bar according to the subtitle file sets up caption information bar The step of data list, includes:
The subtitle file that video bag contains is obtained, and the subtitle file is preserved into caching, the subtitle file includes captions The path of file content and subtitle file;
The subtitle file is parsed, according between at the beginning of every captions and captions are split into multiple caption informations by the end time Bar, obtains side-play amount, time started, end time, content of text and the renderer property of caption information bar;
The side-play amount in path and caption information bar according to subtitle file sets up caption information data list, and by caption information Between at the beginning of bar, end time, content of text and renderer property preserved into caption information data list;
The time attribute of all caption information bars for parsing of traversal, between extracting at the beginning of caption information bar and at the end of Between, according to ascending sort is carried out between at the beginning of the caption information bar, the word is named with the time attribute of caption information bar Curtain information bar is simultaneously preserved into caption information data list.
5. the changing method of the captions as described in claim any one of 1-4, it is characterised in that methods described also includes:
Judge to be switched subtitle file whether be current language subtitle file;
If so, then continuing to output the subtitle file of display current language;
If it is not, then obtaining to be switched subtitle file.
6. a kind of switching device of captions, it is characterised in that described device includes:
Module is set up, for obtaining subtitle file that video bag contains and parsing, caption information bar is obtained, according to the subtitle file Path and the side-play amount of caption information bar set up caption information data list
First acquisition module, the switching subtitle instructions for being triggered according to user obtain the path of to be switched subtitle file;
Extraction module, meet pre-conditioned caption information bar in caption information data list for extracting;
Read module, for searching the path identical captions letter with to be switched subtitle file in the caption strips information extracted Breath bar, and the address offset amount of the caption information bar is obtained, read the caption data of the address offset amount;
First display module, the caption data for that will read carries out output display.
7. the switching device of captions as claimed in claim 6, it is characterised in that the extraction module includes:
Acquiring unit, for obtaining the video data current display time stamp in playing;
Comparison unit, for by between at the beginning of the timestamp and the caption information of caption information data list at the end of Between contrasted respectively;
First extraction unit, if be less than or equal to for there is the time started in the caption information of caption information data list Between stamp and the end time more than or equal to timestamp caption information bar, then extract the caption information bar;
Second extraction unit, if for being less than or equal in the absence of the time started in the caption information of caption information data list Timestamp and end time more than or equal to the caption information bar of timestamp, then extract and the timestamp are separated by nearest captions Information bar.
8. the switching device of captions as claimed in claim 6, it is characterised in that first display module includes:
First resolution unit, for obtaining the to be switched subtitle file for carrying out output display, by the to be switched captions text Part is parsed;
Comparing unit, the caption information data for obtaining the to be switched subtitle file obtains current play time stamp simultaneously And by the current play time stamp and the to be switched subtitle file caption information bar at the beginning of between and the end time according to It is secondary to be compared;
Rendering unit, it is described current for the time started in the caption information bar of the to be switched subtitle file to be less than or equal to Reproduction time is stabbed and current play time stamp carries out rendering display captions less than or equal to the caption information bar of end time Text message;
Searching unit, during for the end time in the caption information bar of the to be switched subtitle file to be more than into described currently playing Between the caption information bar that stabs remove, and search next caption data;
Buffer unit, during for the time started in the caption information bar of the to be switched subtitle file to be less than into described currently playing Between stab caption information bar caching.
9. the switching device of captions as claimed in claim 6, it is characterised in that the module of setting up includes:
Acquiring unit, for obtaining the subtitle file that video bag contains, and the subtitle file is preserved into caching, the captions File includes the path of subtitle file content and subtitle file;
Second resolution unit, for parsing the subtitle file, according between at the beginning of every captions and the end time is by captions Split into multiple caption information bars, obtain the side-play amount of caption information bar, time started, end time, content of text and render Attribute;
Unit is set up, the side-play amount for the path according to subtitle file and caption information bar sets up caption information data row Table, and by between at the beginning of caption information bar, end time, content of text and renderer property preserved to caption information data row In table;
Storage unit, the time attribute for traveling through all caption information bars for parsing extracts the beginning of caption information bar Time and end time, according to ascending sort is carried out between at the beginning of the caption information bar, belonged to the time of caption information bar The life name caption information bar is simultaneously preserved into caption information data list.
10. the switching device of the captions as described in claim any one of 6-9, it is characterised in that described device also includes:
Judge module, for judge to be switched subtitle file whether be current language subtitle file;
Second display module, if being the subtitle file of current language for be switched subtitle file, continues to output display and works as The subtitle file of preceding language;
Second acquisition module, if not being the subtitle file of current language for be switched subtitle file, obtains to be switched word Curtain file.
CN201611127290.1A 2016-12-06 2016-12-06 The switching method and device of subtitle Active CN106792114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611127290.1A CN106792114B (en) 2016-12-06 2016-12-06 The switching method and device of subtitle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611127290.1A CN106792114B (en) 2016-12-06 2016-12-06 The switching method and device of subtitle

Publications (2)

Publication Number Publication Date
CN106792114A true CN106792114A (en) 2017-05-31
CN106792114B CN106792114B (en) 2019-12-03

Family

ID=58882045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611127290.1A Active CN106792114B (en) 2016-12-06 2016-12-06 The switching method and device of subtitle

Country Status (1)

Country Link
CN (1) CN106792114B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107864393A (en) * 2017-11-17 2018-03-30 青岛海信电器股份有限公司 The method and device that video is shown with captioning synchronization
CN108040277A (en) * 2017-12-04 2018-05-15 青岛海信电器股份有限公司 For the subtitle switching method and device of the multi-language captions obtained after decoding
CN108495171A (en) * 2018-04-03 2018-09-04 优视科技有限公司 Method for processing video frequency and its device, storage medium, electronic product
CN112055262A (en) * 2020-08-11 2020-12-08 视若飞信息科技(上海)有限公司 Method and system for displaying network streaming media subtitles
CN113141540A (en) * 2021-03-16 2021-07-20 福建星网智慧科技有限公司 Video file subtitle parsing display method
CN113455012A (en) * 2020-09-03 2021-09-28 深圳市大疆创新科技有限公司 Rendering method, rendering device, mobile terminal and storage medium
CN114466219A (en) * 2021-11-23 2022-05-10 海信视像科技股份有限公司 Display device, subtitle data processing method, and storage medium
WO2023015416A1 (en) * 2021-08-09 2023-02-16 深圳Tcl新技术有限公司 Subtitle processing method and apparatus, and storage medium
CN116886941A (en) * 2023-06-09 2023-10-13 北京医百科技有限公司 Method and device for switching caption content in cloud broadcasting guide station

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164248A (en) * 2011-02-15 2011-08-24 Tcl集团股份有限公司 Automatic caption testing method and system
EP2416318A1 (en) * 2010-08-04 2012-02-08 Nero Ag Multi-language buffering during media playback
CN102843603A (en) * 2012-08-17 2012-12-26 Tcl集团股份有限公司 Intelligent television and method for controlling caption thereof
CN103117077A (en) * 2013-01-17 2013-05-22 广东欧珀移动通信有限公司 Display system and display method of blu-ray player disc VSFilter
CN103778929A (en) * 2012-10-18 2014-05-07 三星电子株式会社 Blu-ray disc player and method of displaying subtitles in the Blu-ray disc player
CN105744346A (en) * 2014-12-12 2016-07-06 深圳Tcl数字技术有限公司 Caption switching method and device
CN106060634A (en) * 2016-05-31 2016-10-26 乐视控股(北京)有限公司 Method and device for displaying rolling subtitles

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2416318A1 (en) * 2010-08-04 2012-02-08 Nero Ag Multi-language buffering during media playback
CN102164248A (en) * 2011-02-15 2011-08-24 Tcl集团股份有限公司 Automatic caption testing method and system
CN102843603A (en) * 2012-08-17 2012-12-26 Tcl集团股份有限公司 Intelligent television and method for controlling caption thereof
CN103778929A (en) * 2012-10-18 2014-05-07 三星电子株式会社 Blu-ray disc player and method of displaying subtitles in the Blu-ray disc player
CN103117077A (en) * 2013-01-17 2013-05-22 广东欧珀移动通信有限公司 Display system and display method of blu-ray player disc VSFilter
CN105744346A (en) * 2014-12-12 2016-07-06 深圳Tcl数字技术有限公司 Caption switching method and device
CN106060634A (en) * 2016-05-31 2016-10-26 乐视控股(北京)有限公司 Method and device for displaying rolling subtitles

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107864393A (en) * 2017-11-17 2018-03-30 青岛海信电器股份有限公司 The method and device that video is shown with captioning synchronization
CN108040277B (en) * 2017-12-04 2020-08-25 海信视像科技股份有限公司 Subtitle switching method and device for multi-language subtitles obtained after decoding
CN108040277A (en) * 2017-12-04 2018-05-15 青岛海信电器股份有限公司 For the subtitle switching method and device of the multi-language captions obtained after decoding
US10999643B2 (en) 2017-12-04 2021-05-04 Hisense Visual Technology Co., Ltd. Subtitle switching method and display device
WO2019192416A1 (en) * 2018-04-03 2019-10-10 阿里巴巴集团控股有限公司 Video processing method and device therefor, and storage medium and electronic product
CN108495171A (en) * 2018-04-03 2018-09-04 优视科技有限公司 Method for processing video frequency and its device, storage medium, electronic product
CN112055262A (en) * 2020-08-11 2020-12-08 视若飞信息科技(上海)有限公司 Method and system for displaying network streaming media subtitles
CN113455012A (en) * 2020-09-03 2021-09-28 深圳市大疆创新科技有限公司 Rendering method, rendering device, mobile terminal and storage medium
WO2022047686A1 (en) * 2020-09-03 2022-03-10 深圳市大疆创新科技有限公司 Rendering method, apparatus, mobile terminal, and storage medium
CN113141540A (en) * 2021-03-16 2021-07-20 福建星网智慧科技有限公司 Video file subtitle parsing display method
WO2023015416A1 (en) * 2021-08-09 2023-02-16 深圳Tcl新技术有限公司 Subtitle processing method and apparatus, and storage medium
CN114466219A (en) * 2021-11-23 2022-05-10 海信视像科技股份有限公司 Display device, subtitle data processing method, and storage medium
CN116886941A (en) * 2023-06-09 2023-10-13 北京医百科技有限公司 Method and device for switching caption content in cloud broadcasting guide station
CN116886941B (en) * 2023-06-09 2024-03-26 北京医百科技有限公司 Method and device for switching caption content in cloud broadcasting guide station

Also Published As

Publication number Publication date
CN106792114B (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN106792114A (en) The changing method and device of captions
CN109168078B (en) Video definition switching method and device
CN102291542B (en) Multilingual subtitle setting method and device thereof
US9576581B2 (en) Metatagging of captions
KR100792261B1 (en) System for managing video based on topic and method usign the same and method for searching video based on topic
US20110138418A1 (en) Apparatus and method for generating program summary information regarding broadcasting content, method of providing program summary information regarding broadcasting content, and broadcasting receiver
JP2008148077A (en) Moving picture playback device
JP2000023112A (en) System, device and method for filtering information and video equipment
KR101293301B1 (en) System and method for serching images using caption of moving picture in keyword
EP1898643A2 (en) Method for automatically searching for data applications for all channels and video apparatus adopting the method
JP2009239729A (en) Device, method and program for informing content scene appearance
US9008492B2 (en) Image processing apparatus method and computer program product
JP5197841B1 (en) Video playback apparatus and video playback method
JP2009260902A5 (en)
CN114640874A (en) Subtitle synchronization method and device, set top box and computer readable storage medium
CN104602099B (en) A kind of method and device of Subtitle Demonstration
US9342813B2 (en) Apparatus and method for displaying log information associated with a plurality of displayed contents
CN110475121B (en) Video data processing method and device and related equipment
WO2013123723A1 (en) Method for searching related information of digital television programs and digital television receiving terminal
CN104768060B (en) A kind of channel switching method and device
KR101228103B1 (en) A method and terminal for producing and applying electronic service guide information
US20160191959A1 (en) Enhanced timed text in video streaming
JP5033653B2 (en) Video recording / reproducing apparatus and video reproducing apparatus
KR20150041403A (en) Display aparatus and method for channel changing
JP6399686B2 (en) Receiving machine

Legal Events

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