CN104410930A - A method and device for controlling playing speed of transport stream TS media file - Google Patents

A method and device for controlling playing speed of transport stream TS media file Download PDF

Info

Publication number
CN104410930A
CN104410930A CN201410625461.8A CN201410625461A CN104410930A CN 104410930 A CN104410930 A CN 104410930A CN 201410625461 A CN201410625461 A CN 201410625461A CN 104410930 A CN104410930 A CN 104410930A
Authority
CN
China
Prior art keywords
time stamp
video image
image data
difference
frame video
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
Application number
CN201410625461.8A
Other languages
Chinese (zh)
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.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia 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 Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN201410625461.8A priority Critical patent/CN104410930A/en
Publication of CN104410930A publication Critical patent/CN104410930A/en
Pending legal-status Critical Current

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/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4385Multiplex stream processing, e.g. multiplex stream decrypting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present invention discloses a method and device for controlling playing speed of a transport stream TS media file, to achieve uniform playing of video images at an abnormal playing speed. The method comprises: obtaining an adjusting ratio; analyzing a TS code stream to be played to obtain a decode time stamp and a presentation time stamp of each frame of video image data; calculating a difference value of the decode time stamps of two adjacent frames of video image data to obtain a first difference value; calculating a difference value of the presentation time stamps of the two adjacent frames of video image data to obtain a second difference value; adjusting the first difference value using the adjusting ratio; determining a new decode time stamp of each frame of video image data according to the adjusted first difference value; adjusting the second difference value using the adjusting ratio; determining a new presentation time stamp of each frame of video image data according to the adjusted second difference value; decoding corresponding video image data when a system clock reaches the new presentation time stamp; and displaying corresponding video image data when the system clock reaches the new presentation time stamp.

Description

A kind of control method of transport stream TS playback of media files speed and device
Technical field
The present invention relates to communication technical field, particularly relate to control method and the device of a kind of transport stream (TS) playback of media files speed.
Background technology
In the media program playing process adopting transport stream (Transport Stream, TS), in order to meet the needs of user's quickly browsing programs content, player provides fast-forward play function.
In prior art, the fast-forward play function of local media file adopts the mode choosing the key frame play in media file to realize usually.For the media file having index information, the such as media file of AVI form, can pass through the direct position of locator key frame in media file of index information, thus obtains the data of key frame fast.
But, inventor finds, the index information of locator key frame is not had in TS media file, only have and search by traveling through whole TS media file the foundation that key frame completes index information, and for the large TS media file of data volume, the foundation completing index information requires a great deal of time, and affects the experience of user.
In addition, in TS media file, the distribution of key frame (I frame) is uneven, if realize fast-forward functionality by the mode extracting key frame, fast-forward play can be caused to occur sometimes fast and sometimes slow.
Summary of the invention
The embodiment of the present invention provides a kind of control method of transport stream TS playback of media files speed, in order to realize the even broadcasting of video image under trick play speed.
The concrete technical scheme that the embodiment of the present invention provides is as follows:
A control method for transport stream TS playback of media files speed, comprising:
Obtain broadcasting speed adjustment instruction, in described broadcasting speed adjustment instruction, carry adjustment multiplying power;
Resolve decoded time stamp and Presentation Time Stamp that TS code stream to be played obtains every frame video image data;
The difference calculating the decoded time stamp of adjacent two frame video image data obtains the first difference, and the difference of the Presentation Time Stamp calculating adjacent two frame video image data obtains the second difference, described adjustment multiplying power is adopted to adjust described first difference, the new decoded time stamp of every frame video image data is determined according to described first difference after adjustment, and adopt described adjustment multiplying power to adjust described second difference, the new Presentation Time Stamp of every frame video image is determined according to described second difference after adjustment;
The vedio data that decoding is corresponding when system clock reaches described new decoded time stamp, and corresponding vedio data is shown when system clock reaches described new Presentation Time Stamp.
A control device for transport stream TS playback of media files speed, comprising:
Acquisition module, for obtaining broadcasting speed adjustment instruction, carries adjustment multiplying power in described broadcasting speed adjustment instruction;
Parsing module, obtains decoded time stamp and the Presentation Time Stamp of every frame video image data for resolving TS code stream to be played;
Reconstructed module, difference for the decoded time stamp calculating adjacent two frame video image data obtains the first difference, and the difference of the Presentation Time Stamp calculating adjacent two frame video image data obtains the second difference, described adjustment multiplying power is adopted to adjust described first difference, the new decoded time stamp of every frame video image data is determined according to described first difference after adjustment, and adopt described adjustment multiplying power to adjust described second difference, the new Presentation Time Stamp of every frame video image is determined according to described second difference after adjustment;
Decoding display module, corresponding vedio data of decoding during for reaching described new decoded time stamp at system clock, and corresponding vedio data is shown when system clock reaches described new Presentation Time Stamp.
Based on technique scheme, in the embodiment of the present invention, according to decoded time stamp and the Presentation Time Stamp of every frame video image data in the adjustment multiplying power reconstruct TS code stream obtained, according to reconstructing the new decoded time stamp decoding video images data obtained, and according to reconstructing the new Presentation Time Stamp display video image data obtained, by controlling the decode time of every frame video image data and reproduction time, reach the object of the broadcasting speed controlling whole TS code stream, ensure that the uniformity of TS code stream broadcasting speed, avoid and extract the mode of key frame and carry out the sometimes fast and sometimes slow result of broadcast that playback rate adjustment causes.
Accompanying drawing explanation
Fig. 1 is the broadcasting preparatory stage schematic diagram of embodiment of the present invention TS code stream;
Fig. 2 is the process schematic of the audio, video data of embodiment of the present invention normal speed forward TS code stream;
Fig. 3 is the method flow schematic diagram that in the embodiment of the present invention, broadcasting speed controls;
Fig. 4 is TS code stream broadcasting speed control block diagram in the embodiment of the present invention;
Fig. 5 is the structural representation of TS playback of media files speed control unit in the embodiment of the present invention.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the present invention is described in further detail, and obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
Audio analog signals or video analog signal are by the standard of encoder according to dynamic image expert group (MPEG)-2, through oversampling, quantification and compressed encoding, form elementary stream (Elementary Stream, ES), this ES is the continuous bit stream of not segmentation.By this ES section of being divided into, add corresponding header file and pack, forming grouping elementary stream (Packet Elementary Stream, PES).
Each frame of video in each PES bag in TS code stream has corresponding decoded time stamp (DecodeTime Stamp, and Presentation Time Stamp (Presentation Time Stamp DTS), PTS), wherein, DTS represents the time that corresponding frame video image data are decoded, use at decode phase, PTS represents the time that corresponding frame video image data are shown, in the use of display stage.Wherein, DTS and PTS is the timestamp relative to the program clock reference (Program Clock Reference, PCR) in TS code stream.
In the following embodiment of the present invention, be divided into the broadcasting preparatory stage of TS code stream, with normal playback speed broadcasting stage and broadcasting speed adjusting stage, whole playing process be described.
As shown in Figure 1, the broadcasting preparatory stage of TS code stream, playback equipment is after reading TS ASCII stream file ASCII, resolve this TS ASCII stream file ASCII and obtain programming association (PAT) table, include the mark of every road video frequency program in this pat table, thus determine this TS code stream Zhong Youji road video frequency program according to this pat table.
Wherein, Program Map Table (PMT) corresponding to every road video frequency program can be obtained according to the mark of pat table Zhong Mei road video frequency program, in pmt table, include the video labeling of corresponding video frequency program, audio identification and program clock reference mark.Wherein the mark of video frequency program is used for determining a road video frequency program, the video labeling of video frequency program is for determining the vedio data comprised in a road video frequency program, the audio identification of video frequency program is for determining the voice data comprised in a road video frequency program, and PCR mark is for determining the PCR that a road video frequency program is corresponding.
Filter (Filter) is set according to the video labeling in pmt table, audio identification and PCR mark, the video PES packet, audio frequency PES packet and the program clock reference (PCR) that obtain TS code stream Zhong Gai road video frequency program can be filtered.Include DTS and PTS of the every frame video image in this PES packet in the packet header of each video PES packet, in the packet header of each audio frequency PES packet, include DTS and PTS of the every frame audio frequency in this PES packet.
The process of the audio, video data of TS code stream is play as shown in Figure 2 with normal playback speed, resolve TS code stream, respectively demultiplexing is carried out to video, audio frequency and PCR, obtain the video PES packet of a road video frequency program, audio frequency PES packet and PCR that user selects to play, and adopt the PCR resolving this road video frequency program obtained to revise the local system clock of playback equipment.
Resolve the video PES packet to be played of this road video frequency program, obtain DTS and PTS of every frame video image data to be played, the video decoding controller vedio data that instruction video decoders decode is corresponding when system clock reaches DTS, the video display controller vedio data that the display of instruction video display is corresponding when system clock reaches PTS.
Resolve the audio frequency PES packet to be played of this road video frequency program, obtain DTS and PTS of every frame audio frequency to be played, the audio codec controller voice data that indicative audio decoders decode is corresponding when system clock reaches DTS, audio frequency o controller indicative audio follower when system clock reaches PTS exports corresponding voice data.
As shown in Figure 3, playing any time in the playing process such as TS code stream with normal playback speed, trick play speed, the method detailed flow process of carrying out broadcasting speed control is as follows:
Step 301: obtain broadcasting speed adjustment instruction, carries adjustment multiplying power in this broadcasting speed adjustment instruction.
In the embodiment of the present invention, adjustment multiplying power R is greater than null value and is not equal to one.
Wherein, broadcasting speed adjustment instruction is the button input that user passes through to operate player, presets adjustment multiplying power corresponding to different button in player, or the adjustment multiplying power that the different operating mode presetting same button is corresponding.The embodiment of the present invention does not limit the obtain manner of broadcasting speed adjustment instruction, and the mode of existing acquisition broadcasting speed adjustment instruction all can be applicable to the present invention.
Step 302: resolve decoded time stamp and Presentation Time Stamp that TS code stream to be played obtains every frame video image data.
Step 303: the difference calculating the decoded time stamp of adjacent two frame video image data obtains the first difference, and the difference of the Presentation Time Stamp calculating adjacent two frame video image data obtains the second difference, described adjustment multiplying power is adopted to adjust described first difference, the new decoded time stamp of every frame video image data is determined according to described first difference after adjustment, and adopt described adjustment multiplying power to adjust described second difference, the new Presentation Time Stamp of every frame video image is determined according to described second difference after adjustment.
Wherein, the first difference is substantially identical with the second difference, when specifically implementing, can be considered that the first difference is equal to the second difference, only calculates the first difference or the second difference during calculating.
Preferably, by described first difference divided by after described adjustment multiplying power, sue for peace with the new decoded time stamp of the former frame vedio data in described adjacent two frame video image data, using obtain with the new decoded time stamp of value as the rear frame video image data in described adjacent two frame video image data;
By described second difference divided by after described adjustment multiplying power, sue for peace with the new Presentation Time Stamp of the former frame vedio data in described adjacent two frame video image data, using obtain with the new Presentation Time Stamp of value as the rear frame video image data in described adjacent two frame video image data.
This is preferably in execution mode, suppose when adjustment multiplying power is designated as quickening broadcasting speed (R is greater than 1), by by the first difference between the decoded time stamp of adjacent two frame video image data divided by adjustment multiplying power, the first difference between the decoded time stamp of adjacent two frame video image data is reduced according to adjustment multiplying power, and by the second difference between the Presentation Time Stamp of adjacent two frame video image data divided by adjustment multiplying power, the second difference between the Presentation Time Stamp of adjacent two frame video image data is reduced according to adjustment multiplying power, by reducing the difference of decode time and the difference of displaying time of adjacent two frame video image data, to reach earlier decode and the object of display video image, reach the effect of F.F..
Suppose adjust multiplying power be designated as slow down broadcasting speed time (R is less than 1), by by the first difference between the decoded time stamp of adjacent two frame video image data divided by adjustment multiplying power, the first difference between the decoded time stamp of adjacent two frame video image data is increased according to adjustment multiplying power, and by the second difference between the Presentation Time Stamp of adjacent two frame video image data divided by adjustment multiplying power, the second difference between the Presentation Time Stamp of adjacent two frame video image data is increased according to adjustment multiplying power, by increasing the difference of decode time and the difference of displaying time of adjacent two frame video image data, to reach the object of postponing decoding display video image, reach the effect of slow-motion.
In a concrete enforcement, suppose to resolve TS code stream to be played, the decoded time stamp of the every frame video image data obtained from PES packet and Presentation Time Stamp, be expressed as according to the time order and function order of each decoded time stamp: dts 1, dts 2dts n, be expressed as according to the time order and function order of each Presentation Time Stamp: pts 1, pts 2pts n, each decoded time stamp and the Presentation Time Stamp of resolving acquisition are timestamp corresponding to normal playback speed.
Suppose to be expressed as according to time order and function order according to the new decoded time stamp of the vedio data each to be played obtained after adjustment multiplying power R adjustment: dts 1, dts 2' ... dts n', be expressed as according to time order and function order according to the new Presentation Time Stamp of the vedio data each to be played obtained after adjustment multiplying power R adjustment: pts 1, pts 2' ... pts n', often the difference (i.e. the first difference) of the decoded time stamp of adjacent two frame video image data can be expressed as: Δ t 2, Δ t 3Δ t n, (namely the second difference can be expressed as the difference of the every Presentation Time Stamp of adjacent two frame video image data: Δ t 2', Δ t 3' ... Δ t n'.
First difference can calculate according to following formula (1):
Δ t 2 = dts 2 - dts 1 Δ t 3 = dts 3 - dts 2 . . . . . . Δ t n = dts n - dts n - 1 - - - ( 1 )
Second difference can calculate according to following formula (2):
Δ t 2 ′ = dts 2 - dts 1 Δ t 3 ′ = dts 3 - dts 2 . . . . . . Δ t n ′ = dts n - dts n - 1 - - - ( 2 )
Can obtain according to following formula (3) according to the new decoded time stamp after adjustment multiplying power R adjustment:
dts 2 ′ = dts 1 + Δ t 2 / R dts 3 ′ = dts 2 ′ + Δ t 3 / R . . . . . . dts n ′ = dts n - 1 ′ + Δ t n / R - - - ( 3 )
Can obtain according to following formula (4) according to the new Presentation Time Stamp after adjustment multiplying power R adjustment:
dts 2 ′ = dts 1 + Δ t 2 ′ / R dts 3 ′ = dts 2 ′ + Δ t 3 ′ / R . . . . . . dts n ′ = dts n - 1 ′ + Δ t n ′ / R - - - ( 4 )
Step 304: the vedio data that decoding is corresponding when system clock reaches described new decoded time stamp, and corresponding vedio data is shown when system clock reaches described new Presentation Time Stamp.
Wherein, be not in the playing process of normal playback speed at broadcasting speed, forbid the system clock of the program clock reference correction this locality of the every frame video image data adopting decoding to obtain, local system clock is according to the crystal oscillator frequency timing of self.In the playing process of trick play speed, the decoded time stamp of every frame video image and Presentation Time Stamp are adjusted according to adjustment multiplying power, and the program clock reference that TS code stream decoding obtains is when with normal playback speed displaying video and audio frequency, the object of synchronization video and audio frequency is reached by revising local system clock, in the playing process of trick play speed, do not need audio plays, without the need to synchronization video and audio frequency, also just without the need to revising local system clock.
Preferably, the vedio data that decoding is corresponding when system clock reaches described new decoded time stamp, and show corresponding vedio data when system clock reaches described new Presentation Time Stamp after, switch to the instruction of normal playback speed if get, resolve decoded time stamp and Presentation Time Stamp that TS code stream to be played obtains every frame video image data to be played; The decoded time stamp of the first frame video image in the TS code stream adopting this to be played or Presentation Time Stamp update the system clock, the vedio data that decoding is corresponding when revised system clock reaches described decoded time stamp, and corresponding vedio data is shown when revised system clock reaches described Presentation Time Stamp.
In the embodiment of the present invention, in the process that TS code stream is play with normal speed, without the need to audio plays, therefore close the process such as the parsing to voice data, broadcasting.
After switching to normal playback speed from trick play speed, adopt the decoded time stamp of the first frame video image data in TS code stream to be played or the system clock of Presentation Time Stamp correction this locality, decoded audio PES wraps, obtain DTS and PTS of every frame voice data, when revised system clock reaches the DTS of audio frequency, to decode voice data corresponding to this DTS, when revised system clock reaches the PTS of audio frequency, play the voice data that this PTS is corresponding.
Preferably, before obtaining broadcasting speed adjustment instruction, resolving with normal playback speed and playing in the process of TS code stream, the TS code stream of decoding to be played, obtain the program clock reference of the first frame video image data, adopt described program clock reference update the system clock.
In concrete enforcement, resolve in normal playback speed and play in the process of TS code stream, can be at interval of after setting duration or the frame of video at interval of setting number, adopt the program clock reference update the system clock of the vedio data of current display.
In TS code stream broadcasting speed control block diagram as shown in Figure 4, wrap at video PES TS code stream demultiplexing being obtained to a road video frequency program, resolve DTS and PTS that video PES bag obtains every frame video image data, obtain fast forward rate (namely the adjusting multiplying power) R of user's input, this adjustment multiplying power is adopted to reconstruct DTS and PTS of every frame video image data, under the control of local system clock, video decoding controller controls the every frame video image data of decoding according to the DTS obtained after reconstruct, under the control of local system clock, video display controller shows every frame video image data according to the PTS control video display after reconstruct.
Based on same inventive concept, as shown in Figure 5, the embodiment of the present invention additionally provides a kind of control device of TS playback of media files speed, and the concrete enforcement of this device can see the description of said method part, and repeat part and do not repeating, this device mainly comprises:
Acquisition module 501, for obtaining broadcasting speed adjustment instruction, carries adjustment multiplying power in described broadcasting speed adjustment instruction;
Parsing module 502, obtains decoded time stamp and the Presentation Time Stamp of every frame video image data for resolving TS code stream to be played;
Reconstructed module 503, difference for the decoded time stamp calculating adjacent two frame video image data obtains the first difference, and the difference of the Presentation Time Stamp calculating adjacent two frame video image data obtains the second difference, described adjustment multiplying power is adopted to adjust described first difference, the new decoded time stamp of every frame video image data is determined according to described first difference after adjustment, and adopt described adjustment multiplying power to adjust described second difference, the new Presentation Time Stamp of every frame video image is determined according to described second difference after adjustment;
Decoding display module 504, corresponding vedio data of decoding during for reaching described new decoded time stamp at system clock, and corresponding vedio data is shown when system clock reaches described new Presentation Time Stamp.
Preferably, described reconstructed module 503 specifically for:
By described first difference divided by after described adjustment multiplying power, sue for peace with the new decoded time stamp of the former frame vedio data in described adjacent two frame video image data, using obtain with the new decoded time stamp of value as the rear frame video image data in described adjacent two frame video image data;
By described second difference divided by after described adjustment multiplying power, sue for peace with the new Presentation Time Stamp of the former frame vedio data in described adjacent two frame video image data, using obtain with the new Presentation Time Stamp of value as the rear frame video image data in described adjacent two frame video image data.
Preferably, described acquisition module 501 also for:
Obtain the instruction switching to normal playback speed;
Described decoding display module 504 specifically for:
Described decoder module is adopted to resolve decoded time stamp or the Presentation Time Stamp update the system clock of the first frame video image data that described TS code stream to be played obtains, the vedio data that decoding is corresponding when revised system clock reaches the described decoded time stamp of described parsing module acquisition, and show corresponding vedio data when revised system clock reaches the described Presentation Time Stamp of described parsing module acquisition.
Preferably, also comprise correcting module 505, for:
Before described acquisition module obtains broadcasting speed adjustment instruction, resolve with normal playback speed and play in the process of TS code stream, to decode TS code stream to be played, obtain the program clock reference of the first frame video image data to be played, adopt described program clock reference update the system clock.
Preferably, described adjustment multiplying power is greater than null value and is not equal to one.
Based on technique scheme, in the embodiment of the present invention, according to decoded time stamp and the Presentation Time Stamp of every frame video image data in the adjustment multiplying power reconstruct TS code stream obtained, according to reconstructing the new decoded time stamp decoding video images data obtained, and according to reconstructing the new Presentation Time Stamp display video image data obtained, by controlling the decode time of every frame video image data and reproduction time, reach the object of the broadcasting speed controlling whole TS code stream, and, difference between the decoded time stamp of every adjacent two frame video image data and the difference between Presentation Time Stamp all adopt adjustment multiplying power to adjust, due to often adjacent two frame video images in TS code stream to be played Presentation Time Stamp between difference all adjust according to identical adjustment multiplying power, and every frame video image all shows, avoid and extract the mode of key frame and carry out the sometimes fast and sometimes slow result of broadcast that playback rate adjustment causes, thus ensure that the uniformity of TS code stream broadcasting speed.
And, to the mode of the broadcasting that the decoded time stamp of every frame video image data and Presentation Time Stamp reconstruct in the embodiment of the present invention, the first difference between the decoded time stamp of every adjacent two frame video image data, and the second difference between the Presentation Time Stamp of every adjacent two frame video image data, can adjust according to adjusting arbitrarily multiplying power, thus realize the video playback of any broadcasting speed, such as can realize 0.5 times, 1.2 doubly, the broadcasting of 1.5 times of multiplying powers, and extract the speed that mode that key frame carries out F.F. can only realize integral multiple in prior art and play.
In addition, in the embodiment of the present invention, do not need the index information setting up key frame, and key frame to distribute in TS media file be uneven, therefore, adopt the embodiment of the present invention to realize F.F. or slow-motion is play, there will not be the problem that reproduction time is sometimes fast and sometimes slow.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store and optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. a control method for transport stream TS playback of media files speed, is characterized in that, comprising:
Obtain broadcasting speed adjustment instruction, in described broadcasting speed adjustment instruction, carry adjustment multiplying power;
Resolve decoded time stamp and Presentation Time Stamp that TS code stream to be played obtains every frame video image data;
The difference calculating the decoded time stamp of adjacent two frame video image data obtains the first difference, and the difference of the Presentation Time Stamp calculating adjacent two frame video image data obtains the second difference, described adjustment multiplying power is adopted to adjust described first difference, the new decoded time stamp of every frame video image data is determined according to described first difference after adjustment, and adopt described adjustment multiplying power to adjust described second difference, the new Presentation Time Stamp of every frame video image is determined according to described second difference after adjustment;
The vedio data that decoding is corresponding when system clock reaches described new decoded time stamp, and corresponding vedio data is shown when system clock reaches described new Presentation Time Stamp.
2. the method for claim 1, it is characterized in that, described adjustment multiplying power is adopted to adjust described first difference, the new decoded time stamp of every frame video image data is determined according to described first difference after adjustment, and adopt described adjustment multiplying power to adjust described second difference, determine the new Presentation Time Stamp of every frame video image according to described second difference after adjustment, comprising:
By described first difference divided by after described adjustment multiplying power, sue for peace with the new decoded time stamp of the former frame vedio data in described adjacent two frame video image data, using obtain with the new decoded time stamp of value as the rear frame video image data in described adjacent two frame video image data;
By described second difference divided by after described adjustment multiplying power, sue for peace with the new Presentation Time Stamp of the former frame vedio data in described adjacent two frame video image data, using obtain with the new Presentation Time Stamp of value as the rear frame video image data in described adjacent two frame video image data.
3. method as claimed in claim 2, it is characterized in that, the vedio data that decoding is corresponding when system clock reaches described new decoded time stamp, and show corresponding vedio data when system clock reaches described new Presentation Time Stamp after, described method also comprises:
Obtain the instruction switching to normal playback speed, resolve decoded time stamp and Presentation Time Stamp that TS code stream to be played obtains every frame video image data to be played;
Adopt decoded time stamp or the Presentation Time Stamp update the system clock of the first frame video image in described TS code stream to be played, the vedio data that decoding is corresponding when revised system clock reaches described decoded time stamp, and corresponding vedio data is shown when revised system clock reaches described Presentation Time Stamp.
4. method as claimed in claim 3, is characterized in that, before obtaining broadcasting speed adjustment instruction, described method also comprises:
Resolving with normal playback speed and playing in the process of TS code stream, the TS code stream of decoding to be played, obtaining the program clock reference of the first frame video image data to be played, adopting described program clock reference update the system clock.
5. the method as described in any one of claim 1-4, is characterized in that, described adjustment multiplying power is greater than null value and is not equal to one.
6. a control device for transport stream TS playback of media files speed, is characterized in that, comprising:
Acquisition module, for obtaining broadcasting speed adjustment instruction, carries adjustment multiplying power in described broadcasting speed adjustment instruction;
Parsing module, obtains decoded time stamp and the Presentation Time Stamp of every frame video image data for resolving TS code stream to be played;
Reconstructed module, difference for the decoded time stamp calculating adjacent two frame video image data obtains the first difference, and the difference of the Presentation Time Stamp calculating adjacent two frame video image data obtains the second difference, described adjustment multiplying power is adopted to adjust described first difference, the new decoded time stamp of every frame video image data is determined according to described first difference after adjustment, and adopt described adjustment multiplying power to adjust described second difference, the new Presentation Time Stamp of every frame video image is determined according to described second difference after adjustment;
Decoding display module, corresponding vedio data of decoding during for reaching described new decoded time stamp at system clock, and corresponding vedio data is shown when system clock reaches described new Presentation Time Stamp.
7. device as claimed in claim 6, is characterized in that, described reconstructed module specifically for:
By described first difference divided by after described adjustment multiplying power, sue for peace with the new decoded time stamp of the former frame vedio data in described adjacent two frame video image data, using obtain with the new decoded time stamp of value as the rear frame video image data in described adjacent two frame video image data;
By described second difference divided by after described adjustment multiplying power, sue for peace with the new Presentation Time Stamp of the former frame vedio data in described adjacent two frame video image data, using obtain with the new Presentation Time Stamp of value as the rear frame video image data in described adjacent two frame video image data.
8. device as claimed in claim 7, is characterized in that, described acquisition module also for:
Obtain the instruction switching to normal playback speed;
Described decoding display module specifically for:
Described decoder module is adopted to resolve decoded time stamp or the Presentation Time Stamp update the system clock of the first frame video image data that described TS code stream to be played obtains, the vedio data that decoding is corresponding when revised system clock reaches the described decoded time stamp of described parsing module acquisition, and show corresponding vedio data when revised system clock reaches the described Presentation Time Stamp of described parsing module acquisition.
9. device as claimed in claim 8, is characterized in that, also comprise correcting module, for:
Before described acquisition module obtains broadcasting speed adjustment instruction, resolve with normal playback speed and play in the process of TS code stream, to decode TS code stream to be played, obtain the program clock reference of the first frame video image data to be played, adopt described program clock reference update the system clock.
10. the device as described in any one of claim 6-9, is characterized in that, described adjustment multiplying power is greater than null value and is not equal to one.
CN201410625461.8A 2014-11-07 2014-11-07 A method and device for controlling playing speed of transport stream TS media file Pending CN104410930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410625461.8A CN104410930A (en) 2014-11-07 2014-11-07 A method and device for controlling playing speed of transport stream TS media file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410625461.8A CN104410930A (en) 2014-11-07 2014-11-07 A method and device for controlling playing speed of transport stream TS media file

Publications (1)

Publication Number Publication Date
CN104410930A true CN104410930A (en) 2015-03-11

Family

ID=52648514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410625461.8A Pending CN104410930A (en) 2014-11-07 2014-11-07 A method and device for controlling playing speed of transport stream TS media file

Country Status (1)

Country Link
CN (1) CN104410930A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049904A (en) * 2015-07-27 2015-11-11 青岛海信移动通信技术股份有限公司 Play method and play device of multi-media files
CN105812962A (en) * 2016-02-24 2016-07-27 清德智体(北京)科技有限公司 Streaming media video frame time offset elimination method
CN106128355A (en) * 2016-07-14 2016-11-16 北京智能管家科技有限公司 The display packing of a kind of LED battle array and device
CN107613407A (en) * 2017-08-18 2018-01-19 珠海市君天电子科技有限公司 A kind of video display control method, device, electronic equipment and storage medium
CN110072123A (en) * 2018-01-24 2019-07-30 中兴通讯股份有限公司 A kind of recovery playback method, video playing terminal and the server of video
CN111265867A (en) * 2020-01-20 2020-06-12 腾讯科技(深圳)有限公司 Method and device for displaying game picture, terminal and storage medium
CN111885334A (en) * 2020-08-26 2020-11-03 杭州速递科技有限公司 Method for reducing delay of real-time frame pursuit of audio and video
CN112153443A (en) * 2020-09-01 2020-12-29 青岛海信传媒网络技术有限公司 PTS acquisition method and display device
CN112272316A (en) * 2020-10-29 2021-01-26 广东博华超高清创新中心有限公司 Multi-transmission code stream synchronous UDP distribution method and system based on video display timestamp
CN112839229A (en) * 2019-11-25 2021-05-25 合肥杰发科技有限公司 Method for calculating decoding time consumption, method for calculating coding time consumption and related device thereof
CN113542840A (en) * 2021-06-11 2021-10-22 浙江大华技术股份有限公司 Method for adjusting display delay, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000016533A1 (en) * 1998-09-15 2000-03-23 Microsoft Corporation Multimedia timeline modification in networked client/server systems
CN1396742A (en) * 2002-08-02 2003-02-12 清华大学 Speed-variable playing method based on stream medium technique for player
CN101022544A (en) * 2006-02-15 2007-08-22 乐金电子(中国)研究开发中心有限公司 System clock reference automatic adjusting system and method
CN101075949A (en) * 2006-05-15 2007-11-21 中兴通讯股份有限公司 Method for changing fluid-medium file broadcasting speed
CN101262291A (en) * 2008-04-30 2008-09-10 中兴通讯股份有限公司 A method and device for realizing speed-varying playing media

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000016533A1 (en) * 1998-09-15 2000-03-23 Microsoft Corporation Multimedia timeline modification in networked client/server systems
CN1396742A (en) * 2002-08-02 2003-02-12 清华大学 Speed-variable playing method based on stream medium technique for player
CN101022544A (en) * 2006-02-15 2007-08-22 乐金电子(中国)研究开发中心有限公司 System clock reference automatic adjusting system and method
CN101075949A (en) * 2006-05-15 2007-11-21 中兴通讯股份有限公司 Method for changing fluid-medium file broadcasting speed
CN101262291A (en) * 2008-04-30 2008-09-10 中兴通讯股份有限公司 A method and device for realizing speed-varying playing media

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049904B (en) * 2015-07-27 2019-05-31 青岛海信移动通信技术股份有限公司 A kind of playing method and device of multimedia file
CN105049904A (en) * 2015-07-27 2015-11-11 青岛海信移动通信技术股份有限公司 Play method and play device of multi-media files
CN105812962A (en) * 2016-02-24 2016-07-27 清德智体(北京)科技有限公司 Streaming media video frame time offset elimination method
CN105812962B (en) * 2016-02-24 2018-10-26 清德智体(北京)科技有限公司 A kind of stream media video frame time migration removing method
CN106128355A (en) * 2016-07-14 2016-11-16 北京智能管家科技有限公司 The display packing of a kind of LED battle array and device
CN107613407A (en) * 2017-08-18 2018-01-19 珠海市君天电子科技有限公司 A kind of video display control method, device, electronic equipment and storage medium
CN110072123A (en) * 2018-01-24 2019-07-30 中兴通讯股份有限公司 A kind of recovery playback method, video playing terminal and the server of video
CN110072123B (en) * 2018-01-24 2022-04-15 中兴通讯股份有限公司 Video recovery playing method, video playing terminal and server
CN112839229A (en) * 2019-11-25 2021-05-25 合肥杰发科技有限公司 Method for calculating decoding time consumption, method for calculating coding time consumption and related device thereof
CN111265867B (en) * 2020-01-20 2021-06-29 腾讯科技(深圳)有限公司 Method and device for displaying game picture, terminal and storage medium
CN111265867A (en) * 2020-01-20 2020-06-12 腾讯科技(深圳)有限公司 Method and device for displaying game picture, terminal and storage medium
CN111885334A (en) * 2020-08-26 2020-11-03 杭州速递科技有限公司 Method for reducing delay of real-time frame pursuit of audio and video
CN112153443A (en) * 2020-09-01 2020-12-29 青岛海信传媒网络技术有限公司 PTS acquisition method and display device
CN112153443B (en) * 2020-09-01 2022-02-22 青岛海信传媒网络技术有限公司 PTS acquisition method and display device
CN112272316A (en) * 2020-10-29 2021-01-26 广东博华超高清创新中心有限公司 Multi-transmission code stream synchronous UDP distribution method and system based on video display timestamp
CN113542840A (en) * 2021-06-11 2021-10-22 浙江大华技术股份有限公司 Method for adjusting display delay, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN104410930A (en) A method and device for controlling playing speed of transport stream TS media file
EP2752023B1 (en) Method to match input and output timestamps in a video encoder and advertisement inserter
US9549027B2 (en) Network-synchronized media playback
JP5258885B2 (en) Encoded stream reproduction apparatus and encoded stream reproduction method
CN108243350B (en) Audio and video synchronization processing method and device
CN101207764B (en) Recording device, recording method and reproducing device
US20150235668A1 (en) Video/audio synchronization apparatus and video/audio synchronization method
KR20000077165A (en) Data processing method/apparatus, and data reproducing method/apparatus, capable of random-accessing multiplexed program data, and recording medium
JP5178375B2 (en) Digital broadcast reproduction apparatus and digital broadcast reproduction method
CN106792152B (en) Video synthesis method and terminal
CN100530356C (en) Digital information reproducing apparatus and method
CN105898500A (en) Network video play method and device
CN100520938C (en) Information storage medium storing still picture, reproducing apparatus and method therefor
CN103458271A (en) Audio-video file splicing method and audio-video file splicing device
US20130232233A1 (en) Systems and methods for client-side media chunking
CN104918120A (en) Playing progress adjustment method and electronic apparatus
CN101656860B (en) Recording apparatus and recording method
US9008494B2 (en) Reproduction unit, reproduction method, and program
CN103491430A (en) Streaming media data processing method and electronic device
CN103391467A (en) Method for achieving synchronization of decoding and displaying of audio and video of network set-top box
CN103581730A (en) Method for achieving synchronization of audio and video on digital set top box
CN105578261B (en) A kind of method and apparatus of video clipping
CN103404162A (en) Broadcast receiving device and method
JP2012023648A (en) Reproduction device, reproduction method, and program
KR100902497B1 (en) Mobile contents playing device with play point selection function by selecting script and method for the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150311

RJ01 Rejection of invention patent application after publication