CN115412754A - Method for synchronously recording and replaying scenes of multiple signal sources based on same time axis - Google Patents
Method for synchronously recording and replaying scenes of multiple signal sources based on same time axis Download PDFInfo
- Publication number
- CN115412754A CN115412754A CN202210979054.1A CN202210979054A CN115412754A CN 115412754 A CN115412754 A CN 115412754A CN 202210979054 A CN202210979054 A CN 202210979054A CN 115412754 A CN115412754 A CN 115412754A
- Authority
- CN
- China
- Prior art keywords
- recording
- service
- time
- multiple signal
- playback
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 230000001360 synchronised effect Effects 0.000 claims abstract description 21
- 238000004806 packaging method and process Methods 0.000 claims description 4
- 238000005538 encapsulation Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 3
- 238000012544 monitoring process Methods 0.000 claims description 2
- 230000003139 buffering effect Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/4302—Content synchronisation processes, e.g. decoder synchronisation
- H04N21/4307—Synchronising 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
- H04N21/43072—Synchronising 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 of multiple content streams on the same device
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4334—Recording operations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-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/47217—End-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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8547—Content authoring involving timestamps for synchronizing content
Abstract
The invention discloses a method for synchronously recording and replaying scenes with multiple signal sources based on the same time axis, relates to a new generation of information technology, and provides a scheme aiming at the problem of time difference caused by the fact that a reference video is jammed in the prior art. Inquiring signal source information in a scene during synchronous recording of multiple signal sources, and then scheduling recording service; pre-pulling streams when recording services are available; after the connection is established, caching the video stream and the timestamp; acquiring current system time; issuing an enabling instruction to enable the recording service to be packaged, and finally uploading the packaged recording service to a file sending server; and the timestamp and the current system time are synchronized based on the NTP service. The method has the advantages that global clock synchronization is carried out through NTP service, the time stamp is written in a signal source live broadcast stream data packet, recording is started or stopped according to the time stamp, the length of recorded videos is guaranteed to be consistent, and the length difference of the videos does not need to be concerned during playback.
Description
Technical Field
The invention relates to a new generation of information technology, in particular to a method for synchronously recording and playing back scenes of multiple signal sources based on the same time axis.
Background
In the prior art, CN104410807A "method and apparatus for synchronously playing back multiple videos" selects a video as a standard video, and uses a timestamp of the standard video as a standard timestamp. The other multiple video timestamps are continuously synchronized with the standard timestamp. And ensuring synchronous playing of multiple paths of videos by replaying video frames or discarding video frames.
In the technical scheme, one path of video is selected as a standard video, and other video timestamps are continuously synchronized with the standard timestamp. The time consumption of the synchronization algorithm of other videos and the standard video cannot be compensated, so that the playing time difference of the other videos and the standard video exists. When the performance of the client is insufficient, the time consumption of the synchronization algorithm is increased, and the playing time difference between other videos and the standard video is increased, so that the videos are obviously out of synchronization. Affected by network fluctuation, bandwidth and the like, if the standard video is delayed, the video is blocked. The other multi-channel video is synchronized with the standard video, and the situation that a certain frame is frequently played back occurs, so that the playing of the client is paused.
Disclosure of Invention
The invention aims to provide a method for synchronously recording and playing back multiple signal source scenes based on the same time axis so as to solve the problems in the prior art.
The invention discloses a method for synchronously recording and playing back scenes with multiple signal sources based on the same time axis, which is used for synchronously recording and playing back the scenes with the multiple signal sources based on NTP service.
Inquiring signal source information in a scene during synchronous recording of multiple signal sources, and then scheduling a recording service; pre-pulling the stream when the recording service is available; caching the video stream and the timestamp after the connection is established; acquiring current system time; issuing an enabling instruction to enable the recording service to be packaged, and finally uploading the packaged recording service to a file sending server;
and the timestamp and the current system time are synchronized based on the NTP service.
And the recording service starts to perform trans-encapsulation on the data after the timestamp on the video bare stream according to the timestamp sent by the scheduling service.
The file server is a distributed file store.
Inquiring the working recording service when receiving a recording finishing instruction, and acquiring a current system time redistribution stop instruction; and checking whether the data packet at the current time is cached or not, if not, continuing to cache the data packet and packaging, and stopping the recording service after the caching is finished.
The condition that the data packet is cached completely is the stop condition of the recording service, if the stop condition is not met, the recording service continuously pulls the stream and continues to package; until the timestamp of the acquired data packet is consistent with the timestamp of the stop.
Acquiring a video playing address before synchronous playback of a multi-signal source, inquiring a video frame rate and current system time and recording the video frame rate and the current system time as reference time;
and starting synchronous playback of the multiple signal sources, monitoring whether the time difference between the current time and the reference time is equal to the playback time, and performing frame skipping or frame replaying processing when the time difference is inconsistent with the playback time until the time difference is consistent with the playback time.
And calculating the deviation video frame number when the time difference is inconsistent with the playback time, and performing frame skipping or frame replaying according to the deviation video frame number.
And when the deviation video frame number is larger than zero, performing replay deviation video frame processing.
And skipping the deviation video frame when the deviation video frame number is less than zero.
The method for synchronously recording and replaying the scenes of the multiple signal sources based on the same time axis has the advantages that global clock synchronization is carried out through NTP service, a time stamp is written in a live streaming data packet of the signal source, recording is started or stopped according to the time stamp, the lengths of recorded videos are ensured to be consistent, and the length difference of the videos does not need to be concerned during replaying. And during playback, the time difference value is used instead of the reference video, so that the overall playing pause caused by the pause of the reference video is improved. According to the decentralized scheme, all videos are aligned with the reference time, and the problem that the standard video and other videos are not synchronized due to time consumption of a synchronization algorithm is solved.
Drawings
FIG. 1 is a system topology diagram applying the method of the present invention;
FIG. 2 is a diagram of the modular relationship of the method described in the present invention with respect to functional services;
FIG. 3 is a schematic diagram of a recording flow of the method of the present invention;
fig. 4 is a schematic diagram illustrating a recording stop flow of the method of the present invention;
fig. 5 is a schematic playback flow diagram of the method of the present invention.
Detailed Description
The method for synchronously recording and playing back scenes based on multiple signal sources on the same time axis can be realized based on the system shown in FIG. 1. The recording server is connected with the disk array by using an optical fiber and is used for storing the recording file. Other nodes in the system are connected by network cables and are communicated with each other through the network for data interaction.
The various services of the system are modularized and include at least NTP service, user terminal, scheduling service, recording service, and storage service, as shown in fig. 2.
The NTP service provides a time correction service with high accuracy. The method is used for correcting the system clock of each node in the system so as to ensure the clock synchronization of each node in the system. NTP is network time protocol, english name: network Time Protocol.
The scheduling service provides user operation related interfaces, including signal source access, scene maintenance, recording management and other related interfaces and related service data management. And provides a load balancing and disaster recovery mechanism. And scheduling the optimal working node according to the recorded broadcast service load. And when the node is down or lost, selecting the available node to take over the fault node for working through the scheduling service. High performance and high availability guarantee are provided.
The recording and playing service provides a video stream recording function. And packaging the real-time video stream according to a specified packaging format, and uploading the packaged video file to a file server for storage.
The storage service is distributed file storage, and provides a high-availability file storage function. File damage and data loss caused by single-node disk failure are avoided.
The user terminal provides a user operation interface. And providing a video playback alignment algorithm to ensure synchronous playback of the videos.
The call flow when starting recording is shown in fig. 3:
s101, a user starts recording at a user terminal;
s102, after receiving the request, the scheduling service inquires a database to acquire signal source information contained in the current scene;
s103, the scheduling service calculates the recording and broadcasting service which needs to participate in the work according to the number of signal sources which need to be recorded and a scheduling strategy, and if no available recording and broadcasting service indicates that the system is abnormal, the recording and broadcasting service directly returns to and informs a user;
s104, the recording service starts to establish connection with the signal source according to the stream address in the distributed signal source information and starts to pull the stream;
s105, after receiving the stream pulling connection, the signal source acquires a current system time stamp and stamps a time stamp for the video data packet;
s106, after all recording services are connected with the signal source, caching the video bare stream and calling back the scheduling service;
s107, after receiving the callback request, the scheduling service acquires a current system timestamp; the recording service issues an enabling instruction and carries the acquired timestamp;
s108, the recording service starts to perform trans-encapsulation on the data after the timestamp on the video bare stream according to the timestamp sent by the scheduling service;
and S109, continuously uploading the encapsulated data packets to a distributed file storage by the recording service.
The call flow when stopping recording is shown in fig. 4:
s201, the user finishes recording at a user terminal;
s202, the scheduling service acquires the recording service which participates in the work;
s203, the scheduling service acquires the current system time stamp and initiates a stop request to the recording service participating in the work;
s204, when the recording service receives the stop request, judging whether the signal source meets the stop condition according to the transmitted system time stamp and the cached data packet time stamp;
s205, if the stop condition is not met, the recording service continuously pulls the stream and continues to package; until the acquired time stamp of the data packet is consistent with the stopped time stamp;
and S206, after the stop condition is met, stopping stream pulling and package transferring by the recording service, and ending the recording task.
The execution flow of scene synchronous playback is shown in fig. 5:
s301, the user terminal starts playback. Acquiring a plurality of video addresses needing to be played back;
s302, calling a scheduling service to acquire a played back video frame rate GOP;
s303, acquiring the current system time and recording the current system time as a time reference t1;
s304, playing back the video;
s305, obtaining the current time t2 and the time t3 of video playback;
s306, determine whether the video playback time is equal to the current time minus the time reference, i.e. the code logic "t3= = t2-t1? ";
s307, if the video is equal to the video, continuing playing back the video;
s308, calculating a deviated video frame if the difference is not equal, namely GOP (t 3- (t 2-t 1));
s309, if the deviated video frame is larger than 0, the playing time is larger than the current time t 2-the reference time t1; indicating that the playing is too fast and video frames need to be played back;
s310, if the video frame of the deviation is less than 0, the video playing is slow, and the video frame needs to be skipped;
and S311, continuously playing back the video until the video playing is completed.
The method of the invention carries out global clock synchronization through NTP, writes a time stamp in a signal source live broadcast stream data packet, and starts or stops recording according to the time stamp. The length of the recorded videos is ensured to be consistent, so that the length difference of the videos does not need to be concerned during playback. And during playback, the time difference value is used instead of the reference video, so that the overall playing pause caused by the pause of the reference video is improved. According to the decentralization scheme, all videos are aligned with the reference time, and the problem that the standard video and other videos are not synchronized due to time consumption of a synchronization algorithm is solved.
It will be apparent to those skilled in the art that various other changes and modifications may be made in the above-described embodiments and concepts and all such changes and modifications are intended to be within the scope of the appended claims.
Claims (10)
1. A method for synchronously recording and playing back a scene with multiple signal sources based on the same time axis is characterized in that the synchronous recording and the synchronous playing back of the multiple signal sources are carried out based on NTP service.
2. The method for synchronously recording and playing back multiple signal source scenes on the basis of the same time axis as claimed in claim 1, wherein the signal source information in the scenes is inquired during the synchronous recording of the multiple signal sources, and then the recording service is scheduled; pre-pulling the stream when the recording service is available; after the connection is established, caching the video stream and the timestamp; acquiring current system time; issuing an enabling instruction to enable the recording service to be packaged, and finally uploading the packaged recording service to a file sending server;
and the timestamp and the current system time are synchronized based on the NTP service.
3. The method for simultaneous recording and playback of multiple signal source scenes on the basis of the same time line as claimed in claim 2, wherein the recording service starts to repackage the data after the timestamp on the video elementary stream according to the timestamp transmitted by the scheduling service.
4. The method for synchronous recording and playback of multiple signal source scenes on the basis of the same time axis as claimed in claim 2, wherein said file server is a distributed file storage.
5. The method for synchronously recording and playing back multiple signal source scenes on the basis of the same time axis as claimed in claim 2, wherein the recording service in operation is inquired when a recording ending instruction is received, and a current system time redistribution stopping instruction is obtained; and checking whether the data packet at the current time is cached or not, if not, continuing to cache the data packet and packaging, and stopping the recording service after the caching is finished.
6. The method according to claim 5, wherein the buffering of the data packet is completed as a stop condition for the recording service, and if the stop condition is not met, the recording service continues to pull the stream and continues to perform encapsulation; until the retrieved packet timestamp coincides with the stop timestamp.
7. The method for synchronously recording and playing back scenes based on the same time axis and multiple signal sources as claimed in claim 2, wherein a video playing address is obtained before the synchronous playback of the multiple signal sources, a video frame rate is inquired, and the current system time is inquired and recorded as a reference time;
and starting synchronous playback of the multiple signal sources, monitoring whether the time difference between the current time and the reference time is equal to the playback time, and performing frame skipping or playback frame processing when the time difference is inconsistent with the playback time until the time difference is consistent with the playback time.
8. The method of claim 7, wherein the offset video frame number is calculated when the time difference is not consistent with the playback time, and the frame skipping or frame playback is performed according to the offset video frame number.
9. The method of claim 8, wherein the offset video frames are processed for playback when the offset video frames number is greater than zero.
10. The method of claim 8, wherein skipping the deviant video frames is performed when the deviant video frames is less than zero.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210979054.1A CN115412754A (en) | 2022-08-16 | 2022-08-16 | Method for synchronously recording and replaying scenes of multiple signal sources based on same time axis |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210979054.1A CN115412754A (en) | 2022-08-16 | 2022-08-16 | Method for synchronously recording and replaying scenes of multiple signal sources based on same time axis |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115412754A true CN115412754A (en) | 2022-11-29 |
Family
ID=84159319
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210979054.1A Pending CN115412754A (en) | 2022-08-16 | 2022-08-16 | Method for synchronously recording and replaying scenes of multiple signal sources based on same time axis |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115412754A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116132751A (en) * | 2022-12-30 | 2023-05-16 | 郑州小鸟信息科技有限公司 | Method and system for synchronous playback based on web window scene |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060146886A1 (en) * | 2005-01-03 | 2006-07-06 | Mediatek Incorporation | System and method for performing signal synchronization of data streams |
US20080145830A1 (en) * | 2006-12-15 | 2008-06-19 | Huang Lucas K | Synchronous multi-media recording and playback with end user control of time, data, and event visualization for playback control over a network |
US20150120953A1 (en) * | 2013-10-31 | 2015-04-30 | At&T Intellectual Property I, Lp | Synchronizing media presentation at multiple devices |
WO2016184229A1 (en) * | 2015-05-15 | 2016-11-24 | 乐视云计算有限公司 | Method and system for recording live video |
KR101700421B1 (en) * | 2016-07-20 | 2017-01-26 | 한국항공우주연구원 | Image recording for launch vehicle and exhibition system |
CN107925783A (en) * | 2015-09-30 | 2018-04-17 | 苹果公司 | Synchronized playback and control to media |
CN110012251A (en) * | 2018-01-04 | 2019-07-12 | 腾讯科技(深圳)有限公司 | Video recording method, device and readable storage medium storing program for executing |
CN112351294A (en) * | 2020-10-27 | 2021-02-09 | 广州赞赏信息科技有限公司 | Method and system for frame synchronization among multiple machine positions of cloud director |
-
2022
- 2022-08-16 CN CN202210979054.1A patent/CN115412754A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060146886A1 (en) * | 2005-01-03 | 2006-07-06 | Mediatek Incorporation | System and method for performing signal synchronization of data streams |
US20080145830A1 (en) * | 2006-12-15 | 2008-06-19 | Huang Lucas K | Synchronous multi-media recording and playback with end user control of time, data, and event visualization for playback control over a network |
US20150120953A1 (en) * | 2013-10-31 | 2015-04-30 | At&T Intellectual Property I, Lp | Synchronizing media presentation at multiple devices |
WO2016184229A1 (en) * | 2015-05-15 | 2016-11-24 | 乐视云计算有限公司 | Method and system for recording live video |
CN107925783A (en) * | 2015-09-30 | 2018-04-17 | 苹果公司 | Synchronized playback and control to media |
KR101700421B1 (en) * | 2016-07-20 | 2017-01-26 | 한국항공우주연구원 | Image recording for launch vehicle and exhibition system |
CN110012251A (en) * | 2018-01-04 | 2019-07-12 | 腾讯科技(深圳)有限公司 | Video recording method, device and readable storage medium storing program for executing |
CN112351294A (en) * | 2020-10-27 | 2021-02-09 | 广州赞赏信息科技有限公司 | Method and system for frame synchronization among multiple machine positions of cloud director |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116132751A (en) * | 2022-12-30 | 2023-05-16 | 郑州小鸟信息科技有限公司 | Method and system for synchronous playback based on web window scene |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10826958B2 (en) | Content server media stream management | |
US6002687A (en) | MPEG transport stream remultiplexer | |
JP4358910B2 (en) | Method and apparatus for connecting compressed information streams | |
JP5086285B2 (en) | Video distribution system, video distribution apparatus, and synchronization correction processing apparatus | |
KR100382711B1 (en) | Transmission system, reception system, and transmission and reception system capable of displaying a scene with high quality | |
US9565482B1 (en) | Adaptive profile switching system and method for media streaming over IP networks | |
CN110933449B (en) | Method, system and device for synchronizing external data and video pictures | |
US20030021346A1 (en) | MPEG dual-channel decoder data and control protocols for real-time video streaming | |
US8145778B2 (en) | Method and system for transitioning streamed digital video content between stream servers in a digital video network | |
US9060183B2 (en) | Reduced latency media distribution system | |
US9781488B2 (en) | Controlled adaptive rate switching system and method for media streaming over IP networks | |
CN112351294A (en) | Method and system for frame synchronization among multiple machine positions of cloud director | |
JP2008178060A (en) | Redundancy gateway system | |
CN111447392B (en) | Data transmission method, device, server and computer readable storage medium | |
CN115412754A (en) | Method for synchronously recording and replaying scenes of multiple signal sources based on same time axis | |
US20240007692A1 (en) | Transport stream automatic change over | |
EP3195533B1 (en) | Video network | |
CN111629158B (en) | Audio stream and video stream synchronous switching method and device | |
KR101338666B1 (en) | Video server device and synchronization control method | |
JP2020005063A (en) | Processing device and control method thereof, output device, synchronization control system, and program | |
KR100962083B1 (en) | Method and system for converting a first data stream into a second data stream | |
JP2005519541A5 (en) | ||
CN116707693A (en) | Signal stream message processing method and device, electronic equipment and storage medium | |
JP2013012827A (en) | Communication system and communication device | |
JP2019201243A (en) | Processing apparatus, synchronous control system, control method of these, and program |
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 |