# US 2021/0176408 A1 · Method, apparatus, and system for implementing video stream switching

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

- Number: US 2021/0176408 A1
- Document ID: US20210176408A1
- Status: Published application
- Kind: A1
- Application number: 17/180,568
- Filed: 2021-02-19
- Published: 2021-06-10
- Earliest claimed: 2018-08-22
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co.,Ltd.
- Inventors: Jinhui Zhang; Jie Xiong; Ji Li; Wenbin Liu
- Web page: https://patentgrep.com/patent/US20210176408A1

## CPC

- H04N 5/268: Signal distribution or switching
- H04N 21/23424: {involving splicing one content stream with another content stream, e.g. for inserting or substituting an advertisement}
- H04N 5/38: Transmitter circuitry {for the transmission of television signals according to analogue transmission standards} (H04N5/14 takes precedence)
- H04N 21/21805: {enabling multiple viewpoints, e.g. using a plurality of cameras}
- H04N 21/2187: Live feed
- H04N 21/64322: {IP}
- H04N 21/8547: involving timestamps for synchronizing content
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Disclosed are a method, an apparatus, and a system for implementing video stream switching. The method can determine switching reference information of a first reference frame trailer packet of a first video stream and switching reference information of a second reference frame trailer packet of a second video stream, when receiving a switching instruction; and switch from the first video stream sent through the target egress port to the second video stream based on the switching reference information of the first switching packet and the switching reference information of the second switching packet. Because locations of data packets sent before and after switching are considered during video stream switching, damage caused by a switching operation to a transmitted video image can be effectively reduced.

## Claims

### Claim 1

A method for implementing video stream switching, comprising:
receiving, by a transmission device, a first video stream and a second video stream;
sending, by the transmission device, the first video stream through a target egress port;
receiving, by the transmission device, a switching instruction, wherein the switching instruction is used to instruct to switch from the first video stream sent through the target egress port to the second video stream;
obtaining, by the transmission device, the switching reference information of the first switching packet of the first video stream and the switching reference information of the second switching packet of the second video stream, according to the switching instruction;
switching, by the transmission device, from the first video stream sent through the target egress port to the second video stream based on the switching reference information of the first switching packet and the switching reference information of the second switching packet.

### Claim 2 (depends on 1)

The method according to claim 1, wherein obtaining, by the transmission device, the switching reference information of the first switching packet of the first video stream and the switching reference information of the second switching packet of the second video stream, according to the switching instruction, comprising:
obtaining, by the transmission device, switching reference information of a first reference frame trailer packet of the first video stream and switching reference information of a second reference frame trailer packet of the second video stream; and
obtaining, by the transmission device, switching reference information of a first switching packet of the first video stream based on the switching reference information of the first reference frame trailer packet, and determining switching reference information of a second switching packet of the second video stream based on the switching reference information of the second reference frame trailer packet.

### Claim 3 (depends on 1)

The method according to claim 1, wherein:
the first reference frame trailer packet and the second reference frame trailer packet are respectively the last but (x−1) frame trailer packet of the first video stream and the last but (x−1) frame trailer packet of the second video stream that are received before the switching reference information of the first reference frame trailer packet and the switching reference information of the second reference frame trailer packet are determined, wherein x is a natural number.

### Claim 4 (depends on 3)

The method according to claim 3, wherein a value of x is 1; and
a video frame to which video data in the first switching packet belongs is a next video frame of a video frame to which video data in the first reference frame trailer packet belongs or a subsequent video frame of the next video frame, and a video frame to which video data in the second switching packet belongs is a next video frame of a video frame to which video data in the second reference frame trailer packet belongs or a subsequent video frame of the next video frame.

### Claim 5 (depends on 1)

The method according to claim 1, wherein:
the switching reference information of the first reference frame trailer packet, the switching reference information of the second reference frame trailer packet, the switching reference information of the first switching packet, and the switching reference information of the second switching packet each comprise a sequence number.

### Claim 6 (depends on 1)

The method according to claim 1, wherein:
the switching reference information of the first reference frame trailer packet, the switching reference information of the second reference frame trailer packet, the switching reference information of the first switching packet, and the switching reference information of the second switching packet each comprise a timestamp.

### Claim 7 (depends on 1)

The method according to claim 1, wherein a value of a first field in a data packet of the second video stream sent by the transmission device through the target egress port is the same as a value of a first field in a data packet of the first video stream sent by the transmission device through the target egress port, and the first field is a multicast address field or a payload type field.

### Claim 8 (depends on 1)

The method according to claim 1, wherein a value of a second field in the data packet of the second video stream sent by the transmission device through the target egress port is consecutive with a value of a second field in the data packet of the first video stream sent by the transmission device through the target egress port, and the second field is a sequence number field, a frame number field, or a timestamp field.

### Claim 9

A transmission device, comprising:
a memory, configured to store computer program instructions; and
a processor, configured to read and execute the computer program instructions, to cause the transmission device to perform the steps of:
receiving a first video stream and a second video stream; sending the first video stream through a target egress port of the transmission device; and receiving a switching instruction, wherein the switching instruction is used to instruct to switch from the first video stream sent through the target egress port to the second video stream;
obtaining the switching reference information of a first switching packet of the first video stream and the switching reference information of a second switching packet of the second video stream; and
switching from the first video stream sent through the target egress port to the second video stream based on the switching reference information of the first switching packet and the switching reference information of the second switching packet.

### Claim 10 (depends on 9)

The transmission device according to claim 9, wherein obtaining the switching reference information of a first switching packet of the first video stream and the switching reference information of a second switching packet of the second video stream, comprises:
obtaining switching reference information of a first reference frame trailer packet of the first video stream and switching reference information of a second reference frame trailer packet of the second video stream according to the switching instruction; and
obtaining switching reference information of a first switching packet of the first video stream based on the switching reference information of the first reference frame trailer packet, and determining switching reference information of a second switching packet of the second video stream based on the switching reference information of the second reference frame trailer packet.

### Claim 11 (depends on 10)

The transmission device according to claim 10, wherein:
the first reference frame trailer packet and the second reference frame trailer packet are respectively the last but (x−1) frame trailer packet of the first video stream and the last but (x−1) frame trailer packet of the second video stream that are received before the switching reference information of the first reference frame trailer packet and the switching reference information of the second reference frame trailer packet are determined, wherein x is a natural number.

### Claim 12 (depends on 11)

The transmission device according to claim 11, wherein:
a value of x is 1; and
a video frame to which video data in the first switching packet belongs is a next video frame of a video frame to which video data in the first reference frame trailer packet belongs or a subsequent video frame of the next video frame, and a video frame to which video data in the second switching packet belongs is a next video frame of a video frame to which video data in the second reference frame trailer packet belongs or a subsequent video frame of the next video frame.

### Claim 13 (depends on 10)

The method according to claim 10, wherein:
the switching reference information of the first reference frame trailer packet, the switching reference information of the second reference frame trailer packet, the switching reference information of the first switching packet, and the switching reference information of the second switching packet each comprise a sequence number.

### Claim 14 (depends on 10)

The method according to claim 10, wherein:
the switching reference information of the first reference frame trailer packet, the switching reference information of the second reference frame trailer packet, the switching reference information of the first switching packet, and the switching reference information of the second switching packet each comprise a timestamp.

### Claim 15 (depends on 13)

The transmission device according to claim 13, wherein:
determining a sequence number of a first switching packet of the first video stream based on the sequence number of the first reference frame trailer packet comprises: determining a sequence number of a first alignment frame trailer packet of the first video stream based on the sequence number of the first reference frame trailer packet and a synchronization relationship between the first video stream and the second video stream, and using the sequence number of the first alignment frame trailer packet as the sequence number of the first switching packet; or determining, as the sequence number of the first switching packet, a sequence number of a data packet used to encapsulate blanking area data of a next video frame of a video frame to which video data in the first alignment frame trailer packet belongs; and
the processor is also configured to determine a sequence number of a second switching packet of the second video stream based on the sequence number of the second reference frame trailer packet comprises: determining a sequence number of a second alignment frame trailer packet of the second video stream based on the sequence number of the second reference frame trailer packet and the synchronization relationship, and using the sequence number of the second alignment frame trailer packet as the sequence number of the second switching packet; or determining, as the sequence number of the second switching packet, a sequence number of a data packet used to encapsulate blanking area data of a next video frame of a video frame to which video data in the second alignment frame trailer packet belongs, wherein the first alignment frame trailer packet and the second alignment frame trailer packet are temporally corresponding frame trailer packets.

### Claim 16 (depends on 15)

The transmission device according to claim 15, wherein the processor is configured to determine the synchronization relationship between the first video stream and the second video stream based on a timestamp of the first reference frame trailer packet and a timestamp of the second reference frame trailer packet.

### Claim 17 (depends on 10)

The transmission device according to claim 10, wherein a value of a first field in a data packet of the second video stream sent by the communications unit through the target egress port is the same as a value of a first field in a data packet of the first video stream sent by the communications unit through the target egress port, and the first field is a multicast address field or a payload type field.

### Claim 18 (depends on 10)

The transmission device according to claim 10, wherein a value of a second field in the data packet of the second video stream sent by the communications unit through the target egress port is consecutive with a value of a second field in the data packet of the first video stream sent by the communications unit through the target egress port, and the second field is a sequence number field, a frame number field, or a timestamp field.

### Claim 19

A system for implementing video stream switching, wherein the system comprises at least one processor and memory storing instructions that when executed by the at least one processor cause the system to:
receive a first video stream and a second video stream; send the first video stream through a target egress port of the transmission device; and receive a switching instruction, wherein the switching instruction is used to instruct to switch from the first video stream sent through the target egress port to the second video stream;
obtain the switching reference information of a first switching packet of the first video stream and the switching reference information of a second switching packet of the second video stream; and
switch from the first video stream sent through the target egress port to the second video stream based on the switching reference information of the first switching packet and the switching reference information of the second switching packet.

### Claim 20 (depends on 19)

The system according to claim 19, wherein the system comprises a controller, and wherein the controller comprises a processor and a memory storing instructions that when executed by the processor cause the controller to: send the switching instruction.
