JP2023091509A - Encoder, control method, and control program - Google Patents

Encoder, control method, and control program Download PDF

Info

Publication number
JP2023091509A
JP2023091509A JP2021206289A JP2021206289A JP2023091509A JP 2023091509 A JP2023091509 A JP 2023091509A JP 2021206289 A JP2021206289 A JP 2021206289A JP 2021206289 A JP2021206289 A JP 2021206289A JP 2023091509 A JP2023091509 A JP 2023091509A
Authority
JP
Japan
Prior art keywords
frame
video
signal
encoded
encoding
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
JP2021206289A
Other languages
Japanese (ja)
Inventor
英尊 木村
Hidetaka Kimura
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.)
NTT Electronics Corp
Original Assignee
NTT Electronics Corp
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 NTT Electronics Corp filed Critical NTT Electronics Corp
Priority to JP2021206289A priority Critical patent/JP2023091509A/en
Publication of JP2023091509A publication Critical patent/JP2023091509A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

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

Description

本発明は、映像信号を符号化する技術に関する。 The present invention relates to technology for encoding video signals.

生放送のテレビ番組において、地方の放送局では、キー局で作成したテレビ番組のCM部分を、当該地方のCMに差し替えて放送する場合がある。日本では、このようなCMの差し替えには、日本放送規格のARIB STD-B39で規定されている放送局間制御信号が用いられている(非特許文献1)。 2. Description of the Related Art In a live TV program, a local broadcasting station may replace the commercial part of the TV program produced by a key station with the local commercial. In Japan, an inter-broadcasting station control signal defined by ARIB STD-B39 of the Japanese broadcasting standard is used for such CM replacement (Non-Patent Document 1).

北米では、SCTE(Society of Cable Telecommunications Engineers)が定めたSCTE-35信号を用いてCMを差し替えている(非特許文献2)。 In North America, SCTE-35 signals defined by SCTE (Society of Cable Telecommunications Engineers) are used to replace CMs (Non-Patent Document 2).

ARIB STD-B39、一般社団法人、電波産業会ARIB STD-B39, General Incorporated Association, Association of Radio Industries and Businesses ANSI/SCTE 35 2019r1, Digital Program Insertion Cueing Message for CableANSI/SCTE 35 2019r1, Digital Program Insertion Cueing Message for Cable

キー局から地方の放送局に配信されるテレビ番組は、MPEG等の符号化方式で符号化・圧縮化された状態で配信される。MPEG等の符号化方式は、15または30フレームのグループ単位で符号化されている。 A television program distributed from a key station to a local broadcasting station is distributed after being encoded/compressed by an encoding method such as MPEG. An encoding method such as MPEG is encoded in units of groups of 15 or 30 frames.

CMは、テレビ番組の決まった位置に差し替える必要がある。ARIB方式では、CMの差し替え位置はフレーム単位で指定される。このため、キー局のCMを地方局のCMに差し替えるには、符号化されたフレームのグループを一旦フレーム単位に復号し、CMを差し替えた後に再びグループ単位に符号化する必要がある。しかしながら、復号および符号化を行う度に画質が劣化し、また復号および符号化の処理が増加する。 The CM needs to be replaced at a fixed position in the TV program. In the ARIB system, CM replacement positions are specified in units of frames. Therefore, in order to replace the CM of the key station with the CM of the local station, it is necessary to first decode the group of encoded frames frame by frame, and then encode the group by group again after replacing the CM. However, every time decoding and encoding are performed, the image quality deteriorates, and the processing of decoding and encoding increases.

北米のSCTE方式では、符号化されたフレームのグループ単位でCMを差し替えるため、CMの差し替えのために復号および符号化を行う必要はない。しかしながら、日本では、テレビ番組などの既存の映像信号(コンテンツ)はARIB方式に準拠しており、広告などの他の映像信号への切り替えはフレーム単位で指定されている。このため、ARIB方式に準拠した映像信号に対して、符号化されたフレームのグループ単位でCMを差し替えるSCTE方式を適用することは難しい。 In the North American SCTE system, CM is replaced in units of groups of encoded frames, so there is no need to perform decoding and encoding for CM replacement. However, in Japan, existing video signals (contents) such as television programs comply with the ARIB system, and switching to other video signals such as advertisements is specified in units of frames. For this reason, it is difficult to apply the SCTE method, in which CM is replaced in group units of encoded frames, to video signals conforming to the ARIB method.

本発明は上記の課題に鑑みてなされたものであって、本発明は、符号化された映像信号の一部を、復号することなく他の映像信号に切り替えて、画質の劣化を回避することを目的とする。 The present invention has been made in view of the above problems, and the present invention is to avoid deterioration of image quality by switching part of an encoded video signal to another video signal without decoding. With the goal.

上記目的を達成するため、本発明の一態様の符号化装置は、映像信号の一部を他の映像信号へ切り替える切り替え位置を、フレーム単位で指定する第1制御信号を検出する検出部と、前記映像信号の映像を、フレームグループ単位に符号化して符号化フレームを生成する映像符号化部と、前記第1制御信号を用いて、前記切り替え位置の直後の符号化フレームのタイムスタンプを算出し、前記タイムスタンプを含む第2制御信号を生成する制御部と、を備え、前記制御部は、前記切り替え位置の直前の符号化フレームで、フレームグループを閉じるクローズ指示を前記映像符号化部に出力し、前記映像符号化部に前記直前の符号化フレームでフレームグループを完成させる。 In order to achieve the above object, an encoding device according to an aspect of the present invention includes a detection unit that detects a first control signal that specifies a switching position for switching part of a video signal to another video signal on a frame-by-frame basis; calculating a time stamp of an encoded frame immediately after the switching position using a video encoding unit that encodes the video of the video signal to generate encoded frames by frame group units, and the first control signal; and a control unit that generates a second control signal including the time stamp, wherein the control unit outputs a close instruction to the video encoding unit to close the frame group at the encoding frame immediately before the switching position. Then, the video encoder completes the frame group with the previous encoded frame.

本発明の一態様は、符号化装置が行う制御方法であって、映像信号の一部を他の映像信号へ切り替える切り替え位置を、フレーム単位で指定する第1制御信号を検出するステップと、前記映像信号の映像を、フレームグループ単位に符号化して符号化フレームを生成するステップと、前記第1制御信号を用いて、前記切り替え位置の直後の符号化フレームのタイムスタンプを算出し、前記タイムスタンプを含む第2制御信号を生成するステップと、前記切り替え位置の直前の符号化フレームで、フレームグループを閉じるステップと、を行う。 One aspect of the present invention is a control method performed by an encoding device, comprising the step of 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 image of the video signal in frame group units to generate an encoded frame; calculating a time stamp of the encoded frame immediately after the switching position using the first control signal; and closing a frame group at a coded frame immediately preceding said switch position.

本発明の一態様は、上記符号化装置として、コンピュータを機能させる制御プログラムである。 One aspect of the present invention is a control program that causes a computer to function as the encoding device.

本発明によれば、符号化された映像信号の一部を、復号することなく他の映像信号に切り替えて、画質の劣化を回避することができる。 According to the present invention, deterioration of image quality can be avoided by switching a part of the encoded video signal to another video signal without decoding.

図1は、ARIB方式のCM差し替えの流れを示す図である。FIG. 1 is a diagram showing the flow of CM replacement in the ARIB system. 図2は、B39切換え信号を説明するための模式図である。FIG. 2 is a schematic diagram for explaining the B39 switching signal. 図3は、番組本編の一部がCMに置き換わる様子を示す図である。FIG. 3 is a diagram showing how a part of the main part of the program is replaced with a CM. 図4は、TSを説明するための模式図である。FIG. 4 is a schematic diagram for explaining the TS. 図5は、SCTE方式のCM差し替えの流れを示す図である。FIG. 5 is a diagram showing the flow of CM replacement in the SCTE system. 図6は、SCTE-35信号を説明するための模式図である。FIG. 6 is a schematic diagram for explaining the SCTE-35 signal. 図7は、MPEG-2の符号化フレームを説明するための模式図である。FIG. 7 is a schematic diagram for explaining an MPEG-2 encoded frame. 図8は、番組本編の一部がCMに置き換わる様子を示すである。FIG. 8 shows how part of the main part of the program is replaced with CM. 図9は、実施形態の放送システムの全体構成例を示す。FIG. 9 shows an example of the overall configuration of the broadcasting system of the embodiment. 図10は、実施形態の符号化装置の機能構成例を示すブロック図である。FIG. 10 is a block diagram illustrating a functional configuration example of the encoding device according to the embodiment; 図11は、PTS2の算出処理を説明するための模式図である。FIG. 11 is a schematic diagram for explaining the calculation process of PTS2. 図12は、オープンGOPとクローズドGOPを説明するための模式図である。FIG. 12 is a schematic diagram for explaining open GOP and closed GOP. 図13は、符号化装置の制御方法を示すフローチャートである。FIG. 13 is a flow chart showing the control method of the encoding device. 図14は、図13の処理とフレームの位置関係を示す図である。FIG. 14 is a diagram showing the positional relationship between the processing of FIG. 13 and frames. 図15は、変形例の符号化装置の機能構成例を示すブロック図である。FIG. 15 is a block diagram showing a functional configuration example of an encoding device according to a modification. 図16は、符号化前の映像・音声と、符号化後の映像・音声を示す図である。FIG. 16 is a diagram showing video/audio before encoding and video/audio after encoding. 図17は、切り替え位置の直前の音声を無音化する例を示す図である。FIG. 17 is a diagram showing an example of muting the sound immediately before the switching position.

以下、本発明の実施形態を、図面を用いて説明する。複数の図面中同一のものには同じ参照符号を付し、説明は繰り返さない。 An embodiment of the present invention will be described below with reference to the drawings. The same reference numerals are given to the same items in multiple drawings, and the description will not be repeated.

まず、ARIB方式の広告差し替えと、SCTE方式の広告差替えについて説明し、その後、本実施形態の放送システムについて説明する。 First, the replacement of advertisements in the ARIB system and the replacement of advertisements in the SCTE system will be described, and then the broadcasting system of this embodiment will be described.

1.ARIB方式の広告差し替え
生中継のテレビ番組において、地方の放送局で、キー局で作成したテレビ番組の広告(例えばCM:Commercial Messageなど)の部分を、当該地方の広告に差替えて放送する場合がある。以下、広告を「CM」と記載する。
1. Advertisement replacement by the ARIB method In live broadcast TV programs, there are cases where local broadcasting stations replace the part of the TV program advertisement (for example, CM: Commercial Message, etc.) created by the key station with the local advertisement. be. The advertisement is hereinafter referred to as "CM".

図1にARIB方式のCM差し替えの流れを示す。キー局において、例えばカメラ11で撮影された映像は、SDI信号としてB39設定装置12に出力される。B39設定装置12は、SDI信号にARIBのB39切換え信号を設定し、スイッチ13に出力する。B39切換え信号は、ARIB STD-B39で規定された放送局間制御信号である。 FIG. 1 shows the flow of CM replacement in the ARIB system. At the key station, for example, an image captured by the camera 11 is output to the B39 setting device 12 as an SDI signal. The B39 setting device 12 sets the B39 switching signal of ARIB to the SDI signal and outputs it to the switch 13 . The B39 switching signal is an inter-station control signal defined by ARIB STD-B39.

図2を用いてB39切換え信号について説明する。B39切換え信号は、何フレーム後にCMを開始すべきか、または、何フレーム後に番組本編を再開すべきかをカウントダウンにより指定する信号である。B39切換え信号は、SDI信号のフレーム列200において、カウントダウンを開始するフレーム201から、広告または番組本編に切り替わるフレーム202の直前の各フレームに設定される。B39切換え信号は、SDI信号のフレームの補助データパケット領域203に格納される。 The B39 switching signal will be described with reference to FIG. The B39 switching signal is a signal that designates, by countdown, after how many frames the CM should start or after how many frames the main part of the program should be resumed. The B39 switching signal is set in each frame in the frame train 200 of the SDI signal from the frame 201 at which the countdown starts to the frame 202 immediately before the frame 202 at which the advertisement or main part of the program is switched. The B39 switching signal is stored in the auxiliary data packet area 203 of the frame of the SDI signal.

図2は、カウントダウンを開始するフレーム201のデータ配置を模式的に示す。ここでは、フレーム201の補助データパケット領域203には、カウントダウンフレーム数として5フレーム後にCMを開始することを指示するB39切換え信号が格納されている。 FIG. 2 schematically shows the data arrangement of a frame 201 starting countdown. Here, in the auxiliary data packet area 203 of the frame 201, a B39 switching signal is stored that instructs to start CM after 5 frames as the number of countdown frames.

図1に戻り、スイッチ13は、B39切換え信号が付与されたSDI信号を受信し、B39切換え信号に従って、指定されたフレームから番組本編をCMに置き換えてエンコーダ14に出力する。スイッチ13は、CMサーバ15からキー局のCMを読み出し番組本編をCMに置き換える。その後、スイッチ13は、B39切換え信号に従って、指定されたフレームから番組本編を再開してエンコーダ14に出力する。 Returning to FIG. 1, the switch 13 receives the SDI signal to which the B39 switching signal is added, replaces the main part of the program with CM from the designated frame, and outputs the CM to the encoder 14 according to the B39 switching signal. The switch 13 reads the CM of the key station from the CM server 15 and replaces the main part of the program with the CM. After that, the switch 13 restarts the main part of the program from the designated frame and outputs it to the encoder 14 according to the B39 switching signal.

図3に番組本編の一部がCMに置き換わる様子を示す。図3(a)は、キー局のB39設定装置12が出力する番組本編のSDI信号のフレーム(以下、「SDIフレーム」)を示す。SDIフレームの一部には、CMを開始するためのB39切換え信号、または、番組本編を開始するためのB39切換え信号が設定されている。 FIG. 3 shows how part of the main part of the program is replaced with CM. FIG. 3(a) shows a frame of an SDI signal (hereinafter referred to as an "SDI frame") of the main program output by the B39 setting device 12 of the key station. A B39 switching signal for starting a CM or a B39 switching signal for starting a main part of a program is set in a part of the SDI frame.

図3(b)は、キー局のスイッチ13が出力するSDIフレームを示す。図3(b)のSDIフレームでは、B39切換え信号にしたがって、番組本編のm個のSDIフレームがキー局のCM1のSDIフレームに差し替えられている。スイッチ13は、CM1のSDIフレームに差し替える際に、番組本編のSDIフレームに設定されているB39切換え信号を対応するCM1のSDIフレームにそのまま設定する。 FIG. 3(b) shows an SDI frame output by the switch 13 of the key station. In the SDI frame of FIG. 3(b), m SDI frames of the main part of the program are replaced with SDI frames of CM1 of the key station according to the B39 switching signal. When replacing the SDI frame of CM1, the switch 13 sets the B39 switching signal set in the SDI frame of the main part of the program to the corresponding SDI frame of CM1 as it is.

図3(c)は、地方局のスイッチ22が出力するSDIフレームを示す。図3(c)のSDIフレームでは、B39切換え信号にしたがって、キー局のCM1のm個のSDIフレームが地方局のCM2のSDIフレームに差し替えられている。スイッチ22は、キー局のスイッチ13と同様に、B39切換え信号にしたがって、指定されたSDIフレームからキー局のCM1を地方局のCM2に置き換えてエンコーダ23に出力する。その後、スイッチ22は、B39切換え信号にしたがって、指定されたSDIフレームから番組本編を再開してエンコーダ23に出力する。 FIG. 3(c) shows an SDI frame output by the switch 22 of the local station. In the SDI frame of FIG. 3(c), m SDI frames of CM1 of the key station are replaced with SDI frames of CM2 of the local station according to the B39 switching signal. Similar to the switch 13 of the key station, the switch 22 replaces CM1 of the key station with CM2 of the local station from the designated SDI frame and outputs it to the encoder 23 according to the B39 switching signal. After that, the switch 22 restarts the main part of the program from the designated SDI frame and outputs it to the encoder 23 according to the B39 switching signal.

図1に戻り、キー局のエンコーダ14は、スイッチ13が出力したSDI信号(SDIフレーム)の映像を、MPEG-2規格で符号化し、符号化した映像を映像TSパケットに格納する。エンコーダ14は、SDI信号の音声を、AAC規格で符号化し、符号化した音声を音声TSパケットに格納する。そして、エンコーダ14は、映像TSパケットおよび音声TSパケットを多重化して出力する。これにより、キー局のCMが挿入された番組が放送される。 Returning to FIG. 1, the encoder 14 of the key station encodes the video of the SDI signal (SDI frame) output from the switch 13 according to the MPEG-2 standard, and stores the encoded video in a video TS packet. The encoder 14 encodes the audio of the SDI signal according to the AAC standard and stores the encoded audio in audio TS packets. The encoder 14 then multiplexes the video TS packets and the audio TS packets and outputs them. As a result, a program in which the CM of the key station is inserted is broadcast.

また、エンコーダ14は、SDI信号を地方局へ配信する場合、B39切換え信号を含む補助データを補助データTSパケットに格納し、補助データTSパケットと、映像TSパケットと、音声TSパケットとを多重化して地方局へ配信する。 When distributing the SDI signal to a local station, the encoder 14 stores the auxiliary data including the B39 switching signal in the auxiliary data TS packet, and multiplexes the auxiliary data TS packet, the video TS packet and the audio TS packet. distributed to local stations.

図4は、TSを説明するための模式図である。TSは、MPEG-2 Transport Streamを意味する。エンコーダ14は、符号化した映像(符号化映像データ)、符号化した音声(符号化音声データ)および補助データのそれぞれを、最大184バイト単位で分割し、4バイトのヘッダを付加してTSパケットを生成し、これらのTSパケットを多重化したTSパケットを生成する。エンコーダ14は、映像、音声および補助データの同期をとりながら混在させて1つのTS(送信ストリーム)にまとめる。TSは、SDI信号を配信または放送するために用いられる。 FIG. 4 is a schematic diagram for explaining the TS. TS stands for MPEG-2 Transport Stream. The encoder 14 divides each of the encoded video (encoded video data), encoded audio (encoded audio data), and auxiliary data into units of up to 184 bytes, adds a 4-byte header, and converts them into TS packets. are generated, and a TS packet is generated by multiplexing these TS packets. The encoder 14 mixes video, audio and auxiliary data while synchronizing them, and combines them into one TS (transmission stream). TS is used to distribute or broadcast SDI signals.

地方局では、デコーダ21が、キー局から配信された多重化TSパケットを復号してSDI信号を再構成し、当該SDI信号をスイッチ22に出力する。このとき、デコーダ21は、補助データTSパケットに含まれるB39切換え信号を、元通りSDI信号の中に格納する。 At the local station, the decoder 21 decodes the multiplexed TS packets delivered from the key station to reconstruct the SDI signal and outputs the SDI signal to the switch 22 . At this time, the decoder 21 stores the B39 switching signal included in the auxiliary data TS packet in the SDI signal as before.

地方局のスイッチ22は、図3(c)に示すように、B39切換え信号にしたがって、指定されたフレームからキー局のCM1を地方局のCM2に置き換え、指定されたフレームから番組本編を再開してエンコーダ23に出力する。 As shown in FIG. 3(c), the switch 22 of the local station replaces CM1 of the key station with CM2 of the local station from the designated frame according to the B39 switching signal, and restarts the main part of the program from the designated frame. is output to the encoder 23.

地方局のエンコーダ23は、地方局のスイッチ22が出力するSDI信号の映像を、MPEG-2規格で符号化し、符号化した映像を映像TSパケットに格納する。また、エンコーダ23は、SDI信号の音声をAAC規格で符号化し、符号化した音声を音声TSパケットに格納する。そして、エンコーダ23は、映像TSパケットおよび音声TSパケットを多重化して出力する。これにより、キー局のCM1が地方局のCM2に置き換わった番組が放送される。 The local station encoder 23 encodes the video of the SDI signal output from the local station switch 22 according to 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 according to the AAC standard and stores the encoded audio in audio TS packets. The encoder 23 then multiplexes the video TS packets and the audio TS packets and outputs them. As a result, a program is broadcast in which CM1 of the key station is replaced with CM2 of the local station.

2.SCTE方式の広告差し替え
北米のデジタルCATVでは、SCTE規格を用いて、前述のARIB方式とは異なる方式でCM(広告)を差し替える。
2. SCTE Advertisement Replacement In digital CATV in North America, the SCTE standard is used to replace commercials (advertisements) by a method different from the above-mentioned ARIB method.

図5に、SCTE方式によるCM差し替えの流れを示す。キー局において、例えばカメラ11で撮影した映像は、SDI信号としてエンコーダ16に出力される。 FIG. 5 shows the flow of CM replacement according to the SCTE method. At the key station, for example, an image captured by the camera 11 is output to the encoder 16 as an SDI signal.

エンコーダ16は、カメラ11が出力したSDI信号の映像を、MPEG-2規格で符号化し、符号化した映像を映像TSパケットに格納する。エンコーダ16は、SDI信号の音声を、所定の音声符号化規格で符号化し、符号化した音声を音声TSパケットに格納する。符号化の際に、エンコーダ16は、補助データとしてSCTE-35信号を生成し、補助データTSパケットに格納する。そして、エンコーダ16は、映像TSパケット、音声TSパケットおよび補助データTSパケットを多重化して編集装置17に出力する。 The encoder 16 encodes the video of the SDI signal output from the camera 11 according to the MPEG-2 standard, and stores the encoded video in video TS packets. The encoder 16 encodes the audio of the SDI signal according to a predetermined audio encoding standard, and stores the encoded audio in audio TS packets. During encoding, encoder 16 generates SCTE-35 signals as auxiliary data and stores them in auxiliary data TS packets. The encoder 16 then multiplexes the video TS packets, the audio TS packets and the auxiliary data TS packets and outputs the multiplexed data to the editing device 17 .

図6を用いてSCTE-35信号について説明する。SCTE-35信号は、符号化された符号化フレームのPTS(Presentation Time Stamp)を用いて、どの符号化フレームからCMを開始すべきか、またどの符号化フレームから番組本編を再開すべきかを指示する。PTSは、図示しないデコーダにおいて復号されたフレームを出力すべきタイミング(90kHzクロックのカウント値)を指示するものである。エンコーダ16は、符号化した符号化フレームにPTSを付与する。 The SCTE-35 signal will be explained with reference to FIG. The SCTE-35 signal uses the PTS (Presentation Time Stamp) of the encoded coded frame to indicate from which coded frame the CM should start and from which coded frame the main program should be resumed. . PTS indicates the timing (count value of 90 kHz clock) to output a frame decoded by a decoder (not shown). The encoder 16 gives a PTS to the encoded encoded frame.

図6に示すSCTE-35信号601は、PTS1の符号化フレーム602でCMを開始し、PTS4の符号化フレーム603で番組本編を再開することを指示している。 The SCTE-35 signal 601 shown in FIG. 6 instructs to start the commercial at the encoded frame 602 of PTS1 and to resume the main part of the program at the encoded frame 603 of PTS4.

図7は、MPEG-2で符号化される符号化フレーム(MPEGフレーム)を説明するための図である。MPEG-2規格では、映像のSDIフレームは、Iフレーム、PフレームおよびBフレームのいずれかのMPEGフレームに符号化される。1つのIフレームを含むフレームグループを、GOP(Group of Pictures)と呼ぶ。Pフレームの復号にはIフレームが必要で、Bフレームの復号にはIフレームとPフレームの両方またはいずれかが必要である。このため、GOPを分断するような位置で番組本編を終了またはCMを開始すると、映像が正しく再生できなくなる。 FIG. 7 is a diagram for explaining an encoded frame (MPEG frame) encoded by MPEG-2. In the MPEG-2 standard, an SDI frame of video is encoded into one of I-frames, P-frames and B-frames. A frame group including one I frame is called a GOP (Group of Pictures). Decoding a P-frame requires an I-frame, and decoding a B-frame requires an I-frame and/or a P-frame. Therefore, if the main part of the program ends or the CM starts at a position that divides the GOP, the video cannot be reproduced correctly.

そこで、エンコーダ16は、番組本編からCMへの切り替え(またはその逆)の切り換え位置が、必ずGOPの境界となるようにSCTE-35信号を生成する必要がある。 Therefore, the encoder 16 needs to generate the SCTE-35 signal so that the switching position for switching from the main program to CM (or vice versa) is always at the GOP boundary.

前述のARIB方式のB39切換え信号では、CM開始位置として、SDI信号の任意のSDIフレームを指定できるが、SCTE-35信号では、上述のとおり任意の符号化フレームをCM開始位置として指定することはできない。 In the B39 switching signal of the ARIB system described above, any SDI frame of the SDI signal can be specified as the CM start position, but in the SCTE-35 signal, as described above, any encoded frame cannot be specified as the CM start position. Can not.

図5に戻り、編集装置17は、SCTE-35信号を含む補助データTSパケットを受信すると、SCTE-35信号にしたがって、CM開始位置のフレームから本編再開位置の直前のフレームまでの間のGOPを、CMサーバ15に格納されたCMのGOPに置き換える。編集装置17は、音声についても同様に、SCTE-35信号にしたがって、番組本編の符号化された音声を、キー局のCMの符号化された音声に置き換える。CMサーバ15には、キー局のCMの符号化済みの映像および音声が格納されている。 Returning to FIG. 5, when the editing device 17 receives the ancillary data TS packet containing the SCTE-35 signal, the editing device 17 reproduces the GOP from the frame at the CM start position to the frame immediately before the main content restart position according to the SCTE-35 signal. , is replaced by the CM GOP stored in the CM server 15 . Similarly, the editing device 17 replaces the coded sound of the main part of the program with the coded sound of the CM of the key station according to the SCTE-35 signal. The CM server 15 stores encoded video and audio of CMs of key stations.

そして、編集装置17は、映像TSパケット、音声TSパケットおよび補助データTSパケットを多重化したTSパケットを生成し、図示しないキー局の送信装置に出力する。これにより、キー局のCMが挿入された番組が放送される。また、編集装置17は、多重化したTSパケットを、そのまま地方局の編集装置31へ配信する。 The editing device 17 then generates a TS packet by multiplexing the video TS packet, the audio TS packet, and the auxiliary data TS packet, and outputs it to the transmission device of the key station (not shown). As a result, a program in which the CM of the key station is inserted is broadcast. Also, the editing device 17 distributes the multiplexed TS packets as they are to the editing device 31 of the local station.

地方局の編集装置31は、多重化されたTSパケットを受信し、キー局の編集装置17と同様に、補助データTSパケットに含まれるSCTE-35信号にしたがって、CM開始位置のフレームから本編再開位置の直前のフレームまでの間のGOPを、CMサーバ32に格納された地方局のCMのGOPに置き換える。編集装置31は、音声についても同様に、SCTE-35信号にしたがって、キー局のCMの符号化された音声を、地方局のCMの符号化された音声に置き換える。CMサーバ32には、地方局のCMの符号化済みの映像および音声が格納されている。 The editing device 31 of the local station receives the multiplexed TS packet and, like the editing device 17 of the key station, resumes the main part from the frame at the CM start position according to the SCTE-35 signal included in the auxiliary data TS packet. The GOP up to the frame immediately preceding the position is replaced with the local station CM GOP stored in the CM server 32 . The editing device 31 similarly replaces the encoded voice of the key station's CM with the encoded voice of the local station's CM according to the SCTE-35 signal. The CM server 32 stores encoded video and audio of local station CMs.

そして、編集装置31は、置き換えた映像TSパケットおよび音声TSパケットを多重化したTSパケットを、図示しない地方局の送信装置に出力する。これにより、地方局のCMが挿入された番組が放送される。 Then, the editing device 31 outputs TS packets obtained by multiplexing the replaced video TS packets and audio TS packets to a transmission device of a local station (not shown). As a result, the program in which the commercial of the local station is inserted is broadcast.

図8に、番組本編の一部がCMに置き換わる様子を示す。図8(a)は、キー局のエンコーダ16が出力する番組本編のGOPを示す。図示する例では、エンコーダ16が生成したSCTE-35信号により、切り替え位置(CM開始)の直後のGOP801からCMに切り替わり、切り替え位置(本編再開)の直後のGOP802から番組本編に切り替えることを示している。 FIG. 8 shows how part of the main part of the program is replaced with CM. FIG. 8(a) shows the GOP of the main part of the program output by the encoder 16 of the key station. In the illustrated example, the SCTE-35 signal generated by the encoder 16 indicates switching from the GOP 801 immediately after the switching position (commercial start) to the commercial, and switching from the GOP 802 immediately after the switching position (resuming the main part) to the program main part. there is

図8(b)は、キー局の編集装置17が出力するGOPを示す。図示する例では、編集装置17が、SCTE-35信号にしたがって、図8(a)のGOP801から切り替え位置の直前のGOP803までを、キー局のCM1のGOPに置き換えたことを示している。 FIG. 8(b) shows a GOP output by the editing device 17 of the key station. The illustrated example shows that the editing device 17 has replaced the GOP 801 to the GOP 803 immediately before the switching position in FIG. 8A with the GOP of CM1 of the key station according to the SCTE-35 signal.

図8(c)は、地方局の編集装置31が出力するGOPを示す。図示する例では、編集装置31が、SCTE-35信号にしたがって、図8(a)のGOP801から切り替え位置の直前のGOP803までを、地方局のCM2のGOPに置き換えたことを示している。 FIG. 8(c) shows a GOP output by the editing device 31 of the local station. The illustrated example shows that the editing device 31 has replaced the GOP 801 to the GOP 803 immediately before the switching position in FIG. 8A with the GOP of CM2 of the local station according to the SCTE-35 signal.

3.実施形態
<放送システムの全体構成>
図9は、本実施形態の放送システムの全体構成例を示す。図示する放送システムは、キー局1と、SCTE-35信号を処理できない地方局2と、SCTE-35信号を処理可能な地方局3とを有する。
3. Embodiment <Overall Configuration of Broadcast System>
FIG. 9 shows an example of the overall configuration of the broadcasting system of this embodiment. The illustrated broadcasting system has 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.

本実施形態では、テレビ番組の一部を広告に切り替える場合を例として以下に説明するが、本発明はこれに限定されない。テレビ番組以外の映像信号(コンテンツ)を、広告以外の他の映像信号(コンテンツ)に切り替える場合であっても、本発明を用いることができる。 In the present embodiment, the case of switching part of a television program to an advertisement will be described below as an example, but the present invention is not limited to this. The present invention can be used even when video signals (contents) other than television programs are switched to video signals (contents) other than advertisements.

キー局1では、テレビ番組の一部を、キー局のCM1に切り替える。キー局1は、カメラ11と、B39設定装置12と、スイッチ13と、CMサーバ15と、符号化装置100とを備える。本実施形態のカメラ11、B39設定装置12、スイッチ13およびCMサーバ15は、図1で説明した装置11、12、13、15と同様である。 At key station 1, part of the television program is switched to CM1 of the key station. The key station 1 comprises a camera 11 , a B39 setting device 12 , a switch 13 , a CM server 15 and an encoding device 100 . The camera 11, B39 setting device 12, switch 13 and CM server 15 of this embodiment are the same as the devices 11, 12, 13 and 15 described in FIG.

カメラ11は、映像を撮影し、SDI信号(映像信号)としてB39設定装置12に出力する。B39設定装置12は、SDI信号にARIB規格のB39切換え信号を設定する。B39設定装置12から出力されるSDIフレームは、図3(a)と同様である。 The camera 11 takes an image and outputs it to the B39 setting device 12 as an SDI signal (video signal). The B39 setting device 12 sets the B39 switching signal of the ARIB standard to the SDI signal. The SDI frame output from the B39 setting device 12 is the same as that shown in FIG. 3(a).

スイッチ13は、B39切換え信号が付与されたSDI信号を受信すると、B39切換え信号にしたがって、CM開始位置から番組本編再開位置までのSDIフレームを、CMサーバ15に格納されたCM1のSDIフレームに置き換えて、符号化装置100に出力する。スイッチ13から出力されるSDIフレームは図3(b)と同様である。 When the switch 13 receives the SDI signal to which the B39 switching signal is added, the switch 13 replaces the SDI frame from the CM start position to the main program restart position with the SDI frame of CM1 stored in the CM server 15 according to the B39 switching signal. and output to the encoding device 100 . The SDI frame output from the switch 13 is the same as that shown in FIG. 3(b).

符号化装置100は、スイッチ13が出力するSDI信号を、映像と、音声と、B39切換え信号を含む補助データとに分離する。符号化装置100は、映像をMPEG-2規格で符号化し、符号化した映像を映像TSパケットに格納する。符号化装置100は、音声をAAC規格で符号化し、符号化した音声を音声TSパケットに格納する。また、符号化装置100は、補助データを補助データTSパケットに格納する。 The encoding device 100 separates the SDI signal output from the switch 13 into video, audio, and auxiliary data including the B39 switching signal. The encoding device 100 encodes video according to the MPEG-2 standard and stores the encoded video in video TS packets. Encoding apparatus 100 encodes audio according to the AAC standard and stores the encoded audio in audio TS packets. Also, the encoding device 100 stores the auxiliary data in the auxiliary data TS packet.

また、本実施形態の符号化装置100は、B39切換え信号に基づいてSCTE-35信号を生成し、SCTE-35TSパケットに格納する。また、符号化装置100は、差し替えるCM1が複数のGOPから構成されるように映像を符号化する。これについては、後述する。 Also, the encoding apparatus 100 of this embodiment generates an SCTE-35 signal based on the B39 switching signal and stores it in an SCTE-35TS packet. In addition, the encoding device 100 encodes video such that CM1 to be replaced is composed of a plurality of GOPs. This will be described later.

そして、符号化装置100は、映像TSパケット、音声TSパケット、補助データTSパケットおよびSCTE-35TSパケットを多重化して、図示しない送信装置に出力する。これにより、キー局のCM1が挿入された番組が放送される。また、符号化装置100は、多重化されたTSパケットを、地方局2、3へそれぞれ配信する。 Encoding apparatus 100 then multiplexes the video TS packets, audio TS packets, auxiliary data TS packets and SCTE-35TS packets, and outputs the multiplexed data to a transmission apparatus (not shown). As a result, a program in which CM1 of the key station is inserted is broadcast. Encoding apparatus 100 also distributes the multiplexed TS packets to local stations 2 and 3, respectively.

地方局2は、SCTE-35信号が処理できないで地方局であって、B39切換え信号を用いてキー局のCM1を地方局2のCM2に置き換える。地方局2が備えるデコーダ21、スイッチ22、エンコーダ23およびCMサーバ24は、図1に示す地方局の装置21、22、23、24と同様である。 Local station 2, being a local station that cannot process SCTE-35 signals, uses a B39 switching signal to replace key station CM1 with local station 2 CM2. A decoder 21, a switch 22, an encoder 23 and a CM server 24 provided in the local station 2 are the same as the local station devices 21, 22, 23 and 24 shown in FIG.

デコーダ21は、キー局1の符号化装置100から配信された、多重化されたTSパケットを復号し、SDI信号に復元してスイッチ22に出力する。このとき、デコーダ21は、補助データTSパケットに含まれるB39切換え信号を、SDI信号の中に元通り格納する。 The decoder 21 decodes the multiplexed TS packets delivered from the encoding device 100 of the key station 1 , restores them to SDI signals, and outputs them to the switch 22 . At this time, the decoder 21 restores the B39 switching signal included in the auxiliary data TS packet in the SDI signal.

地方局2のスイッチ22は、B39切換え信号にしたがって、CM開始位置から番組本編再開位置までのSDIフレームを、CMサーバ24に格納された地方局のCM2に置き換えて、エンコーダ23に出力する。すなわち、スイッチ22は、SDI信号のキー局のCM1の部分を、CMサーバ24の地方局のCM2に置き換えて出力する(図3(c)参照)。 The switch 22 of the local station 2 replaces the SDI frame from the CM start position to the main program restart position with the local station CM2 stored in the CM server 24 and outputs it to the encoder 23 according to the B39 switching signal. That is, the switch 22 replaces the CM1 portion of the key station of the SDI signal with CM2 of the local station of the CM server 24 and outputs it (see FIG. 3(c)).

地方局2のエンコーダ23は、スイッチ22が出力するSDI信号の映像を、MPEG-2規格で符号化し、符号化した映像を映像TSパケットに格納する。エンコーダ23は、SDI信号の音声をAAC規格で符号化し、符号化した音声を音声TSパケットに格納する。そして、エンコーダ23は、映像TSパケットおよび音声TSパケットを多重化して出力する。これにより、キー局のCM1が地方局2のCM2に置き換わった番組が放送される。 The encoder 23 of the local station 2 encodes the video of the SDI signal output from the switch 22 according to the MPEG-2 standard, and stores the encoded video in a video TS packet. The encoder 23 encodes the audio of the SDI signal according to the AAC standard and stores the encoded audio in audio TS packets. The encoder 23 then multiplexes the video TS packets and the audio TS packets and outputs them. As a result, a program in which CM1 of the key station is replaced with CM2 of the local station 2 is broadcast.

地方局3は、SCTE-35信号を処理可能な地方局であって、SCTE-35信号を用いて、キー局のCM1を地方局3のCM3に置き換える。地方局3が備える編集装置31およびCMサーバ32は、図5の地方局の装置31、32と同様である。CMサーバ32には、地方局3のCM3の符号化済みの映像および音声が格納されている。 Local station 3 is a local station capable of processing SCTE-35 signals and uses SCTE-35 signals to replace key station CM1 with local station 3 CM3. The editing device 31 and CM server 32 provided in the local station 3 are the same as the devices 31 and 32 of the local station in FIG. CM server 32 stores encoded video and audio of CM 3 of local station 3 .

編集装置31は、多重化されたTSパケットを受信し、SCTE-35TSパケットに含まれるSCTE-35信号にしたがって、CM開始位置から本編再開位置までのGOPを、CMサーバ32に格納されたCM3のGOPに置き換えて出力する。これについては、後述する。 The editing device 31 receives the multiplexed TS packets, and converts the GOP from the CM start position to the main part restart position into CM3 stored in the CM server 32 according to the SCTE-35 signal included in the SCTE-35TS packets. Replace with GOP and output. This will be described later.

<符号化装置の構成>
図10は、本実施形態の符号化装置100の機能構成例を示すブロック図である。図示する符号化装置100は、SDI信号(映像信号)を符号化してTSパケットを生成するとともに、B39切換え信号(第1制御信号)に基づいてSCTE-35信号(第2制御信号)を生成する。
<Configuration of Encoding Apparatus>
FIG. 10 is a block diagram showing a functional configuration example of the encoding device 100 of this embodiment. The illustrated encoding device 100 encodes an SDI signal (video signal) to generate a TS packet, and generates an SCTE-35 signal (second control signal) based on a B39 switching signal (first control signal). .

符号化装置100は、メディア分離部110と、映像符号化部120と、音声符号化部130と、検出部140と、制御部160と、パケット化部170と、多重化部180とを備える。パケット化部170は、補助データパケット化部174と、SCTE-35パケット化部171と、映像パケット化部172と、音声パケット化部173とを備える。 Encoding device 100 includes media separation section 110 , video encoding section 120 , audio encoding section 130 , detection section 140 , control section 160 , packetization section 170 and multiplexing section 180 . The packetizer 170 includes an auxiliary data packetizer 174 , an SCTE-35 packetizer 171 , a video packetizer 172 , and an audio packetizer 173 .

メディア分離部110は、SDI信号を、補助データ(アンシラリデータ)と、映像(映像データ)と、音声(音声データ)との3つに分離する。補助データには、B39切換え信号が含まれる。そして、メディア分離部110は、補助データを検出部140に出力し、映像を映像符号化部120に出力し、音声を音声符号化部130に出力する。 The media separation unit 110 separates the SDI signal into three data: auxiliary data (ancillary data), video (video data), and audio (audio data). The auxiliary data includes the B39 switching signal. Media separation section 110 then outputs auxiliary data to detection section 140 , video to video encoding section 120 , and audio to audio encoding section 130 .

検出部140は、入力された補助データを、補助データパケット化部174に出力する。補助データパケット化部174は、補助データをTSパケットにパケット化する。メディア分離部110は、検出部140を経由せずに、補助データを直接補助データパケット化部174に出力してもよい。この場合、メディア分離部110は、補助データを、検出部140と補助データパケット化部174の両方に出力する。 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 separation unit 110 may output the auxiliary data directly to the auxiliary data packetization unit 174 without going through the detection unit 140 . In this case, media separation section 110 outputs the auxiliary data to both detection section 140 and auxiliary data packetization section 174 .

本実施形態の検出部140は、補助データからB39切換え信号を検出する。B39切換え信号は、SDI信号の一部を他のSDI信号へ切り替える切り替え位置を、フレーム単位で指定するものである。例えば、B39切換え信号は、前記切り替え位置を、切り替えまでのカウントダウンフレーム数を用いて指示してもよい。本実施形態では、B39切換え信号は、番組本編の一部を、CMに切り替えるためのものである。検出部140は、検出したB39切換え信号、またはB39切換え信号に含まれるカウントダウンフレーム数を、制御部160へ出力する。 The detection unit 140 of this embodiment detects the B39 switching signal from the auxiliary data. The B39 switching signal designates a switching position for switching part of the SDI signal to another SDI signal on a frame-by-frame basis. For example, the B39 switch signal may indicate the switch position using a countdown frame number to switch. In this embodiment, the B39 switching signal is for switching part of the main part of the program to CM. Detecting section 140 outputs the detected B39 switching signal or the number of countdown frames included in the B39 switching signal to control section 160 .

映像符号化部120は、SDI信号の映像をGOP単位に符号化して符号化フレームを生成する。映像符号化部120は、符号化フレームを映像パケット化部172に出力する。本実施形態では、映像符号化部120は、映像をMPEG-2に従って符号化し、符号化した各MPEGフレーム(符号化フレーム)に、PTS(Presentartion Time Stamp)を付与する。PTSは、図示しないデコーダによる復号後に当該MPEGフレームを再生すべきタイミング(90kHzクロックのカウント値)を示すタイムススタンプである。映像パケット化部172は、映像の符号化フレームをTSパケットにパケット化する。 The video encoding unit 120 encodes the video of the SDI signal in units of GOPs to generate encoded frames. The video encoder 120 outputs the encoded frames to the video packetizer 172 . In this embodiment, the video encoding unit 120 encodes video according to MPEG-2, and gives each encoded MPEG frame (encoded frame) a PTS (Presentation Time Stamp). PTS is a time stamp indicating the timing (count value of 90 kHz clock) to reproduce the MPEG frame after decoding by a decoder (not shown). The video packetization unit 172 packetizes the encoded video frames into TS packets.

音声符号化部30は、SDI信号の音声を符号化して、音声パケット化部173に出力する。音声パケット化部173は、符号化された音声をTSパケットにパケット化する。 Audio encoding section 30 encodes the audio of the SDI signal and outputs it to audio packetizing section 173 . The audio packetization unit 173 packetizes the encoded audio into TS packets.

制御部160は、B39切換え信号を用いて、番組本編からCMへの切り替え位置の直後の符号化フレームのPTSを算出し、当該PTSを含むSCTE-35信号を生成する。このPTSを、以下「PTS2」とする。制御部160は、生成したSCTE-35信号をSCTE-35パケット化部171に出力する。SCTE-35パケット化部171は、SCTE-35信号をTSパケットにパケット化する。 Using the B39 switching signal, the control unit 160 calculates the PTS of the coded frame immediately after the switching position from the main program to the CM, and generates an SCTE-35 signal including the PTS. This PTS is hereinafter referred to as "PTS2". Control section 160 outputs the generated SCTE-35 signal to SCTE-35 packetization section 171 . The SCTE-35 packetizer 171 packetizes the SCTE-35 signal into TS packets.

具体的には、制御部160は、検出部140が検出したB39切換え信号のカウントダウンフレーム数を取得する。そして、制御部160は、B39切換え信号が検出された時点で符号化済みの最新の符号化フレームのPTSを映像符号化部120から取得する。このPTSを、以下「PTS1」(他のタイムスタンプ)とする。制御部160は、PTS1と、映像符号化部120による符号化処理時間と、B39切換え信号に含まれるカウントダウンフレーム数とを用いて、切り替え位置の直後の符号化フレームのPTS2を算出する。詳細については後述する
また、制御部160は、切り替え位置の直前の符号化フレームで、GOPを閉じるGOP制御指示(クローズ指示)を映像符号化部120に出力し、映像符号化部120に前記直前の符号化フレームでGOPを完成させる。映像符号化部120は、GOP制御指示にしたがって、CMが開始される直前の符号化フレーム(または番組本編が再開される直前の符号化フレーム)で、GOPが完結するように符号化を実施する。
Specifically, the control unit 160 acquires the countdown frame number of the B39 switching signal detected by the detection unit 140 . Then, the control unit 160 acquires the PTS of the latest encoded frame from the video encoding unit 120 when the B39 switching signal is detected. This PTS is hereinafter referred to as "PTS1" (another time stamp). The control unit 160 calculates the PTS2 of the encoded frame immediately after the switching position using the PTS1, the encoding processing time of the video encoding unit 120, and the countdown frame number included in the B39 switching signal. Further, the control unit 160 outputs a GOP control instruction (close instruction) to the video encoding unit 120 to close the GOP in the encoded frame immediately before the switching position, and sends the video encoding unit 120 the GOP control instruction (close instruction) to the video encoding unit 120 coded frames complete the GOP. In accordance with the GOP control instruction, the video encoding unit 120 performs encoding such that the GOP is completed with the encoded frame immediately before the CM starts (or the encoded frame immediately before the main part of the program is restarted). .

パケット化部170は、前述のとおり、B39切換え信号を補助データTSパケットにパケット化し、SCTE-35信号をSCTE-35TSパケットにパケット化し、映像符号化部120が符号化した符号化フレームを映像TSパケットにパケット化し、音声符号化部130が符号化した音声符号化フレームを音声TSパケットにパケット化する。 As described above, the packetization unit 170 packetizes the B39 switching signal into auxiliary data TS packets, packetizes the SCTE-35 signal into SCTE-35TS packets, and converts the encoded frames encoded by the video encoding unit 120 into video TS packets. The audio coded frame encoded by the audio encoding unit 130 is packetized into audio TS packets.

多重化部180は、補助データTSパケットと、SCTE-35TSパケットと、映像TSパケットと、音声TSパケットとを多重化して出力する。すなわち、多重化部180は、パケット化部170が出力する、これらのTSパケットに、PID(Program Identifier)を付与して多重化したTSパケットを出力する。 The multiplexer 180 multiplexes the auxiliary data TS packets, the SCTE-35 TS packets, the video TS packets, and the audio TS packets and outputs them. That is, the multiplexing unit 180 multiplexes the TS packets output from the packetizing unit 170 by adding PIDs (Program Identifiers) and outputs the multiplexed TS packets.

具体的には、多重化部180は、映像信号の一部を他の映像信号へ切り替える切り替え位置を、フレーム単位で指定するB39切換え信号と、前記映像信号のフレームを符号化した符号化フレームと、B39切換え信号が指定するフレームに対応する符号化フレームを、前記切り替え位置として指定するSCTE-35信号と、がTSパケットに格納されたTransport Streamを出力する。 Specifically, the multiplexing unit 180 uses a B39 switching signal that designates a switching position for switching a part of a video signal to another video signal on a frame-by-frame basis, and an encoded frame obtained by encoding the frame of the video signal. , the SCTE-35 signal designating the coded frame corresponding to the frame designated by the B39 switching signal as the switching position, and the Transport Stream stored in the TS packet.

<PTS2の算出>
図11を用いて、制御部160が行うPTS2の算出処理について説明する。
<Calculation of PTS2>
Calculation processing of PTS2 performed by the control unit 160 will be described with reference to FIG.

MPEG-2のPTSは、90kHzクロックのカウント値であり、1秒は90,000カウントに相当する。例えば、60fps(frames per second)のフレーム間隔のカウント値は次のようになる。 MPEG-2 PTS is the count value of the 90 kHz clock, and one second corresponds to 90,000 counts. For example, the count value of the frame interval of 60 fps (frames per second) is as follows.

フレーム間隔のカウント値=90,000/60=1,500
映像符号化部120に入力されたSDIフレームの映像は、所定の符号化処理時間を経てMPEGフレーム(符号化フレーム)として出力される。図11では、2フレーム分の2/60=約0.03秒の時間を、映像符号化処理時間として示す。また、図11に示すSDIフレーム列61の「SDIn」(SDIフレーム)が符号化されたものが、符号化フレーム列62の「MPEGn」(MPEGフレーム)に対応する。
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, 2/60 of two frames=approximately 0.03 seconds is shown as the video encoding processing time. 11 corresponds to "MPEGn" (MPEG frame) of the encoded frame sequence 62. FIG.

図11では、「SDI3」でB39切換え信号が検出され、CM開始までのカウントダウンフレーム数は60とする。「SDI3」でB39切換え信号が検出された時点で、最新のMPEGフレームは「MPEG1」であり、この「MPEG1」のPTSをPTS1とする。この場合、CMを開始させるべきMPEGフレーム(すなわち、PTS2を有するフレーム)は、「MPEG1」から2フレーム分の符号化処理時間後の「MPEG3」を起点として、カウントダウンフレーム数(60フレーム)の後の「MPEG63」となる。 In FIG. 11, it is assumed that the B39 switching signal is detected in "SDI3" and the number of countdown frames until the start of CM is 60. In FIG. When the B39 switching signal is detected in "SDI3", the latest MPEG frame is "MPEG1", and the PTS of "MPEG1" is PTS1. In this case, the MPEG frame (that is, the frame having PTS2) to start the CM is set after the countdown frame number (60 frames) starting from "MPEG3" after the encoding processing time of two frames from "MPEG1". "MPEG63".

したがって、図11に示すPTS2の算出式は、次の通りとなる。 Therefore, the calculation formula for PTS2 shown in FIG. 11 is as follows.

PTS2=PTS1+(符号化処理時間の換算値)+(カウントダウン時間の換算値)
(符号化処理時間の換算値)
=符号化処理時間(秒)×90,000
=符号化処理時間相当のフレーム数/フレーム周波数×90,000
(カウントダウン時間の換算値)
=カウントダウンフレーム数相当の時間×90,000
=カウントダウンフレーム数/フレーム周波数×90,000
図示する例では、PTS2は以下の通りとなる。
PTS2 = PTS1 + (converted value of encoding processing time) + (converted value of countdown time)
(Converted 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
(conversion value of countdown time)
= time equivalent to the number of countdown frames x 90,000
= number of countdown frames/frame frequency x 90,000
In the illustrated example, PTS2 is as follows.

PTS2=PTS1+(2/60×90,000)+(60/60×90,000)
ここでは、番組本編からCMに切り替わる場合について説明したが、制御部160は、CMから番組本編に切り替わる場合も、同様にPTS2を算出する。
PTS2 = PTS1 + (2/60 x 90,000) + (60/60 x 90,000)
Here, the case of switching from the main part of the program to the CM has been described, but the control unit 160 similarly calculates PTS2 when switching from the CM to the main part of the program.

<GOPクローズ処理>
図12を参照して、オープンGOPとクローズドGOPについて説明する。GOPにはGOP間でフレーム参照するオープンGOPと、GOP間でフレーム参照がないクローズドGOPがある。
<GOP close processing>
An open GOP and a closed GOP will be described with reference to FIG. GOPs include open GOPs that refer to frames between GOPs and closed GOPs that do not refer to frames between GOPs.

オープンGOPは、直前のGOPの最後のPフレームを参照する、1つまたは複数のBフレームから開始されるGOPである。クローズドGOPは、直前のGOP内のフレームを参照しないIフレームから開始されるGOPである。オープンGOPとクローズドGOPでは、サイズが同じ場合、オープンGOPで符号化・圧縮する方がやや効率的であり、通常はオープンGOPで映像が符号化される。 An open GOP is a GOP that starts with one or more B-frames that reference the last P-frame of the immediately preceding GOP. A closed GOP is a GOP that starts with an I-frame that does not reference frames in the immediately preceding GOP. If the size of an open GOP and a closed GOP are the same, it is slightly more efficient to encode and compress using the open GOP, and usually the video is encoded using the open GOP.

しかし、SCTE-35信号でSDIフレームの映像を切換える場合、例えば番組本編とCMとの間ではフレーム間参照符号化は行われない。このため、番組本編の最後のGOPとCMの最初のGOPは、クローズドGOPとする必要がある。制御部160は、映像符号化部120にGOP制御指示を出力することで、所定のGOPをクローズドGOPにする。 However, when the SCTE-35 signal is used to switch SDI frame video, inter-frame reference encoding is not performed between, for example, the main part of the program and CM. Therefore, the last GOP of the main part of the program and the first GOP of the CM must be closed GOPs. By outputting a GOP control instruction to the video encoding unit 120, the control unit 160 changes a predetermined GOP into a closed GOP.

<符号化装置の制御方法>
図13は、符号化装置100の制御方法を示すフローチャートである。図14は、図13の処理と、フレームの位置関係を示したものである。図13および図14を参照して符号化装置100の制御方法について詳しく説明する。
<Method of Controlling Encoding Device>
FIG. 13 is a flow chart showing a control method of the encoding device 100. As shown in FIG. FIG. 14 shows the processing of FIG. 13 and the positional relationship of frames. A control method of the encoding device 100 will be described in detail with reference to FIGS. 13 and 14. FIG.

検出部140は、メディア分離部110で分離された補助データの中からB39切換え信号を検出し(ステップS1)、B39切換え信号に含まれるカウントダウンフレーム数を取得する(ステップS2)。検出部140は、取得したカウントダウンフレーム数を制御部160に出力する。 The detection unit 140 detects the B39 switching signal from the auxiliary data separated by the media separation unit 110 (step S1), and obtains the number of countdown frames included in the B39 switching signal (step S2). The detection unit 140 outputs the obtained number of countdown frames to the control unit 160 .

なお、検出部140が検出するB39切換え信号は、カウントダウンフレーム数に初期値が設定された最初のB39切換え信号を意味する。図14に示す例では、検出部140は、「SDI16」のB39切換え信号(カウントダウンフレーム数:60)を検出する。前述の通り、B39切換え信号は、当該信号が属するSDIフレームから何フレーム後にCMを開始(または番組本編を再開)すべきかをカウントダウンフレーム数により指示する制御信号である。 The B39 switching signal detected by the detection unit 140 means the first B39 switching signal in which the initial value is set to the number of countdown frames. In the example shown in FIG. 14, the detection unit 140 detects the B39 switching signal (number of countdown frames: 60) of "SDI16". As described above, the B39 switching signal is a control signal that indicates how many frames after the SDI frame to which the signal belongs should start the CM (or restart the main part of the program) by the number of countdown frames.

制御部160は、検出部140からカウントダウンフレーム数を取得すると、映像符号化部120から最新の符号化済みMPEGフレームのPTS1を取得する(ステップS3)。すなわち、制御部160は、現時点における最新のMPEGフレームのPTS1を取得する。図14では、制御部160は、「MPEG14」のPTS1を取得する。 After acquiring the countdown frame number from the detection unit 140, the control unit 160 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 present time. In FIG. 14, the control unit 160 acquires the PTS1 of "MPEG14".

制御部160は、PTS1と、カウントダウンフレーム数と、SDIフレームをMPEGフレームに符号化する符号化処理時間とを用いて、CMが開始されるMPEGフレームのPTS2を算出する(ステップS4)。PTS2の算出方法は前述の通りである。具体的には、制御部160は、PTS1に、符号化処理時間の換算値と、カウントダウン時間の換算値とを加算して、PTS2を算出する。図14の例では、制御部160は、「MPEG76」のPTS2を算出する。 The control unit 160 calculates the PTS2 of the MPEG frame at which the CM starts, using the PTS1, the number of countdown frames, and the encoding processing time for encoding the SDI frame into the MPEG frame (step S4). The calculation method of PTS2 is as described above. Specifically, the control unit 160 adds the conversion value of the encoding processing time and the conversion value of the countdown time to PTS1 to calculate PTS2. In the example of FIG. 14, the control unit 160 calculates the PTS2 of "MPEG76".

制御部160は、PTS2の算出後、CMへの切り替え位置直前のGOPの符号化処理を開始する前に、前記直前のGOPをクローズドGOPにするGOP制御指示を、映像符号化部120に出力する(ステップS5)。GOP制御指示は、切り替え位置直前のMPEGフレームでGOPを閉じて、当該GOPをクローズドGOPにする指示である。映像符号化部20は、GOP制御指示にしたがって、CMが開始(または番組本編が再開)される切り替え位置の直前のフレームでGOPが完成されるように符号化を実施する。GOP制御指示には、切り替え位置の直後のフレームを含むGOPも、クローズドGOPにする指示が含まれる。 After calculating PTS2, the control unit 160 outputs to the video encoding unit 120 a GOP control instruction to make the preceding GOP a closed GOP before starting the encoding processing of the GOP immediately before the switching position to CM. (Step S5). The GOP control instruction is an instruction to close the GOP at the MPEG frame immediately before the switching position to make the GOP a closed GOP. The video encoding unit 20 performs encoding such that the GOP is completed at the frame immediately before the switching position where the CM starts (or the main part of the program is restarted) according to the GOP control instruction. The GOP control instruction includes an instruction to make the GOP including the frame immediately after the switching position also a closed GOP.

図14の例では、制御部160は、CMが開始される「MPEG76」の直前のGOP72をクローズドGOPとするGOP制御指示を映像符号化部120に出力する。また、制御部160は、このGOP72の符号化が開始される前に、GOP制御指示を映像符号化部120に出力する。ここでは、映像符号化部120がGOP71を符号化している間に、制御部160はGOP制御指示を出力する。また、GOP制御指示には、CM開始後の最初のGOP73もクローズドGOPにする指示が含まれる。 In the example of FIG. 14 , the control unit 160 outputs to the video encoding unit 120 a GOP control instruction to set the GOP 72 immediately before “MPEG76” where the CM starts as a closed GOP. Also, the control unit 160 outputs a GOP control instruction to the video encoding unit 120 before encoding of this GOP 72 is started. Here, while the video encoding unit 120 is encoding the GOP 71, the control unit 160 outputs the GOP control instruction. The GOP control instruction also includes an instruction to make the first GOP 73 after the start of the CM a closed GOP.

なお、図14では、クローズドGOP72のフレーム数を、通常の15フレームとしているが、「MPEG75」でGOPを強制的に閉じるため、クローズドGOP72は、15フレームより少ないフレーム数となる場合がある。 In FIG. 14, the number of frames of the closed GOP 72 is the usual 15 frames, but since the GOP is forcibly closed by "MPEG75", the number of frames of the closed GOP 72 may be less than 15 frames.

制御部160は、算出したPTS2含むSCTE-35信号を生成し、当該SCTE-35信号を、SCTE-35パケット化部171に出力する(ステップS6)。ステップS6は、ステップS5の前に行ってもよい。 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.

以上、図13、図14を用いて番組本編からCMに切り替わる場合について説明したが、CMから番組本編に切り替わる場合も、同様である。 The case of switching from the main part of the program to the CM has been described above with reference to FIGS.

<変形例>
図15は、本実施形態の変形例の符号化装置100Aの機能構成例を示すブロック図である。変形例の符号化装置100Aは、制御部160Aおよび音声符号化部130Aが、図10に示す実施形態の制御部160および音声符号化部130と異なり、それ以外は、実施形態の符号化装置100と同様である。
<Modification>
FIG. 15 is a block diagram showing a functional configuration example of an encoding device 100A according to a modification of this embodiment. A coding device 100A of the modification differs from the control unit 160 and the speech coding unit 130 of the embodiment shown in FIG. is similar to

変形例の制御部160Aおよび音声符号化部130Aは、実施形態の制御部160および音声符号化部130の機能に加え、以下の機能をさらに有する。すなわち、制御部160Aは、切り替え位置の直前の所定時間の音声を無音とするミュート指示を、音声符号化部130Aに出力し、音声符号化部130Aは、ミュート指示にしたがって無音化した音声を符号化する。 In addition to the functions of the control unit 160 and the audio encoding unit 130 of the embodiment, the control unit 160A and the audio encoding unit 130A of the modified example further have the following functions. That is, control unit 160A outputs to audio encoding unit 130A a mute instruction to silence the audio for a predetermined time period immediately before the switching position, and audio encoding unit 130A encodes the silenced audio according to the mute instruction. become

図16を参照し、符号化前の映像および音声と、符号化後の映像および音声について説明する。符号化前のSDI信号では、SDI映像信号と、対応するSDI音声信号とは、同じSDIフレームに格納される。 Video and audio before encoding and video and audio after encoding will be described with reference to FIG. In the SDI signal before encoding, the SDI video signal and the corresponding SDI audio signal are stored in the same SDI frame.

一方、SDI映像信号を符号化したMPEGフレーム(30fpsの場合、約33ms)と、SDI音声信号を符号化したAACフレーム(1フレームのサンプル数1,024の場合、約21ms)は、長さが異なる。このため、MPEGフレームの境目とAACフレームとの境目は、一般に一致しない。したがって、番組本編とCMの境目では、番組本編の音声とCMの音声の両方を含んだAACフレームが生成されることになる。番組本編の音声とCMの音声は、一般に、異なる音声の波であるため、これを連続する一つの波としてつなぎ合わせて符号化されると、雑音が発生する可能性がある。 On the other hand, an MPEG frame (approximately 33 ms at 30 fps) encoded with an SDI video signal and an AAC frame (approximately 21 ms at 1,024 samples per frame) encoded with an SDI audio signal have lengths of different. For this reason, the boundaries between MPEG frames and AAC frames generally do not match. Therefore, at the boundary between the main part of the program and the CM, an AAC frame containing both the audio of the main part of the program and the audio of the CM is generated. Since the sound of the main part of the program and the sound of the CM are generally different sound waves, noise may be generated if these waves are combined and encoded as one continuous wave.

そこで、変形例の制御部160Aは、番組本編とCMの切り替え位置の直前の所定時間のSDI音声信号を、無音とするミュート指示を音声符号化部130に出力する。音声符号化部130は、ミュート指示にしたがって、切り替え位置直前の所定時間のSDI音声信号を無音とし、無音としたSDI音声信号をAACで符号化する。これにより、変形例では、番組本編の音声とCMの音声の両方を含むAACフレームの生成を回避し、切替え時に雑音が発生しないようにすることができる。 Therefore, the control unit 160A of the modified example outputs a mute instruction to the audio encoding unit 130 to silence the SDI audio signal for a predetermined time period immediately before the switching position between the main program and the CM. In accordance with the mute instruction, audio encoding section 130 silences the SDI audio signal for a predetermined time immediately before the switching position, and encodes the silenced SDI audio signal with AAC. As a result, in the modified example, it is possible to avoid generation of an AAC frame containing both the main program audio and the CM audio, thereby preventing noise from occurring at the time of switching.

図17に、番組本編とCMとの切り替え位置直前の500msを、無音化し符号化する例を示す。制御部160Aは、算出したPTS2(切り替え位置)の500ms前(PTSに換算すると45,000前)の位置で音声符号化部130にミュート開始を指示し、PTS2でミュート停止を指示する。あるいは、制御部160Aは、(PTS2-45,000)から500ms間、SDI信号をミュートさせるミュート指示を、音声符号化部130に出力してもよい。 FIG. 17 shows an example in which 500 ms immediately before the switching point between the main part of the program and the CM is muted and encoded. The control unit 160A instructs the audio encoding unit 130 to start muting at a position 500 ms before the calculated PTS2 (switching position) (45,000 in terms of PTS), and to stop muting at PTS2. Alternatively, control section 160A may output to audio encoding section 130 a mute instruction to mute the SDI signal for 500 ms from (PTS2-45,000).

音声符号化部130は、メディア分離部110から入力されたSDI音声信号を、ミュート指示にしたがって無音化し、無音化したSDI音声信号をAACで符号化する。これにより、番組本編の音声とCMの音声の両方を含むAACフレームが生成されてしまうことを回避し、切替え時に発生する雑音を抑制することができる。 Audio encoding section 130 silences the SDI audio signal input from media separation section 110 according to the mute instruction, and encodes the silenced SDI audio signal using AAC. As a result, it is possible to avoid generation of an AAC frame containing both the main program audio and the CM audio, thereby suppressing noise that occurs at the time of switching.

<本実施形態の効果>
以上説明したように、本実施形態の符号化装置100は、映像信号の一部を他の映像信号へ切り替える切り替え位置を、フレーム単位で指定するB39切換え信号(第1制御信号)を検出する検出部140と、前記映像信号の映像を、GOP(フレームグループ)単位に符号化して符号化フレームを生成する映像符号化部120と、B39切換え信号を用いて、前記切り替え位置の直後の符号化フレームのPTS2(タイムスタンプ)を算出し、前記PTS2を含むSCTE-35信号(第2制御信号)を生成する制御部160と、を備え、前記制御部160は、前記切り替え位置の直前の符号化フレームで、GOPを閉じるGOP制御指示(クローズ指示)を前記映像符号化部120に出力し、前記映像符号化部120に前記直前の符号化フレームでGOPを完成させる。
<Effects of this embodiment>
As described above, the encoding device 100 of the present embodiment detects a B39 switching signal (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. a video encoding unit 120 that encodes the video of the video signal in GOP (frame group) units to generate an encoded frame; and a control unit 160 that calculates the PTS2 (time stamp) of the PTS2 and generates an SCTE-35 signal (second control signal) containing the PTS2, and the control unit 160 calculates the encoded frame immediately before the switching position. , a GOP control instruction (close instruction) for closing the GOP is output to the video encoding unit 120, and the video encoding unit 120 completes the GOP with the previous encoded frame.

このように、本実施形態では、符号化された映像信号の一部を、復号することなく他の映像信号に切り替えて、画質の劣化を回避することができる。具体的には、映像信号の切り替え位置をフレーム単位で指定するB39切換え信号から、SCTE-35信号を生成することで、ARIB方式に準拠した既存の映像信号に対して、GOP単位で映像信号を切り替えるSCTE方式を容易に適用することができる。例えば、キー局で符号化された番組を、復号することなく地方局のCMに差し替えることができ、復号および符号化を繰り返すことによる画質の劣化を防ぐことができる。 As described above, in this embodiment, it is possible to avoid deterioration of image quality by switching a part of the encoded video signal to another video signal without decoding. Specifically, by generating an SCTE-35 signal from the B39 switching signal that specifies the switching position of the video signal on a frame-by-frame basis, it is possible to convert the existing video signal conforming to the ARIB format into GOP units. A switched SCTE scheme can be easily applied. For example, a program encoded by a key station can be replaced with a commercial of a local station without decoding, and image quality degradation due to repeated decoding and encoding can be prevented.

また、本実施形態では、映像信号の切り替え位置の直前の符号化フレームでGOPを閉じる。具体的には、番組本編とCMとの境界がGOPの境界となるように、SDIフレームをMPEGフレームに符号化する。このため、切り替え時で映像が乱れることなく適切な映像を再生することができる。 Further, in this embodiment, the GOP is closed at the encoded frame immediately before the switching position of the video signal. Specifically, the SDI frame is encoded into the MPEG frame so that the boundary between the main part of the program and the CM becomes the boundary of the GOP. Therefore, an appropriate image can be reproduced without disturbing the image at the time of switching.

また、本実施形態では、SCTE-35信号含むTSパケットと、B39切換え信号を含むTSパケットの両方を出力する。これにより、SCTE-35信号を処理できる地方局では、符号化された映像を復号することなくCMの差し替えが可能となり、画質の劣化を回避することができる。一方、SCTE-35信号が処理できない地方局では、今まで通りB39切換え信号を用いてCMの差し替えを実施することができる。すなわち、本実施形態の符号化装置100は、SCTE-35信号を処理可能な地方局およびSCTE-35信号を処理できない地方局の両方に対応することができる。 Also, in this embodiment, both TS packets containing SCTE-35 signals and TS packets containing B39 switching signals are output. As a result, local stations capable of processing SCTE-35 signals can replace CMs without decoding encoded video, thereby avoiding deterioration of image quality. On the other hand, local stations that cannot process SCTE-35 signals can still perform CM replacement using B39 switching signals. That is, the encoding apparatus 100 of this embodiment can support both local stations that can process SCTE-35 signals and local stations that cannot process SCTE-35 signals.

また、変形例の符号化装置100Aでは、映像信号の切り替え位置の直前の所定時間の音声を無音とし、無音化した音声を符号化する。これにより、切り替え前の映像信号(番組本編)の音声と、切り替え後の映像信号(CM)の音声の両方を含む音声符号化フレーム(AACフレーム)の生成を回避し、切り替え時に発生する雑音を抑制することができる。 Further, in the encoding device 100A of the modified example, the audio for a predetermined time period immediately before the switching position of the video signal is silenced, and the silenced audio is encoded. This prevents the generation of audio-encoded frames (AAC frames) that include both the audio of the video signal (main program) before switching and the audio of the video signal (CM) after switching, thereby reducing the noise that occurs during switching. can be suppressed.

<ハードウェア構成>
上記説明した符号化装置100、100Aには、汎用的なコンピュータシステムを用いることができる。コンピュータシステムは、例えば、CPU(Central Processing Unit、プロセッサ)と、メモリと、ストレージ(HDD:Hard Disk Drive、SSD:Solid State Drive)と、通信装置と、入力装置と、出力装置とを備える。メモリおよびストレージは、記憶装置である。このコンピュータシステムにおいて、CPUがメモリ上にロードされた所定のプログラムを実行することにより、符号化装置100、100Aの各機能が実現される。
<Hardware configuration>
A general-purpose computer system can be used for the encoding devices 100 and 100A described above. A computer system includes, for example, a CPU (Central Processing Unit, processor), a memory, a storage (HDD: Hard Disk Drive, SSD: Solid State Drive), a communication device, an input device, and an output device. Memory and storage are storage devices. In this computer system, each function of the encoding devices 100 and 100A is realized by the CPU executing a predetermined program loaded on the memory.

また、符号化装置100、100Aは、1つのコンピュータで実装されてもよく、あるいは複数のコンピュータで実装されても良い。また、符号化装置100、100Aは、コンピュータに実装される仮想マシンであっても良い。符号化装置100、100A用のプログラムは、HDD、SSD、USB(Universal Serial Bus)メモリ、CD (Compact Disc)、DVD (Digital Versatile Disc)などのコンピュータ読取り可能な記録媒体に記憶することも、ネットワークを介して配信することもできる。 Also, the encoding devices 100 and 100A may be implemented by one computer, or may be implemented by a plurality of computers. Also, the encoding devices 100 and 100A may be virtual machines implemented in computers. Programs for the encoding devices 100 and 100A can be stored in computer-readable recording media such as HDDs, SSDs, USB (Universal Serial Bus) memories, CDs (Compact Discs), and DVDs (Digital Versatile Discs). It can also be delivered via

なお、本発明は上記実施形態および変形例に限定されるものではなく、その要旨の範囲内で数々の変形が可能である。 It should be noted that the present invention is not limited to the above embodiments and modified examples, and many modifications are possible within the scope of the gist of the present invention.

例えば、上記の実施形態では、番組本編の一部をキー局のCMに置き換え、さらに当該CMを地方局の別のCMに置き換える例で説明したが、置き換えるコンテンツはCM以外のコンテンツでもよい。また、置き換えられるコンテンツは、テレビ番組以外のコンテンツであってもよい。 For example, in the above embodiment, a part of the main program is replaced with a CM of a key station, and the CM is replaced with another CM of a local station. Also, the content to be replaced may be content other than television programs.

また、上記の実施形態では、B39切換え信号にカウントダウンフレーム数が含まれる場合を例として説明したが、本発明はこれに限定されない。B39切換え信号にカウントダウンフレーム数が含まれない場合は、予め設定されたプリロール値(一定の時間)を用いてコンテンツの切り替えの位置(切り替えタイミング)を示すようにしても良い。すなわち、制御部160は、検出部140によるB39切換え信号の検出から一定時間の経過後をPTS2として算出し、当該PTS2を含むSCTE-35信号を生成してもよい。 Further, in the above embodiment, the case where the number of countdown frames is included in the B39 switching signal has been described as an example, but the present invention is not limited to this. If the B39 switching signal does not include the number of countdown frames, a preset preroll value (fixed time) may be used to indicate the content switching position (switching timing). That is, the control unit 160 may calculate the PTS2 after a certain period of time has elapsed since the detection of the B39 switching signal by the detection unit 140, and generate the SCTE-35 signal including the PTS2.

また、上記の実施形態では、SDI信号の映像はMPEG-2で、音声はAACで符号化する例で説明したが、本発明はこれに限定されない。PTSを利用する映像符号化方法であればAVC、HEVC等の符号化を用いてもよい。音声符号化も任意の符号化方法を用いてもよい。 Further, in the above embodiment, the video of the SDI signal is encoded by MPEG-2, and the audio is encoded by AAC. However, the present invention is not limited to this. As long as it is a video encoding method using PTS, encoding such as AVC and HEVC may be used. Any coding method may also be used for audio coding.

また、上記の実施形態では、SCTE-35信号を含むTSを地方局へ配信し、当該SCTE-35信号を地方局でCMを差し替えるのに利用したが、本発明はこれに限定されない。例えば、SCTE-35信号を含むTSを、ネット配信で利用することもできる。この場合、SCTE-35信号を用いることで、コンテンツプロバイダ毎にCMを差し替えることができる。TSは、ネット配信用にアダプティブ・ビットレートにトランスコードしておいても良い。 Moreover, in the above embodiment, the TS including the SCTE-35 signal is distributed to the local station and the SCTE-35 signal is used to replace the CM at the local station, but the present invention is not limited to this. For example, a TS containing SCTE-35 signals may be used for net distribution. In this case, by using the SCTE-35 signal, CM can be replaced for each content provider. The TS may have been transcoded to adaptive bitrate for net distribution.

また、上記の実施形態では、B39切換え信号に基づいて生成したSCTE-35信号はSCTE-35パケット化部171でSCTE-35信号のTSパケットに格納した。しかし、SCTE-35信号は補助データの一部として、補助データパケット化部174でTSパケットに格納しても良い。
すなわち、補助データパケット化部174は、B39切換え信号とSCTE-35信号とを、TSパケットにパケット化しても良い。
Further, in the above embodiment, the SCTE-35 signal generated based on the B39 switching signal is stored in the TS packet of the SCTE-35 signal by the SCTE-35 packetizer 171 . However, the SCTE-35 signal may be stored in a TS packet 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.

100、100A:符号化装置
110:メディア分離部
120:映像符号化部
130:音声符号化部
140:検出部
160:制御部
170:パケット化部
171:SCTE-35パケット化部
172:映像パケット化部
173:音声パケット化部
174:補助データパケット化部
180:多重化部
11 :カメラ
12 :B39設定装置
13、22:スイッチ
15、24、32:キー局CMサーバ
21 :デコーダ
23 :エンコーダ
31 :編集装置
100, 100A: encoding device 110: media separation unit 120: video encoding unit 130: audio encoding unit 140: detection unit 160: control unit 170: packetization unit 171: SCTE-35 packetization unit 172: video packetization Unit 173: Audio packetization unit 174: Auxiliary data packetization unit 180: Multiplexing unit 11: Camera 12: B39 setting device 13, 22: Switch 15, 24, 32: Key station CM server 21: Decoder 23: Encoder 31: editing device

Claims (9)

映像信号の一部を他の映像信号へ切り替える切り替え位置を、フレーム単位で指定する第1制御信号を検出する検出部と、
前記映像信号の映像を、フレームグループ単位に符号化して符号化フレームを生成する映像符号化部と、
前記第1制御信号を用いて、前記切り替え位置の直後の符号化フレームのタイムスタンプを算出し、前記タイムスタンプを含む第2制御信号を生成する制御部と、を備え、
前記制御部は、前記切り替え位置の直前の符号化フレームで、フレームグループを閉じるクローズ指示を前記映像符号化部に出力し、前記映像符号化部に前記直前の符号化フレームでフレームグループを完成させること
を特徴とする符号化装置。
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 on a frame-by-frame basis;
a video encoding unit that encodes the video of the video signal in units of frame groups to generate encoded frames;
a control unit that uses the first control signal to calculate the time stamp of the encoded frame immediately after the switching position and generates a second control signal including the time stamp;
The control unit outputs a close instruction to the video encoding unit to close the frame group at the encoded frame immediately before the switching position, and instructs the video encoding unit to complete the frame group at the encoded frame immediately before the switching position. An encoding device characterized by:
前記制御部は、
前記第1制御信号が検出された時点で最新の符号化フレームの他のタイムスタンプを前記映像符号化部から取得し、
前記他のタイムスタンプと、前記映像符号化部による符号化処理時間と、前記第1制御信号に含まれる切り替えまでのフレーム数とを用いて、前記切り替え位置の直後の符号化フレームのタイムスタンプを算出すること
を特徴とする請求項1に記載の符号化装置。
The control unit
Obtaining from the video encoding unit another time stamp of the latest encoded frame when the first control signal is detected;
Using the other time stamp, the encoding processing time by the video encoding unit, and the number of frames until switching included in the first control signal, the time stamp of the encoded frame immediately after the switching position is calculated. 2. The encoding device according to claim 1, wherein:
前記映像信号の音声を符号化する音声符号化部を備え、
前記制御部は、前記切り替え位置の直前の所定時間の音声を無音とするミュート指示を、前記音声符号化部に出力し、
前記音声符号化部は、前記ミュート指示にしたがって無音化した音声を符号化すること
を特徴とする請求項1または2に記載の符号化装置。
An audio encoding unit that encodes the audio of the video signal,
The control unit outputs to the audio encoding unit a mute instruction to mute audio for a predetermined time period immediately before the switching position,
3. The encoding device according to claim 1, wherein the audio encoding unit encodes the silenced audio according to the mute instruction.
前記第1制御信号を第1TS(Transport Stream)パケットにパケット化し、前記第2制御信号を第2TSパケットにパケット化し、前記映像符号化部が符号化した符号化フレームを第3TSパケットにパケット化するパケット化部と、
前記第1TSパケットと、前記第2TSパケットと、前記第3TSパケットとを多重化して出力する多重化部を備えること
を特徴とする請求項1から3のいずれか1項に記載の符号化装置。
The first control signal is packetized into first TS (Transport Stream) packets, the second control signal is packetized into second TS packets, and the encoded frame encoded by the video encoding unit is packetized into third TS packets. a packetizer;
The encoding apparatus according to any one of claims 1 to 3, further comprising a multiplexing unit that multiplexes and outputs the first TS packet, the second TS packet, and the third TS packet.
前記第1制御信号と第2制御信号とを第1TS(Transport Stream)パケットにパケット化し、前記映像符号化部が符号化した符号化フレームを第2TSパケットにパケット化するパケット化部と、
前記第1TSパケットと、前記第2TSパケットとを多重化して出力する多重化部を備えること
を特徴とする請求項1から3のいずれか1項に記載の符号化装置。
a packetization unit that packetizes the first control signal and the second control signal into first TS (Transport Stream) packets, and packetizes the encoded frame encoded by the video encoding unit into second TS packets;
The encoding apparatus according to any one of claims 1 to 3, further comprising a multiplexing unit that multiplexes and outputs the first TS packet and the second TS packet.
前記映像信号はテレビ番組であって、前記他の映像信号は広告であること
を特徴とする請求項1から5のいずれか1項に記載の符号化装置。
The encoding device according to any one of claims 1 to 5, wherein the video signal is a television program and the other video signal is an advertisement.
映像信号の一部を他の映像信号へ切り替える切り替え位置を、フレーム単位で指定する第1制御信号と、
前記映像信号のフレームを符号化した符号化フレームと、
前記第1制御信号が指定するフレームに対応する符号化フレームを、前記切り替え位置として指定する第2制御信号と、
がTSパケットに格納されたTransport Streamを出力する多重化部を備える
ことを特徴とする符号化装置。
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;
an encoded frame obtained by encoding a frame of the video signal;
a second control signal specifying, as the switching position, an encoded frame corresponding to the frame specified by the first control signal;
is provided with a multiplexer that outputs a Transport Stream stored in a TS packet.
符号化装置が行う制御方法であって、
映像信号の一部を他の映像信号へ切り替える切り替え位置を、フレーム単位で指定する第1制御信号を検出するステップと、
前記映像信号の映像を、フレームグループ単位に符号化して符号化フレームを生成するステップと、
前記第1制御信号を用いて、前記切り替え位置の直後の符号化フレームのタイムスタンプを算出し、前記タイムスタンプを含む第2制御信号を生成するステップと、
前記切り替え位置の直前の符号化フレームで、フレームグループを閉じるステップと、を行うこと
を特徴とする制御方法。
A control method performed by an encoding device,
a step of detecting a first control signal designating a switching position for switching a part of the video signal to another video signal on a frame-by-frame basis;
encoding the video of the video signal on a frame group basis to generate encoded frames;
calculating, using the first control signal, a time stamp of an encoded frame immediately following the switch position to generate a second control signal including the time stamp;
A control method, comprising: closing a frame group at an encoded frame immediately preceding said switch position.
請求項1から7のいずれか1項に記載の符号化装置として、コンピュータを機能させる制御プログラム。 A control program that causes a computer to function as the encoding device according to any one of claims 1 to 7.
JP2021206289A 2021-12-20 2021-12-20 Encoder, control method, and control program Pending JP2023091509A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021206289A JP2023091509A (en) 2021-12-20 2021-12-20 Encoder, control method, and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021206289A JP2023091509A (en) 2021-12-20 2021-12-20 Encoder, control method, and control program

Publications (1)

Publication Number Publication Date
JP2023091509A true JP2023091509A (en) 2023-06-30

Family

ID=86941962

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021206289A Pending JP2023091509A (en) 2021-12-20 2021-12-20 Encoder, control method, and control program

Country Status (1)

Country Link
JP (1) JP2023091509A (en)

Similar Documents

Publication Publication Date Title
US9426335B2 (en) Preserving synchronized playout of auxiliary audio transmission
KR101350754B1 (en) Method for reducing channel change times and synchronizing audio/video content during channel change
US8300667B2 (en) Buffer expansion and contraction over successive intervals for network devices
EP2227910B1 (en) Reducing media stream delay through independent decoder clocks
CN112369042B (en) Frame conversion for adaptive streaming alignment
JP4983923B2 (en) Decoder device and decoding method
CA2792106C (en) Method and system for inhibiting audio-video synchronization delay
JP2009521163A (en) Apparatus and method for processing a data stream
US7693398B2 (en) Digital information reproducing apparatus and method
US8331763B2 (en) Apparatus and method for synchronizing reproduction time of time-shifted content with reproduction time of real-time content
KR101142379B1 (en) Method and Apparatus of playing digital broadcasting and Method of recording digital broadcasting
JP5881219B2 (en) Receiver capable of channel change with a single decoder and method at the receiver
JP2023091509A (en) Encoder, control method, and control program
EP3360334B1 (en) Digital media splicing system and method
JP3792770B2 (en) Recording / playback device
TWI819580B (en) Media playback method for improving playback response based on pre-parsing operation and related media playback device
CN117061813A (en) Media playback method and related media playback device
JP2005252515A (en) Data distribution method
JP2011078068A (en) System for video transmission
JP2010172003A (en) Decoding and playback method and decoding and playback apparatus
JP2008010997A (en) Information processing apparatus and method, and semiconductor integrated circuit
KR20070064750A (en) Receiver and method for receiving digital broadcast

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240627