JP2011234068A - Video recording device and video recovery device - Google Patents
Video recording device and video recovery device Download PDFInfo
- Publication number
- JP2011234068A JP2011234068A JP2010101734A JP2010101734A JP2011234068A JP 2011234068 A JP2011234068 A JP 2011234068A JP 2010101734 A JP2010101734 A JP 2010101734A JP 2010101734 A JP2010101734 A JP 2010101734A JP 2011234068 A JP2011234068 A JP 2011234068A
- Authority
- JP
- Japan
- Prior art keywords
- index
- file
- video
- unit
- recording
- 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
Links
Images
Abstract
Description
本発明は、映像を記録する映像記録装置および記録した映像の復旧処理を行う映像復旧装置に関する。 The present invention relates to a video recording apparatus that records video and a video restoration apparatus that performs restoration processing of the recorded video.
従来、放送局の番組制作は、カメラレコーダを用いてテープに映像を記録し、テープを用いて編集やアーカイブを行っていた。近年、HDDやフラッシュメモリなどランダムアクセス可能な記録媒体に映像を記録するカメラレコーダが登場してきている。それにより、カメラレコーダで映像データをファイル形式で記録し、そのファイルをノンリニア編集機で編集するというスタイルが確立されてきている。 Conventionally, program production at a broadcasting station has recorded video on a tape using a camera recorder, and edited and archived using the tape. In recent years, camera recorders that record video on a randomly accessible recording medium such as an HDD or a flash memory have appeared. Accordingly, a style has been established in which video data is recorded in a file format with a camera recorder, and the file is edited with a non-linear editing machine.
記録媒体にファイルを記録するためには、記録媒体上のファイルを管理するためのファイルシステムと呼ばれるモジュールが用いられる。ファイルシステムの代表的なものにFAT(Standard ECMA−107: Volume and File Structure of Disk Cartridges for Information Interchange)がある。ファイルシステムの動作は複雑であるため、カメラレコーダにオペレーティングシステム(OS)を搭載して、ソフトウェアとしてファイルシステムを実装するのが一般的である。 In order to record a file on a recording medium, a module called a file system for managing files on the recording medium is used. A typical file system is FAT (Standard ECMA-107: Volume and File Structure of Disk Cartridges for Information Interchange). Since the operation of the file system is complicated, it is common to mount an operating system (OS) on the camera recorder and implement the file system as software.
ファイルシステムフォーマットの一例として、FATフォーマットを、図1を用いて説明する。図1のように、メモリカードやハードディスク等の物理ドライブ100は、通常、領域の先頭に置かれるマスターブートレコード102と1個以上の論理ドライブ101から構成される。1個の論理ドライブ101は、1種類のファイルシステムでフォーマットされる。FATフォーマットの場合、領域の先頭からパーティションブートセクタ103、ファイルアロケーションテーブル(FAT)104、FATのバックアップ104b、ルートディレクトリエントリ105というシステム領域が配置され、システム領域の後ろにユーザデータ領域106が配置される。パーティションブートセクタ103には、パーティションのセクタ数といったパーティションを起動するのに必要な情報が記録される。FAT104には、ファイルの記録情報が配置される。ユーザデータ領域106には、ファイルのデータ自体が置かれる。ファイルはクラスタと呼ばれる単位(通常4KB〜32KB)で記録される。
As an example of the file system format, the FAT format will be described with reference to FIG. As shown in FIG. 1, a
ルートディレクトリエントリ105には、ルートディレクトリに置かれているファイル又はフォルダの情報がエントリとして記録される。階層構造のディレクトリにおいて、全てのファイル及びディレクトリは、図2のような32バイトからなるディレクトリエントリ107として記録される。図2では、FLOWER02.AVIというファイル名を持つファイルのディレクトリエントリを示している。このようにFATフォーマットにおいては、ファイルはファイル名が8文字、拡張子が3文字の8.3形式で記録される。ディレクトリエントリ107には、ファイルのデータが置かれる先頭のクラスタ番号108が含まれる。この先頭のクラスタ番号108によりファイルのデータへのアクセスが可能となる。
In the
FAT104に配置されるファイルの記録情報について、図3を用いて説明する。FAT104は、ユーザデータ領域106上のクラスタを管理するためのテーブルである。FAT104には12ビットや16ビットといった単位でファイルの次のデータの存在するクラスタ番号を記録する。図3のように、ユーザデータ領域106に記録するファイル120を部分データ121に分けてクラスタ番号3、4、7のクラスタに記録する場合、FAT104にはクラスタを連結するための情報として、クラスタ番号3の位置に4を記録し、クラスタ番号4の位置に7を記録する。最後にクラスタ番号7の位置に終了マークを記録する。ファイル120における先頭のクラスタ番号3は、前述のようにファイル120のディレクトリエントリ107に記録される。
The recording information of the file arranged in the
カメラレコーダを用いて、映像ファイルを記録媒体に記録する場合、容量の観点から映像信号を圧縮して記録することが一般的である。映像データの圧縮符号化方式の代表的な規格の1つとして、MPEG2(Moving Picture Experts group 2)規格が知られている。MPEG映像データは、何フレームかのデータをまとめたGOP(Group of Picture)と呼ばれる単位で構成される。 When a video file is recorded on a recording medium using a camera recorder, the video signal is generally compressed and recorded from the viewpoint of capacity. The MPEG2 (Moving Picture Experts group 2) standard is known as one of the typical standards for video data compression coding. MPEG video data is composed of units called GOP (Group of Pictures), which is a collection of several frames of data.
1つのGOPには、予め定められた所定数の原画像をそれぞれ圧縮符号化して生成される画像データが含まれる。各画像データは、原画像の圧縮符号化方式によって、3つのピクチャタイプ、Iピクチャ(Intra−coded picture)、Pピクチャ(Predictive−coded picture)およびBピクチャ(Bidirectionally predictive−coded picture)に分類される。 One GOP includes image data generated by compressing and encoding a predetermined number of original images. Each image data is classified into three picture types, an I picture (Intra-coded picture), a P picture (Predictive-coded picture), and a B picture (Directive-predictive-coded picture) according to the compression coding method of the original picture. .
Iピクチャは、イントラ符号化画像とも呼ばれ、原画像1枚の情報のみを用いて符号化される。したがって、Iピクチャは、前後の他の画像データピクチャとは独立性を保っており、Iピクチャ自身のみで復号することが可能である。 An I picture is also called an intra-coded image, and is coded using only information of one original image. Therefore, the I picture is independent of the other image data pictures before and after it and can be decoded only by the I picture itself.
Pピクチャは、フレーム間順方向予測符号化画像とも呼ばれ、予測画像(差分を取る基準となる画像)として、時間的に前の既に復号されたIピクチャまたはPピクチャを使用するものであり、動き補償された予測画像との差分を符号化するものである。 The P picture is also called an interframe forward predictive encoded image, and uses a previously decoded I picture or P picture temporally before as a predicted image (an image serving as a reference for obtaining a difference), A difference from the motion compensated predicted image is encoded.
Bピクチャは、双方向予測符号化画像とも呼ばれ、IピクチャおよびPピクチャを先に処理した後に、その間に挿入される画像として符号化される。すなわち、Bピクチャは、予測画像として、時間的に前の既に復号されたIピクチャまたはPピクチャ、時間的に後の既に復号されたIピクチャまたはPピクチャ、ならびにこの両方から作られた補間画像の3種類を使用する。 The B picture is also called a bi-predictive encoded image, and is encoded as an image inserted between the I picture and the P picture after being processed first. That is, the B picture is a predicted image of an already decoded I picture or P picture earlier in time, an already decoded I picture or P picture later in time, and an interpolated image made from both. Three types are used.
MPEG2のストリームデータにおいて、GOPのアドレスをインデックスファイルとして作成しておくことで、GOPに対して直接アクセスすることが可能な技術が開示されている(特許文献1参照)。これにより、任意のGOPの先頭に飛ぶことができる。しかしながら、この手法はMPEG2のストリームデータとインデックスファイルとを対応付けて管理しなければならないため、管理が煩雑になるという問題がある。 A technique is disclosed that allows direct access to a GOP by creating the GOP address as an index file in MPEG2 stream data (see Patent Document 1). Thereby, it is possible to jump to the head of an arbitrary GOP. However, this method has a problem that management is complicated because MPEG2 stream data and index files must be managed in association with each other.
1フレームのデータ長を固定長にすることにより、インデックス情報を持たずにランダムアクセスを実現できる技術が開示されている(特許文献2参照)。しかしながら、不用なデータを挿入することになるので、無駄なデータ領域を消費してしまい、特にデータ領域が豊富にないリムーバブルディスクなどでは効率的な方法とはいえない。 A technique is disclosed in which random access can be realized without having index information by setting the data length of one frame to a fixed length (see Patent Document 2). However, since unnecessary data is inserted, useless data areas are consumed, and it is not an efficient method especially for a removable disk or the like having no abundant data areas.
フレームごとのランダムアクセスを実現するために、フレームごとのインデックス情報を映像データと同一のファイル内に配置できるようなファイルフォーマットが提案されている。そのひとつにMXF(Material Exchange Format、SMPTE 377M)がある。MXFは主にプロユースのデジタル映像や音声を扱うためのファイルフォーマットである。カメラレコーダで映像データをMXFで記録する場合、撮影前に記録時間を決定できないため、インデックス情報のデータサイズを事前に決定することができない。このような場合、インデックス情報は、ファイルの先頭(ヘッダ)ではなく、末尾(フッタ)に書くことが一般的である。 In order to realize random access for each frame, a file format has been proposed in which index information for each frame can be arranged in the same file as video data. One of them is MXF (Material Exchange Format, SMPTE 377M). MXF is a file format mainly for handling professional-use digital video and audio. When recording video data with MXF with a camera recorder, the recording time cannot be determined before shooting, and therefore the data size of the index information cannot be determined in advance. In such a case, the index information is generally written not at the beginning (header) but at the end (footer) of the file.
しかしながら、末尾に大きなデータを書くと記録停止時に時間がかかり、次の記録に迅速に入れないという問題がある。また、途中で電源が落ちたなど記録が正常に終了しなかった場合、インデックス情報が記録媒体上に残っていない。異常ファイルを復旧するには、映像データからインデックス情報を作成しなおす必要がある。この処理は容量の大きな映像データを読み込む必要があるので、完了までに多くの時間を費やしてしまう。 However, if a large amount of data is written at the end, there is a problem that it takes time to stop recording and it is not possible to quickly enter the next recording. In addition, when the recording is not normally completed, such as when the power is turned off halfway, the index information does not remain on the recording medium. To recover an abnormal file, it is necessary to recreate index information from the video data. This process needs to read a large amount of video data, and thus it takes a lot of time to complete.
上記課題に鑑み本発明は、フレームごとのインデックス情報と映像データを同一のファイル上に記録しつつ、記録終了の処理を高速化すること、障害発生時に迅速にインデックス情報を復旧すること、の2つを実現する機構を提供することを目的とする。 In view of the above-mentioned problems, the present invention is to increase the speed of the recording end process while recording the index information and video data for each frame on the same file, and to quickly restore the index information when a failure occurs. It aims at providing the mechanism which realizes one.
本発明の映像記録装置は、外部から入力される映像信号をフレーム間圧縮方式で符号化するエンコード部と、前記エンコード部でエンコードした映像データを記録媒体上に映像ファイルとして記録する映像書き出し部と、前記エンコード部でエンコードした映像データのインデックス情報を作成し、前記記録媒体上にインデックスファイルとして記録するインデックス記録部と、前記映像ファイルおよび前記インデックスファイルの前記記録媒体への記録後に、前記映像ファイルと前記インデックスファイルをひとつに合成するインデックス合成部と、を備える。 The video recording apparatus of the present invention includes an encoding unit that encodes an externally input video signal using an inter-frame compression method, a video writing unit that records video data encoded by the encoding unit on a recording medium as a video file, An index recording unit for creating index information of the video data encoded by the encoding unit and recording the index information on the recording medium as an index file; and after recording the video file and the index file on the recording medium, the video file And an index composition unit for synthesizing the index files into one.
記録終了時にファイルシステムを操作してインデックス情報を映像ファイルに合成することにより、インデックス情報を映像ファイルに追記する場合に比べ、ファイルへの書き込みを抑えることができるので、記録終了処理を短時間で終えることができる。さらに、記録途中で障害が発生し、記録が正常に完了しなかった場合に、インデックスファイルを頼りにして修復の処理を進めることができるので、修復処理を短時間で終えることができる。 By combining the index information with the video file by operating the file system at the end of recording, writing to the file can be suppressed compared to adding index information to the video file. Can finish. Further, when a failure occurs during recording and the recording is not completed normally, the repair process can be proceeded by relying on the index file, so that the repair process can be completed in a short time.
(実施の形態1)
本実施の形態では、映像ファイルのファイルフォーマットとしてMXFを例にとり、映像記録装置600および映像復旧装置1100を説明する。MXFはKLV(Key−Length−Value)と呼ぶデータ要素の集まりで構成されており、メタデータ、映像データなど、すべてのデータがKLV構造をとっている。KLV構造とは、その先頭から、キー(Key)、レングス(Length)、バリュー(Value)が順次配置された構造であり、キーには、バリューに配置されるデータがどのようなデータであるかを表す、SMPTE 298Mの規格に準拠した16バイトのラベルが配置される。レングスには、バリューに配置されるデータのデータ長(8バイト)がBER(Basic Encoding Rules:ISO/IEC882−1 ASN)によって配置される。バリューには、実データが配置される。
(Embodiment 1)
In the present embodiment, the
図4にMXFのファイルフォーマットを示す。先頭から、ファイルヘッダ(File Header)、ファイルボディ(File Body)、ファイルフッタ(File Footer)が順次配置されて構成される。 FIG. 4 shows the MXF file format. A file header (File Header), a file body (File Body), and a file footer (File Footer) are sequentially arranged from the top.
ファイルヘッダは、その先頭から、ヘッダパーティションパック(Header Partition Pack)、およびヘッダメタデータ(Header Metadata)が順次配置されて構成される。ヘッダパーティションパックには、ヘッダを特定するためのパターンや、ファイルボディに配置されるデータの形式、MXFファイルフォーマットであることを表す情報およびヘッダサイズ情報などが配置される。 The file header is configured by sequentially arranging a header partition pack (Header Partition Pack) and header metadata (Header Metadata) from the top. In the header partition pack, a pattern for specifying a header, a format of data arranged in a file body, information indicating an MXF file format, header size information, and the like are arranged.
ファイルボディは、ボディパーティションパック(Body Partition Pack)およびエッセンスコンテナ(Essence Container)が順次配置されて構成される。エッセンスコンテナには、画像データが配置されている。エッセンスコンテナもKLV構造であるため、キー、レングスの後にバリューとして画像データが配置される。 The file body is configured by sequentially arranging a body partition pack and an essence container. Image data is arranged in the essence container. Since the essence container also has a KLV structure, image data is arranged as a value after the key and length.
ファイルフッタには、フッタパーティションパック(Footer Partition Pack)およびインデックステーブル(Index Table)が順次配置されて構成される。インデックステーブルとは、画像データの位置を指し示すデータが格納されており、詳しくは図5(c)にて後述する。 In the file footer, a footer partition pack (Footer Partition Pack) and an index table (Index Table) are sequentially arranged. The index table stores data indicating the position of image data, and will be described in detail later with reference to FIG.
図5(a)は各画像の表示順番を表している。数字の部分が表示の順番、アルファベット(I、B、P)がピクチャタイプを示しており、B1、I2、B3、P4、B5、P6の順番に表示されることを示している。図5(b)は図5(a)の映像がファイル上どのように格納されるかを示している。Bピクチャをデコードするためには、その予測画像であるIピクチャまたはPピクチャを事前にデコードしておく必要がある。そのため、ファイルの先頭から順次データを読み出してデコードすることができるようにするために、表示の順番とは別の順番で画像を記録している。たとえば、B1はI2を用いてデコードされるため、I2、B1の順番でファイル上には記録される。同様にB3よりもP4のほうが前方に、B5よりP6が前方に配置される。よって、記録順としては、I2、B1、P4、B3、P6、B5となる。 FIG. 5A shows the display order of each image. The numerical part indicates the display order, and the alphabet (I, B, P) indicates the picture type, indicating that the display is performed in the order of B1, I2, B3, P4, B5, P6. FIG. 5B shows how the video of FIG. 5A is stored on the file. In order to decode a B picture, it is necessary to decode an I picture or a P picture that is the predicted picture in advance. Therefore, images are recorded in an order different from the display order so that data can be read and decoded sequentially from the beginning of the file. For example, since B1 is decoded using I2, it is recorded on the file in the order of I2 and B1. Similarly, P4 is disposed forward of B3 and P6 is disposed forward of B5. Therefore, the recording order is I2, B1, P4, B3, P6, and B5.
図5(c)はMXFのインデックステーブルの詳細である。Temporal Offsetとは表示順から記録順への変換を表すものである。1フレーム目のフレームB1は、表示のフレーム番号1にTemporal Offsetの1を加算した2フレーム目のデータとしてファイルに格納されていることがわかる。同様にI2は、表示のフレーム番号2にTemporal Offsetの−1を加算した1フレーム目のデータとしてファイルに格納されていることがわかる。Key−Frame Offsetとは当該フレームをデコードするためにどのフレームからデコードする必要があるかを示す情報であり、通常Iピクチャを参照している。たとえば、B3をデコードするためには、表示のフレーム番号3からKey−Frame Offsetの−1を加算した2番目のフレーム(I2)からデコードする必要があることを示している。Flagsとは先述のピクチャタイプである。Stream Offsetはファイル上のどの位置にフレームが格納されているかを表す情報である。この情報は記録順フレーム番号に基づいて記録されている。たとえば、B3が格納されているバイトオフセットを求める場合、表示順のフレーム番号3にTemporal Offsetの1を加算した記録のフレーム番号4を求め、4フレーム目のStream Offsetからバイトオフセット65,000バイトを求める。任意位置のフレームを出力するためには、キーフレームから出力画像までをデコードすればよい。たとえば、B3を出力するためには、表示のフレーム番号3にKey−Frame Offsetの−1を加算して表示のフレーム番号2(I2)を求め、前述のようにTemporal Offset、Stream OffsetからI2のバイトオフセット0を求める。次にTemporal Offset、Stream OffsetからB3のバイトオフセット65,000バイトを求める。これらの2つのバイトオフセットの情報から、0バイト目から65,000バイト目のピクチャを読み込むことで、I2、B1、P4、B3の順番でデコードを行い、B3を出力することができる。
FIG. 5C shows details of the MXF index table. “Temporal Offset” represents conversion from display order to recording order. It can be seen that the frame B1 of the first frame is stored in the file as data of the second frame obtained by adding 1 of Temporal Offset to the
本実施の形態の映像記録装置600の構成を図6に示す。エンコード部601は外部から入力された映像信号に対してフレーム間圧縮を行い、MPEG形式の圧縮データに符号化(エンコード)する。映像書き出し部602はエンコード部601でエンコードした映像データを記録媒体610上に映像ファイル611として記録する。インデックス記録部603はエンコード部601でエンコードした圧縮データのインデックス情報を記録媒体610上にインデックスファイル612として記録する。インデックス合成部604は、記録が終了したときにインデックスファイル612を映像ファイル611の末尾に連結する。
FIG. 6 shows the configuration of the
映像記録装置600の処理の流れを図7のフローチャートおよび図5を用いて説明する。エンコード部601は、まずデータ入力処理S71にて、1フレーム目の映像信号を受け取る。1フレーム目の映像信号はBピクチャにすることを予定しているので、エンコード部601は、エンコード可否判定S72にて、1フレーム目の映像信号のエンコードを遅延させることを決定し、非圧縮画像格納処理S73にて非圧縮画像保持部D70に一時的に保存する。エンコード部601は、非圧縮画像保持部D70を内部に保持する。次に、データ入力処理S71にて、2フレーム目の映像信号を受け取ると、2フレーム目の映像信号はIピクチャにすることが予定されているので、エンコード部601は、エンコード可否判定S72にて、2フレーム目の映像信号をエンコードすることを決定する。エンコード処理S74にて、エンコード部601は、まず2フレーム目の映像信号をエンコードし、次に非圧縮画像保持部D70に格納されている1フレーム目の映像信号を取り出し、2フレーム目の映像信号を用いてフレーム間圧縮を行う。データ書き出し処理S75にて、映像書き出し部602は、圧縮データを書き出す前に、図4で示したMXFのファイルヘッダ、ボディパーティションパック、およびエッセンスコンテナのK、Lのデータを映像ファイル611へ書き出す。次に映像書き出し部602は、2フレーム目の圧縮データ(I2)、1フレーム目の圧縮データ(B1)の順で映像ファイル611へ書き出す。映像ファイル611上の1フレーム目には2フレーム目に表示される圧縮データが書かれるので、1フレーム目のTemporal Offsetは1(2−1)になる。キーフレームであるIピクチャは2フレーム目にあるので、1フレーム目のKey−Frame Offsetは1(2−1)になる。また、1フレーム目のFlagsがB、Stream Offsetが0になる。映像ファイル611上の2フレーム目には1フレーム目に表示される圧縮データが書かれるので、2フレーム目のTemporal Offsetは−1(1−2)になる。キーフレームであるIピクチャは2フレーム目にあるので、2フレーム目のKey−Frame Offsetは0(2−2)になる。また、I2のデータサイズを50,000バイトとすると、1フレーム目のFlagsがI、Stream Offsetが50,000になる。
The processing flow of the
インデックス書き出し処理S76にて、インデックス記録部603は、これらの2フレーム分のインデックス情報をインデックスファイル612へ書き出す。2フレームでは記録停止されていないので、記録停止判断S78では記録が停止されていないと判断する。次に3フレーム目の処理をするために、データ入力部S71へ戻る。記録停止判断S78にて記録が終了したと判断されると、インデックス合成部604は、インデックス合成処理S79を行い、記録を終了する。インデックス合成処理S79は、映像ファイル611とインデックスファイル612を合成して1つのファイルにする処理である。
In the index writing process S76, the
インデックス合成処理S79のフローチャートを図8に示す。インデックス合成部604が、インデックス合成処理S79を実行する。ヘッダサイズが32KB、圧縮データサイズが82KB、1クラスタのサイズを32KBとして説明する。データサイズ計算処理S81では、ヘッダサイズ32KBと圧縮データサイズ82KBを合計して映像ファイル611に記録したデータサイズ114KBを求める。クラスタ残量計算処理S82では、114KB=3クラスタ(96KB)+18KBバイトなので、クラスタ内の残りの14KB(32KB−18KB)を求める。フィラ埋め込み処理S83は、クラスタ残量計算処理S82で計算したサイズからフッタパーティションパックを差し引いたサイズをスタッフィング(stuffing)のためのデータとして埋め込む処理である。図4に示すようにフィラもKLV構造をとっており、K、Lの後に0で埋められたデータが並ぶ。フッタパーティションパックを簡単のために1KBと仮定すると、フィラ埋め込み処理S83では、クラスタの末尾までの14KBからフッタパーティションパックの1KBを引いた13KBのフィラを作成し、映像ファイル611へ追記する。
FIG. 8 shows a flowchart of the index composition process S79. The
図9に映像ファイル611およびインデックスファイル612のFATを示す。図9(a)に示すように、映像データがクラスタ番号2、3、4、5のクラスタに、インデックスファイル612がクラスタ番号7に記録されているとする。インデックス合成部604は、FAT操作処理S84にてクラスタ5の次のクラスタ番号を終了マークから7に書き換え、図9(b)に示すように、インデックス合成部604は、クラスタ番号2、3、4、5、7がひとつのファイルを構成するように変更する。その後、インデックス合成部604は、インデックスファイル612をディレクトリエントリから削除し、映像ファイル611とインデックスファイル612の結合を完了する。これにより、2つのファイルが記録終了時に1つの正しいMXFファイルへと結合され、図10に示すような映像ファイル611が完成する。
FIG. 9 shows the FAT of the
以上のように、映像記録装置は、外部から入力される映像信号をフレーム間圧縮方式で符号化するエンコード部601と、エンコード部601でエンコードした映像データを記録媒体610上に映像ファイル611として記録する映像書き出し部602と、エンコード部601でエンコードした映像データのインデックス情報を作成し、記録媒体610上にインデックスファイル612として記録するインデックス記録部603と、映像ファイル611およびインデックスファイル612の記録媒体610への記録後に、映像ファイル611とインデックスファイル612をひとつに合成するインデックス合成部604と、を具備することにより、記録終了時に、インデックス情報をまとめて映像ファイルに追記する場合に比べて、インデックスファイル612を映像ファイル611に合成するだけであるため、記録終了処理を短時間で終えることができる。さらに、映像記録装置は、記録途中で障害が発生し、記録が正常に完了しなかった場合に、インデックスファイル612を頼りにして修復の処理を進めることができるので、修復処理を短時間で終えることができる。
As described above, the video recording apparatus records the video data input from the outside using the inter-frame compression method and the video data encoded by the
次に、本実施の形態の映像復旧装置について説明する。この装置は映像記録装置600で記録中に何らかの障害が発生し、映像ファイル611およびインデックスファイル612が中途半端な状態で残ってしまった状態から、正常な映像ファイル611を復旧する装置である。
Next, the video restoration apparatus of this embodiment will be described. This device is a device that restores a
まず、インデックスファイル612の内容と圧縮ファイルの内容に矛盾がない場合の映像復旧装置1100の構成を図11に示す。映像復旧装置1100において、映像記録装置600と同一の構成要素は、同一の番号を付与し、説明を省略する。データ復旧指示部1101は、まずインデックスファイル612と映像ファイル611が存在することを確認すると、インデックス合成部604に対してインデックスファイル612を映像ファイル611の末尾に結合することを指示する。インデックス合成部604では、前述の通りの処理を行い、図10に示したようなファイルが完成する。
First, FIG. 11 shows the configuration of the video restoration apparatus 1100 when there is no contradiction between the contents of the
本実施の形態の映像記録装置600は、ファイルシステムを経由してファイルへの書き込みを行っている。ファイルシステムには、遅延書き込みと呼ばれる機構が備わっている。遅延書き込みとは、ファイルシステムへの書き込み命令が発生するたびに記録メディアに書き込むのではなく、いったんメモリ上に保管し、一定サイズのデータ書き込み命令が発行された後、記録メディアに書き込む処理である。これにより、記録メディアへの書き込み回数を減らして転送速度の向上を図っている。
The
遅延書き込み機構が働いているとき、メモリ上にのみ存在し、記録媒体610に書き出されないデータが存在するタイミングがある。そのタイミングで障害が発生するとインデックスファイル612と映像ファイル611の内容に不一致が発生する可能性がある。不一致のケースとしては、映像ファイル611が少ないケース(図12)とインデックスファイル612が少ないケース(図13)の2種類がある。これらのケースに対応するための映像復旧装置1400の構成を図14に示す。
When the delayed writing mechanism is working, there is a timing when there exists data that exists only in the memory and is not written to the
映像復旧装置1400において、映像記録装置600および映像復旧装置1100と同一の構成要素は、同一の番号を付与し、説明を省略する。
In the
インデックス読み出し部1402は、インデックスファイル612を読み出し、記録されているインデックス情報を解釈する。インデックス検出部1401は、映像ファイル611を読み出し、インデックスファイル612に書かれていないインデックス情報を作成する。インデックス調整部1403は、インデックス検出部1401で検出したインデックス情報をインデックスファイル612に追記したり、映像ファイル611に存在しない不要なインデックス情報をインデックスファイル612から削除したりする。
The index reading unit 1402 reads the
映像ファイル611が少ないケース(図12)について図15のフローチャートを用いて説明する。インデックス読み出し部1402は、インデックスファイル読み込み処理S151にて、インデックスファイル612を読み込み、6フレームのデータがあることを認識する。インデックス検出部1401は、データサイズ算出処理S152にて、映像ファイル611を読み出し、圧縮データが68,000バイトであることを算出する。インデックス調整部1403は、不要インデックス判断S153にて、インデックスファイル612から68,000バイトが4フレーム分のデータに相当することがわかるので、不要なインデックスが存在すると判断する。次にインデックス調整部1403は、インデックス削除処理S156にて、不要な5、6フレーム目のインデックス情報をインデックスファイル612から削除する。インデックス合成部604は、インデックス合成処理S79にて、前述の通りフィラおよび削除済みのインデックスファイル612を映像ファイル611の末尾に結合し映像ファイル611を復旧する。
The case where the
インデックスファイル612が少ないケース(図13)について説明する。インデックス読み出し部1402は、インデックスファイル読み込み処理S151にて、インデックスファイル612を読み込み、4フレームのデータがあることを認識する。インデックス検出部1401は、データサイズ算出処理S152にて、映像ファイル611を読み出し、圧縮データが82KBであることを算出する。インデックス調整部1403は、不要インデックス判断S153にて、82KBが5フレーム以上のデータであることがわかるので、不要なインデックスが存在しないと判断する。インデックス検出部1401は、インデックス検出処理S154にて、5フレーム目以降の圧縮データを検査し、5、6フレームのインデックス情報を抽出する(後述)。インデックス調整部1403は、インデックス検出部1401で検出したインデックス情報をインデックスファイル612に追記し、図12(b)と同じインデックス情報を復旧する。インデックス合成部604は、インデックス合成処理S79にて前述の通り、フィラおよび追記済みのインデックスファイル612を末尾に結合する。
A case where the
図16はMPEGのピクチャの内部構成を示した図である。ピクチャは最初にピクチャヘッダ(Picture Header)が配置され、その後ろにスライス(Slice)が配置される。ピクチャヘッダには、スタートコード(Start Code)、GOP内の画像の表示順を示すテンポラルリファレンス(Temporal Reference)およびピクチャタイプ(Picture Type)が含まれている。 FIG. 16 shows the internal structure of an MPEG picture. In the picture, a picture header (Picture Header) is first arranged, and a slice (Slice) is arranged behind the picture header. The picture header includes a start code (Start Code), a temporal reference indicating the display order of images in the GOP, and a picture type (Picture Type).
図17のフローチャートにてインデックス検出処理S154を説明する。インデックス検出部1401が、インデックス検出処理S154を実行する。ピクチャヘッダ検索処理S171では、インデックスファイルに書かれている最終フレームのインデックス情報のStream Offsetである65,000バイト目から検索をはじめ、68,000バイト目でスタートコードを見つける。ピクチャヘッダ有無判定S172では、ピクチャヘッダ検索処理S171でピクチャヘッダを見つけたので、ピクチャヘッダありと判断する。インデックス作成処理S173では、5フレーム目のピクチャのテンポラルリファレンスは5(0基準)であるので、GOP内で6番目に出力されることが分かる。よって、インデックス情報のTemporary Offsetはテンポラルリファレンス+1(0基準であるため+1が必要)から記録順でのフレーム番号5を引いた値1であることが分かる。Key−Frame Offsetは、Iピクチャの表示順でのフレーム番号2からフレーム番号5を引いた−3になる。Stream Offsetには、ピクチャヘッダの開始位置の68,000バイトが設定される。
The index detection process S154 will be described with reference to the flowchart of FIG. The
次にピクチャヘッダ検索処理S171は、68,000バイト目から検索を開始し、79,000バイト目でスタートコードを見つける。インデックス情報作成処理S173にて、テンポラルリファレンス+1(5)から記録フレーム数6を引いた値−1をTemporary Offsetに設定する。Key−Frame OffsetはIピクチャの表示順でのフレーム番号2からフレーム番号6を引いた−4を設定する。Stream Offsetには、ピクチャヘッダの開始位置の79,000バイトが設定される。Flagsは、表示順でのピクチャタイプであるので、インデックスの5番目には6フレーム目のピクチャタイプP、インデックスの6番目には5フレーム目のピクチャタイプBが設定される。このようにして図5(c)と同じインデックス情報を構成することができる。
Next, the picture header search process S171 starts the search from the 68,000th byte and finds the start code at the 79,000th byte. In the index information creation process S173, a value −1 obtained by subtracting the
これらの方法により、インデックスファイル612と映像ファイル611に不一致が発生したケースに対しても1つの正しい映像ファイル611を得ることができる。
By these methods, one
本実施の形態にかかる映像記録装置は、記録終了処理を短時間で終えることができ、さらに、記録途中で障害が発生し、記録が正常に完了しなかった場合に、インデックスファイルを頼りにして修復の処理を進めることができるため、業務用または民生用ビデオカメラ等に適用することができ、有用である。 The video recording apparatus according to the present embodiment can finish the recording end process in a short time. Further, when a failure occurs during the recording and the recording is not completed normally, the video recording apparatus relies on the index file. Since the repair process can be advanced, it can be applied to a commercial or consumer video camera or the like, which is useful.
100 物理ドライブ
101 論理ドライブ
102 マスターブートレコード
103 パーティションブートセクタ
104 ファイルアロケーションテーブル#1
104b ファイルアロケーションテーブル#2
105 ルートディレクトリエントリ
106 ユーザデータ領域
107 ディレクトリエントリ
108 先頭のクラスタ番号
110 クラスタ
111 クラスタ番号
600 映像記録装置
601 エンコード部
602 映像書き出し部
603 インデックス記録部
604 インデックス合成部
610 記録媒体
611 映像ファイル
612 インデックスファイル
1100、1400 映像復旧装置
1101 データ復旧指示部
1401 インデックス検出部
1402 インデックス読み出し部
1403 インデックス調整部
100
104b File
105
Claims (3)
前記エンコード部でエンコードした映像データを記録媒体上に映像ファイルとして記録する映像書き出し部と、
前記エンコード部でエンコードした映像データのインデックス情報を作成し、前記記録媒体上にインデックスファイルとして記録するインデックス記録部と、
前記映像ファイルおよび前記インデックスファイルの前記記録媒体への記録後に、前記映像ファイルと前記インデックスファイルをひとつに合成するインデックス合成部と、
を具備する映像記録装置。 An encoding unit that encodes an externally input video signal using an inter-frame compression method;
A video writing unit for recording the video data encoded by the encoding unit as a video file on a recording medium;
An index recording unit that creates index information of the video data encoded by the encoding unit and records the index information on the recording medium;
An index composition unit for compositing the video file and the index file into one after recording the video file and the index file on the recording medium;
A video recording apparatus comprising:
前記映像ファイルと前記インデックスファイルとの整合性を確認し、整合性がとれている場合に、前記インデックス合成部に対して前記映像ファイルと前記インデックスファイルとをひとつにまとめる指示を行うデータ復旧指示部と、
を具備する映像復旧装置。 An index composition unit for compositing a video file existing on a recording medium and an index file related to the video file into one;
A data recovery instruction unit that confirms the consistency between the video file and the index file, and instructs the index composition unit to combine the video file and the index file together when the consistency is achieved. When,
A video restoration device comprising:
前記映像ファイルからインデックス情報を作成するインデックス検出部と、
前記インデックス読み出し部から読み出したインデックス情報と、前記インデックス検出部で作成したインデックス情報との整合性を確認し、整合性がとれていない場合に、前記インデックスファイルのインデックス情報に対して、インデックスの追加または削除を行うインデックス調整部と、
を具備する請求項2記載の映像復旧装置。 An index reading unit for reading index information from the index file;
An index detector for creating index information from the video file;
Check the consistency between the index information read from the index reading unit and the index information created by the index detection unit, and add an index to the index information of the index file if consistency is not achieved Or an index adjustment unit for performing deletion,
The video restoration device according to claim 2, further comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010101734A JP2011234068A (en) | 2010-04-27 | 2010-04-27 | Video recording device and video recovery device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010101734A JP2011234068A (en) | 2010-04-27 | 2010-04-27 | Video recording device and video recovery device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011234068A true JP2011234068A (en) | 2011-11-17 |
Family
ID=45322957
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010101734A Pending JP2011234068A (en) | 2010-04-27 | 2010-04-27 | Video recording device and video recovery device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011234068A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108322808A (en) * | 2018-02-28 | 2018-07-24 | 珠海全志科技股份有限公司 | A kind of video record processing method and processing device, computer installation, storage medium |
US11197028B2 (en) * | 2017-03-13 | 2021-12-07 | Sling Media Pvt Ltd | Recovery during video encoding |
-
2010
- 2010-04-27 JP JP2010101734A patent/JP2011234068A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11197028B2 (en) * | 2017-03-13 | 2021-12-07 | Sling Media Pvt Ltd | Recovery during video encoding |
CN108322808A (en) * | 2018-02-28 | 2018-07-24 | 珠海全志科技股份有限公司 | A kind of video record processing method and processing device, computer installation, storage medium |
CN108322808B (en) * | 2018-02-28 | 2021-01-29 | 珠海全志科技股份有限公司 | Video recording processing method and device, computer device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4720543B2 (en) | Data processing device, data processing method and data processing program, recording medium, and playback device, playback method and playback program | |
JP3356991B2 (en) | Optical disc, recording method, recording device, reproducing method, and reproducing device | |
JP4481889B2 (en) | Data recording apparatus and method, program, and recording medium | |
US8295673B2 (en) | Apparatus, method, and computer program for processing information | |
US20050157599A1 (en) | Data recording method, data recording device, data recording medium, data reproduction method, and data reproduction device | |
EP2018054A1 (en) | Information processing device, information processing method, and computer program | |
TW200829012A (en) | Data processor, data processing method and computer program | |
US8639098B2 (en) | Apparatus, method, and computer program for processing information | |
JP4548226B2 (en) | Data processing method, apparatus and program thereof | |
JP2004178788A (en) | Recording device and recording method | |
US7551838B2 (en) | Moving picture recording apparatus and method thereof with correlating of representative image with thumbnail image recorded in thumbnail file corresponding to moving picture stream data referenced by reference moving picture data | |
US20040234240A1 (en) | Recording medium | |
JP4115061B2 (en) | Recording medium and video recording / reproducing apparatus using the same | |
JP2012170054A (en) | Video recording apparatus, video reproduction apparatus, and video recovery apparatus | |
JP2006074391A (en) | File recording method and recorder | |
JP2011234068A (en) | Video recording device and video recovery device | |
EP1643764A1 (en) | Video reproducing apparatus | |
JP3986973B2 (en) | AV data recording method, AV data recording apparatus, data recording medium, and program | |
JP3510782B2 (en) | Moving image recording method, reproducing method, editing method and apparatus | |
JP2008310889A (en) | Recording and reproducing device | |
JP2004363825A (en) | Recording and reproducing device, recording and reproducing method, and recording medium and program therefor | |
JP4072044B2 (en) | Moving image recording method | |
JP6806577B2 (en) | Recording device and its control method and program | |
JP4312783B2 (en) | AV data reproducing method, AV data reproducing apparatus, program, and recording medium | |
JP3897783B2 (en) | Image processing apparatus, control method therefor, computer program, and computer-readable storage medium |