CN106878807B - Video switching method and device - Google Patents

Video switching method and device Download PDF

Info

Publication number
CN106878807B
CN106878807B CN201710039818.8A CN201710039818A CN106878807B CN 106878807 B CN106878807 B CN 106878807B CN 201710039818 A CN201710039818 A CN 201710039818A CN 106878807 B CN106878807 B CN 106878807B
Authority
CN
China
Prior art keywords
video
metadata
playing
switching
player
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.)
Active
Application number
CN201710039818.8A
Other languages
Chinese (zh)
Other versions
CN106878807A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201710039818.8A priority Critical patent/CN106878807B/en
Publication of CN106878807A publication Critical patent/CN106878807A/en
Application granted granted Critical
Publication of CN106878807B publication Critical patent/CN106878807B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440245Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/458Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a video switching method, which is used for a mobile terminal and comprises the following steps: inserting metadata in at least one transport stream data of a first video, wherein the metadata contains instruction information; and in the process of playing the first video by the first video player, if the metadata is called back at any moment, switching to a second video player to play a second video. The embodiment of the invention also provides a video switching device. According to the invention, the metadata containing the instruction information is inserted into the transmission stream data of the video, and when the metadata is obtained by callback in the video playing process, the video can be switched according to the instruction information in the metadata, so that the switching between the video and the video is more accurate and flexible, the occupied resources are less, and the user experience is improved.

Description

Video switching method and device
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a video switching method and apparatus.
Background
In an actual playing application scene, in order to obtain the best playing experience, a plurality of sections of videos can be organized together according to the sequence and played, and each section of video starts a playing module instance of a system to be played; or in order to realize dynamic inter-cut of other video materials in the video, the playing module instances of a plurality of systems can be managed and played as required.
For example management of playing modules of multiple systems and switching between examples, in order to play (advertisement before video, copyright statement, etc.), the conventional switching method is to switch to the next playing after the previous playing is finished, and to determine that 'playing is finished' by detecting the playing progress or to determine that 'playing is finished' by other state information. For the problem of inter cut (advertisement playing in video), the existing switching method is to continuously and actively obtain the current playing progress from the player, detect the playing progress value, and switch the player when the playing progress reaches the expected inter cut time point. Therefore, the precision of switching videos in the prior art completely depends on the precision of the acquired playing progress.
Improving the accuracy of obtaining the playing progress will significantly increase the system load or complexity. Therefore, the video switching method in the prior art cannot simultaneously meet the requirements of improving the precision of obtaining the playing progress and reducing the system load or complexity.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a video switching method and device, so as to solve the problem that the video switching method in the prior art cannot improve the precision of obtaining the playing progress and reduce the system load or complexity.
In order to solve the above problem, according to an aspect of the present invention, there is provided a video switching method for a mobile terminal, the video switching method including:
inserting metadata in at least one transport stream data of a first video, wherein the metadata contains instruction information;
and in the process of playing the first video by the first video player, if the metadata is called back at any moment, switching to a second video player to play a second video.
According to another aspect of the present invention, the present invention also discloses a video switching apparatus for a mobile terminal, the video switching apparatus comprising:
the video processing device comprises an insertion module, a processing module and a display module, wherein the insertion module is used for inserting metadata into at least one transport stream data of a first video, and the metadata contains instruction information;
and the switching module is used for switching to a second video player to play a second video if the metadata is obtained by calling back at any moment in the process of playing the first video by the first video player.
Compared with the prior art, the embodiment of the invention has the following advantages:
the metadata containing the instruction information is inserted into the transmission stream data of the video, and in the video playing process, when the metadata is obtained by callback, the video can be switched according to the instruction information in the metadata.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart of a video switching method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a video switching method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a video switching method according to a third embodiment of the present invention;
fig. 4 is a flowchart of a video switching method according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a video switching apparatus according to a fifth embodiment of the present invention;
fig. 6 is a block diagram of a video switching apparatus according to a sixth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The embodiment of the invention provides a video switching method. The video switching method is used for the mobile terminal. The mobile terminal may be, but is not limited to, a mobile phone, a tablet computer, MP3/MP4, a smart watch, a smart bracelet, a Personal Digital Assistant (PDA), a vehicle-mounted computer, and the like. The system of the mobile terminal is an IOS system or an android system. Fig. 1 is a flowchart of a video switching method according to a first embodiment of the present invention. The video switching method comprises the following steps:
step 101: metadata is inserted in at least one transport stream data of the first video.
Preferably, the video playing of the method of the embodiment of the present invention may be based on a protocol of hls (http Live streaming). The HLS can realize live broadcast and on-demand of streaming media and provide a video live broadcast and on-demand scheme for the mobile terminal. Based on HLS playing, the video is divided into small data segments and organized in a playlistic mode, and the playing process is to acquire the data segments from a server side through HTTP. The data file encapsulation formats supported by HLS are mainly MPEG transport streams (MPEG-TS, TS).
When packaging video, the metadata is kept consistent with the video stream and the audio stream as an independent data stream, namely, the time axis is kept synchronous. Preferably, the metadata is encapsulated into the transport stream data in the ID3 data format. The data in the ID3 data format is readable by a video player. The type of metadata is a plain text data type in the ID3 data format. The plain text data is typically a string of characters in a fixed format. The specific form of the fixed format is customizable. The fixed format is adopted, so that the metadata can be conveniently identified by the method of the embodiment, and the difficulty that different metadata adopt different formats to increase identification is avoided. The metadata includes instruction information, and specifically, a dedicated field may be used in the fixed-format string to describe the instruction information. The instruction information is used for prompting the next action when the first video is played to the time point.
Specifically, the instruction information includes: after the first video is played, the playing of the first video is interrupted, or the playing of the second video is resumed, preferably, the step 101 specifically includes:
metadata is inserted in the last or non-beginning transport stream data of the first video.
Step 102: in the process that the first video player plays the first video, if the metadata is called back at any moment, the second video player is switched to play the second video.
The first video, the second video may be an advertisement, a feature, or the like. Thus, the video switch may be ad to ad, ad to feature, feature to feature.
Since the instruction information contained in the metadata includes: after the first video is played, the playing of the first video is interrupted, or the playing of the second video is resumed, preferably, the step 102 specifically includes:
in the process of playing the first video by the first video player, if the metadata is obtained by calling back at the moment when the first video is played or at any moment of playing the first video, which is not the beginning or the end, the corresponding second video player is switched to play or the playing of the second video is resumed.
Specifically, taking the IOS system as an example, the first video player and the second video player may employ an avplayer. The player is a player carried by the IOS system of the mobile terminal. The player may support point-in-time based metadata presentation. A metadata callback is registered by the avplayer, and when the avplayer encounters ID3 data in metadata during playing, the avplayer is informed of the ID3 data through the callback interface. Therefore, this feature of the avplayer can implement a callback mechanism. The callback mechanism does not depend on the playing progress, but triggers the switching action of the avplayer through a callback event, and particularly, the playing scene is interrupted. Therefore, by inserting the metadata into the transport stream data in step 101, different switching operations can be triggered according to the instruction information included in the metadata after the metadata is obtained by callback in step 102.
To sum up, in the video switching method according to the first embodiment of the present invention, metadata including instruction information is inserted into transport stream data of a video, and when the metadata is obtained by callback in a video playing process, a video can be switched according to the instruction information in the metadata, and since the metadata is inserted into a specific transport stream data, the video can be accurately switched at a specific time without increasing precision of obtaining a playing progress, and a flow of inserting the metadata is simple, and a load or complexity of a system is not increased, so that switching between the video and the video is more accurate and flexible, resources are less occupied, and user experience is improved.
Example two
The second embodiment of the invention provides a video switching method. The video switching method is used for the mobile terminal. The mobile terminal may be, but is not limited to, a mobile phone, a tablet computer, MP3/MP4, a smart watch, a smart bracelet, a Personal Digital Assistant (PDA), a vehicle-mounted computer, and the like. The system of the mobile terminal is an IOS system or an android system. The video switching method is suitable for scenes in which the instruction information is that the first video is played completely. Fig. 2 is a flowchart of a video switching method according to a second embodiment of the present invention. The video switching method comprises the following specific steps:
step 201: metadata is inserted in the last transport stream data of the first video.
For example, if the first video is an advertisement, metadata is inserted into the last transport stream data of the advertisement video. The instruction information contained in the metadata is that the advertisement is played completely.
Step 202: in the process of playing the first video by the first video player, if the metadata is obtained by calling back at the moment when the first video is played, switching to the corresponding second video player to play the second video according to a preset video playing sequence or an instant received playing instruction.
For example, if the second video is a feature film, after the advertisement serving as the first video is played, the metadata including the instruction information "advertisement playing completed" is called back, and the second video player is switched to play the feature film. In addition, the second video may also be a new advertisement.
The predetermined playing sequence is generally the sequence set by the video provider. The instant received playing command is generally an instant command input by a user. Wherein, the meaning that the instant receiving playing instruction indicates is: and when the first video is played and the metadata is called back, the playing instruction is received immediately. Therefore, switching to the corresponding second video player to play the second video representation according to the instant received playing instruction means: when the first video is played and the metadata is called back, and the second video needs to be switched, if the playing instruction is received immediately, the video is not played according to the preset video playing sequence, but the second video indicated by the instruction is played. For example, a plurality of advertisement videos are played before a feature film is played, and on a page where a current advertisement is played, members of some video websites can make a player skip the following advertisement by clicking the skip advertisement, so as to directly play the feature film.
In summary, the instruction information in the video switching method according to the second embodiment of the present invention is that the first video is completely played, so that after the first video is completely played, the metadata including the instruction information is obtained through callback, and the video switching method can be accurately and flexibly switched to the second video after the first video is completely played.
EXAMPLE III
The third embodiment of the invention provides a video switching method. The video switching method is used for the mobile terminal. The mobile terminal may be, but is not limited to, a mobile phone, a tablet computer, MP3/MP4, a smart watch, a smart bracelet, a Personal Digital Assistant (PDA), a vehicle-mounted computer, and the like. The system of the mobile terminal is an IOS system or an android system. The video switching method is suitable for scenes with instruction information of interruption of first video playing. Fig. 3 is a flowchart of a video switching method according to a third embodiment of the present invention. The video switching method comprises the following specific steps:
step 301: metadata is inserted in non-head-to-tail located transport stream data of the first video.
For example, the first video is a feature film. The instruction information contained in the metadata is a feature play interruption. The transport stream data is arranged according to a time axis of the first video. Therefore, by inserting the metadata in any transport stream data located not at the beginning or end, the effect of interrupting the playing of the first video at a specific point in time can be achieved.
Step 302: in the process of playing the first video by the first video player, if the metadata is obtained by calling back at any time of playing the first video, the corresponding second video player is switched to play the second video according to a preset video playing sequence or an instant received playing instruction.
For example, the second video is an advertisement. When the feature film serving as the first video is played to a specific moment which is not head and tail, the metadata containing the instruction information of 'feature film playing interruption' is called back, and then the second video player is switched to play the advertisement.
As in the second embodiment, the preset playing sequence is generally the sequence set by the video provider, and the instant received playing command is generally an instant command input by the user, for example, after the feature film playing is interrupted, a plurality of advertisement videos are generally inserted, and on the page where the current advertisement is played, members of some video websites can make the player skip the following advertisement by clicking the skip advertisement, so as to directly play the feature film.
To sum up, the instruction information in the video switching method according to the third embodiment of the present invention is the interruption of the playing of the first video, so that in the playing process of the first video, the metadata including the instruction information is obtained by calling back at any time other than the beginning and the end of the first video, and the video switching method can accurately and flexibly switch to the second video in the playing process of the first video, and is particularly suitable for being applied to a scene in which an advertisement is inserted in a feature film.
Example four
The fourth embodiment of the invention provides a video switching method. The video switching method is used for the mobile terminal. The mobile terminal may be, but is not limited to, a mobile phone, a tablet computer, MP3/MP4, a smart watch, a smart bracelet, a Personal Digital Assistant (PDA), a vehicle-mounted computer, and the like. The system of the mobile terminal is an IOS system or an android system. The video switching method is suitable for the scene of the instruction information for resuming playing the second video. Fig. 4 is a flowchart of a video switching method according to a fourth embodiment of the present invention. The video switching method comprises the following specific steps:
step 401: metadata is inserted in the last transport stream data of the first video.
For example, if the first video is an advertisement and the second video is a feature, metadata is inserted into the last transport stream data of the advertisement video. The instruction information included in the metadata is to resume playing the feature film.
Step 402: in the process of playing the first video by the first video player, if the metadata is called back at the moment when the first video is played completely, switching to the second video player and playing the second video from the moment when the second video is interrupted.
For example, if the second video is a feature film, after the advertisement serving as the first video is played, the metadata including the instruction information "resume playing the feature film" is called back, and the second video player is switched to continue playing the feature film from the time when the feature film is interrupted.
To sum up, the instruction information in the video switching method according to the fourth embodiment of the present invention is to resume playing the second video, so that after the first video is played, the metadata including the instruction information is obtained through callback, the second video can be accurately and flexibly switched to after the first video is played, and the second video is continuously played from the time when the second video is interrupted, and the method is particularly suitable for being applied to a scene where the advertisement inserted in the feature film is switched back to the feature film after the advertisement playing is finished.
EXAMPLE five
The fifth embodiment of the invention provides a video switching device. The video switching device is used for the mobile terminal. The mobile terminal may be, but is not limited to, a mobile phone, a tablet computer, MP3/MP4, a smart watch, a smart bracelet, a Personal Digital Assistant (PDA), a vehicle-mounted computer, and the like. The system of the mobile terminal is an IOS system or an android system. Fig. 5 is a block diagram of a video switching apparatus according to a fifth embodiment of the present invention. The video switching device comprises the following specific structure:
an inserting module 501 is configured to insert metadata in at least one transport stream data of the first video.
Preferably, the video playing of the apparatus of the embodiment of the present invention may be based on a protocol of hls (http Live streaming). The HLS can realize live broadcast and on-demand of streaming media and provide a video live broadcast and on-demand scheme for the mobile terminal. Based on HLS playing, the video is divided into small data segments and organized in a playlistic mode, and the playing process is to acquire the data segments from a server side through HTTP. The data file encapsulation formats supported by HLS are mainly MPEG transport streams (MPEG-TS, TS).
When packaging video, the metadata is kept consistent with the video stream and the audio stream as an independent data stream, namely, the time axis is kept synchronous. Preferably, the metadata is encapsulated into the transport stream data in the ID3 data format. The type of metadata is a plain text data type in the ID3 data format. The plain text data is typically a string of characters in a fixed format. The specific form of the fixed format is customizable. The device of the embodiment can conveniently identify the metadata by adopting a fixed format, and the difficulty that different metadata adopt different formats to increase identification is avoided. The metadata includes instruction information, and specifically, a dedicated field may be used in the fixed-format string to describe the instruction information. The instruction information is used for prompting the next action when the first video is played to the time point. Specifically, the instruction information includes: and after the first video is played, the playing of the first video is interrupted or the playing of the second video is resumed.
The switching module 502 is configured to, in a process of playing a first video by a first video player, switch to a second video player to play a second video if metadata is obtained by callback at any time.
The first video, the second video may be an advertisement, a feature, or the like. Thus, the video switch may be ad to ad, ad to feature, feature to feature.
Specifically, the first video player and the second video player may employ an avplayer. The player is a player carried by the mobile terminal system. The player may support point-in-time based metadata presentation. A metadata callback is registered by the avplayer, and when the avplayer encounters ID3 data in metadata during playing, the avplayer is informed of the ID3 data through the callback interface. Therefore, this feature of the avplayer can implement a callback mechanism. The callback mechanism does not depend on the playing progress, but triggers the switching action of the avplayer through a callback event, and particularly, the playing scene is interrupted. Therefore, the insertion module 501 inserts the metadata into the transport stream data, and the switching module 502 can trigger different switching operations according to the instruction information included in the metadata after the metadata is obtained by callback.
To sum up, in the video switching apparatus according to the fifth embodiment of the present invention, by inserting the metadata including the instruction information into the transport stream data of the video, when the metadata is retrieved in the video playing process, the video can be switched according to the instruction information in the metadata, and since the metadata is inserted into a specific transport stream data, the video can be accurately switched at a specific time without increasing the precision of obtaining the playing progress, and the flow of inserting the metadata is simple, and without increasing the load or complexity of the system, the switching between the video and the video is more accurate and flexible, the resource usage is less, and the user experience is improved.
EXAMPLE six
The sixth embodiment of the invention provides a video switching device. The video switching device is used for the mobile terminal. The mobile terminal may be, but is not limited to, a mobile phone, a tablet computer, MP3/MP4, a smart watch, a smart bracelet, a Personal Digital Assistant (PDA), a vehicle-mounted computer, and the like. The system of the mobile terminal is an IOS system or an android system. Fig. 6 is a block diagram of a video switching apparatus according to a sixth embodiment of the present invention. The video switching device comprises the following specific structure:
an inserting module 601, configured to insert metadata in at least one transport stream data of the first video.
The switching module 602 is configured to, in a process of playing a first video by a first video player, switch to a second video player to play a second video if metadata is obtained by callback at any time.
Wherein the instruction information includes: and after the first video is played, the playing of the first video is interrupted or the playing of the second video is resumed.
Preferably, the insertion module 601 includes:
an inserting sub-module 6011 is configured to insert the metadata in the last or non-head-to-tail transport stream data of the first video.
The switching module 602 includes:
the switching submodule 6021 is configured to, in a process of playing the first video by the first video player, switch to the corresponding second video player to play or resume playing the second video if the metadata is obtained by callback at a time when the playing of the first video is completed or at any time other than the beginning and the end of the playing of the first video.
The preferred insert submodule 6011 includes:
a first inserting unit 60111, configured to insert the metadata in the last transport stream data of the first video if the instruction information indicates that the first video has been played.
To cooperate with the first plug-in unit 60111, the switching submodule 6021 includes:
the first switching unit 60211 is configured to, in a process that the first video player plays the first video, switch to a corresponding second video player to play the second video according to a preset video playing sequence or an immediately received playing instruction if the metadata is obtained by calling back at a time when the first video is played.
By the unit design, the device is particularly suitable for switching between advertisements and prints and between advertisements.
Preferably, insert submodule 6011 includes:
a second inserting unit 60112, configured to insert, if the instruction information is that the playing of the first video is interrupted, metadata in the transport stream data of the first video that is not the head and the tail;
to mate with the second plug-in unit 60112, the switching submodule 6021 includes:
the second switching unit 60212 is configured to, in a process that the first video player plays the first video, switch to a corresponding second video player to play the second video according to a preset video playing sequence or a playing instruction received immediately if the metadata is obtained by calling back at any time that is not from the beginning to the end of playing the first video.
Through the unit design, the device is particularly suitable for being applied to scenes for inserting advertisements in the prints.
Preferably, insert submodule 6011 includes:
a third inserting unit 60113, configured to insert the metadata in the last transport stream data of the first video if the instruction information is to resume playing the second video.
To mate with this third plug-in unit sub-module 60113, the switching sub-module 6021 includes:
a third switching unit 60213, configured to switch to the second video player and play the second video from the moment when the second video is interrupted if the metadata is retrieved at the moment when the first video is completely played in the process that the first video player plays the first video.
Through the unit design, the device is particularly suitable for being applied to scenes of switching back to the feature films after the advertisements inserted in the feature films are played.
To sum up, the video switching apparatus according to the sixth embodiment of the present invention inserts metadata including instruction information into transport stream data of a video, and switches the video according to the instruction information in the metadata when the metadata is retrieved in a video playing process, and the metadata is inserted into a specific transport stream data, so that the video can be accurately switched at a specific time without increasing precision of a playing progress.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The video switching method and device provided by the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. A video switching method is used for a mobile terminal, and is characterized by comprising the following steps:
inserting metadata in at least one transport stream data of a first video, wherein the metadata contains instruction information;
in the process that a first video player plays the first video, if the metadata is obtained by calling back at any moment, switching to a second video player to play a second video;
the instruction information includes: after the first video is played, the playing of the first video is interrupted or the playing of the second video is resumed;
said step of inserting metadata in at least one transport stream data of the first video comprises:
inserting metadata in the last or non-beginning transport stream data of the first video;
in the process that the first video player plays the first video, if the metadata is obtained by calling back at any moment, the step of switching to the second video player to play the second video comprises the following steps:
in the process that the first video player plays the first video, if the metadata is obtained by calling back at the moment when the first video is played or at any moment of playing the first video, which is not the beginning and the end of the first video, the corresponding second video player is switched to play or the second video is resumed to play;
if the instruction information is to resume playing the second video,
said step of inserting metadata in at least one transport stream data of the first video comprises:
inserting metadata in a last transport stream data of the first video;
in the process that the first video player plays the first video, if the metadata is obtained by calling back at any moment, the step of switching to the second video player to play the second video comprises the following steps:
and in the process of playing the first video by the first video player, if the metadata is obtained by calling back at the moment when the first video is played completely, switching to the second video player and playing the second video from the moment when the second video is interrupted.
2. The video switching method of claim 1, wherein if the command message indicates that the first video has been played,
said step of inserting metadata in at least one transport stream data of the first video comprises:
inserting metadata in a last transport stream data of the first video;
in the process that the first video player plays the first video, if the metadata is obtained by calling back at any moment, the step of switching to the second video player to play the second video comprises the following steps:
in the process of playing the first video by the first video player, if the metadata is obtained by calling back at the moment when the first video is played, switching to the corresponding second video player to play the second video according to a preset video playing sequence or an instant received playing instruction.
3. The video switching method of claim 1, wherein if the command message is a first video playback interrupt,
said step of inserting metadata in at least one transport stream data of the first video comprises:
inserting metadata in non-head-to-tail transport stream data of the first video;
in the process that the first video player plays the first video, if the metadata is obtained by calling back at any moment, the step of switching to the second video player to play the second video comprises the following steps:
in the process of playing the first video by the first video player, if the metadata is obtained by calling back at any time of playing the first video, the corresponding second video player is switched to play the second video according to a preset video playing sequence or an instant received playing instruction.
4. The video switching method according to claim 1, wherein: the type of the metadata is a plain text data type in the ID3 data format.
5. A video switching apparatus for a mobile terminal, the video switching apparatus comprising:
the video processing device comprises an insertion module, a processing module and a display module, wherein the insertion module is used for inserting metadata into at least one transport stream data of a first video, and the metadata contains instruction information;
the switching module is used for switching to a second video player to play a second video if the metadata is obtained by calling back at any moment in the process of playing the first video by the first video player;
the instruction information includes: after the first video is played, the playing of the first video is interrupted or the playing of the second video is resumed;
the insertion module comprises:
an insertion sub-module for inserting metadata in the last or non-beginning transport stream data of the first video;
the switching module includes:
the switching sub-module is configured to, in a process that the first video player plays the first video, switch to a corresponding second video player to play or resume playing the second video if the metadata is obtained by callback at a time when the first video is played or at any time other than the beginning and the end of the playing of the first video;
the insertion sub-module includes:
a third inserting unit, configured to insert metadata in the last transport stream data of the first video if the instruction information is to resume playing the second video;
the switching submodule includes:
and a third switching unit, configured to switch to the second video player and play the second video from the moment when the second video is interrupted, if the metadata is obtained by recalling at the moment when the first video is completely played in the process of playing the first video by the first video player.
6. The video switching apparatus according to claim 5,
the insertion sub-module includes:
a first inserting unit, configured to insert metadata in a last transport stream data of a first video if the instruction information indicates that the first video is completely played;
the switching submodule includes:
and the first switching unit is used for switching to the corresponding second video player to play the second video according to a preset video playing sequence or an instant received playing instruction if the metadata is obtained by calling back at the moment when the first video is played by the first video player in the process that the first video player plays the first video.
7. The video switching apparatus according to claim 5,
the insertion sub-module includes:
a second inserting unit, configured to insert metadata in the non-head-to-tail transport stream data of the first video if the instruction information indicates that playing of the first video is interrupted;
the switching submodule includes:
and the second switching unit is used for switching to the corresponding second video player to play the second video according to a preset video playing sequence or an instant received playing instruction if the metadata is obtained by calling back at any moment of playing the first video, which is not the beginning or the end of the first video, in the process of playing the first video by the first video player.
8. The video switching apparatus according to claim 5, wherein: the type of the metadata is a plain text data type in the ID3 data format.
CN201710039818.8A 2017-01-19 2017-01-19 Video switching method and device Active CN106878807B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710039818.8A CN106878807B (en) 2017-01-19 2017-01-19 Video switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710039818.8A CN106878807B (en) 2017-01-19 2017-01-19 Video switching method and device

Publications (2)

Publication Number Publication Date
CN106878807A CN106878807A (en) 2017-06-20
CN106878807B true CN106878807B (en) 2020-06-19

Family

ID=59158048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710039818.8A Active CN106878807B (en) 2017-01-19 2017-01-19 Video switching method and device

Country Status (1)

Country Link
CN (1) CN106878807B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107371064B (en) * 2017-07-03 2020-02-07 奇酷互联网络科技(深圳)有限公司 Mobile terminal and audio and video playing method and device thereof
CN111970572B (en) * 2018-01-31 2022-05-17 聚好看科技股份有限公司 Method for controlling video occlusion map on smart television
CN110471635A (en) * 2018-05-09 2019-11-19 上海碧虎网络科技有限公司 Vehicle-mounted media put-on method and its system, automobile and readable storage medium storing program for executing
CN108924573B (en) * 2018-06-21 2021-08-31 深圳市网心科技有限公司 Data stream processing method, data stream playing method, server, data stream playing device, data stream playing system and media

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104023271A (en) * 2014-02-26 2014-09-03 华为技术有限公司 Advertisement information pushing method and user equipment
CN104756505A (en) * 2012-06-28 2015-07-01 爱立信股份有限公司 Method and system for ad insertion in over-the-top live media delivery

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8670649B1 (en) * 2012-10-10 2014-03-11 Hulu, LLC Scene detection using weighting function

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104756505A (en) * 2012-06-28 2015-07-01 爱立信股份有限公司 Method and system for ad insertion in over-the-top live media delivery
CN104023271A (en) * 2014-02-26 2014-09-03 华为技术有限公司 Advertisement information pushing method and user equipment

Also Published As

Publication number Publication date
CN106878807A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN106878807B (en) Video switching method and device
US9077956B1 (en) Scene identification
US10452250B2 (en) Method for associating media files with additional content
US10992973B2 (en) Publishing a plurality of disparate live media output stream manifests using live input streams and pre-encoded media assets
CN106792152B (en) Video synthesis method and terminal
CN112333536A (en) Audio and video editing method, equipment and computer readable storage medium
CN103823870B (en) Information processing method and electronic equipment
US20160119661A1 (en) On-Demand Metadata Insertion into Single-Stream Content
CN107318038B (en) Method for synchronizing video playing and comment, terminal equipment and storage medium
CN102123281A (en) Fast forward and fast backward treatment method and device during video playing and mobile terminal
US10231005B2 (en) Operation instructing method and apparatus for remote controller of intelligent television
CN111510755A (en) Audio and video switching method and device, computer equipment and readable storage medium
CN101770371A (en) Application theme content preview method and device
CN103491430A (en) Streaming media data processing method and electronic device
CN106331089A (en) Video play control method and system
CN103841451A (en) Multimedia playing method, device and terminal
CN108769806B (en) Media content display method and device
JP2015026920A (en) Content recording/reproducing device
CN106576181A (en) Method and system for backward recording
EP2177023B1 (en) Method and apparatus for generating and accessing metadata in media file format
US20190166389A1 (en) Frame accurate splicing
CN102647622A (en) Play progress management method for streaming media clip and play progress management system for streaming media clip
CN104837061A (en) Method and device for modifying and managing video playlist
CN104768060B (en) A kind of channel switching method and device
US9560103B2 (en) Custom video content

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