CN108206966A - A kind of video file synchronous broadcast method and device - Google Patents

A kind of video file synchronous broadcast method and device Download PDF

Info

Publication number
CN108206966A
CN108206966A CN201611170214.9A CN201611170214A CN108206966A CN 108206966 A CN108206966 A CN 108206966A CN 201611170214 A CN201611170214 A CN 201611170214A CN 108206966 A CN108206966 A CN 108206966A
Authority
CN
China
Prior art keywords
video
time
played
current
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611170214.9A
Other languages
Chinese (zh)
Other versions
CN108206966B (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201611170214.9A priority Critical patent/CN108206966B/en
Publication of CN108206966A publication Critical patent/CN108206966A/en
Application granted granted Critical
Publication of CN108206966B publication Critical patent/CN108206966B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4305Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen

Abstract

An embodiment of the present invention provides a kind of video file synchronous broadcast method and device, wherein, video file synchronous broadcast method includes:At least two-way video to be played is parsed, wherein, video to be played includes time zone time, and each video frame includes the absolute time of the video frame in video to be played;The current base time per road video to be played is periodically calculated, wherein, the current base time of video to be played is:According to the time zone time in video to be played, the time converted to the absolute time of video frame to be shown current in video to be played;According to the current base time of every road video to be played, the display of the current video frame to be shown of the video to be played is controlled, so that the broadcasting per road video to be played synchronizes.Being played simultaneously for video in different time zone can be realized by this programme.

Description

A kind of video file synchronous broadcast method and device
Technical field
The present invention relates to video display arts field, more particularly to a kind of video file synchronous broadcast method and device.
Background technology
With popularizing for various multimedia players, playing audio-video, browsing pictures are that most widely used media perform Mode, more and more players start to pursue the effect that multichannel is played and is played simultaneously, such as in same terminal simultaneously Play 16 road videos.The way that the video definition height or needs of some scenes are opened is very more, and there will be performance issues to lead Interim card or the delay of video are caused, in this way, it is necessary to which a kind of simultaneous techniques makes to keep being played simultaneously between multi-channel video.
In the relevant technologies, by identifying, encoding and extracting different types of video in preset memory space, in video Broadcasting synchronous on a timeline in play system, and the played video finished of video supplement of Real time buffer standby.The party Case realizes simple and practicable multimedia synchronous and plays effect.
But the scene of the video for different time zone, due between different time zone there are the time difference, such as Beijing time 10 points of 23 points and New York time are practical for synchronization, according to the scheme of the relevant technologies, using unified time shaft, meeting Cause the video of the different time zone of synchronization that can not realize to be played simultaneously.
Invention content
The embodiment of the present invention is designed to provide a kind of video file synchronous broadcast method and device, is broadcast with realizing to synchronize Put the video in different time zone.Specific technical solution is as follows:
In a first aspect, an embodiment of the present invention provides a kind of video file synchronous broadcast method, the method includes:
At least two-way video to be played is parsed, wherein, the video to be played includes time zone time, described to treat Play the absolute time that each video frame in video includes the video frame;
The current base time per road video to be played is periodically calculated, wherein, the current base of the video to be played Time is:According to the time zone time in the video to be played, to the exhausted of video frame to be shown current in the video to be played The time converted to the time;
The current base time of video to be played according to every road controls the current video to be shown of the video to be played The display of frame, so that the broadcasting of video to be played described in per road synchronizes.
Optionally, the time zone time is:Shooting ground time and the preset standard of the video to be played the time when Difference.
Optionally, after the time zone time in video to be played described in every road is stored in each key frame of the video to be played Privately owned frame in.
Optionally, the video to be played at least two-way different time zone parses, including:
Parallel parsing obtains the absolute time of each video frame in video to be played described in every road per road video to be played, Wherein, the absolute time is:The video to be played shooting generate shooting ground time of the video frame;
When being resolved to the privately owned frame, it is described privately owned as including to read the time zone time stored in the privately owned frame The time zone time of the video to be played of frame.
Optionally, the current base time calculated per road video to be played, including:
It obtains per video to be played described in the absolute time of video frame to be shown current in the video to be played of road and every road Time zone time;
By the absolute time of video frame to be shown current in video to be played described in every road and the time zone of the video to be played The difference of time, the current base time as the video to be played;
The current base time of basis video to be played described in per road, control the current to be shown of the video to be played The display of video frame, including:
It is the synchronous base time at current time to determine the minimum value in the current base time of all videos to be played;
Calculate the difference of the current base time of video to be played and the current time synchronous base time described in per road;
Be less than in the current base time of the video to be played and the difference of the current time synchronous base time or When person is equal to predetermined deviation value, the current video frame to be shown of the video to be played is shown;
It is more than in advance in the current base time of the video to be played and the difference of the current time synchronous base time If during deviation, the current video frame to be shown of the video to be played is set to wait for state, does not show and described currently treat Frame of display video.
Optionally, inverse of the predetermined deviation value for designated frame rate in all videos to be played.
Second aspect, the embodiment of the present invention additionally provide a kind of video file simultaneously playing device, and described device includes:
Parsing module, for being parsed at least two-way video to be played, wherein, when the video to be played includes Area's time, each video frame includes the absolute time of the video frame in the video to be played;
Computing module, for periodically calculating the current base time per road video to be played, wherein, it is described to be played to regard The current base time of frequency is:According to the time zone time in the video to be played, to currently waiting to show in the video to be played Show the time that the absolute time of video frame is converted;
Control module for the current base time of the video to be played according to per road, controls the video to be played The display of current video frame to be shown, so that the broadcasting of video to be played described in per road synchronizes.
Optionally, the time zone time is:Shooting ground time and the preset standard of the video to be played the time when Difference.
Optionally, after the time zone time in video to be played described in every road is stored in each key frame of the video to be played Privately owned frame in.
Optionally, the parsing module, including:
Absolute time determination sub-module for parsing every road video to be played parallel, obtains video to be played described in every road In each video frame absolute time, wherein, the absolute time is:The video to be played shooting generate described regard The shooting of the frequency frame ground time;
Reading submodule is made for when being resolved to the privately owned frame, reading the time zone time stored in the privately owned frame Time zone time for the video to be played for including the privately owned frame.
Optionally, the computing module, including:
Acquisition submodule, for obtaining the absolute time of current video frame to be shown and every road in the video to be played of every road The time zone time of the video to be played;
First operation submodule, for by the absolute time of video frame to be shown current in video to be played described in every road with The difference of the time zone time of the video to be played, the current base time as the video to be played;
The control module, including:
Second determination sub-module, for determine the minimum value in the current base time of all videos to be played for it is current when Carve the synchronous base time;
Second operation submodule, for calculating the current base time of video to be played described in every road and the current time The difference of synchronous base time;
Display sub-module, for when the current base time of the video to be played is with the current time synchronous base Between difference when being less than or equal to predetermined deviation value, show the current video frame to be shown of the video to be played;
Submodule is waited for, for when the current base time of the video to be played is with the current time synchronous base Between difference be more than predetermined deviation value when, the current video frame to be shown of the video to be played is set to wait for state, no Show the current video frame to be shown.
Optionally, inverse of the predetermined deviation value for designated frame rate in all videos to be played.
A kind of video file synchronous broadcast method and device provided in an embodiment of the present invention, by being carried out to video to be played Parsing obtains the time zone time of video to be played and the absolute time of each video frame in video to be played, time zone time characterization Time zone residing for video to be played, then by time zone conversion, the video to be played of different time zone is scaled to same time zone The current base time finally according to the current base time, controls the display of the current video frame to be shown of video to be played, so as to Realize being played simultaneously for all videos to be played, the embodiment of the present invention, using time zone conversion, realizes not on the basis of synchronization Video with time zone is played simultaneously.
Description of the drawings
Technical solution in order to illustrate the embodiments of the present invention more clearly or in the relevant technologies, below will be to embodiment or phase Attached drawing is briefly described needed in the technology description of pass, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow diagram of the video file synchronous broadcast method of the embodiment of the present invention;
Fig. 2 is the structure diagram of the video file simultaneously playing device of the embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without making creative work Embodiment shall fall within the protection scope of the present invention.
The video in different time zone is played simultaneously in order to realize, an embodiment of the present invention provides a kind of synchronizations of video file Playback method and device.
A kind of video file synchronous broadcast method provided first below the embodiment of the present invention is introduced.
It should be noted that the executive agent of a kind of video file synchronous broadcast method that the embodiment of the present invention is provided can Think a kind of video player, the video file synchronous broadcast method that the embodiment of the present invention is provided can be realized by software. It is emphasized that the executive agent of the video file synchronous broadcast method of the embodiment of the present invention is not limited only to above-mentioned video playing Device can also be server, industrial personal computer etc., realize that the video file synchronous broadcast method that the embodiment of the present invention is provided not only limits In software, hardware circuit or logic circuit can also be.
As shown in Figure 1, a kind of video file synchronous broadcast method that the embodiment of the present invention is provided, can include following step Suddenly:
S101 parses at least two-way video to be played.
Wherein, video file can include image, camera shooting, image, picture, photo, word etc., can be in video to be played Including time zone time, each video frame can include the absolute time of the video frame in video to be played.
It should be noted that being played simultaneously for audio file, with the present embodiment the step of is similar, wherein, audio File can include sound, music, dub in background music;It, can be first into Mobile state for multiple video files before video is obtained The pretreatment processing programs such as processing, static rendering and/or texture processing.Can have in playing process by the video of pretreatment There is more preferably result of broadcast.
Video is parsed, is that the information that will be included in video is restored to the number before encoding from coded form According to the analysis mode and technology of video are various.Can according to video coding when used coding standard video is solved Analysis.Coding standard includes:International Telecommunication Association H.261, H.263, M-JPEG (Motion-Join Photographic Experts Group, motor rest motion picture expert group version) and MPEG (Moving Picture Experts Group, Motion Picture Experts Group) Series standard etc..Analytic technique belongs to the relevant technologies, no longer repeats one by one here.
The present embodiment is accomplished that being played simultaneously for multichannel video to be played, thus need to ensure to play way in two-way or More than two-way, for example, for two-way different video, the 1st road video is Chinese eastern 8th area August in 2016 8 days 23:00:00 to 24: 00:The video of 00 1 hours, New York Xi Wuqu Augusts in 2016 8 days 10 during the 2nd road video:00:00 to 11:00:It is 00 1 small When video, since Dong Baqu with the time difference in western 5th area differs 13 hours, so this two-path video is really synchronization Video.
It is emphasized that being performed parallel to the parsing of every road video, and each regard can be obtained after parsing The information that frequency frame carries, including absolute time and video frame content.Time zone time can be taken in some particular frame in video Band or carried in key frame, this is all reasonable.Video is played simultaneously including fully synchronized broadcasting and opposite It is played simultaneously, fully synchronized play refers to that the video of same time zone same period keeps playing progress rate completely the same, relatively together Step plays the video for referring to the different time zone same period has consistent playing progress rate on the basis of time zone difference is kept.It can be with Understand, fully synchronized broadcasting is a special case of the relative synchronization broadcasting when time zone is identical, and the present embodiment can be used for reality The relative synchronization of existing multi-channel video plays.
Optionally, the time zone time is:The time difference of with the shooting ground time and preset standard time of video to be played.
It should be noted that the earth shares 24 time zones, during the longitude residing for the Greenwich Observatory old site of Britain is Time zone or zero zone, 12,12nd areas of Dong1Qu Zhi Dong time zone is shared eastwards by boundary of zero zone, westwards shares Xi1Qu to west 12 12, area time zone, across 15 degree of longitude, the time is exactly 1 hour in each time zone, and the time on the central meridian in each time zone is just When being the time, referred to as area being used uniformly in this time zone, the time difference in two neighboring time zone is 1 hour, for example, 8th area of east of China Time 7th area more eastern than Thailand time it is 1 hour fast, it is and 1 hour slower than the time in Japanese eastern 9th area.In many countries, allly The time of point uses the general time, such as in China, if video to be played is shot in Xinjiang Urumqi, then The shooting ground time is Beijing time, preset standard the time can be any place time, such as greenwich time, Beijing Time, Tokyo time, or the time in the time zone in all videos to be played residing for any video to be played.Wherein, it needs If it is noted that the shooting ground of video to be played positioned at the east side on preset standard ground, the time zone time of video to be played Shooting ground time and preset standard for video to be played the time difference, if the shooting of video to be played be located at it is default The west side of study plot, the then time zone time of video to be played for preset standard shooting ground time of time and video to be played The opposite number of difference;If the date of with preset standard time on date of the shooting ground time of video to be played differs 1 day, By the hourage of faster time on date plus 24, then carry out the operation of above-mentioned work difference.
Optionally, the calculating of the time difference is referred to geographic(al) Shicha algorithm, alternatively, in setting preset standard the time Afterwards, the time difference is determined by inquiring international time equation watch.
Optionally, the time zone time of video to be played can also utilize the time zone numerical value on the shooting ground of video to be played with it is pre- If the time zone numerical computations of study plot obtain.
Specifically, to be obtained using the time zone numerical value and the time zone numerical computations on preset standard ground on the shooting ground of video to be played To for the time zone time of video to be played, with setting preset standard the time as greenwich time, be in video to be played During eastern time zone, it is poor that the time zone numerical value of the time zone numerical value in time zone eastern residing for video to be played and greenwich time is made, and determines to make The difference that difference obtains is the time zone time of video to be played;When video to be played is in western time zone, by greenwich time It is poor that time zone numerical value and the time zone numerical value in western time zone residing for video to be played are made, and determines that it is video to be played to make the difference that difference obtains Time zone time.
It should be noted that by preset standard the time be set as greenwich time, can intuitively be regarded to be played Time zone residing for frequency judges the time zone time of video, and the determining method of time zone time is simple, i.e., with the time zone of greenwich time It is poor that numerical value is made, it is to be understood that positioned at the practical time zone number for time zone residing for the video of the time zone time of the video in eastern time zone Value, positioned at the opposite number of the practical time zone numerical value for time zone residing for the video of the time zone time of the video in western time zone.For example, first Video of the road video to be played for eastern 8th area of China, the second tunnel video to be played is the video of New York Xi Wuqu, then by default Time zone can determine that the time zone time of first via video to be played is 8 hours, during the time zone of the second tunnel video to be played Between be -5 hours.
Optionally, after the time zone time in video to be played described in every road is stored in each key frame of the video to be played Privately owned frame in.
It should be noted that in the code stream typing of video, privately owned frame is designed with after each key frame, the privately owned frame For storing the time zone time of the road video, when the every road video for ensureing to obtain all preserves the time zone in time zone residing for the road video Between, the video for realizing different time zone for subsequent step is played simultaneously, and be not take up the space of other frames, ensures decoded effect Rate.
It should be noted that since key frame generally comprises the crucial variation of video, if video is aboard Shooting or satellite photographs, at a time, there is to video capture time zone variation, then a video after this moment In, the time zone time in privately owned frame after key frame can also change correspondingly.
Optionally, the video to be played at least two-way different time zone parses, and can include:
First, parallel parsing obtains the absolute time of each video frame in the video to be played of every road per road video to be played.
Wherein, absolute time is:Video to be played shooting generate shooting ground time of video frame.Need what is illustrated It is that absolute time is time when each video frame generates in video, the shooting ground time, which differs, is set to shooting ground place time zone Time, for example, video to be played Xinjiang Urumqi shoot, but the shooting of the video the time be Beijing time, then should The absolute time of video is Beijing time when shooting the video.Absolute time is bound in the code stream of video with time zone time, Therefore, absolute time of the video frame of synchronization in different time zone is different, for example, a certain moment, video is in Chinese eastern 8th area Absolute time be August in 2016 8 days 23:00:00, since there are 13 time zones in the time difference in eastern 8th area of New York Xi Wuqu and China, Namely slow 13 hours, therefore, this when inscribe, the absolute time of the video of New York Xi Wuqu is August in 2016 8 days 10: 00:00。
Secondly, when being resolved to privately owned frame, the time zone time that is stored in privately owned frame is read as including the privately owned frame The time zone time of video to be played.
It should be noted that when being resolved to privately owned frame, the time zone time stored in privately owned frame is read out, during time zone Between can be previously according to video to be played shooting ground where time zone and preset time zone, carry out conversion determine, so It stores afterwards in privately owned frame.Alternatively, can also be the time-zone information for storing time zone residing for video in privately owned frame, it be resolved to private When having frame, the time-zone information stored in privately owned frame is read out, then by being converted to obtain time zone to time-zone information when Between.
S102 periodically calculates the current base time per road video to be played.
Wherein, the current base time is:According to the time zone time in video to be played, to currently waiting to show in video to be played Show the time that the absolute time of video frame is converted.In order to ensure to watch the effect of multi-channel video, usually cycle is counted The very little that the period of calculation is chosen, such as 5ms.Within each period, by calculating the current base time, video to be played is controlled Broadcasting, to realize being played simultaneously for multi-channel video.
It should be noted that the step of calculating the current base time per road video can perform parallel, it is every per road video One cycle separation performs an above-mentioned steps parallel.
It, can be by the way that the faster video " waiting " of broadcasting be enabled to play slower regard in order to keep being played simultaneously for multi-channel video The method of frequency is realized, for example, if there is two-path video, the video in 8th area of the 1st tunnel east is by parsing obtained absolute time August 8 days 23 in 2016:10:The video in the 10, the 2nd Lu Xiwu areas is by parsing obtained absolute time as August in 2016 8 days 10: 11:11, fiducial time of the 1st road video can be obtained as August in 2016 8 days 15 by calculating:10:The base of 10, the 2nd road video It is August in 2016 8 days 15 between punctual:11:11.According to the thought of above-mentioned " waiting ", the 1st road video can be demarcated as playing shape 2nd road video is demarcated as wait state by state, is equal or close in the fiducial time of the 1st road video in the base of the 2nd road video When between punctual, the 2nd road video is further continued for playing, in this way, two-path video can be achieved with being played simultaneously.
Optionally, the step of current base time of the every road video to be played of the calculating, can include:
First, it obtains per the absolute time of video frame to be shown current in the video to be played of road and per road video to be played Time zone time;
Secondly, by the absolute time of video frame to be shown current in the video to be played of every road and the time zone of the video to be played The difference of time, the current base time as the video to be played.
It should be noted that calculating the current base time per road video to be played, substantive meaning is will be in difference The absolute time of the video to be played in time zone is by calculating the current base time being scaled under same time zone, therefore, currently Fiducial time makees difference with time zone time by absolute time and obtains.If multi-channel video also may be used all in same time zone It is realized in the method provided using the present embodiment.
S103 according to the current base time of every road video to be played, controls the current of the video to be played to be shown to regard The display of frequency frame, so that the broadcasting per road video to be played synchronizes.
Can be that control is above-mentioned it should be noted that controlling the display of the current video frame to be shown of the video to be played The display of video frame in step in current base time faster video.Optionally, the current of each road video to be played waits to show Show that the display of video frame performs parallel.
Optionally, current base time of the basis per road video to be played controls the current of the video to be played to treat The step of display of frame of display video, can include:
First, when determining the minimum value in the current base time of all videos to be played as current time synchronous base Between;
Secondly, the difference of the current base time per road video to be played and synchronous base time at current time are calculated;
Then, the difference in the current base time of video to be played and synchronous base time at current time is less than or waits When predetermined deviation value, the current video frame to be shown of video to be played is shown;Alternatively, in the current base of video to be played Between when being more than predetermined deviation value with the difference of synchronous base time at current time, by the current video frame to be shown of video to be played State is set to wait for, does not show current video frame to be shown.
It should be noted that in order to realize synchronization, current base time faster video is set to wait for by the present embodiment State waits for other road videos, and the video to be played being waited for is enabled to be stuck in the previous of current video frame to be shown Video frame, that is, not to the video to be played that is waited for current video frame to be shown show, display Effect is the road video hiccups in a upper video frame.During based on enabling current base time faster video " waiting " current base Between the method realization of slower video be played simultaneously, the minimum value in the current base time of all road videos can be set here For the synchronous base time at current time, in addition to the video corresponding to the synchronous base time at current time is set as broadcast state, The very small video of the difference of current base time and synchronous base time at current time can also be set as broadcast state, it is poor The too big video of value is set to wait for state.Wherein, for easy analysis and ensure the effect that personal observations audio video synchronization plays, It can think that difference is very small if difference is less than predetermined deviation value by setting predetermined deviation value, and difference is more than default Deviation then thinks that difference is too big.Under normal circumstances, a value of the predetermined deviation value for very little.
Optionally, inverse of the predetermined deviation value for designated frame rate in all videos to be played.
It should be noted that since different video code stream is not completely to upper, so in a small deviation range Interior to synchronize, predetermined deviation value is usually a value of very little, in order to ensure the reasonability of data, since the frame per second of video is The number of the video frame shown in 1 second, then the inverse of frame per second is the number of time, usually Millisecond that a video frame is shown According to.Since the inverse of frame per second is Millisecond, the inverse of the frame per second of all videos to be played is generally not much different, therefore, this reality Apply the inverse for the frame per second that predetermined deviation value can be set as to any video to be played in example.
If it should be noted that multichannel video to be played were at the time of just starting to play, current base time just not phase Together, for example, the current base time of the initial time of the 1st road video is August in 2016 8 days 15:10:At the beginning of 10, the 2nd road video Begin current base time at moment is August in 2016 8 days 15:11:11, the current base time phase difference of two-path video is larger, because This, can enable that the 1st road video is broadcast state, the 2nd road video is wait state, then initial time, start to play the 1st tunnel and regard Frequently, and the 2nd road video does not play, until the 1st tunnel video playing was to August in 2016 8 days 15:11:11, the 1st road video and the 2nd tunnel Audio video synchronization plays subsequent video;Also there are a kind of situation, if wherein certain all the way video play when due to the time delay of circuit Problem causes the interim card of the road video, and other road video normal plays, the then video that can demarcate generation interim card are broadcasting shape State demarcates other road videos as wait state, for example, the 1st road video is being played to the current base time as August in 2016 8 days 16:10:Have occurred interim card when 12, and the 2nd road video continues to be played to the current base time as August in 2016 8 days 16:10: 13, the current base time phase difference of two-path video is larger, therefore, can enable that the 1st road video is broadcast state, the 2nd road video is Wait state, then after the 1st road video is normal, start play the 1st road video, until the 1st road video the current base time with The current base time of 2nd road video is close, and subsequent video is played simultaneously in two-path video.
In order to improve the effect that user watches audio video synchronization, if interim card occurs for video all the way for certain, the video on other roads is every Cross the difference of the current base time of video of the other time judgement of a Millisecond with interim card occurs.
Using the present embodiment, by being parsed to video to be played, obtaining the time zone time of video to be played and waiting to broadcast The absolute time of each video frame in video is put, time zone time characterizes the time zone residing for video to be played, then is changed by time zone It calculates, the video to be played of different time zone is scaled to the current base time in same time zone, finally according to current base time, control The display of the current video frame to be shown of video to be played is made, so as to fulfill being played simultaneously for all videos to be played.By true Settled preceding timing synchronization fiducial time, display current base time are less than or equal to the to be played of synchronous base time at current time The current video frame to be shown of video;The current base time is set more than the video to be played of synchronous base time at current time Current video frame to be shown is wait state, does not show that the present embodiment, using time zone conversion, realizes not on the basis of synchronization Video with time zone is played simultaneously.It can also be deposited after being set in each key frame in the code stream typing of video The privately owned frame of time zone time is contained, ensures decoded efficiency.
With reference to specific application example, the video file synchronous broadcast method provided the embodiment of the present invention carries out It introduces.
Assuming that there are the video to be played that two-way is in different time zone, the 1st tunnel video to be played is Chinese eastern eight areas 2016 On August 8,23:00:00 to 24:00:The video of 00 1 hours, Xi Wuqu in Augusts, 2016 in New York during the video to be played of the 2nd tunnel 8 days 10:00:00 to 11:00:The video of 00 1 hours;By being parsed to two-way video to be played, treated from the 1st tunnel The time zone time that the 1st tunnel video to be played is read in the privately owned frame of broadcasting video is 8 hours, from the 2nd tunnel video to be played The time zone time that the 2nd tunnel video to be played is read in privately owned frame is -5 hours;First video frame of the 1st tunnel video to be played Absolute time be August in 2016 8 days 23:00:00, it is poor that the time zone time of the absolute time and the 1st tunnel video to be played is made The current base time to first video frame of the 1st tunnel video to be played is August in 2016 8 days 15:00:It waits to broadcast in 00, the 2nd tunnel The absolute time of first video frame of video is put as August in 2016 8 days 10:00:00, the absolute time and the 2nd tunnel are to be played The current base time that the time zone time of video makees first video frame that difference obtains the 2nd tunnel video to be played is August 8 in 2016 Day 15:00:00;Predetermined deviation value is set as 40ms, selects August in 2016 8 days 15:00:00 be current time synchronous base when Between, current base time and the synchronous base time at current time on the 1st tunnel make difference and are equal to the current base time on the 0, the 2nd tunnel with working as Preceding timing synchronization fiducial time makees difference and is equal to 0, therefore, the video to be played of two-way is both configured to broadcast state, is played simultaneously First video frame of two-path video.
Assuming that the 1st tunnel video to be played is being played to absolute time as August in 2016 8 days 23:10:During 10 video frame, Interim card has occurred, the time zone time of the absolute time and the 1st tunnel video to be played makees difference and obtains the current of the 1st tunnel video to be played The current base time of video frame to be shown is August in 2016 8 days 15:10:10, since the 2nd tunnel video to be played does not occur Interim card, video continue to play still in broadcast state, it is determined that the current video frame to be shown of the 1st tunnel video to be played it is current Fiducial time is the synchronous base time at current time, sets and the primary step for calculating the synchronous base time at current time is performed per 5ms Suddenly, when the step goes to the 8th period, the current base time of the 2nd tunnel video to be played is synchronous with current time The difference of fiducial time has reached 40ms;It then will be demarcated as wait state by the 2nd tunnel video to be played at this time, and not show this moment The current video frame to be shown of 2 tunnels video to be played;Until the Caton phenomenon on the 1st tunnel is eliminated, the 1st tunnel of normal play is to be played to be regarded Frequently, in the current base time of the current video frame to be shown of the 2nd tunnel video to be played and synchronous base time at current time When difference is less than 40ms, start to play the 2nd tunnel video to be played.
Compared with the relevant technologies, in the present solution, by being parsed to video to be played, the time zone of video to be played is obtained The absolute time of each video frame, time zone time characterize the time zone residing for video to be played in time and video to be played, then By time zone conversion, the video to be played of different time zone is scaled to the current base time in same time zone, it is last according to current Fiducial time controls the display of the current video frame to be shown of video to be played, so as to fulfill the synchronization of all videos to be played It plays, using time zone conversion on the basis of synchronization, the video for realizing different time zone is played simultaneously this programme.
Corresponding to above method embodiment, an embodiment of the present invention provides a kind of video file simultaneously playing device, such as Fig. 2 Shown, described device can include:
Parsing module 210, for being parsed at least two-way video to be played, wherein, it is wrapped in the video to be played Include time zone time, each video frame includes the absolute time of the video frame in the video to be played;
Computing module 220, for periodically calculating the current base time per road video to be played, wherein, it is described to wait to broadcast The current base time for putting video is:According to the time zone time in the video to be played, to current in the video to be played The time that the absolute time of video frame to be shown is converted;
Control module 230 for the current base time of the video to be played according to per road, controls the video to be played Current video frame to be shown display so that the broadcasting per video to be played described in road synchronizes.
Using the present embodiment, by being parsed to video to be played, obtaining the time zone time of video to be played and waiting to broadcast The absolute time of each video frame in video is put, time zone time characterizes the time zone residing for video to be played, then is changed by time zone It calculates, the video to be played of different time zone is scaled to the current base time in same time zone, finally according to current base time, control The display of the current video frame to be shown of video to be played is made, so as to fulfill being played simultaneously for all videos to be played, this implementation Using time zone conversion on the basis of synchronization, the video for realizing different time zone is played simultaneously for example.
Optionally, the time zone time is:Shooting ground time and the preset standard of the video to be played the time when Difference.
Optionally, after the time zone time in video to be played described in every road is stored in each key frame of the video to be played Privately owned frame in.
Optionally, the parsing module 210, can include:
Absolute time determination sub-module for parsing every road video to be played parallel, obtains video to be played described in every road In each video frame absolute time, wherein, the absolute time is:The video to be played shooting generate described regard The shooting of the frequency frame ground time;
Reading submodule is made for when being resolved to the privately owned frame, reading the time zone time stored in the privately owned frame Time zone time for the video to be played for including the privately owned frame.
Optionally, the computing module 220, can include:
Acquisition submodule, for obtaining the absolute time of current video frame to be shown and every road in the video to be played of every road The time zone time of the video to be played;
First operation submodule, for by the absolute time of video frame to be shown current in video to be played described in every road with The difference of the time zone time of the video to be played, the current base time as the video to be played;
The control module 230, can include:
Second determination sub-module, for determine the minimum value in the current base time of all videos to be played for it is current when Carve the synchronous base time;
Second operation submodule, for calculating the current base time of video to be played described in every road and the current time The difference of synchronous base time;
Display sub-module, for when the current base time of the video to be played is with the current time synchronous base Between difference when being less than or equal to predetermined deviation value, show the current video frame to be shown of the video to be played;
Submodule is waited for, for when the current base time of the video to be played is with the current time synchronous base Between difference be more than predetermined deviation value when, the current video frame to be shown of the video to be played is set to wait for state, no Show the current video frame to be shown.
Optionally, the predetermined deviation value can be the inverse of designated frame rate in all videos to be played.
It is synchronized it should be noted that the video file simultaneously playing device of the embodiment of the present invention is the above-mentioned video file of application The device of playback method, then all embodiments of above-mentioned video file synchronous broadcast method are suitable for the device, and can reach To the same or similar advantageous effect.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this practical relationship or sequence.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that Also there are other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is described using relevant mode, identical similar portion between each embodiment Point just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for system reality For applying example, since it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (12)

1. a kind of video file synchronous broadcast method, which is characterized in that the method includes:
At least two-way video to be played is parsed, wherein, the video to be played includes time zone time, described to be played Each video frame includes the absolute time of the video frame in video;
The current base time per road video to be played is periodically calculated, wherein, the current base time of the video to be played For:According to the time zone time in the video to be played, to the absolute time of video frame to be shown current in the video to be played Between time for being converted;
The current base time of video to be played, controls the current video frame to be shown of the video to be played according to every road It has been shown that, so that the broadcasting of video to be played described in per road synchronizes.
2. video file synchronous broadcast method according to claim 1, which is characterized in that the time zone time is:It is described The time difference of with the shooting ground time and preset standard time of video to be played.
3. video file synchronous broadcast method according to claim 1, which is characterized in that in video to be played described in per road Time zone time be stored in the privately owned frame after each key frame of the video to be played.
4. video file synchronous broadcast method according to claim 3, which is characterized in that it is described at least two-way difference when The video to be played in area is parsed, including:
Parallel parsing obtains the absolute time of each video frame in video to be played described in every road per road video to be played, wherein, The absolute time is:The video to be played shooting generate shooting ground time of the video frame;
When being resolved to the privately owned frame, the time zone time that is stored in the privately owned frame is read as including the privately owned frame The time zone time of video to be played.
5. video file synchronous broadcast method according to claim 1, which is characterized in that described calculate regards per road is to be played The current base time of frequency, including:
Obtain the time zone per video to be played described in the absolute time of video frame to be shown current in the video to be played of road and every road Time;
By the absolute time of video frame to be shown current in video to be played described in every road and the time zone time of the video to be played Difference, the current base time as the video to be played;
The current base time of basis video to be played described in per road controls the current video to be shown of the video to be played The display of frame, including:
It is the synchronous base time at current time to determine the minimum value in the current base time of all videos to be played;
Calculate the difference of the current base time of video to be played and the current time synchronous base time described in per road;
It is less than or waits in the current base time of the video to be played and the difference of the current time synchronous base time When predetermined deviation value, the current video frame to be shown of the video to be played is shown;
It is more than in the current base time of the video to be played with the difference of the current time synchronous base time and presets partially During difference, the current video frame to be shown of the video to be played is set to wait for state, is not shown described current to be shown Video frame.
6. video file synchronous broadcast method according to claim 5, which is characterized in that the predetermined deviation value is all The inverse of designated frame rate in video to be played.
7. a kind of video file simultaneously playing device, which is characterized in that described device includes:
Parsing module, for being parsed at least two-way video to be played, wherein, when the video to be played includes time zone Between, each video frame includes the absolute time of the video frame in the video to be played;
Computing module, for periodically calculating the current base time per road video to be played, wherein, the video to be played The current base time is:According to the time zone time in the video to be played, regarded to currently to be shown in the video to be played The time that the absolute time of frequency frame is converted;
Control module for the current base time of the video to be played according to per road, controls the current of the video to be played The display of video frame to be shown, so that the broadcasting of video to be played described in per road synchronizes.
8. video file simultaneously playing device according to claim 7, which is characterized in that the time zone time is:It is described The time difference of with the shooting ground time and preset standard time of video to be played.
9. video file simultaneously playing device according to claim 7, which is characterized in that in video to be played described in per road Time zone time be stored in the privately owned frame after each key frame of the video to be played.
10. video file simultaneously playing device according to claim 9, which is characterized in that the parsing module, including:
Absolute time determination sub-module for parsing every road video to be played parallel, obtains every in video to be played described in every road The absolute time of one video frame, wherein, the absolute time is:The video to be played shooting generate the video frame The shooting ground time;
Reading submodule, for when being resolved to the privately owned frame, reading the time zone time stored in the privately owned frame as packet The time zone time of video to be played containing the privately owned frame.
11. video file simultaneously playing device according to claim 7, which is characterized in that the computing module, including:
Acquisition submodule, for obtain in the video to be played of every road the absolute time of current video frame to be shown and per road described in The time zone time of video to be played;
First operation submodule, for the absolute time of video frame to be shown current in video to be played described in every road to be treated with this Play the difference of the time zone time of video, the current base time as the video to be played;
The control module, including:
Second determination sub-module, for determining that the minimum value in the current base time of all videos to be played is same for current time Walk fiducial time;
Second operation submodule, it is synchronous with the current time for calculating the current base time of video to be played described in every road The difference of fiducial time;
Display sub-module, in the current base time of the video to be played and the current time synchronous base time When difference is less than or equal to predetermined deviation value, the current video frame to be shown of the video to be played is shown;
Submodule is waited for, in the current base time of the video to be played and the current time synchronous base time When difference is more than predetermined deviation value, the current video frame to be shown of the video to be played is set to wait for state, is not shown The current video frame to be shown.
12. video file simultaneously playing device according to claim 11, which is characterized in that the predetermined deviation value is institute There is the inverse of designated frame rate in video to be played.
CN201611170214.9A 2016-12-16 2016-12-16 Video file synchronous playing method and device Active CN108206966B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611170214.9A CN108206966B (en) 2016-12-16 2016-12-16 Video file synchronous playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611170214.9A CN108206966B (en) 2016-12-16 2016-12-16 Video file synchronous playing method and device

Publications (2)

Publication Number Publication Date
CN108206966A true CN108206966A (en) 2018-06-26
CN108206966B CN108206966B (en) 2020-07-03

Family

ID=62602054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611170214.9A Active CN108206966B (en) 2016-12-16 2016-12-16 Video file synchronous playing method and device

Country Status (1)

Country Link
CN (1) CN108206966B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109525879A (en) * 2018-10-30 2019-03-26 北京凯视达科技有限公司 Video playing control method and device
CN109769124A (en) * 2018-12-13 2019-05-17 广州华多网络科技有限公司 Mixed flow method, apparatus, electronic equipment and storage medium
CN110430445A (en) * 2019-06-26 2019-11-08 北京拙河科技有限公司 A kind of audio video synchronization playback method, device, equipment and medium
CN110475137A (en) * 2019-09-06 2019-11-19 北京市博汇科技股份有限公司 A kind of high-precision distribution is aobvious to control frame synchornization method and system
CN111683215A (en) * 2020-06-05 2020-09-18 杭州海康威视数字技术股份有限公司 Video playback method and device, electronic equipment and computer readable storage medium
CN112004132A (en) * 2020-09-02 2020-11-27 北京猿力未来科技有限公司 Video synchronous playing method and device
CN112565630A (en) * 2020-12-08 2021-03-26 杭州电子科技大学 Video frame synchronization method for video splicing
CN113163222A (en) * 2021-03-31 2021-07-23 杭州奥点科技股份有限公司 Video frame synchronization method, system, equipment and readable storage medium
CN113542811A (en) * 2021-07-15 2021-10-22 杭州海康威视数字技术股份有限公司 Video playing method and device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103444A1 (en) * 2002-11-26 2004-05-27 Neal Weinberg Point to multi-point broadcast-quality Internet video broadcasting system with synchronized, simultaneous audience viewing and zero-latency
CN101047776A (en) * 2006-04-17 2007-10-03 华为技术有限公司 Mobile broadcast network system and method for implementing synchronous of the network
CN102630017A (en) * 2012-04-10 2012-08-08 中兴通讯股份有限公司 Method and system for synchronizing mobile multi-media broadcasting and subtitles
US20140201774A1 (en) * 2009-05-29 2014-07-17 Zeev Neumeier Systems and methods for multi-broadcast differentiation
CN105612758A (en) * 2013-11-20 2016-05-25 纳宝株式会社 Video-providing method and video-providing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103444A1 (en) * 2002-11-26 2004-05-27 Neal Weinberg Point to multi-point broadcast-quality Internet video broadcasting system with synchronized, simultaneous audience viewing and zero-latency
CN101047776A (en) * 2006-04-17 2007-10-03 华为技术有限公司 Mobile broadcast network system and method for implementing synchronous of the network
US20140201774A1 (en) * 2009-05-29 2014-07-17 Zeev Neumeier Systems and methods for multi-broadcast differentiation
CN102630017A (en) * 2012-04-10 2012-08-08 中兴通讯股份有限公司 Method and system for synchronizing mobile multi-media broadcasting and subtitles
CN105612758A (en) * 2013-11-20 2016-05-25 纳宝株式会社 Video-providing method and video-providing system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109525879A (en) * 2018-10-30 2019-03-26 北京凯视达科技有限公司 Video playing control method and device
CN109769124A (en) * 2018-12-13 2019-05-17 广州华多网络科技有限公司 Mixed flow method, apparatus, electronic equipment and storage medium
CN110430445A (en) * 2019-06-26 2019-11-08 北京拙河科技有限公司 A kind of audio video synchronization playback method, device, equipment and medium
CN110475137A (en) * 2019-09-06 2019-11-19 北京市博汇科技股份有限公司 A kind of high-precision distribution is aobvious to control frame synchornization method and system
CN110475137B (en) * 2019-09-06 2021-05-14 北京市博汇科技股份有限公司 High-precision distributed display control frame synchronization method and system
CN111683215A (en) * 2020-06-05 2020-09-18 杭州海康威视数字技术股份有限公司 Video playback method and device, electronic equipment and computer readable storage medium
CN112004132A (en) * 2020-09-02 2020-11-27 北京猿力未来科技有限公司 Video synchronous playing method and device
CN112565630A (en) * 2020-12-08 2021-03-26 杭州电子科技大学 Video frame synchronization method for video splicing
CN113163222A (en) * 2021-03-31 2021-07-23 杭州奥点科技股份有限公司 Video frame synchronization method, system, equipment and readable storage medium
CN113542811A (en) * 2021-07-15 2021-10-22 杭州海康威视数字技术股份有限公司 Video playing method and device and computer readable storage medium
CN113542811B (en) * 2021-07-15 2023-05-16 杭州海康威视数字技术股份有限公司 Video playing method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN108206966B (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN108206966A (en) A kind of video file synchronous broadcast method and device
US11582497B2 (en) Methods, systems, processors and computer code for providing video clips
US8931024B2 (en) Receiving apparatus and subtitle processing method
JP6385447B2 (en) Video providing method and video providing system
CN103165156B (en) Audio video synchronization Play System and video broadcasting method, CD
US7710965B2 (en) Method and system for multi-program clock recovery and timestamp correction
CN105791938B (en) The joining method and device of multimedia file
US20060064641A1 (en) Low bandwidth television
CN101419827B (en) Method for synchronzing audio and video data in avi file
US9396762B2 (en) Systems and methods for networked media synchronization
CN106658030B (en) A kind of playback method and equipment of the composite video comprising SCVF single channel voice frequency multi-channel video
AU751335B2 (en) Video and audio signal processing
EP1243138B1 (en) Method apparatus and system for video fast forward playback functionality in a mobile phone
CN109672837A (en) Equipment of taking photo by plane real-time video method for recording, mobile terminal and computer storage medium
CN108429931A (en) A kind of method for broadcasting multimedia file and device
CN101316369B (en) Image processing device and method
CN103581730A (en) Method for achieving synchronization of audio and video on digital set top box
CN108650541B (en) Method and system for realizing synchronous video playing of different devices
CN1719869A (en) Two stage synchronous controlling method for multi-player digital film playing system
CN105898435A (en) Data synchronizing method and device
JP3830645B2 (en) Image decoding method and apparatus
JP7365212B2 (en) Video playback device, video playback system, and video playback method
JP4364619B2 (en) Multiple video time synchronous display terminal, multiple video time synchronous display method, program, and recording medium
CN101594487B (en) Method for synchronously changing scene areas of caption machine
CN117676222A (en) Multimedia file playing method and device, computing equipment and storage medium

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