Encoding device, control method, and control program

The encoding device addresses image quality degradation by using a B39 switching signal to generate an SCTE-35 signal for seamless video transitions, ensuring compatibility between ARIB and SCTE formats and supporting various local stations.

JP7743298B2Active Publication Date: 2025-09-24NTT INNOVATIVE DEVICES CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021206289
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2025-09-24
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

Existing video encoding methods, such as MPEG, require decoding and re-encoding of frames to replace commercials, leading to image quality degradation, and the SCTE format is incompatible with the ARIB standard for frame-by-frame commercial switching, complicating the integration of different video signal formats.

Method used

An encoding device that detects frame-based switching positions using a B39 switching signal, calculates a timestamp for the next frame, and generates an SCTE-35 signal to close the GOP before the switching position, allowing seamless video signal transitions without decoding.

Benefits of technology

Prevents image quality degradation by enabling seamless video signal transitions between encoded frames, making the SCTE format compatible with ARIB-standard compliant signals, and supports both SCTE-capable and non-SCTE-capable local stations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007743298000001
    Figure 0007743298000001
  • Figure 0007743298000002
    Figure 0007743298000002
  • Figure 0007743298000003
    Figure 0007743298000003
Patent Text Reader

Abstract

To avoid degradation of image quality by switching a part of encoded video signals to another video signals without decoding.SOLUTION: An encoder 100 includes: a detection unit 140 which detects first control signals which designate, by frame, switching positions to switch a part of video signals to another video signals; a video encoding unit 120 which encodes a video of the video signals in units of frame group to generate encoded frames; and a control unit 160 which calculates, using the first control signals, a time-stamp of an encoded frame immediately after the switching position, and generates a second control signal including the time-stamp. The control unit 160 outputs a close instruction to close a frame group in an encoded frame immediately before the switching position to the video encoding unit, to cause the video encoding unit to complete the frame group in the encoded frame immediately before.SELECTED DRAWING: Figure 10
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a technique for encoding a video signal. [Background technology]

[0002] In live television programs, local broadcasting stations sometimes replace commercials created by key stations with local commercials. In Japan, such commercial replacement is performed using an inter-station control signal specified in the Japanese broadcasting standard ARIB STD-B39 (Non-Patent Document 1).

[0003] In North America, commercials are replaced using SCTE-35 signals defined by the Society of Cable Telecommunications Engineers (SCTE) (Non-Patent Document 2). [Prior art documents] [Non-patent literature]

[0004] [Non-Patent Document 1] ARIB STD-B39, General Incorporated Association, Association of Radio Industries and Businesses [Non-patent document 2] ANSI / SCTE 35 2019r1, Digital Program Insertion Cueing Message for Cable Summary of the Invention [Problem to be solved by the invention]

[0005] Television programs distributed from key broadcasting stations to local broadcasting stations are encoded and compressed using encoding methods such as MPEG, which encodes programs in groups of 15 or 30 frames.

[0006] Commercials must be replaced at specific positions in a television program. In the ARIB system, commercial replacement positions are specified frame by frame. Therefore, to replace a key station commercial with a local station commercial, a group of coded frames must first be decoded frame by frame, and then coded again group by group after the commercial has been replaced. However, each decoding and coding process results in a degradation of picture quality and an increase in the amount of decoding and coding processing.

[0007] In the North American SCTE format, commercials are replaced by groups of coded frames, so there is no need to decode or code them to replace them. However, in Japan, existing video signals (content) such as television programs comply with the ARIB standard, and switching to other video signals such as advertisements is specified on a frame-by-frame basis. This makes it difficult to apply the SCTE format, which replaces commercials by groups of coded frames, to video signals that comply with the ARIB standard.

[0008] The present invention has been made in consideration of the above-mentioned problems, and aims to avoid degradation of image quality by switching part of an encoded video signal to another video signal without decoding it. [Means for solving the problem]

[0009] In order to achieve the above-mentioned object, one embodiment of the encoding device of the present invention comprises: a detection unit that detects a first control signal that specifies, on a frame-by-frame basis, a switching position at which part of a video signal is switched to another video signal; a video encoding unit that encodes the video of the video signal on a frame group basis to generate encoded frames; and a control unit that uses the first control signal to calculate a timestamp of the encoded frame immediately after the switching position and generates a second control signal including the timestamp, wherein the control unit outputs a close instruction to the video encoding unit to close the frame group with the encoded frame immediately before the switching position, and causes the video encoding unit to complete the frame group with the immediately previous encoded frame.

[0010] One aspect of the present invention is a control method performed by an encoding device, which includes the steps of detecting a first control signal that specifies a switching position, on a frame-by-frame basis, at which a portion of a video signal is switched to another video signal; encoding the video of the video signal on a frame-group basis to generate encoded frames; using the first control signal to calculate a timestamp of the encoded frame immediately after the switching position and generating a second control signal including the timestamp; and closing the frame group with the encoded frame immediately before the switching position.

[0011] One aspect of the present invention is a control program that causes a computer to function as the encoding device. [Effects of the Invention]

[0012] According to the present invention, a part of an encoded video signal can be switched to another video signal without being decoded, thereby avoiding deterioration of image quality. [Brief explanation of the drawings]

[0013] [Figure 1] FIG. 1 is a diagram showing the flow of replacing commercials in the ARIB system. [Figure 2] FIG. 2 is a schematic diagram for explaining the B39 switching signal. [Figure 3] FIG. 3 shows how a part of the main program is replaced with a commercial. [Figure 4] FIG. 4 is a schematic diagram for explaining the TS. [Figure 5] FIG. 5 is a diagram showing the flow of replacing commercials in the SCTE format. [Figure 6] FIG. 6 is a schematic diagram for explaining an SCTE-35 signal. [Figure 7] FIG. 7 is a schematic diagram for explaining an MPEG-2 coded frame. [Figure 8] FIG. 8 shows how a part of the main program is replaced with a commercial. [Figure 9]FIG. 9 shows an example of the overall configuration of a broadcasting system according to an embodiment. [Figure 10] FIG. 10 is a block diagram illustrating an example of a functional configuration of an encoding device according to an embodiment. [Figure 11] FIG. 11 is a schematic diagram for explaining the calculation process of PTS2. [Figure 12] FIG. 12 is a schematic diagram for explaining an open GOP and a closed GOP. [Figure 13] FIG. 13 is a flowchart showing a method for controlling the encoding device. [Figure 14] FIG. 14 is a diagram showing the relationship between the processing of FIG. 13 and the positions of frames. [Figure 15] FIG. 15 is a block diagram showing an example of the functional configuration of an encoding device according to a modified example. [Figure 16] FIG. 16 shows video and audio before and after encoding. [Figure 17] FIG. 17 is a diagram showing an example in which the audio immediately before the switching position is muted. DETAILED DESCRIPTION OF THE INVENTION

[0014] Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the drawings, the same reference numerals are used to denote the same parts, and the description thereof will not be repeated.

[0015] First, the advertisement replacement in the ARIB format and the advertisement replacement in the SCTE format will be explained, and then the broadcasting system of this embodiment will be explained.

[0016] 1. ARIB-style advertising replacement In live television broadcasts, local broadcasting stations may replace advertisements (such as commercials: commercial messages) created by key stations with local advertisements. Hereinafter, advertisements will be referred to as "CMs."

[0017] Figure 1 shows the flow of commercial replacement in the ARIB system. At a key station, for example, video captured by camera 11 is output as an SDI signal to B39 setting device 12. B39 setting device 12 sets the ARIB B39 switching signal in the SDI signal and outputs it to switch 13. The B39 switching signal is an inter-broadcasting station control signal specified in ARIB STD-B39.

[0018] The B39 switching signal will be explained using Figure 2. The B39 switching signal is a signal that specifies, by countdown, how many frames after which a commercial should start or how many frames after which the main program should resume. The B39 switching signal is set in each frame in a frame sequence 200 of an SDI signal, from frame 201, where the countdown starts, to frame 202, immediately before frame 202, where switching occurs to an advertisement or the main program. The B39 switching signal is stored in the ancillary data packet area 203 of a frame of the SDI signal.

[0019] 2 shows a schematic diagram of the data arrangement in countdown start frame 201. In this example, the ancillary data packet area 203 of frame 201 stores a B39 switching signal that instructs the start of a commercial after five countdown frames.

[0020] Returning to Fig. 1, the switch 13 receives the SDI signal to which the B39 switching signal has been added, and in accordance with the B39 switching signal, replaces the main program with commercials from a specified frame and outputs the replaced program to the encoder 14. The switch 13 reads commercials from the key station from the commercial server 15 and replaces the main program with commercials. Thereafter, in accordance with the B39 switching signal, the switch 13 resumes the main program from a specified frame and outputs the replaced program to the encoder 14.

[0021] Figure 3 shows how part of the main program is replaced with a commercial. Figure 3(a) shows a frame of the SDI signal of the main program (hereinafter referred to as "SDI frame") output by the B39 setting device 12 of the key station. In part of the SDI frame, a B39 switching signal for starting a commercial or a B39 switching signal for starting the main program is set.

[0022] Figure 3(b) shows an SDI frame output by the switch 13 of the key station. In the SDI frame of Figure 3(b), m SDI frames of the main program are replaced with SDI frames of CM1 of the key station in accordance with the B39 switching signal. When replacing with SDI frames of CM1, the switch 13 sets the B39 switching signal set in the SDI frames of the main program directly to the corresponding SDI frames of CM1.

[0023] Figure 3(c) shows an SDI frame output by the switch 22 of the local station. In the SDI frame of Figure 3(c), m SDI frames of CM1 of the key station are replaced with SDI frames of CM2 of the local station in accordance with the B39 switching signal. Like the switch 13 of the key station, the switch 22 replaces CM1 of the key station with CM2 of the local station from the specified SDI frame in accordance with the B39 switching signal, and outputs the result to the encoder 23. Thereafter, the switch 22 resumes the main program from the specified SDI frame in accordance with the B39 switching signal, and outputs the result to the encoder 23.

[0024] Returning to Figure 1, the encoder 14 of the key station encodes the video of the SDI signal (SDI frame) output by the switch 13 in accordance with the MPEG-2 standard and stores the encoded video in video TS packets. The encoder 14 encodes the audio of the SDI signal in accordance with the AAC standard and stores the encoded audio in audio TS packets. The encoder 14 then multiplexes and outputs the video TS packets and audio TS packets. This allows the program with the key station's commercials inserted to be broadcast.

[0025] Furthermore, when distributing an SDI signal to a local station, the encoder 14 stores auxiliary data including a B39 switching signal in an auxiliary data TS packet, multiplexes the auxiliary data TS packet, video TS packet, and audio TS packet, and distributes the multiplexed data to the local station.

[0026] FIG. 4 is a schematic diagram for explaining TS. TS stands for MPEG-2 Transport Stream. The encoder 14 divides each of the coded video (coded video data), coded audio (coded audio data), and auxiliary data into units of up to 184 bytes, adds a 4-byte header to generate TS packets, and then multiplexes these TS packets to generate a TS packet. The encoder 14 synchronizes and mixes the video, audio, and auxiliary data, and combines them into a single TS (transmission stream). TS is used to distribute or broadcast SDI signals.

[0027] At the local station, the decoder 21 decodes the multiplexed TS packets delivered from the key station to reconstruct an SDI signal, and outputs the SDI signal to the switch 22. At this time, the decoder 21 stores the B39 switching signal contained in the auxiliary data TS packet back into the SDI signal.

[0028] As shown in Figure 3(c), the local station switch 22 replaces the key station's CM1 with the local station's CM2 from the specified frame in accordance with the B39 switching signal, resumes the main program from the specified frame, and outputs it to the encoder 23.

[0029] The local station's encoder 23 encodes the video of the SDI signal output by the local station's switch 22 in accordance with the MPEG-2 standard and stores the encoded video in a video TS packet. The encoder 23 also encodes the audio of the SDI signal in accordance with the AAC standard and stores the encoded audio in an audio TS packet. The encoder 23 then multiplexes the video TS packet and the audio TS packet and outputs them. This allows a program to be broadcast in which the key station's commercial 1 is replaced with the local station's commercial 2.

[0030] 2.SCTE Ad Replacement North American digital cable TV uses the SCTE standard to replace commercials (advertisements) using a method different from the ARIB method mentioned above.

[0031] The flow of commercial replacement using the SCTE format is shown in Figure 5. At a key station, for example, video captured by a camera 11 is output to an encoder 16 as an SDI signal.

[0032] The encoder 16 encodes the video of the SDI signal output by the camera 11 in accordance with the MPEG-2 standard and stores the encoded video in video TS packets. The encoder 16 encodes the audio of the SDI signal in accordance with a predetermined audio encoding standard and stores the encoded audio in audio TS packets. During encoding, the encoder 16 generates an SCTE-35 signal as ancillary data and stores it in ancillary data TS packets. The encoder 16 then multiplexes the video TS packets, audio TS packets, and ancillary data TS packets and outputs the multiplexed signal to the editing device 17.

[0033] The SCTE-35 signal will be described with reference to Figure 6. The SCTE-35 signal uses the PTS (Presentation Time Stamp) of the coded frame to indicate from which coded frame a commercial should start and from which coded frame the main program should resume. The PTS indicates the timing (count value of a 90 kHz clock) at which a decoded frame should be output by a decoder (not shown). The encoder 16 assigns the PTS to the coded frame.

[0034] An SCTE-35 signal 601 shown in FIG. 6 indicates that a commercial starts at an encoded frame 602 of PTS1 and that the main program resumes at an encoded frame 603 of PTS4.

[0035] FIG. 7 is a diagram explaining coded frames (MPEG frames) coded in MPEG-2. In the MPEG-2 standard, SDI video frames are coded into one of three MPEG frames: I-frames, P-frames, and B-frames. A frame group containing one I-frame is called a GOP (Group of Pictures). An I-frame is required to decode a P-frame, and an I-frame and / or P-frame are required to decode a B-frame. For this reason, if the main program ends or a commercial starts at a point that divides a GOP, the video will not play correctly.

[0036] Therefore, the encoder 16 needs to generate an SCTE-35 signal so that the switching position from the main program to a commercial (or vice versa) always coincides with the boundary of a GOP.

[0037] With the B39 switching signal of the ARIB standard mentioned above, any SDI frame of the SDI signal can be specified as the commercial start position, but with the SCTE-35 signal, as mentioned above, any coded frame cannot be specified as the commercial start position.

[0038] Returning to Fig. 5, when the editing device 17 receives ancillary data TS packets including an SCTE-35 signal, it replaces the GOP from the frame where the commercial starts to the frame immediately before the frame where the main program resumes, with the GOP of the commercial stored in the commercial server 15, in accordance with the SCTE-35 signal. Similarly, for the audio, the editing device 17 replaces the encoded audio of the main program with the encoded audio of the key station's commercial, in accordance with the SCTE-35 signal. The commercial server 15 stores encoded video and audio of the key station's commercial.

[0039] The editing device 17 then multiplexes the video TS packets, audio TS packets, and auxiliary data TS packets to generate TS packets, and outputs the TS packets to a key station's transmitter (not shown). This allows the program with the key station's commercials inserted to be broadcast. The editing device 17 also distributes the multiplexed TS packets directly to the editing device 31 of the local station.

[0040] The local station's editing device 31 receives the multiplexed TS packets and, like the key station's editing device 17, replaces the GOP from the frame where the commercial starts to the frame immediately before the frame where the main program resumes, with the GOP of the local station's commercial stored in the commercial server 32, in accordance with the SCTE-35 signal included in the ancillary data TS packet. Similarly, for the audio, the editing device 31 replaces the encoded audio of the key station's commercial with the encoded audio of the local station's commercial, in accordance with the SCTE-35 signal. The commercial server 32 stores encoded video and audio of the local station's commercial.

[0041] The editing device 31 then outputs the TS packets in which the replaced video TS packets and audio TS packets are multiplexed to a transmitting device of the local station (not shown), thereby broadcasting the program with the local station commercials inserted.

[0042] Fig. 8 shows how a part of a main program is replaced with a commercial. Fig. 8(a) shows the GOPs of the main program output by the key station's encoder 16. In the example shown, the SCTE-35 signal generated by the encoder 16 shows that the commercial starts in GOP 801 immediately after the switching position (where the commercial begins), and the main program starts in GOP 802 immediately after the switching position (where the main program resumes).

[0043] 8(b) shows GOPs output by the editing device 17 of the key station. In the example shown, the editing device 17 replaces GOP 801 to GOP 803 immediately before the switching position in FIG. 8(a) with the GOP of CM1 of the key station in accordance with the SCTE-35 signal.

[0044] 8(c) shows GOPs output by the editing device 31 of the local station. In the example shown, the editing device 31 replaces GOP 801 to GOP 803 immediately before the switching position in FIG. 8(a) with the GOP of CM2 of the local station in accordance with the SCTE-35 signal.

[0045] 3. Implementation form <Overall configuration of the broadcasting system> 9 shows an example of the overall configuration of a broadcasting system according to this embodiment. The broadcasting system shown in the figure includes a key station 1, a local station 2 that cannot process SCTE-35 signals, and a local station 3 that can process SCTE-35 signals.

[0046] In this embodiment, the following description will be given taking as an example a case where a part of a television program is switched to an advertisement, but the present invention is not limited to this. The present invention can also be used in a case where a video signal (content) other than a television program is switched to a video signal (content) other than an advertisement.

[0047] Key station 1 switches part of its television program to key station CM1. Key station 1 includes camera 11, B39 setting device 12, switch 13, CM server 15, and encoding device 100. Camera 11, B39 setting device 12, switch 13, and CM server 15 of this embodiment are similar to devices 11, 12, 13, and 15 described in FIG.

[0048] The camera 11 captures video and outputs it as an SDI signal (video signal) to the B39 setting device 12. The B39 setting device 12 sets the B39 switching signal of the ARIB standard in the SDI signal. The SDI frame output from the B39 setting device 12 is the same as that shown in FIG. 3(a).

[0049] When the switch 13 receives the SDI signal with the B39 switching signal added, it replaces the SDI frames from the commercial start position to the program main content restart position with the SDI frames of commercial 1 stored in the commercial server 15 in accordance with the B39 switching signal, and outputs them to the encoding device 100. The SDI frames output from the switch 13 are the same as those in Fig. 3(b).

[0050] The encoding device 100 separates the SDI signal output by the switch 13 into video, audio, and auxiliary data including a B39 switching signal. The encoding device 100 encodes the video in accordance with the MPEG-2 standard and stores the encoded video in video TS packets. The encoding device 100 encodes the audio in accordance with the AAC standard and stores the encoded audio in audio TS packets. The encoding device 100 also stores the auxiliary data in auxiliary data TS packets.

[0051] Furthermore, the encoding device 100 of this embodiment generates an SCTE-35 signal based on the B39 switching signal and stores it in an SCTE-35TS packet. The encoding device 100 also encodes the video so that the replacement CM1 is made up of multiple GOPs, as will be described later.

[0052] The encoding device 100 then multiplexes the video TS packets, audio TS packets, auxiliary data TS packets, and SCTE-35 TS packets and outputs the multiplexed TS packets to a transmitting device (not shown). This allows the program with the key station's commercial 1 inserted to be broadcast. The encoding device 100 also distributes the multiplexed TS packets to local stations 2 and 3, respectively.

[0053] Local station 2 is a local station that cannot process SCTE-35 signals and uses a B39 switching signal to replace CM1 of the key station with CM2 of local station 2. The decoder 21, switch 22, encoder 23 and CM server 24 provided in local station 2 are similar to the devices 21, 22, 23 and 24 of the local station shown in FIG.

[0054] The decoder 21 decodes the multiplexed TS packets distributed from the encoding device 100 of the key station 1, restores them to an SDI signal, and outputs the signal to the switch 22. At this time, the decoder 21 stores the B39 switching signal contained in the ancillary data TS packet back into the SDI signal.

[0055] In response to the B39 switching signal, the switch 22 of the local station 2 replaces the SDI frames from the commercial start position to the program main content resumption position with the local station's CM2 stored in the CM server 24, and outputs the replaced SDI frames to the encoder 23. That is, the switch 22 replaces the CM1 portion of the SDI signal from the key station with the local station's CM2 stored in the CM server 24, and outputs the replaced SDI frame (see FIG. 3(c)).

[0056] The encoder 23 of local station 2 encodes the video of the SDI signal output by the switch 22 in accordance with the MPEG-2 standard and stores the encoded video in video TS packets. The encoder 23 encodes the audio of the SDI signal in accordance with the AAC standard and stores the encoded audio in audio TS packets. The encoder 23 then multiplexes the video TS packets and audio TS packets and outputs them. This allows a program to be broadcast in which commercial 1 from the key station is replaced with commercial 2 from local station 2.

[0057] Local station 3 is a local station capable of processing SCTE-35 signals, and uses the SCTE-35 signal to replace CM1 from the key station with CM3 from local station 3. The editing device 31 and CM server 32 provided in local station 3 are similar to the devices 31 and 32 of the local station in Fig. 5. The CM server 32 stores encoded video and audio of CM3 from local station 3.

[0058] The editing device 31 receives the multiplexed TS packets and, in accordance with the SCTE-35 signal contained in the SCTE-35 TS packets, replaces the GOP from the commercial start position to the main program resume position with the GOP of CM3 stored in the CM server 32 and outputs the replaced GOP. This will be described later.

[0059] <Encoder Configuration> 10 is a block diagram showing an example of the functional configuration of an encoding device 100 according to this embodiment. The illustrated encoding device 100 encodes an SDI signal (video signal) to generate TS packets, and also generates an SCTE-35 signal (second control signal) based on a B39 switching signal (first control signal).

[0060] The encoding device 100 includes a media demultiplexing unit 110, a video encoding unit 120, an audio encoding unit 130, a detection unit 140, a control unit 160, a packetization unit 170, and a multiplexing unit 180. The packetization unit 170 includes an auxiliary data packetization unit 174, an SCTE-35 packetization unit 171, a video packetization unit 172, and an audio packetization unit 173.

[0061] The media separator 110 separates the SDI signal into three parts: auxiliary data (ancillary data), video (video data), and audio (audio data). The auxiliary data includes a B39 switching signal. The media separator 110 then outputs the auxiliary data to the detector 140, the video to the video encoder 120, and the audio to the audio encoder 130.

[0062] The detector 140 outputs the input auxiliary data to the auxiliary data packetizer 174. The auxiliary data packetizer 174 packetizes the auxiliary data into TS packets. The media separator 110 may output the auxiliary data directly to the auxiliary data packetizer 174 without passing through the detector 140. In this case, the media separator 110 outputs the auxiliary data to both the detector 140 and the auxiliary data packetizer 174.

[0063] The detection unit 140 of this embodiment detects a B39 switching signal from the auxiliary data. The B39 switching signal specifies the switching position, in frame units, at which part of an SDI signal is switched to another SDI signal. For example, the B39 switching signal may indicate the switching position using the number of countdown frames until the switch. In this embodiment, the B39 switching signal is used to switch part of the main program to a commercial. The detection unit 140 outputs the detected B39 switching signal or the number of countdown frames included in the B39 switching signal to the control unit 160.

[0064] The video encoding unit 120 encodes the video of the SDI signal in units of GOPs to generate encoded frames. The video encoding unit 120 outputs the encoded frames to the video packetization unit 172. In this embodiment, the video encoding unit 120 encodes the video in accordance with MPEG-2 and assigns a PTS (Presentation Time Stamp) to each encoded MPEG frame (encoded frame). The PTS is a time stamp that indicates the timing (count value of a 90 kHz clock) at which the MPEG frame should be played back after decoding by a decoder (not shown). The video packetization unit 172 packetizes the encoded video frames into TS packets.

[0065] The audio encoding unit 30 encodes the audio of the SDI signal and outputs the encoded audio to the audio packetizing unit 173. The audio packetizing unit 173 packetizes the encoded audio into TS packets.

[0066] The control unit 160 uses the B39 switching signal to calculate the PTS of the coded frame immediately after the point where the program switches to a commercial, and generates an SCTE-35 signal including this PTS. This PTS will be referred to as "PTS2" hereinafter. The control unit 160 outputs the generated SCTE-35 signal to the SCTE-35 packetizer 171. The SCTE-35 packetizer 171 packetizes the SCTE-35 signal into TS packets.

[0067] Specifically, the control unit 160 acquires the number of countdown frames of the B39 switching signal detected by the detection unit 140. Then, the control unit 160 acquires the PTS of the most recently coded frame that has been coded at the time the B39 switching signal is detected from the video coding unit 120. This PTS is hereinafter referred to as "PTS1" (another timestamp). The control unit 160 calculates PTS2 of the coded frame immediately after the switching position using PTS1, the coding processing time by the video coding unit 120, and the number of countdown frames included in the B39 switching signal. Details will be described later. In addition, the control unit 160 outputs a GOP control instruction (close instruction) to close the GOP in the encoded frame immediately before the switching position to the video encoding unit 120, and causes the video encoding unit 120 to complete the GOP with the immediately previous encoded frame. The video encoding unit 120 performs encoding so that the GOP is completed in the encoded frame immediately before the start of CM (or the encoded frame immediately before the resumption of the main program) according to the GOP control instruction.

[0068] As described above, the packetization unit 170 packetizes the B39 switching signal into an auxiliary data TS packet, packetizes the SCTE-35 signal into an SCTE-35 TS packet, packetizes the encoded frame encoded by the video encoding unit 120 into a video TS packet, and packetizes the audio encoded frame encoded by the audio encoding unit 130 into an audio TS packet.

[0069] The multiplexing unit 180 multiplexes and outputs the auxiliary data TS packet, the SCTE-35 TS packet, the video TS packet, and the audio TS packet. That is, the multiplexing unit 180 outputs a TS packet obtained by multiplexing these TS packets output from the packetization unit 170 with a PID (Program Identifier) added thereto.

[0070] Specifically, the multiplexing unit 180 outputs a Transport Stream in which a B39 switching signal that specifies a switching position for switching a part of the video signal to another video signal in frame units, an encoded frame obtained by encoding the frame of the video signal, and an SCTE-35 signal that specifies the encoded frame corresponding to the frame specified by the B39 switching signal are stored in a TS packet as the switching position.

[0071] <Calculation of PTS2> The calculation process of PTS2 performed by the control unit 160 will be described using FIG. 11.

[0072] The MPEG-2 PTS is a count value of a 90 kHz clock, and one second corresponds to 90,000 counts. For example, the count value of the frame interval at 60 fps (frames per second) is as follows:

[0073] Frame interval count value = 90,000 / 60 = 1,500 The SDI frame video input to the video encoding unit 120 is output as an MPEG frame (encoded frame) after a predetermined encoding processing time. In Fig. 11, the video encoding processing time is shown as 2 / 60 of two frames, or approximately 0.03 seconds. Furthermore, the encoded "SDIn" (SDI frame) of the SDI frame sequence 61 shown in Fig. 11 corresponds to the "MPEGn" (MPEG frame) of the encoded frame sequence 62.

[0074] In Figure 11, a B39 switching signal is detected in "SDI3," and the number of countdown frames until the start of a commercial is 60. At the time the B39 switching signal is detected in "SDI3," the most recent MPEG frame is "MPEG1," and the PTS of this "MPEG1" is PTS1. In this case, the MPEG frame where the commercial should start (i.e., the frame with PTS2) is "MPEG63," which is the countdown frame number (60 frames) after "MPEG3," which is two frames' worth of encoding processing time after "MPEG1."

[0075] Therefore, the calculation formula for PTS2 shown in FIG. 11 is as follows:

[0076] PTS2 = PTS1 + (equivalent value of encoding processing time) + (equivalent value of countdown time) (equivalent value of encoding processing time) = Encoding processing time (seconds) x 90,000 = Number of frames equivalent to encoding processing time / Frame frequency x 90,000 (Countdown time conversion value) = Time equivalent to the number of countdown frames x 90,000 =Countdown frame number / frame frequency × 90,000 In the illustrated example, PTS2 is as follows.

[0077] PTS2 = PTS1 + (2 / 60 × 90,000) + (60 / 60 × 90,000) Here, the case of switching from the main program to the CM has been described. However, when the control unit 160 switches from the CM to the main program, it also calculates PTS2 in the same manner.

[0078] <GOP close processing> Referring to FIG. 12, open GOP and closed GOP will be described. GOPs include open GOPs that reference frames between GOPs and closed GOPs that do not reference frames between GOPs.

[0079] An open GOP is a GOP that starts from one or more B frames that reference the last P frame of the previous GOP. A closed GOP is a GOP that starts from an I frame that does not reference frames within the previous GOP. When the sizes are the same, encoding and compression with an open GOP is slightly more efficient, and usually, video is encoded with an open GOP.

[0080] However, when switching the video of the SDI frame with the SCTE-35 signal, for example, between the main program and the CM, inter-frame reference encoding is not performed. Therefore, the last GOP of the main program and the first GOP of the CM need to be closed GOPs. The control unit 160 outputs a GOP control instruction to the video encoding unit 120 to make a predetermined GOP a closed GOP.

[0081] <Control method of encoding device> FIG. 13 is a flowchart showing the control method of the encoding device 100. FIG. 14 shows the relationship between the processing of FIG. 13 and the positions of the frames. The control method of the encoding device 100 will be described in detail with reference to FIGS. 13 and 14.

[0082] The detector 140 detects the B39 switching signal from the auxiliary data separated by the media separator 110 (step S1), and obtains the number of countdown frames included in the B39 switching signal (step S2). The detector 140 outputs the obtained number of countdown frames to the controller 160.

[0083] The B39 switching signal detected by the detection unit 140 means the first B39 switching signal in which the countdown frame number is set to an initial value. In the example shown in Fig. 14, the detection unit 140 detects the B39 switching signal of "SDI16" (countdown frame number: 60). As mentioned above, the B39 switching signal is a control signal that indicates, by the countdown frame number, how many frames after the SDI frame to which the signal belongs that a commercial should start (or the main program should resume).

[0084] When the control unit 160 acquires the countdown frame number from the detection unit 140, it acquires the PTS1 of the latest encoded MPEG frame from the video encoding unit 120 (step S3). That is, the control unit 160 acquires the PTS1 of the latest MPEG frame at the current time. In Fig. 14, the control unit 160 acquires the PTS1 of "MPEG14".

[0085] The control unit 160 calculates PTS2 of the MPEG frame where the commercial starts using PTS1, the number of countdown frames, and the encoding processing time for encoding the SDI frame into an MPEG frame (step S4). The method for calculating PTS2 is as described above. Specifically, the control unit 160 calculates PTS2 by adding a converted value of the encoding processing time and a converted value of the countdown time to PTS1. In the example of Fig. 14, the control unit 160 calculates PTS2 for "MPEG76".

[0086] After calculating PTS2, and before starting the encoding process for the GOP immediately before the commercial switching position, control unit 160 outputs a GOP control instruction to video encoding unit 120 to make the immediately preceding GOP a closed GOP (step S5). The GOP control instruction is an instruction to close the GOP at the MPEG frame immediately before the switching position and make that GOP a closed GOP. In accordance with the GOP control instruction, video encoding unit 20 performs encoding so that the GOP is completed at the frame immediately before the switching position where the commercial starts (or the main program resumes). The GOP control instruction also includes an instruction to make the GOP including the frame immediately after the switching position a closed GOP.

[0087] 14, control unit 160 outputs a GOP control instruction to video encoding unit 120 to make GOP72, which is immediately before "MPEG76" where the commercial starts, a closed GOP. Furthermore, control unit 160 outputs the GOP control instruction to video encoding unit 120 before encoding of GOP72 starts. Here, control unit 160 outputs the GOP control instruction while video encoding unit 120 is encoding GOP71. Furthermore, the GOP control instruction includes an instruction to also make GOP73, the first GOP after the commercial starts, a closed GOP.

[0088] In FIG. 14, the number of frames in the closed GOP 72 is the usual 15 frames, but since GOPs are forcibly closed in "MPEG75", the number of frames in the closed GOP 72 may be less than 15 frames.

[0089] The control unit 160 generates an SCTE-35 signal including the calculated PTS2, and outputs the SCTE-35 signal to the SCTE-35 packetization unit 171 (step S6). Step S6 may be performed before step S5.

[0090] While the case where a program switches to a commercial has been described above using FIGS. 13 and 14, the same applies to the case where a commercial switches to the program.

[0091] <Modification> Fig. 15 is a block diagram showing an example of the functional configuration of an encoding device 100A according to a modification of the present embodiment. The encoding device 100A according to the modification has a control unit 160A and an audio encoding unit 130A that are different from the control unit 160 and the audio encoding unit 130 according to the embodiment shown in Fig. 10, but is otherwise similar to the encoding device 100 according to the embodiment.

[0092] The control unit 160A and audio encoding unit 130A of the modified example have the following functions in addition to the functions of the control unit 160 and audio encoding unit 130 of the embodiment: That is, the control unit 160A outputs a mute instruction to the audio encoding unit 130A to mute the audio for a predetermined period of time immediately before the switching position, and the audio encoding unit 130A encodes the muted audio in accordance with the mute instruction.

[0093] Video and audio before encoding and video and audio after encoding will be described with reference to Fig. 16. In an SDI signal before encoding, an SDI video signal and a corresponding SDI audio signal are stored in the same SDI frame.

[0094] On the other hand, MPEG frames encoded from SDI video signals (approximately 33 ms at 30 fps) and AAC frames encoded from SDI audio signals (approximately 21 ms at 1,024 samples per frame) are different in length. As a result, the boundaries between MPEG frames and AAC frames generally do not coincide. As a result, an AAC frame containing both the program audio and the commercial audio is generated at the boundary between the main program and commercials. Because the program audio and the commercial audio are generally different audio waves, if they are connected and encoded as a single continuous wave, noise may occur.

[0095] Therefore, the control unit 160A of the modified example outputs a mute instruction to the audio encoding unit 130 to mute the SDI audio signal for a predetermined time just before the switching position between the main program and the commercial. In accordance with the mute instruction, the audio encoding unit 130 silences the SDI audio signal for a predetermined time just before the switching position, and encodes the muted SDI audio signal using AAC. This makes it possible in the modified example to avoid generating AAC frames that include both the audio of the main program and the audio of the commercial, and to prevent noise from occurring when switching.

[0096] 17 shows an example in which 500 ms immediately before the switch point between the main program and the commercial is muted and encoded. The control unit 160A instructs the audio encoding unit 130 to start muting 500 ms before the calculated PTS2 (switch point) (45,000 ms before in PTS terms), and instructs the audio encoding unit 130 to stop muting at PTS2. Alternatively, the control unit 160A may output a mute instruction to the audio encoding unit 130 to mute the SDI signal for 500 ms from (PTS2-45,000).

[0097] The audio encoding unit 130 mutes the SDI audio signal input from the media separation unit 110 in accordance with the mute instruction, and encodes the muted SDI audio signal using AAC. This prevents the generation of an AAC frame that includes both the audio of the main program and the audio of the commercial, and suppresses noise that occurs when switching.

[0098] <Effects of this embodiment> As described above, the encoding device 100 of this embodiment includes a detection unit 140 that detects a B39 switching signal (first control signal) that specifies, on a frame-by-frame basis, a switching position at which part of a video signal is switched to another video signal; a video encoding unit 120 that encodes the video of the video signal on a GOP (group of frames) basis to generate encoded frames; and a control unit 160 that uses the B39 switching signal to calculate a PTS2 (timestamp) of the encoded frame immediately after the switching position and generates an SCTE-35 signal (second control signal) including the PTS2. The control unit 160 outputs a GOP control instruction (close instruction) to the video encoding unit 120 to close the GOP with the encoded frame immediately before the switching position, causing the video encoding unit 120 to complete the GOP with the immediately previous encoded frame.

[0099] In this way, in this embodiment, a part of an encoded video signal can be switched to another video signal without decoding, thereby preventing degradation of image quality. Specifically, by generating an SCTE-35 signal from a B39 switching signal that specifies the switching position of the video signal in units of frames, the SCTE system, which switches video signals in units of GOPs, can be easily applied to existing video signals that comply with the ARIB system. For example, a program encoded by a key station can be replaced with a commercial from a local station without decoding, preventing degradation of image quality due to repeated decoding and encoding.

[0100] In this embodiment, the GOP is closed with the encoded frame immediately before the video signal switching position. Specifically, SDI frames are encoded into MPEG frames so that the boundary between the program and the commercial break becomes the GOP boundary. This allows for proper video playback without any video distortion when switching.

[0101] Furthermore, in this embodiment, both TS packets containing SCTE-35 signals and TS packets containing B39 switching signals are output. This allows local stations that can process SCTE-35 signals to replace commercials without decoding the encoded video, thereby avoiding degradation of image quality. On the other hand, local stations that cannot process SCTE-35 signals can continue to replace commercials using B39 switching signals as before. In other words, the encoding device 100 of this embodiment can support both local stations that can process SCTE-35 signals and local stations that cannot process SCTE-35 signals.

[0102] Furthermore, the encoding device 100A of the modified example mutes the audio for a predetermined period of time immediately before the switching position of the video signal, and encodes the muted audio. This avoids generating an audio encoding frame (AAC frame) that includes both the audio of the video signal before switching (main program) and the audio of the video signal after switching (commercial), and can suppress noise that occurs during switching.

[0103] <Hardware configuration> A general-purpose computer system can be used for the encoding devices 100 and 100A described above. The computer system includes, for example, a CPU (Central Processing Unit, processor), memory, storage (HDD: Hard Disk Drive, SSD: Solid State Drive), a communication device, an input device, and an output device. The memory and storage are storage devices. In this computer system, the CPU executes a predetermined program loaded into the memory, thereby realizing each function of the encoding devices 100 and 100A.

[0104] The encoding devices 100 and 100A may be implemented in one computer or in multiple computers. The encoding devices 100 and 100A may be virtual machines implemented in a computer. Programs for the encoding devices 100 and 100A may be stored in computer-readable recording media such as HDDs, SSDs, USB (Universal Serial Bus) memories, CDs (Compact Discs), and DVDs (Digital Versatile Discs), or may be distributed via a network.

[0105] The present invention is not limited to the above-described embodiment and modifications, and various modifications are possible within the scope of the gist of the present invention.

[0106] For example, in the above embodiment, an example was described in which a part of the main program was replaced with a commercial from a key station, and then the commercial was replaced with another commercial from a local station, but the content to be replaced may be content other than a commercial.Furthermore, the content to be replaced may be content other than a television program.

[0107] Furthermore, in the above embodiment, the B39 switching signal includes a countdown frame number, but the present invention is not limited to this. If the B39 switching signal does not include a countdown frame number, a preset pre-roll value (a certain amount of time) may be used to indicate the content switching position (switching timing). That is, the control unit 160 may calculate PTS2 as the time a certain amount of time has elapsed since the detection unit 140 detected the B39 switching signal, and generate an SCTE-35 signal including this PTS2.

[0108] In the above embodiment, the video of the SDI signal is coded in MPEG-2 and the audio is coded in AAC, but the present invention is not limited to this. Any video coding method using PTS, such as AVC or HEVC, may be used. Any coding method may also be used for audio coding.

[0109] In the above embodiment, a TS containing an SCTE-35 signal is distributed to a local broadcasting station and the SCTE-35 signal is used to replace commercials at the local broadcasting station. However, the present invention is not limited to this. For example, a TS containing an SCTE-35 signal can also be used for online distribution. In this case, the SCTE-35 signal can be used to replace commercials for each content provider. The TS may be transcoded to an adaptive bitrate for online distribution.

[0110] Furthermore, in the above embodiment, the SCTE-35 signal generated based on the B39 switching signal is stored in TS packets of the SCTE-35 signal by the SCTE-35 packetizer 171. However, the SCTE-35 signal may also be stored in TS packets by the auxiliary data packetizer 174 as part of the auxiliary data. That is, the auxiliary data packetizer 174 may packetize the B39 switching signal and the SCTE-35 signal into TS packets. [Explanation of symbols]

[0111] 100, 100A: Encoding device 110: Media separation unit 120: Video encoding unit 130: Audio coding unit 140: Detection unit 160: Control unit 170: Packetization unit 171: SCTE-35 packetization unit 172: Video packetization unit 173: Voice packetization unit 174: Auxiliary data packetization unit 180: Multiplexing section 11: Camera 12:B39 setting device 13, 22: Switch 15, 24, 32: Key station CM server 21: Decoder 23: Encoder 31:Editing device

Claims

1. a detection unit that detects a first control signal that specifies a switching position for switching a part of a video signal to another video signal in units of frames; a video encoding unit that encodes the video signal in frame group units to generate encoded frames; a control unit that calculates a timestamp of an encoded frame immediately after the switching position using the first control signal and generates a second control signal including the timestamp; The control unit outputs a close instruction to the video encoding unit to close the frame group with an encoding frame immediately before the switching position, and causes the video encoding unit to complete the frame group with the encoding frame immediately before the switching position. An encoding device comprising:

2. The control unit acquiring another timestamp of the latest encoded frame from the video encoding unit at the time when the first control signal is detected; calculating a timestamp of an encoded frame immediately after the switching position using the other timestamp, an encoding processing time by the video encoding unit, and the number of frames up to the switching position included in the first control signal; 2. The encoding device according to claim 1, wherein:

3. an audio encoding unit that encodes audio of the video signal; the control unit outputs a mute instruction to the audio encoding unit to mute audio for a predetermined period of time immediately before the switching position; The audio encoding unit encodes the audio muted in accordance with the mute instruction.

3. The encoding device according to claim 1 or 2,

4. a packetizer that packetizes the first control signal into a first TS (Transport Stream) packet, packetizes the second control signal into a second TS packet, and packetizes the encoded frame encoded by the video encoder into a third TS packet; a multiplexing unit that multiplexes the first TS packet, the second TS packet, and the third TS packet and outputs the multiplexed packet; 4. The encoding device according to claim 1, wherein:

5. a packetizer that packetizes the first control signal and the second control signal into a first TS (Transport Stream) packet and packetizes the encoded frame encoded by the video encoder into a second TS packet; a multiplexing unit that multiplexes the first TS packet and the second TS packet and outputs the multiplexed packet; 4. The encoding device according to claim 1, wherein:

6. The video signal is a television program, and the other video signal is an advertisement.

6. The encoding device according to claim 1, wherein:

7. A control method performed by an encoding device, detecting a first control signal that specifies a switching position for switching a part of a video signal to another video signal on a frame-by-frame basis; encoding the video signal in frame group units to generate encoded frames; calculating a timestamp of an encoded frame immediately after the switching position using the first control signal, and generating a second control signal including the timestamp; and closing the group of frames with the encoding frame immediately preceding the switching position. A control method characterized by:

8. A control program that causes a computer to function as the encoding device according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Methods and apparatus for identification of local commercial insertion opportunities

    CN112166615A

  • Supplying device and method, and inserting device and method for video material

    JP1997284761A

  • Seamless splicing method in video encoder

    JP2000511740A

  • Program dividing device and program dividing method

    WO2017061103A1