CN107135415A - Video caption processing method and processing device - Google Patents
Video caption processing method and processing device Download PDFInfo
- Publication number
- CN107135415A CN107135415A CN201710232417.4A CN201710232417A CN107135415A CN 107135415 A CN107135415 A CN 107135415A CN 201710232417 A CN201710232417 A CN 201710232417A CN 107135415 A CN107135415 A CN 107135415A
- Authority
- CN
- China
- Prior art keywords
- layer
- video
- captions
- window
- terminal device
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 15
- 230000015572 biosynthetic process Effects 0.000 claims abstract description 51
- 238000000034 method Methods 0.000 claims abstract description 51
- 238000003786 synthesis reaction Methods 0.000 claims abstract description 51
- 230000002194 synthesizing effect Effects 0.000 claims abstract description 15
- 238000010586 diagram Methods 0.000 description 6
- 230000009286 beneficial effect Effects 0.000 description 2
- 210000004209 hair Anatomy 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/488—Data services, e.g. news ticker
- H04N21/4884—Data services, e.g. news ticker for displaying subtitles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/435—Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
- H04N21/4355—Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream involving reformatting operations of additional data, e.g. HTML pages on a television screen
- H04N21/4356—Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream involving reformatting operations of additional data, e.g. HTML pages on a television screen by altering the spatial resolution, e.g. to reformat additional data on a handheld device, attached to the STB
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440263—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Circuits (AREA)
Abstract
The embodiment of the present invention provides a kind of video caption processing method and processing device, and this method includes:According to the screen size of the terminal device, Video Layer to be shown and captions figure layer are obtained, the size of the Video Layer and the captions figure layer is identical with the screen size of the terminal device;Judge whether the video playback window for carrying out video playback is full screen window;If so, then showing the Video Layer and the captions figure layer simultaneously in the video playback window, the Video Layer is located at below the captions figure layer;If not, then the Video Layer and the captions figure layer are overlapped, obtain synthesizing figure layer, processing zoomed in and out to the synthesis figure layer according to the size of the video playback window, and show in the video playback window scaling handle after synthesis figure layer.Workload for reducing video caption processing.
Description
Technical field
The present embodiments relate to video technique field, more particularly to a kind of video caption processing method and processing device.
Background technology
What the video file and subtitle file of many film sources (such as TV play, film) were separated, when playing film source, need
Video file and subtitle file are handled, so that terminal device can synchronously play video and captions.
At present, when playing film source, for each frame in film source, video file progress is handled and obtains pre-set dimension
Video Layer (a frame video), handles subtitle file progress the captions figure layer (a frame captions) for obtaining pre-set dimension;Then, root
According to the size of video playback window, processing is zoomed in and out to Video Layer and captions figure layer respectively, further according to video playback window
Position in the display screen of terminal device, determines the display location of Video Layer and captions figure layer, and according to Video Layer
With the display location of captions figure layer, while show scaling processing after Video Layer and captions figure layer, wherein, scaling processing after
Video Layer is located at the lower section of the captions figure layer after scaling is handled.
However, when playing film source, it is necessary to zoom in and out processing to Video Layer and captions figure layer respectively and need difference
Workload is excessive to be shown to Video Layer and captions figure layer, causes the consumed resource to terminal device excessive.
The content of the invention
The embodiment of the present invention provides a kind of video caption processing method and processing device, reduces the work of video caption processing
Amount.
In a first aspect, the embodiment of the present invention provides a kind of video caption processing method, applied to terminal device, methods described
Including:
According to the screen size of the terminal device, acquisition Video Layer to be shown and captions figure layer, the video figure
The size of layer and the captions figure layer is identical with the screen size of the terminal device;
Judge whether the video playback window for carrying out video playback is full screen window;
If so, then showing the Video Layer and the captions figure layer, the video simultaneously in the video playback window
Figure layer is located at below the captions figure layer;
If it is not, being then overlapped the Video Layer and the captions figure layer, obtain synthesizing figure layer, according to the video
The size of broadcast window zooms in and out processing to the synthesis figure layer, and is shown in the video playback window at the scaling
Synthesis figure layer after reason.
In one embodiment, according to the screen size of the terminal device, Video Layer and word to be shown is obtained
Curtain figure layer, including:
Obtain the corresponding video file of the Video Layer and the corresponding subtitle file of the captions figure layer;
The video file is decoded, initial video figure layer is obtained;
The subtitle file is decoded, initial captions figure layer is obtained;
According to the screen size of the terminal device, the initial video figure layer and the initial captions figure layer are entered respectively
The processing of row scaling, obtains the Video Layer and the captions figure layer.
In another embodiment, judge for carry out video playback video playback window whether be full screen window it
Before, in addition to:
According to the first default transparency, transparency process is carried out to the Video Layer;
According to the second default transparency, transparency process is carried out to the captions figure layer.
In another embodiment, the Video Layer and the captions figure are shown simultaneously in the video playback window
Layer, including:
Obtain the figure layer order of the Video Layer and the figure layer order of the captions figure layer, the figure of the Video Layer
Layer order is less than the figure layer order of the captions figure layer;
According to the figure layer order of the Video Layer and the figure layer order of the captions figure layer, in the video playback window
Show the Video Layer and the captions figure layer simultaneously.
In another embodiment, the Video Layer and the captions figure layer are overlapped, obtain synthesizing figure layer,
Including:
Obtain the figure layer order of the Video Layer and the figure layer order of the captions figure layer, the figure of the Video Layer
Layer order is less than the figure layer order of the captions figure layer;
According to the figure layer order of the Video Layer and the figure layer order of the captions figure layer, by the captions map overlay
To the Video Layer, the synthesis figure layer is obtained.
In another embodiment, the synthesis figure layer after the scaling processing is shown in the video playback window,
Including:
Obtain positional information of the video playback window in the display screen of the terminal device;
According to the positional information, the synthesis figure layer is shown in the display screen of the terminal device, so that shown
Figure layer is synthesized to be located in the video playback window.
Second aspect, the embodiment of the present invention provides a kind of video subtitle processing apparatus, including acquisition module, judge module,
Display module, synthesis module and Zoom module, wherein,
The acquisition module is used for, and according to the screen size of the terminal device, obtains Video Layer and word to be shown
The size of curtain figure layer, the Video Layer and the captions figure layer is identical with the screen size of the terminal device;
The judge module is used for, and judges whether the video playback window for carrying out video playback is full screen window;
The display module is used for, and when the judge module judges the video window for full screen window, is regarded described
Frequency broadcast window shows the Video Layer and the captions figure layer simultaneously, and the Video Layer is located under the captions figure layer
Side;
The synthesis module is used for, when the judge module judges the video window for non-full screen window, to described
Video Layer and the captions figure layer are overlapped, and obtain synthesizing figure layer;The Zoom module is used for, according to the video playback
The size of window zooms in and out processing to the synthesis figure layer;The display module is additionally operable to, in the video playback window
Show the synthesis figure layer after the scaling processing.
In one embodiment, the acquisition module is obtained to be shown according to the screen size of the terminal device
Video Layer and captions figure layer, including:
Obtain the corresponding video file of the Video Layer and the corresponding subtitle file of the captions figure layer;
The video file is decoded, initial video figure layer is obtained;
The subtitle file is decoded, initial captions figure layer is obtained;
According to the screen size of the terminal device, the initial video figure layer and the initial captions figure layer are entered respectively
The processing of row scaling, obtains the Video Layer and the captions figure layer.
In another embodiment, described device also includes transparency process module, wherein, sentence in the judge module
Before whether the video playback window broken for carrying out video playback is full screen window, the transparency process module is used for:
According to the first default transparency, transparency process is carried out to the Video Layer;
According to the second default transparency, transparency process is carried out to the captions figure layer.
In another embodiment, the display module shows the Video Layer simultaneously in the video playback window
With the captions figure layer, including:
Obtain the figure layer order of the Video Layer and the figure layer order of the captions figure layer, the figure of the Video Layer
Layer order is less than the figure layer order of the captions figure layer;
According to the figure layer order of the Video Layer and the figure layer order of the captions figure layer, in the video playback window
Show the Video Layer and the captions figure layer simultaneously.
In another embodiment, the synthesis module is overlapped to the Video Layer and the captions figure layer,
Obtain synthesizing figure layer, including:
Obtain the figure layer order of the Video Layer and the figure layer order of the captions figure layer, the figure of the Video Layer
Layer order is less than the figure layer order of the captions figure layer;
According to the figure layer order of the Video Layer and the figure layer order of the captions figure layer, by the captions map overlay
Onto the Video Layer, the synthesis figure layer is obtained.
In another embodiment, the display module is shown in the video playback window after the scaling processing
Synthesis figure layer, including:
Obtain positional information of the video playback window in the display screen of the terminal device;
According to the positional information, the synthesis figure layer is shown in the display screen of the terminal device, so that shown
Figure layer is synthesized to be located in the video playback window.
Video caption processing method and processing device provided in an embodiment of the present invention, when needing to play a certain frame in film source,
First according to the screen size of terminal device, Video Layer and captions figure layer are obtained so that the size of Video Layer and captions figure layer
It is identical with the screen size of terminal device, then according to the type of video playback window, Video Layer and captions figure layer are carried out
Different disposal, specifically, when judging video playback window for full screen window, directly show within display screen Video Layer and
Captions figure layer;When judging video playback window for non-full screen window, first synthetic video figure layer and captions figure layer are closed
Into figure layer, then processing is zoomed in and out to synthesis figure layer and shown, reduced the scaling number of times and display number of times to figure layer, reduce
To the workload of video caption processing, and then reduce the consumed resource to terminal device.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs
Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the application scenarios schematic diagram of video caption processing method provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet one of video caption processing method provided in an embodiment of the present invention;
Fig. 3 is the schematic flow sheet two of video caption processing method provided in an embodiment of the present invention;
Fig. 4 is that video caption provided in an embodiment of the present invention handles interface schematic diagram one;
Fig. 5 is that video caption provided in an embodiment of the present invention handles interface schematic diagram two;
Fig. 6 is the structural representation one of video subtitle processing apparatus provided in an embodiment of the present invention;
Fig. 7 is the structural representation two of video subtitle processing apparatus provided in an embodiment of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is the application scenarios schematic diagram of video caption processing method provided in an embodiment of the present invention.Fig. 1 is referred to, eventually
End equipment obtains piece source file, includes video file and subtitle file in piece source file.Terminal device can be in display screen
Video playback window in play film source, wherein, video playback window can be located at display screen optional position, video playback
The size of window can also be set according to actual needs.Optionally, terminal device can be the equipment such as computer, TV, mobile phone.
In this application, when needing to play a certain frame in film source, first according to the screen size of terminal device, acquisition is regarded
Frequency figure layer and captions figure layer so that Video Layer is identical with the size of captions figure layer and the screen size of terminal device, works as judgement
Video playback window be full screen window when, Video Layer and captions figure layer are directly shown within display screen, no longer to regarding
Frequency figure layer and captions figure layer zoom in and out processing, also no longer determine the display location of Video Layer and captions figure layer, when judgement is regarded
When frequency broadcast window is non-full screen window, first synthetic video figure layer and captions figure layer obtain synthesizing figure layer, then enter synthesis figure layer
The processing of row scaling and display, reduce the scaling number of times and display number of times to figure layer, reduce the work to video caption processing
Amount, and then reduce the consumed resource to terminal device.
Below, by specific embodiment, the technical scheme shown in the application is described in detail.It should be noted that
Several specific embodiments can be combined with each other below, for same or analogous content, no longer carry out in various embodiments
Repeat.
Fig. 2 is the schematic flow sheet one of video caption processing method provided in an embodiment of the present invention.Refer to Fig. 2, the party
Method can include:
S201, the screen size according to terminal device, obtain Video Layer to be shown and captions figure layer, Video Layer and
The size of captions figure layer is identical with the screen size of terminal device.
The executive agent of the embodiment of the present invention is video subtitle processing apparatus, and the video subtitle processing apparatus can be arranged on
In terminal device.
In embodiments of the present invention, the screen size of terminal device refers to the length and width of the display screen of terminal device
Degree.Video Layer is the frame in video, and captions figure layer is the frame in captions.
In actual application, when needing to play out film source, first video file is handled and (for example decoded
Processing etc.), to obtain the Video Layer for being currently needed for playing, and handled subtitle file (such as decoding process) to obtain
Take the corresponding captions figure layer of Video Layer.In embodiments of the present invention, video process apparatus is to each Video Layer and its right
The process that the captions figure layer answered is handled is identical, below, with video process apparatus to any one Video Layer and its correspondingly
Captions figure layer processing procedure exemplified by, the technical scheme shown in the application is described in detail.
Optionally, the screen size of terminal device can be represented by the screen pixels of terminal device, the screen of terminal device
The pixel that the pixel and a row that curtain pixel can be included by a line of screen include is represented, for example, the screen picture of terminal device
Element can be 1920 × 1080, wherein, 1920 be the pixel that screen a line includes, and 1080 be that screen one arranges the pixel included.Phase
Answer, the pixel that the pixel and a row that the size of Video Layer can be included by the Video Layer a line include is represented.Captions
The pixel that the pixel and a row that the size of figure layer can be included by the captions figure layer a line include is represented.
Optionally, the corresponding video file of Video Layer and the corresponding subtitle file of captions figure layer can be obtained, to video
File is decoded, and obtains initial video figure layer, subtitle file is decoded, and obtains initial captions figure layer, and according to terminal
The screen size of equipment, zooms in and out processing to initial video figure layer and initial captions figure layer respectively, obtains Video Layer and word
Curtain figure layer.
In embodiments of the present invention, can be to the processing of the scaling of figure layer (initial video figure layer or initial captions figure layer) pair
The enhanced processing of figure layer or the diminution processing to figure layer., optionally, can when needing to be amplified processing to figure layer
To be smoothed to figure layer, and new pixel is inserted in figure layer by interpolation algorithm, to realize amplification figure layer.Work as needs
When reduce processing to figure layer, optionally, the pixel in being deleted layer by intermittent, which is realized, reduces figure layer.
For example, it is assumed that the screen pixels of terminal device can be 1920 × 1080, it is further assumed that video file is decoded
The pixel of the initial video figure layer obtained afterwards is 960 × 540, then according to the screen size (1920 × 1080) of terminal device, will
Initial video figure layer, which is amplified twice, obtains Video Layer, for example, being smoothed to initial video figure layer, passes through interpolation algorithm
New pixel is inserted in initial video figure layer, the Video Layer that pixel is 1920 × 1080, the pixel of the Video Layer is obtained
It is identical with the screen pixels of terminal device, and then make it that the size of Video Layer is identical with the screen size of terminal device.
S202, judge whether the video playback window for carrying out video playback is full screen window.
If so, then performing S203.
If it is not, then performing S204-S206.
In actual application, video playback window can be full screen window, or non-full screen window, work as video
When broadcast window is non-full screen window, user can also set the size and video playback window of video playback window aobvious
Position in display screen curtain.
Optionally, user can carry out different settings according to the difference of video type to the video playback window of video,
For example, the video playback window of live video can be set to full screen window by user, by regarding for Internet video and local video
Frequency broadcast window is set to non-full screen window.Accordingly, it can judge that video is broadcast according to the type of the video being currently played
Whether put window is full screen window.
S203, in video playback window Video Layer and captions figure layer are shown simultaneously, Video Layer is located under captions figure layer
Side.
If video playback window is full screen window, Video Layer and word are shown in the display screen of terminal device simultaneously
Curtain figure layer, and Video Layer is included below captions figure layer, due to video playback window, Video Layer and captions figure layer
Size is identical with the screen size of terminal device, therefore, it can include Video Layer and captions figure layer in video playback window
Mouthful.
It should be noted that before video playback window shows Video Layer and captions figure layer simultaneously, first to video figure
Layer and captions figure layer carry out transparency process, and during so as to which captions figure layer being included on Video Layer, user both can see
Captions positioned at upper strata, it can also be seen that positioned at the video of lower floor.
Optionally, when showing Video Layer and captions figure layer at the same time, can first obtain Video Layer figure layer order and
The figure layer order of captions figure layer, the figure layer order of Video Layer is less than the figure layer order of captions figure layer, further according to Video Layer
The figure layer order of figure layer order and captions figure layer, Video Layer and captions figure layer are shown in video playback window simultaneously.Wherein, scheme
The small figure layer of layer order is located at the lower section of the big figure layer of figure layer order, because the figure layer order of Video Layer is less than captions figure layer
Figure layer order, therefore, Video Layer are shown in the lower section of captions figure layer.
S204, Video Layer and captions figure layer are overlapped, obtain synthesizing figure layer.
Optionally, when obtaining synthesis figure layer, the figure layer order of Video Layer and the figure layer time of captions figure layer can be obtained
Sequence, the figure layer order of Video Layer is less than the figure layer order of captions figure layer, and according to the figure layer order and captions figure of Video Layer
The figure layer order of layer, on captions map overlay to Video Layer, will obtain synthesizing figure layer.
It should be noted that before being overlapped to Video Layer and captions figure layer, first to Video Layer and captions figure
Layer carries out transparency process, so that after Video Layer and captions figure layer are overlapped, user both can see positioned at upper strata
Captions, it can also be seen that positioned at the video of lower floor.
S205, processing zoomed in and out to synthesis figure layer according to the size of video playback window.
It should be noted that to synthesis figure layer zoom in and out processing process may refer to shown in S201 to initially regarding
Frequency figure layer and initial captions figure layer zoom in and out the process of processing, are no longer repeated herein.
S206, show in video playback window the synthesis figure layer after scaling processing.
Optionally, in display synthesis figure layer, video playback window can first be obtained in the display screen of terminal device
Positional information, and according to positional information, synthesis figure layer is shown in the display screen of terminal device, so that shown synthesis figure layer
In video playback window.
Video caption processing method provided in an embodiment of the present invention, when needing to play a certain frame in film source, first basis
The screen size of terminal device, obtains Video Layer and captions figure layer so that the size and terminal of Video Layer and captions figure layer
The screen size of equipment is identical, then according to the type of video playback window, and Video Layer and captions figure layer are not existed together
Reason, specifically, when judging video playback window for full screen window, Video Layer and captions figure are directly shown within display screen
Layer, without zooming in and out processing to Video Layer and captions figure layer, without determining showing for Video Layer and captions figure layer
Show position, when judging video playback window for non-full screen window, first synthetic video figure layer and captions figure layer obtain composite diagram
Layer, then processing is zoomed in and out to synthesis figure layer and shown;Video Layer and captions figure layer are contracted respectively compared with prior art
Put and be shown in display window, the scaling number of times and display number of times to figure layer are reduced, so as to reduce to video caption
The workload of processing, and then reduce the consumed resource to terminal device.
On the basis of embodiment illustrated in fig. 2, below, by the embodiment shown in Fig. 3, to the technical side shown in the application
Case is further elaborated.
Fig. 3 is the schematic flow sheet two of video caption processing method provided in an embodiment of the present invention.In embodiment illustrated in fig. 2
On the basis of, Fig. 3 is referred to, this method can include:
S301, the corresponding video file of acquisition Video Layer and the corresponding subtitle file of captions figure layer.
S302, video file is decoded, obtain initial video figure layer, subtitle file is decoded, obtain initial
Captions figure layer.
S303, the screen size according to terminal device, are zoomed in and out to initial video figure layer and initial captions figure layer respectively
Processing, obtains Video Layer and captions figure layer.
It should be noted that S301-S303 implementation procedure is illustrated in S201, no longer repeated herein.
S304, according to the first default transparency, transparency process is carried out to Video Layer, according to the second default transparency,
Transparency process is carried out to captions figure layer.
Transparency process is being carried out to Video Layer and according to the second default transparency to word according to the first default transparency
Curtain figure layer is carried out after transparency process, frequency figure layer and captions figure layer is shown at the same time or to display frequency figure layer and captions figure
When layer is overlapped, user both can see the captions positioned at upper strata, it can also be seen that positioned at the video of lower floor.
S305, judge whether the video playback window for carrying out video playback is full screen window.
If so, then performing S306-S307.
If it is not, then performing S308-S311.
S306, the figure layer order for obtaining Video Layer and captions figure layer figure layer order, the figure layer order of Video Layer are small
In the figure layer order of captions figure layer.
S307, the figure layer order according to Video Layer and captions figure layer figure layer order, show simultaneously in video playback window
Show Video Layer and captions figure layer, Video Layer is located at below captions figure layer.
It should be noted that S306-S307 implementation procedure is illustrated in S203, no longer repeated herein.
S308, the figure layer order according to Video Layer and captions figure layer figure layer order, by captions map overlay to video
In figure layer, obtain synthesizing figure layer.
S309, processing zoomed in and out to synthesis figure layer according to the size of video playback window.
The positional information of S310, acquisition video playback window in the display screen of terminal device.
S311, according to positional information, shown in the display screen of terminal device synthesis figure layer so that shown synthesis figure layer
In video playback window.
It should be noted that S308-S311 implementation procedure is no longer gone to live in the household of one's in-laws on getting married in S204-S206 implementation procedure herein
State.
Below, with reference to Fig. 4-Fig. 5, by specific example, the technical scheme shown in above-described embodiment is described in detail.
Fig. 4 is that video caption provided in an embodiment of the present invention handles interface schematic diagram one.Fig. 5 is the present invention
Fig. 4 and Fig. 5 are referred to, when playing on television during video 1, initial video figure is obtained in video file
Layer 401-1, the acquisition initial video captions figure layer 402-1 in subtitle file.Assuming that initial video figure layer 401-1 pixels are 768*
432nd, initial captions figure layer 402-1 pixel is 576*324, it is further assumed that the screen pixels of TV are 960*540, then to initially regarding
Frequency figure layer 401-1 and initial captions figure layer 402-1 zoom in and out processing, for example, can pass through differential technique Video Layer 401-1's
282 pixels are laterally increased, 108 pixels are longitudinally increased in Video Layer 401-1, by interpolation method in initial captions figure layer
402-1's laterally increases 384 pixels, and 216 pixels are laterally increased in initial captions figure layer 402-1, meanwhile, to initially regarding
Frequency figure layer 401-1 and initial captions figure layer 402-1 carries out transparency process, obtains Video Layer 401-2 and captions figure layer 402-
2。
When the video playback window for playing video 1 is full screen window, Fig. 4 is referred to, Video Layer 401-2 figure is obtained
The figure layer order 1 of layer order 0 and captions figure layer 402-2, because Video Layer 401-2 figure layer order (0) is less than captions figure layer
402-2 figure layer order (1), then show Video Layer 401-2 and captions figure layer 402-2, and will regard on display screen A simultaneously
Frequency figure layer 401-2 is placed on captions figure layer 402-2 lower section.
When the video playback window for playing video 1 is non-full screen window, Fig. 5 is referred to, obtains Video Layer 401-2's
The figure layer order 1 of figure layer order 0 and captions figure layer 402-2, because Video Layer 401-2 figure layer order (0) is less than captions figure
Captions figure layer 402-2, then be added on Video Layer 401-2 by layer 402-2 figure layer order (1), obtains synthesis figure layer 403-
1.Assuming that the size of video playback window is 480*270, then synthesis figure layer 403-1 is reduced, obtain synthesis figure layer 403-
2, the position upper left corner (in practical application can by coordinate representation) of the video playback window in display screen A is also obtained, then
In display screen A upper left corner display synthesis figure layer 403-2.
In above process, when judging video playback window for full screen window, video is directly shown within display screen
Figure layer and captions figure layer, no longer zoom in and out processing to Video Layer and captions figure layer, also no longer determine Video Layer and
The display location of captions figure layer, when judging video playback window for non-full screen window, first synthetic video figure layer and captions figure layer,
Obtain synthesizing figure layer, then processing is zoomed in and out to synthesis figure layer and shown;Compared with prior art respectively to Video Layer and captions
Figure layer zooms in and out and is shown in display window, the scaling number of times and display number of times to figure layer is reduced, so as to reduce
To the workload of video caption processing, and then reduce the consumed resource to terminal device.
Fig. 6 is the structural representation one of video subtitle processing apparatus provided in an embodiment of the present invention.The device can be set
In terminal device, Fig. 6 is referred to, the device includes acquisition module 11, judge module 12, display module 13, synthesis module 14
With Zoom module 15, wherein,
The acquisition module 11 is used for, according to the screen size of the terminal device, obtain Video Layer to be shown and
The size of captions figure layer, the Video Layer and the captions figure layer is identical with the screen size of the terminal device respectively;
The judge module 12 is used for, and judges whether the video playback window for carrying out video playback is full screen window;
The display module 13 is used for, when the judge module 12 judges the video window for full screen window, in institute
Video playback window is stated while showing the Video Layer and the captions figure layer, the Video Layer is located at the captions figure layer
Lower section;
The synthesis module 14 is used for, right when the judge module 12 judges the video window for non-full screen window
The Video Layer and the captions figure layer are overlapped, and obtain synthesizing figure layer;The Zoom module 15 is used for, and is regarded according to described
The size of frequency broadcast window zooms in and out processing to the synthesis figure layer;The display module 13 is additionally operable to, and is broadcast in the video
Put and the synthesis figure layer after the scaling processing is shown in window.
Video subtitle processing apparatus provided in an embodiment of the present invention can perform the technical side shown in above method embodiment
Case, its realization principle and beneficial effect are similar, are no longer repeated herein.
In one embodiment, the acquisition module 11 is obtained to be shown according to the screen size of the terminal device
Video Layer and captions figure layer, including:
Obtain the corresponding video file of the Video Layer and the corresponding subtitle file of the captions figure layer;
The video file is decoded, initial video figure layer is obtained;
The subtitle file is decoded, initial captions figure layer is obtained;
According to the screen size of the terminal device, the initial video figure layer and the initial captions figure layer are entered respectively
The processing of row scaling, obtains the Video Layer and the captions figure layer.
Fig. 7 is the structural representation two of video subtitle processing apparatus provided in an embodiment of the present invention.In embodiment illustrated in fig. 6
On the basis of, button Fig. 7 is asked, described device also includes transparency process module 16, wherein, judge to use in the judge module 12
Before whether the video playback window for carrying out video playback is full screen window, the transparency process module 16 is used for:
According to the first default transparency, transparency process is carried out to the Video Layer;
According to the second default transparency, transparency process is carried out to the captions figure layer.
In another embodiment, the display module 13 shows the video figure simultaneously in the video playback window
Layer and the captions figure layer, including:
Obtain the figure layer order of the Video Layer and the figure layer order of the captions figure layer, the figure of the Video Layer
Layer order is less than the figure layer order of the captions figure layer;
According to the figure layer order of the Video Layer and the figure layer order of the captions figure layer, in the video playback window
Show the Video Layer and the captions figure layer simultaneously.
In one embodiment, described 14 pairs of Video Layers of synthesis module and the captions figure layer are overlapped,
Obtain synthesizing figure layer, including:
Obtain the figure layer order of the Video Layer and the figure layer order of the captions figure layer, the figure of the Video Layer
Layer order is less than the figure layer order of the captions figure layer;
According to the figure layer order of the Video Layer and the figure layer order of the captions figure layer, by the captions map overlay
Onto the Video Layer, the synthesis figure layer is obtained.
In one embodiment, the display module 13 is shown in the video playback window after the scaling processing
Synthesis figure layer, including:
Obtain positional information of the video playback window in the display screen of the terminal device;
According to the positional information, the synthesis figure layer is shown in the display screen of the terminal device, so that shown
Figure layer is synthesized to be located in the video playback window.
Video subtitle processing apparatus provided in an embodiment of the present invention can perform the technical side shown in above method embodiment
Case, its realization principle and beneficial effect are similar, are no longer repeated herein.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to
The related hardware of programmed instruction is crossed to complete.Foregoing program can be stored in a computer read/write memory medium.The journey
Sequence upon execution, performs the step of including above-mentioned each method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or
Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is only to the technical scheme for illustrating the embodiment of the present invention, rather than to it
Limitation;Although the embodiment of the present invention is described in detail with reference to foregoing embodiments, one of ordinary skill in the art
It should be understood that:It can still modify to the technical scheme described in foregoing embodiments, or to which part or
All technical characteristic carries out equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from this hair
The scope of bright embodiment scheme.
Claims (10)
1. a kind of video caption processing method, it is characterised in that applied to terminal device, methods described includes:
According to the screen size of the terminal device, obtain Video Layer to be shown and captions figure layer, the Video Layer and
The size of the captions figure layer is identical with the screen size of the terminal device;
Judge whether the video playback window for carrying out video playback is full screen window;
If so, then showing the Video Layer and the captions figure layer, the Video Layer simultaneously in the video playback window
Below the captions figure layer;
If it is not, being then overlapped the Video Layer and the captions figure layer, obtain synthesizing figure layer, according to the video playback
The size of window zooms in and out processing to the synthesis figure layer, and is shown in the video playback window after the scaling processing
Synthesis figure layer.
2. according to the method described in claim 1, it is characterised in that according to the screen size of the terminal device, obtain and wait to show
The Video Layer and captions figure layer shown, including:
Obtain the corresponding video file of the Video Layer and the corresponding subtitle file of the captions figure layer;
The video file is decoded, initial video figure layer is obtained;
The subtitle file is decoded, initial captions figure layer is obtained;
According to the screen size of the terminal device, the initial video figure layer and the initial captions figure layer are contracted respectively
Processing is put, the Video Layer and the captions figure layer is obtained.
3. according to the method described in claim 1, it is characterised in that judge be for the video playback window for carrying out video playback
It is no be full screen window before, in addition to:
According to the first default transparency, transparency process is carried out to the Video Layer;
According to the second default transparency, transparency process is carried out to the captions figure layer.
4. the method according to claim any one of 1-3, it is characterised in that show institute simultaneously in the video playback window
Video Layer and the captions figure layer are stated, including:
Obtain the figure layer order of the Video Layer and the figure layer order of the captions figure layer, the figure layer time of the Video Layer
Sequence is less than the figure layer order of the captions figure layer;
According to the figure layer order of the Video Layer and the figure layer order of the captions figure layer, in the video playback window simultaneously
Show the Video Layer and the captions figure layer.
5. the method according to claim any one of 1-3, it is characterised in that to the Video Layer and the captions figure layer
It is overlapped, obtains synthesizing figure layer, including:
Obtain the figure layer order of the Video Layer and the figure layer order of the captions figure layer, the figure layer time of the Video Layer
Sequence is less than the figure layer order of the captions figure layer;
According to the figure layer order of the Video Layer and the figure layer order of the captions figure layer, by the captions map overlay to institute
State on Video Layer, obtain the synthesis figure layer.
6. the method according to claim any one of 1-3, it is characterised in that show described in the video playback window
Synthesis figure layer after scaling processing, including:
Obtain positional information of the video playback window in the display screen of the terminal device;
According to the positional information, the synthesis figure layer is shown in the display screen of the terminal device, so that shown synthesis
Figure layer is located in the video playback window.
7. a kind of video subtitle processing apparatus, it is characterised in that including acquisition module, judge module, display module, synthesis module
And Zoom module, wherein,
The acquisition module is used for, and according to the screen size of the terminal device, obtains Video Layer and captions figure to be shown
The size of layer, the Video Layer and the captions figure layer is identical with the screen size of the terminal device;
The judge module is used for, and judges whether the video playback window for carrying out video playback is full screen window;
The display module is used for, and when the judge module judges the video window for full screen window, is broadcast in the video
Window is put while showing the Video Layer and the captions figure layer, the Video Layer is located at below the captions figure layer;
The synthesis module is used for, when the judge module judges the video window for non-full screen window, to the video
Figure layer and the captions figure layer are overlapped, and obtain synthesizing figure layer;
The Zoom module is used for, and processing is zoomed in and out to the synthesis figure layer according to the size of the video playback window;Institute
State display module to be additionally operable to, the synthesis figure layer after the scaling processing is shown in the video playback window.
8. device according to claim 7, it is characterised in that the acquisition module is according to the screen chi of the terminal device
It is very little, acquisition Video Layer to be shown and captions figure layer, including:
Obtain the corresponding video file of the Video Layer and the corresponding subtitle file of the captions figure layer;
The video file is decoded, initial video figure layer is obtained;
The subtitle file is decoded, initial captions figure layer is obtained;
According to the screen size of the terminal device, the initial video figure layer and the initial captions figure layer are contracted respectively
Processing is put, the Video Layer and the captions figure layer is obtained.
9. device according to claim 7, it is characterised in that described device also includes transparency process module, wherein,
Before the judge module judges whether the video playback window for carrying out video playback be full screen window, at the transparence
Reason module is used for:
According to the first default transparency, transparency process is carried out to the Video Layer;
According to the second default transparency, transparency process is carried out to the captions figure layer.
10. the device according to claim any one of 7-9, it is characterised in that the display module is in the video playback
Window shows the Video Layer and the captions figure layer simultaneously, including:
Obtain the figure layer order of the Video Layer and the figure layer order of the captions figure layer, the figure layer time of the Video Layer
Sequence is less than the figure layer order of the captions figure layer;
According to the figure layer order of the Video Layer and the figure layer order of the captions figure layer, in the video playback window simultaneously
Show the Video Layer and the captions figure layer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710232417.4A CN107135415A (en) | 2017-04-11 | 2017-04-11 | Video caption processing method and processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710232417.4A CN107135415A (en) | 2017-04-11 | 2017-04-11 | Video caption processing method and processing device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107135415A true CN107135415A (en) | 2017-09-05 |
Family
ID=59716287
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710232417.4A Pending CN107135415A (en) | 2017-04-11 | 2017-04-11 | Video caption processing method and processing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107135415A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111327961A (en) * | 2020-03-30 | 2020-06-23 | 上海句石智能科技有限公司 | Video subtitle switching method and system |
CN111669664A (en) * | 2020-06-17 | 2020-09-15 | Oppo广东移动通信有限公司 | Video playing method, video playing device, electronic equipment and storage medium |
CN113438514A (en) * | 2021-04-26 | 2021-09-24 | 深圳Tcl新技术有限公司 | Subtitle processing method, device, equipment and storage medium |
CN113438533A (en) * | 2021-05-31 | 2021-09-24 | 北京达佳互联信息技术有限公司 | Video display method and device, electronic equipment and storage medium |
WO2022073389A1 (en) * | 2020-10-10 | 2022-04-14 | 游艺星际(北京)科技有限公司 | Video picture display method and electronic device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102685600A (en) * | 2012-04-26 | 2012-09-19 | 青岛海信电器股份有限公司 | Data overlaying display and synthesis method and system and display equipment |
CN102724458A (en) * | 2012-06-18 | 2012-10-10 | 深圳Tcl新技术有限公司 | Video picture full-screen display subtitle processing method and video terminal |
CN104410929A (en) * | 2014-12-19 | 2015-03-11 | 三星电子(中国)研发中心 | Processing method and device for caption images |
WO2015163555A1 (en) * | 2014-04-22 | 2015-10-29 | 주식회사 뱁션 | Subtitle inserting system and method |
CN106101528A (en) * | 2015-12-29 | 2016-11-09 | 广东中星电子有限公司 | A kind of method and device at video playback window operation video |
CN106303725A (en) * | 2016-08-25 | 2017-01-04 | 暴风集团股份有限公司 | HOOK is utilized to realize the method and device of barrage in renderer |
-
2017
- 2017-04-11 CN CN201710232417.4A patent/CN107135415A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102685600A (en) * | 2012-04-26 | 2012-09-19 | 青岛海信电器股份有限公司 | Data overlaying display and synthesis method and system and display equipment |
CN102724458A (en) * | 2012-06-18 | 2012-10-10 | 深圳Tcl新技术有限公司 | Video picture full-screen display subtitle processing method and video terminal |
WO2015163555A1 (en) * | 2014-04-22 | 2015-10-29 | 주식회사 뱁션 | Subtitle inserting system and method |
CN104410929A (en) * | 2014-12-19 | 2015-03-11 | 三星电子(中国)研发中心 | Processing method and device for caption images |
CN106101528A (en) * | 2015-12-29 | 2016-11-09 | 广东中星电子有限公司 | A kind of method and device at video playback window operation video |
CN106303725A (en) * | 2016-08-25 | 2017-01-04 | 暴风集团股份有限公司 | HOOK is utilized to realize the method and device of barrage in renderer |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111327961A (en) * | 2020-03-30 | 2020-06-23 | 上海句石智能科技有限公司 | Video subtitle switching method and system |
CN111669664A (en) * | 2020-06-17 | 2020-09-15 | Oppo广东移动通信有限公司 | Video playing method, video playing device, electronic equipment and storage medium |
CN111669664B (en) * | 2020-06-17 | 2022-06-07 | Oppo广东移动通信有限公司 | Video playing method, video playing device, electronic equipment and storage medium |
WO2022073389A1 (en) * | 2020-10-10 | 2022-04-14 | 游艺星际(北京)科技有限公司 | Video picture display method and electronic device |
CN113438514A (en) * | 2021-04-26 | 2021-09-24 | 深圳Tcl新技术有限公司 | Subtitle processing method, device, equipment and storage medium |
CN113438533A (en) * | 2021-05-31 | 2021-09-24 | 北京达佳互联信息技术有限公司 | Video display method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107135415A (en) | Video caption processing method and processing device | |
CN103797787B (en) | Image processing method and image processing equipment | |
WO2020107297A1 (en) | Video clipping control method, terminal device, system | |
WO2015192713A1 (en) | Image processing method and device, mobile terminal, and computer storage medium | |
CN107770627A (en) | The method of image display device and operation image display device | |
CN103297855B (en) | Application display method and terminal | |
CN104581380A (en) | Information processing method and mobile terminal | |
KR20230049691A (en) | Video processing method, terminal and storage medium | |
CN105100664A (en) | Image generation method and device | |
WO2020001022A1 (en) | Image expansion method, computing device and computer storage medium | |
CN102473285A (en) | Retargeting of image with overlay graphic | |
CN107295390A (en) | Television pages switching method and device | |
CN112801004A (en) | Method, device and equipment for screening video clips and storage medium | |
US11996124B2 (en) | Video processing method, apparatus, readable medium and electronic device | |
CN113296721A (en) | Display method, display device and multi-screen linkage system | |
CN113900567B (en) | Control method for interactive display of covers, interactive display device for covers and large-screen terminal | |
CN107231537A (en) | A kind of picture-in-picture switching method and apparatus | |
JP2004056488A (en) | Image processing method, image processor and image communication equipment | |
US7659913B2 (en) | Method and apparatus for video editing with a minimal input device | |
KR20180132095A (en) | Method and apparatus for gamut mapping | |
CN107301045A (en) | Window display method and device | |
CN109816620A (en) | Image processing method and device, electronic equipment and storage medium | |
JP2005354332A (en) | Image reproducer and program | |
CN103543978A (en) | Video scaling method and system | |
US10306140B2 (en) | Motion adaptive image slice selection |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218 Applicant after: Hisense Video Technology Co., Ltd Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218 Applicant before: HISENSE ELECTRIC Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170905 |