# US 8,279,945 B2 · Method for compensating timing mismatch in A/V data stream

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,279,945 B2
- Document ID: US8279945B2
- Status: Granted
- Kind: B2
- Application number: 12/020,593
- Filed: 2008-01-28
- Published: 2009-07-30
- Granted: 2012-10-02
- Earliest claimed: 2008-01-28
- Assignees: Mediatek Inc.
- Inventors: Chi-Chun Lin; Shih-Rong Kao
- Web page: https://patentgrep.com/patent/US8279945B2

## CPC

- H04N 21/2368: Multiplexing of audio and video streams
- H04N 21/4305: {Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets (arrangements for synchronising receiver with transmitter by comparing receiver clock with transmitter clock H04L7/0012; arrangements for synchronising receiver with transmitter wherein the receiver takes measures against momentary loss of synchronisation H04L7/0083)}
- H04N 21/434: Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream {(demultiplexing of data packets for data networks, e.g. RTP/UDP H04L65/00)}
- H04N 21/4341: {Demultiplexing of audio and video streams}
- H04N 21/4344: {Remultiplexing of multiplex streams, e.g. by modifying time stamps or remapping the packet identifiers}
- H04N 21/4425: Monitoring of client processing errors or hardware failure
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Methods for compensating timing errors in an A/V stream are provided. An embodiment of the methods includes: receiving a plurality of encoded video frames of a current Group of pictures (GOP) from the video encoder and a plurality of encoded audio frames; when an error occurs in the video encoder, utilizing a most recent encoded video frame of a previous GOP received from the video encoder as a reference to generate a plurality of dummy video frames; and utilizing the dummy video frames to pad the current GOP.

## Claims

### Claim 1

A method for compensating for a timing mismatch in an A/V stream, the method comprising:
receiving a plurality of encoded video frames of a current Group of Pictures (GOP) from a video encoder and a plurality of encoded audio frames;
multiplexing the encoded video frames with the encoded audio frames;
when an error occurs in the video encoder, generating a plurality of dummy video frames; and
utilizing the plurality of dummy video frames to replace the multiplexed video frames of the current GOP.

### Claim 2 (depends on 1)

The method of claim 1, wherein the dummy video frames are generated utilizing a most recent encoded video frame of a previous GOP as a reference.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
restarting the video encoder when the error occurs;
multiplexing the encoded audio frames and the dummy video frames; and
when a next encoded video frame is received from the restarted video encoder, continuing multiplexing the encoded audio frames with the dummy video frames to complete the current GOP.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
adding a time duration of the padded dummy video frames to a recording time of the A/V stream.

### Claim 5 (depends on 1)

The method of claim 1, wherein the dummy video frame is generated by altering bits of a frame header.

### Claim 6

A method for compensating for a timing mismatch in an A/V stream, the method comprising:
receiving a plurality of encoded video frames of a Group of Pictures (GOP) and a plurality of encoded audio frames;
determining an error value of each video frame of the GOP, wherein the error value is time difference between an actual time of arrival of a video frame and an expected time of arrival;
when a difference between an error value of a current frame and an error value of a previous frame is greater than a first threshold, determining an error value of a last video frame in the GOP to generate a GOP error value;
when the GOP error value is greater than or equal to a second threshold, generating a dummy video frame; and
utilizing the dummy video frame to pad the GOP.

### Claim 7 (depends on 6)

The method of claim 6, wherein the dummy video frame is generated utilizing the last video frame as a reference frame.

### Claim 8 (depends on 6)

The method of claim 6, wherein the GOP error value is determined by comparing an actual time of the last video frame with an expected time, the expected time determined according to an expected frame rate.

### Claim 9 (depends on 6)

The method of claim 6, wherein the step of utilizing the dummy video frame to pad the GOP comprises:
inserting a dummy video frame in the tail of the GOP;
adjusting the GOP error value according to the inserted dummy video frame;
comparing the adjusted GOP error value with the second threshold; and
when the adjusted GOP error value is greater than the second threshold, repeating the above steps until the adjusted GOP error value is less than the second threshold.

### Claim 10 (depends on 9)

The method of claim 9 wherein the encoded video frames and encoded audio frames are received in a television (TV) system and the step of adjusting the GOP error value according to the inserted dummy video frame comprises:
subtracting a PTS_Period of the TV system from the GOP error value.

### Claim 11 (depends on 6)

The method of claim 6, wherein the encoded video frames and encoded audio frames are received in a television (TV) system and the step of determining an error value of each video frame of the GOP is determined by:
PTSn+Acc_Video_Adjust−PTS_Period*n;
wherein PTSn is the real time of encoding of the video frame, Acc_Video_Adjust is an accumulated adjustment value, and PTS_Period is the PTS period of the TV system.
