JP2022096304A - Moving image file transfer device, transfer system, transfer method for moving image file transfer device, and program - Google Patents

Moving image file transfer device, transfer system, transfer method for moving image file transfer device, and program Download PDF

Info

Publication number
JP2022096304A
JP2022096304A JP2020209344A JP2020209344A JP2022096304A JP 2022096304 A JP2022096304 A JP 2022096304A JP 2020209344 A JP2020209344 A JP 2020209344A JP 2020209344 A JP2020209344 A JP 2020209344A JP 2022096304 A JP2022096304 A JP 2022096304A
Authority
JP
Japan
Prior art keywords
moving image
file
transfer
divided
data
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
JP2020209344A
Other languages
Japanese (ja)
Inventor
亮 及川
Akira Oikawa
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2020209344A priority Critical patent/JP2022096304A/en
Publication of JP2022096304A publication Critical patent/JP2022096304A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Information Transfer Between Computers (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

To check the details of a moving image file including moving image data even during transfer of the file.SOLUTION: A moving image file transfer device 1 transfers a moving image file to an external device 200, and the moving image file transfer device creates a plurality of divided transfer files including pieces of divided moving image data obtained by dividing moving image data included in a moving image file to be transferred and management information on the divided moving image data, and transfers the plurality of divided transfer files and the management information included in the moving image file to the external device 200.SELECTED DRAWING: Figure 10

Description

本発明は、動画ファイル転送装置、転送システム、動画ファイル転送装置の転送手方法、および、プログラムに関する。 The present invention relates to a moving image file transfer device, a transfer system, a transfer method of the moving image file transfer device, and a program.

撮像装置などの情報処理装置には、特許文献1のように、再生可能動画データを取り扱うものがある。また、撮像装置などの情報処理装置には、撮像による動画データをストリーミング再生可能に含む動画ファイルをSDカードなどの外付けの記録媒体に記録し、記録媒体の動画ファイルを他のコンピュータ装置といった外部装置へ転送するものがある。このような動画データには、たとえばISO/IEC14496-14:2003で標準化されているMP4形式の動画ファイルによるものがある。MP4形式の動画ファイルには、撮像の開始から終了までの動画データが、その動画データを(ストリーミング)再生するための管理情報とともに記録される。 Some information processing devices such as an image pickup device handle reproducible moving image data as in Patent Document 1. Further, in an information processing device such as an image pickup device, a moving image file containing moving image data obtained by streaming can be recorded on an external recording medium such as an SD card, and the moving image file of the recording medium is recorded on an external recording medium such as another computer device. There is something to transfer to the device. Such video data includes, for example, MP4 format video files standardized by ISO / IEC 14496-14: 2003. In the MP4 format video file, video data from the start to the end of imaging is recorded together with management information for (streaming) playback of the video data.

特開平11-176083号公報Japanese Unexamined Patent Publication No. 11-176083

ところで、近年、外付けの記録媒体が大容量化している。また、ライブ映像発信の機会は増加している。これらの要因により、1つの動画ファイルに記録される動画データの再生時間は、長くなる傾向にある。撮像装置などにおいても、たとえば数時間以上の動画データを含む動画ファイルを記録できるようにすることが求められる。その一方で、このように長い再生時間の動画データを含む動画ファイルを転送する場合、その転送に時間がかかる。また、転送先の外部装置では、動画ファイルの転送が終了しなければ、動画ファイルに含まれる動画データの内容を確認することができない。このため、長時間の撮影によりデータサイズが大きくなっている動画ファイルの転送については、長時間にわたって動画データの内容を確認することができなくなる。 By the way, in recent years, the capacity of external recording media has increased. In addition, opportunities for live video transmission are increasing. Due to these factors, the reproduction time of the moving image data recorded in one moving image file tends to be long. An image pickup device or the like is also required to be able to record a moving image file containing moving image data for, for example, several hours or more. On the other hand, when transferring a video file containing video data having such a long playback time, the transfer takes time. In addition, the transfer destination external device cannot confirm the contents of the video data included in the video file until the transfer of the video file is completed. Therefore, when transferring a moving image file whose data size is large due to long-time shooting, it is not possible to check the content of the moving image data for a long time.

上述の課題を解決するために、本発明は、動画データを含む動画ファイルの転送において、転送が終了していなくとも、転送中の動画ファイルの動画データの内容を確認可能な動画ファイル転送装置、転送方法を提供することを目的とする。 In order to solve the above-mentioned problems, the present invention is a video file transfer device capable of confirming the content of the video data of the video file being transferred even if the transfer is not completed in the transfer of the video file including the video data. The purpose is to provide a transfer method.

本発明に係る動画ファイルを外部装置に転送する動画ファイル転送装置は、転送対象の動画ファイルに含まれる動画データを複数に分割した分割動画データと、当該分割動画データの管理情報とをそれぞれ含む、複数の分割転送ファイルを生成する分割転送ファイル生成手段と、前記複数の分割転送ファイルと、前記動画ファイルに含まれる管理情報とを、前記外部装置に転送する転送手段と、を有する。 The moving image file transfer device for transferring the moving image file according to the present invention includes divided moving image data obtained by dividing the moving image data included in the moving image file to be transferred into a plurality of parts, and management information of the divided moving image data, respectively. It has a divided transfer file generation means for generating a plurality of divided transfer files, and a transfer means for transferring the plurality of divided transfer files and management information included in the moving image file to the external device.

本発明では、動画データを含む動画ファイルの転送が終了していなくとも、転送中の動画ファイルの動画データの内容を確認することが可能となる。 In the present invention, it is possible to confirm the content of the moving image data of the moving moving image file even if the transfer of the moving image file including the moving image data is not completed.

本発明の第一実施形態に係る動画ファイル転送装置を有する撮像装置のブロック図である。It is a block diagram of the image pickup apparatus which has the moving image file transfer apparatus which concerns on 1st Embodiment of this invention. 図1の撮像装置において転送可能な動画ストリームファイルのファイルフォーマットの一例の説明図である。It is explanatory drawing of an example of the file format of the moving image stream file which can be transferred in the image pickup apparatus of FIG. MP4形式の動画ストリームファイルのバリエーションの説明図である。It is explanatory drawing of the variation of the moving image stream file of MP4 format. 図1のマイクロコンピュータが実行可能な撮像時の動画ストリームファイル生成処理のフローチャートである。FIG. 3 is a flowchart of a moving image stream file generation process at the time of imaging, which can be executed by the microcomputer of FIG. 1. 図4の動画データファイル生成処理の詳細なフローチャートである。It is a detailed flowchart of the moving image data file generation process of FIG. 図4の全体moovデータ生成処理の詳細なフローチャートである。It is a detailed flowchart of the whole moov data generation process of FIG. 図4の全体moovファイル生成処理の詳細なフローチャートである。It is a detailed flowchart of the whole moov file generation process of FIG. 動画ストリームファイルを生成するためのFAT処理の説明図である。It is explanatory drawing of FAT processing for generating a moving image stream file. 動画ストリームファイル生成処理により外部メモリに生成される動画ストリームファイルの説明図である。It is explanatory drawing of the video stream file generated in the external memory by the video stream file generation process. 第一実施形態における動画ストリームファイルの転送元処理のフローチャートである。It is a flowchart of the transfer source processing of the moving image stream file in 1st Embodiment. 図10のステップS1304の分割転送ストリームファイルの生成処理の詳細なフローチャートである。It is a detailed flowchart of the generation process of the split transfer stream file of step S1304 of FIG. 第一実施形態における動画ストリームファイルの転送先処理のフローチャートである。It is a flowchart of the transfer destination processing of the moving image stream file in 1st Embodiment. 第二実施形態における、図10のステップS1304の分割転送ストリームファイルの生成処理の詳細なフローチャートである。It is a detailed flowchart of the process of generating the split transfer stream file of step S1304 of FIG. 10 in the second embodiment.

以下、本発明の実施形態について図面を参照しながら詳細に説明する。しかしながら、以下の実施形態に記載されている構成はあくまで例示に過ぎず、本発明の範囲は実施形態に記載されている構成によって限定されることはない。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. However, the configurations described in the following embodiments are merely examples, and the scope of the present invention is not limited by the configurations described in the embodiments.

[第一実施形態]
図1は、本発明の第一実施形態に係る動画ストリームファイル生成装置を有する撮像装置1のブロック図である。図1の撮像装置1は、動画ファイル生成装置として動画を撮像するために、マイクロコンピュータ105とともに、撮像レンズ100、撮像素子101、A/D変換器102、マイクロホン103、A/D変換器104、を有する。マイクロコンピュータ105には、A/D変換器102、A/D変換器104、揮発性メモリ106、静止画コーデック107、動画コーデック108、音声コーデック109、ファイル生成部110、が接続される。マイクロコンピュータ105には、不揮発性メモリ111、外部メモリ112、表示部材113、操作部材114、通信部材115、が接続される。
[First Embodiment]
FIG. 1 is a block diagram of an image pickup apparatus 1 having a moving image stream file generation apparatus according to the first embodiment of the present invention. The image pickup device 1 of FIG. 1 includes an image pickup lens 100, an image pickup element 101, an A / D converter 102, a microphone 103, and an A / D converter 104 together with a microcomputer 105 in order to capture a moving image as a moving image file generation device. Has. An A / D converter 102, an A / D converter 104, a volatile memory 106, a still image codec 107, a moving image codec 108, an audio codec 109, and a file generation unit 110 are connected to the microcomputer 105. A non-volatile memory 111, an external memory 112, a display member 113, an operation member 114, and a communication member 115 are connected to the microcomputer 105.

撮像レンズ100は、たとえば単焦点レンズ、複数のレンズで構成されるズームレンズ、である。撮像素子101は、たとえばCCDやCMOSセンサである。撮像素子101は、撮像レンズ100によって結像された被写体像を、アナログ動画信号に変換する。A/D変換器102は、撮像素子101に接続され、アナログ動画信号をデジタル動画信号に変換する。マイクロホン103は、たとえば周囲の音を集めて、アナログ音信号に変換する。A/D変換器104は、マイクロホン103に接続され、アナログ音信号をデジタル音信号に変換する。 The image pickup lens 100 is, for example, a single focus lens or a zoom lens composed of a plurality of lenses. The image sensor 101 is, for example, a CCD or a CMOS sensor. The image sensor 101 converts the subject image imaged by the image pickup lens 100 into an analog moving image signal. The A / D converter 102 is connected to the image pickup device 101 and converts an analog moving image signal into a digital moving image signal. The microphone 103 collects ambient sounds, for example, and converts them into analog sound signals. The A / D converter 104 is connected to the microphone 103 and converts an analog sound signal into a digital sound signal.

揮発性メモリ106は、たとえば半導体メモリである。揮発性メモリ106は、撮像による動画データや静止画データなどの一時的なデータを記録してよい。揮発性メモリ106は、編集などにより動画データから抜き出される静止画データ、音声データを一時的に記録してよい。静止画コーデック107は、揮発性メモリ106にある静止画データをJPEGフォーマットへ圧縮変換する。動画コーデック108は、揮発性メモリ106にある動画データを、H.264フォーマットへ圧縮変換し、H.264フォーマットのデータを伸長変換する。音声コーデック109は、揮発性メモリ106にある音声データを、AACフォーマットへ圧縮変換し、AACフォーマットのデータを伸長変換する。ファイル生成部110は、静止画コーデック107で変換されたJPEG圧縮データのヘッダファイルを生成し、JPEGフォーマットの静止画ファイルを生成する。ファイル生成部110は、動画コーデック108で生成されたH.264フォーマットのデータおよび音声コーデック109で生成されたAACフォーマットのデータとを多重化して、動画データファイルを生成する。ファイル生成部110は、多重化により生成する動画データファイルについてのヘッダファイルを生成する。動画データファイルには、たとえばMP4形式の動画ストリーミング再生に用いることができるものがある。ファイル生成部110は、動画ストリームファイルの動画データについての編集処理を実行してよい。編集処理には、たとえば編集元の動画データの前後の部分を削除して一部を切り出す処理がある。編集処理には、他にもたとえば、動画データにOSDデータを重畳する処理がある。ファイル生成部110は、編集後の動画データについて、動画ストリームファイルを再構築する処理を実行してよい。 The volatile memory 106 is, for example, a semiconductor memory. The volatile memory 106 may record temporary data such as moving image data and still image data obtained by imaging. The volatile memory 106 may temporarily record still image data and audio data extracted from the moving image data by editing or the like. The still image codec 107 compresses and converts the still image data in the volatile memory 106 into a JPEG format. The video codec 108 converts the video data in the volatile memory 106 into H. Compressed and converted to 264 format, H. Data in 264 format is decompressed and converted. The audio codec 109 compresses and converts the audio data in the volatile memory 106 into the AAC format, and decompresses and converts the data in the AAC format. The file generation unit 110 generates a header file of JPEG compressed data converted by the still image codec 107, and generates a still image file in JPEG format. The file generation unit 110 is the H.A. generated by the video codec 108. A moving image data file is generated by multiplexing the data in 264 format and the data in AAC format generated by the audio codec 109. The file generation unit 110 generates a header file for the moving image data file generated by multiplexing. Some video data files can be used, for example, for video streaming playback in MP4 format. The file generation unit 110 may execute an editing process for the moving image data of the moving image stream file. The editing process includes, for example, a process of deleting parts before and after the video data of the editing source and cutting out a part. The editing process also includes, for example, a process of superimposing OSD data on moving image data. The file generation unit 110 may execute a process of reconstructing a video stream file for the edited video data.

外部メモリ112は、たとえばコンパクトフラッシュ、SDカード、スマートメディア、ハードディスクドライブ、である。外部メモリ112は、撮像装置1から取り外し可能に設けられてよい。表示部材113は、たとえば液晶モニタでよい。表示部材113は、撮像装置1の表示部でよい。操作部材114は、たとえばスイッチ、ボタン、タッチパネル、などを有する。操作部材114は、撮像装置1の操作部でよい。不揮発性メモリ111は、たとえば半導体メモリである。不揮発性メモリ111は、マイクロコンピュータ105のプログラムおよびデータを記録してよい。このようなデータには、プログラムの実行に用いる設定データ、動画データへ重畳可能なビットマップデータによるOSDデータ、が含まれてよい。 The external memory 112 is, for example, a compact flash, an SD card, a smart media, or a hard disk drive. The external memory 112 may be provided so as to be removable from the image pickup apparatus 1. The display member 113 may be, for example, a liquid crystal monitor. The display member 113 may be the display unit of the image pickup apparatus 1. The operating member 114 includes, for example, a switch, a button, a touch panel, and the like. The operation member 114 may be an operation unit of the image pickup apparatus 1. The non-volatile memory 111 is, for example, a semiconductor memory. The non-volatile memory 111 may record the programs and data of the microcomputer 105. Such data may include setting data used for program execution and OSD data based on bitmap data that can be superimposed on moving image data.

通信部材115は、たとえば無線通信によりまたはケーブルを用いた有線通信により、他の装置である外部装置200との間でデータを送受する。通信部材115は、たとえばIEEE802.15、IEEE802.11ax、IEEE802.3といった規格に準拠するデータ通信機能を備えてよい。外部装置200には、たとえば図1と同様の他の撮像装置、パーソナルコンピュータ装置、サーバ装置、がある。外部装置200と撮像装置1とにより、転送システム300が構成されている。 The communication member 115 transmits / receives data to / from an external device 200, which is another device, for example, by wireless communication or by wired communication using a cable. The communication member 115 may be provided with a data communication function conforming to standards such as IEEE802.15, IEEE802.11ax, and IEEE802.3. The external device 200 includes, for example, another image pickup device, a personal computer device, and a server device similar to those in FIG. 1. The transfer system 300 is composed of the external device 200 and the image pickup device 1.

マイクロコンピュータ105は、不揮発性メモリ111からプログラムを読み込んで実行する。これにより、撮像装置1には、各部の動作を制御する制御部が実現される。 The microcomputer 105 reads a program from the non-volatile memory 111 and executes it. As a result, the image pickup apparatus 1 is realized with a control unit that controls the operation of each unit.

マイクロコンピュータ105は、たとえば、操作部材114の操作に基づいて、静止画や動画を撮像する。動画を撮像する場合、マイクロコンピュータ105は、デジタル動画信号に含まれる静止画データと、デジタル音信号に含まれる音データとを、揮発性メモリ106に一時的に蓄積する。マイクロコンピュータ105は、揮発性メモリ106に蓄積されている静止画データおよび音データを、静止画コーデック107、動画コーデック108、ファイル生成部110に処理させる。これにより、揮発性メモリ106には、撮像による動画データを含む動画データファイルが一時的に記録される。マイクロコンピュータ105は、揮発性メモリ106に記録されている処理後の動画データファイルを、外部メモリ112に記録する。マイクロコンピュータ105は、撮像による動画データをストリーミング再生するための管理情報を生成し、管理情報を含む動画ストリームファイルを外部メモリ112に記録してよい。これにより、外部メモリ112には、撮像装置1で撮像した動画データをストリーミング再生可能に含む動画ストリームファイルが記録される。 The microcomputer 105 captures a still image or a moving image based on the operation of the operation member 114, for example. When capturing a moving image, the microcomputer 105 temporarily stores the still image data included in the digital moving image signal and the sound data included in the digital sound signal in the volatile memory 106. The microcomputer 105 causes the still image codec 107, the moving image codec 108, and the file generation unit 110 to process the still image data and the sound data stored in the volatile memory 106. As a result, a moving image data file including moving image data obtained by imaging is temporarily recorded in the volatile memory 106. The microcomputer 105 records the processed moving image data file recorded in the volatile memory 106 in the external memory 112. The microcomputer 105 may generate management information for streaming and reproducing the moving image data obtained by imaging, and may record the moving image stream file including the management information in the external memory 112. As a result, the external memory 112 records a moving image stream file containing the moving image data captured by the imaging device 1 so that the moving image data can be streamed and reproduced.

この他にもたとえば動画を再生する場合、マイクロコンピュータ105は、外部メモリ112から転送対象の動画ストリームファイルを読み込み、通信部材115を用いて、動画ストリームファイルを外部装置200へ送信してよい。これにより、撮像装置1は、記録されている動画ストリームファイルを、他の装置との間で転送できる。 In addition to this, for example, when playing a moving image, the microcomputer 105 may read the moving image stream file to be transferred from the external memory 112 and transmit the moving image stream file to the external device 200 by using the communication member 115. As a result, the image pickup device 1 can transfer the recorded moving image stream file to and from another device.

図2は、図1の撮像装置1において生成可能な動画ストリームファイル20のファイルフォーマットの一例の説明図である。図2の動画ストリームファイル20は、ISO/IEC14496-14:2003で標準化されているMP4形式のものである。動画ストリームファイル20は、動画ファイルの一例である。図2の動画ストリームファイル20は、符号化された動画データを含むmdatアトム22と、動画データの管理情報を含むmoovアトム21と、を有する。 FIG. 2 is an explanatory diagram of an example of a file format of the moving image stream file 20 that can be generated by the image pickup apparatus 1 of FIG. The moving image stream file 20 in FIG. 2 is in the MP4 format standardized by ISO / IEC14496-14: 2003. The video stream file 20 is an example of a video file. The moving image stream file 20 of FIG. 2 has an mdat atom 22 including encoded moving image data and a moov atom 21 containing management information of the moving image data.

mdatアトム22には、動画ストリームファイル20に記録した撮像の開始から終了までのすべての動画データが記録される。mdatアトム22は、複数のチャンク(chunk cN)28を有する。各チャンク28は、複数のサンプル(sample sM)29を有する。各サンプル29は、符号化されたフレームデータ30が対応する。フレームデータ30は、たとえば基本的に撮像された静止画データに対応する。動画データは、連続する複数のフレームデータで構成される。たとえばサンプル(sample s1)29には、I0の符号化されたフレームデータ30が対応する。サンプル(sample s2)29には、B-2の符号化されたフレームデータ30が対応する。サンプル(sample s3)29には、B-1の符号化されたフレームデータ30が対応する。サンプル(sample s4)29には、P3の符号化されたフレームデータ30が対応する。ここで、I0、I1、I2、・・・、Inは、イントラ符号化(フレーム内符号化)されたフレームデータ30である。B0、B1、B2、・・・、Bnは、双方向から参照して符号化(フレーム間符号化)されるフレームデータ30である。P0、P1、P2、・・・、Pnは、一方向(順方向)から参照して符号化(フレーム間符号化)されるフレームデータ30である。いずれの符号化も、可変長でフレームデータ30を符号化している。 The mdat atom 22 records all the moving image data from the start to the end of the imaging recorded in the moving image stream file 20. The mdat atom 22 has a plurality of chunk cNs 28. Each chunk 28 has a plurality of samples 29. Each sample 29 corresponds to the coded frame data 30. The frame data 30 basically corresponds to, for example, captured still image data. The moving image data is composed of a plurality of consecutive frame data. For example, the sample (sample s1) 29 corresponds to the coded frame data 30 of I0. The coded frame data 30 of B-2 corresponds to the sample (sample s2) 29. The coded frame data 30 of B-1 corresponds to the sample (sample s3) 29. The sample (sample s4) 29 corresponds to the coded frame data 30 of P3. Here, I0, I1, I2, ..., In are frame data 30 that have been intra-coded (in-frame coding). B0, B1, B2, ..., Bn are frame data 30 that are encoded (inter-frame coding) by reference from both directions. P0, P1, P2, ..., Pn are frame data 30 that are encoded (inter-frame coding) by reference from one direction (forward direction). In either coding, the frame data 30 is encoded with a variable length.

moovアトム21には、mdatアトム22に記録されている動画データを再生する際に使用する各種の管理情報が記録される。図2のmoovアトム21は、動画ストリームファイル20に格納されているすべての動画データについての全体管理情報である。moovアトム21は、生成日時等が記録されるヘッダ情報を含むmvhdアトム23と、mdatアトム22に格納された動画データに関する情報を入れるtrakアトム24と、を有する。trakアトム24には、stcoアトム25、stscアトム26、stszアトム27、などが含まれる。stcoアトム25は、mdatアトム22の各チャンク28へのオフセット値の情報を格納する。stscアトム26は、各チャンク28のサンプル29の数の情報を格納する。stszアトム27は、各サンプル28のサイズの情報を格納する。stcoアトム25のデータ量、stscアトム26のデータ量、stszアトム27のデータ量は、動画ストリームファイル20に記録される動画データの量、すなわち動画データの記録時間の長さに対応して増減する。たとえば1秒間30フレームの画像データについての15フレームを1つのチャンク28に格納するMP4形式の動画ストリームファイル20では、2時間の記録により1MByte程度のデータ量になる。この場合、moovアトム21には、1MByte程度の容量が必要になる。また、MP4形式の動画ストリームファイル20に記録される動画データが記録時間の経過とともに増大すると、その記録中においても、既に記録しているサイズが大きい動画データを外部メモリ112へ書き出す必要が生じる可能性がある。しかしながら、上述するように、moovアトム21も記録時間に応じてサイズが増減する。したがって、記録が終了するまで、moovアトム21のサイズは不明である。既に記録しているサイズが大きい動画データを、動画ファイルとして書き出すためのオフセット位置などを、適切に決定することは難しい。 Various management information used when playing back the moving image data recorded in the mdat atom 22 is recorded in the moov atom 21. The moov atom 21 in FIG. 2 is general management information for all the video data stored in the video stream file 20. The moov atom 21 has an mvhd atom 23 including header information in which the generation date and time and the like are recorded, and a trak atom 24 containing information regarding the moving image data stored in the mdat atom 22. The trak atom 24 includes a stco atom 25, a stsc atom 26, a stsz atom 27, and the like. The stco atom 25 stores information on the offset value of the mdat atom 22 to each chunk 28. The stsc atom 26 stores information on the number of samples 29 of each chunk 28. The stsz atom 27 stores information on the size of each sample 28. The amount of data of stco atom 25, the amount of data of stsc atom 26, and the amount of data of stsz atom 27 increase or decrease according to the amount of video data recorded in the video stream file 20, that is, the length of the recording time of the video data. .. For example, in the MP4 format moving image stream file 20 that stores 15 frames of 30 frames of image data per second in one chunk 28, the amount of data is about 1 MByte by recording for 2 hours. In this case, the moov atom 21 needs a capacity of about 1 MByte. Further, if the video data recorded in the MP4 format video stream file 20 increases with the passage of recording time, it may be necessary to write the already recorded large video data to the external memory 112 even during the recording. There is sex. However, as described above, the size of the moov atom 21 also increases or decreases depending on the recording time. Therefore, the size of moov atom 21 is unknown until the recording is completed. It is difficult to properly determine the offset position for exporting the already recorded large-sized video data as a video file.

図3は、MP4形式の動画ストリームファイルのバリエーションの説明図である。図3(a)の動画ストリームファイル31は、図2と同様に、ファイルの先頭にmoovアトム21を含み、moovアトム21の後にmdatアトム22を含む。この場合、動画ストリームファイル31の先頭にmoovアトム21が含まれている。動画ストリームファイル31の先頭のデータを読み込むことにより、動画データをストリーミング再生するための管理情報を読み込むことができる。その後にmdatアトム22に含まれている動画データを読み込む際には、動画データをストリーミング再生するための情報を既に取得できているため、遅滞することなくストリーミング再生を開始できる。図3(a)の動画ストリームファイル31は、動画データのストリーミング再生に適している。 FIG. 3 is an explanatory diagram of variations of an MP4 format video stream file. Similar to FIG. 2, the moving image stream file 31 of FIG. 3A includes the moov atom 21 at the beginning of the file, and the mdat atom 22 after the moov atom 21. In this case, the moov atom 21 is included at the beginning of the moving image stream file 31. By reading the data at the beginning of the video stream file 31, it is possible to read the management information for streaming and playing the video data. After that, when the moving image data included in the mdat atom 22 is read, the information for streaming the moving image data has already been acquired, so that the streaming reproduction can be started without delay. The video stream file 31 of FIG. 3A is suitable for streaming playback of video data.

図3(b)の動画ストリームファイル32は、ファイルの先頭にmdatアトム22を含み、mdatアトム22の後にmoovアトム21を含む。この場合、動画ストリームファイル32の先頭にmdatアトム22が含まれているため、最終的な記録時間などが不明であってtrakアトムのデータ量が不明な状態においても、たとえば撮像などによる動画データの記録を開始することが可能である。撮像中といった記録中においても、上述したオフセット位置などを適宜決定して、既に記録している動画データの一部を外部メモリ112へ書き出すことができる。しかも、撮像による記録が終了して記録時間などが明確になって、trakアトムのデータ量が確定した時点で、mdatアトム22の後に動画データの全体についてのmoovアトム21を記録することができる。 The moving image stream file 32 of FIG. 3B includes the mdat atom 22 at the beginning of the file and the moov atom 21 after the mdat atom 22. In this case, since the mdat atom 22 is included at the beginning of the moving image stream file 32, even when the final recording time or the like is unknown and the data amount of the trak atom is unknown, for example, the moving image data by imaging or the like is recorded. It is possible to start recording. Even during recording such as during imaging, the offset position and the like described above can be appropriately determined, and a part of the already recorded moving image data can be written to the external memory 112. Moreover, when the recording by imaging is completed and the recording time or the like is clarified and the data amount of the trak atom is determined, the moov atom 21 for the entire moving image data can be recorded after the mdat atom 22.

このようにMP4形式の動画ストリームファイルでは、複数の形式の中から1つを選択することができる。撮像装置1では、最終的な撮像時間が不明な状態での記録が可能であることから、図3(b)の形式での記録が好まれる。しかしながら、図3(b)の形式の動画ストリームファイル32の動画データをストリーミング再生しようとする場合、動画ストリームファイル32の先頭からデータの読み込みを開始することになる。そして、動画ストリームファイル32の最後までを一旦は読み込まないと、動画データをストリーミング再生するために使用するmoovアトム21を読み込むことができない。図3(b)の形式の動画ストリームファイル32は、動画データのストリーミング再生に適していない。動画データのストリーミング再生では、図3(a)の形式の動画ストリームファイル31が望まれる。図3(a)の形式の動画ストリームファイル31では、ファイルの先頭にあるmoovアトム21を読み込むことで、即座に、mdatアトム22に格納されている動画データへアクセスすることができる。図3(a)の形式の動画ストリームファイル31では、ファイルの読み込み開始から遅滞なく、動画データのストリーミング再生を開始することができる。 As described above, in the MP4 format video stream file, one can be selected from a plurality of formats. Since the image pickup apparatus 1 can record in a state where the final image pickup time is unknown, recording in the format of FIG. 3B is preferred. However, when the moving image data of the moving image stream file 32 in the format of FIG. 3B is to be streamed, the reading of the data is started from the beginning of the moving image stream file 32. Then, unless the end of the video stream file 32 is read once, the moov atom 21 used for streaming the video data cannot be read. The video stream file 32 in the format of FIG. 3B is not suitable for streaming playback of video data. For streaming playback of video data, a video stream file 31 in the format of FIG. 3A is desired. In the moving image stream file 31 in the format of FIG. 3A, the moving image data stored in the mdat atom 22 can be immediately accessed by reading the moov atom 21 at the head of the file. In the moving image stream file 31 in the format of FIG. 3A, streaming playback of the moving image data can be started without delay from the start of reading the file.

図4は、図1のマイクロコンピュータ105が実行可能な撮像時の動画ストリームファイル生成処理のフローチャートである。図1の撮像装置1のマイクロコンピュータ105は、撮像装置1が動画ストリームファイルを生成するために動画データを撮像する場合に、生成手段として、図4の生成処理を実行することができる。また、動画ストリームファイルが最終的に記録される外部メモリ112は、組込機器で一般的に使用されているFAT(FAT Allocation Table)ファイルシステムを使用するものとする。図4の処理により最終的に生成される動画ストリームファイルは、図3(a)の形式のものとなり、ファイルの先頭にmoovアトムを含み、moovアトムの後にmdatアトムを含むものとなる。 FIG. 4 is a flowchart of a moving image stream file generation process at the time of imaging, which can be executed by the microcomputer 105 of FIG. The microcomputer 105 of the image pickup device 1 of FIG. 1 can execute the generation process of FIG. 4 as a generation means when the image pickup device 1 captures moving image data in order to generate a moving image stream file. Further, the external memory 112 in which the moving image stream file is finally recorded uses the FAT (FAT Allocation Table) file system generally used in the embedded device. The video stream file finally generated by the process of FIG. 4 has the format shown in FIG. 3A, and includes a moov atom at the beginning of the file and an mdat atom after the moov atom.

ステップS501において、マイクロコンピュータ105は、動画ストリームファイルを生成するための動画撮像が撮像装置1において開始されたか否かを判断する。マイクロコンピュータ105は、たとえば撮像装置1の操作部材114において動画撮像の開始ボタンが操作されると、動画撮像が開始されたと判断してよい。動画撮像が開始されていない場合、マイクロコンピュータ105は、本処理を繰り返す。動画撮像が開始されると、マイクロコンピュータ105は、処理をステップS502へ進める。ステップS502において、マイクロコンピュータ105は、取得手段として、撮像による動画データを取得して、動画データファイルの生成処理を実行する。動画データファイルの生成処理の詳細は、図5に後述する。マイクロコンピュータ105は、撮像による動画データを複数の分割画像データに分けて記録するための複数の分割動画データファイルを外部メモリ112に生成する。マイクロコンピュータ105は、揮発性メモリ106にある動画データを、適宜、分割動画データファイルに退避する。ステップS503において、マイクロコンピュータ105は、動画データの全体についての全体moovデータの生成処理を実行する。全体moovデータの生成処理の詳細は、図6に後述する。 In step S501, the microcomputer 105 determines whether or not the moving image imaging for generating the moving image stream file has been started in the imaging device 1. The microcomputer 105 may determine that the moving image imaging has started when, for example, the operation member 114 of the imaging device 1 operates the moving image imaging start button. If the moving image imaging has not started, the microcomputer 105 repeats this process. When the moving image imaging is started, the microcomputer 105 advances the process to step S502. In step S502, the microcomputer 105 acquires moving image data by imaging as an acquisition means and executes a process of generating a moving image data file. Details of the video data file generation process will be described later in FIG. The microcomputer 105 generates a plurality of divided moving image data files in the external memory 112 for dividing and recording the moving image data obtained by imaging into a plurality of divided image data. The microcomputer 105 appropriately saves the moving image data in the volatile memory 106 into a divided moving image data file. In step S503, the microcomputer 105 executes a process of generating whole moov data for the whole moving image data. Details of the overall moov data generation process will be described later in FIG.

ステップS504において、マイクロコンピュータ105は、画像データの全体を複数に分割してなる分割画像データについての分割moovファイルの生成処理を実行する。マイクロコンピュータ105は、動画データが分割画像データとして分割するデータ量となっている場合に、分割moovデータを生成し、外部メモリ112に分割moovファイルを記録する。この際、ステップS502の処理により、外部メモリ112には、予め分割画像データファイルが記録されていてよい。この場合、マイクロコンピュータ105は、分割moovデータの先頭が外部メモリ112のクラスタ境界となるように、外部メモリ112に記録されている分割画像データファイルの後に、パディングを実行する。これにより、外部メモリ112に記録されている分割画像データファイルは、クラスタの倍数サイズのものとなる。その後、マイクロコンピュータ105は、分割moovデータを書き込む。分割moovデータは、予めクラスタサイズアライメントが確保されるようにパディングされている。分割moovデータは、クラスタの倍数サイズの倍数のデータ量のファイルとして、外部メモリ112に記録される。したがって、後に外部メモリ112に記録される次の分割画像データの先頭は、外部メモリ112のクラスタ境界から記録される。分割画像データは、上述したパディングにより、分割moovファイルとは別の、分割動画データファイルとして、外部メモリ112に記録される。その結果、外部メモリ112には、分割動画データファイルと、分割moovファイルとが交互に並ぶように、記録され得る。 In step S504, the microcomputer 105 executes a process of generating a divided moov file for the divided image data obtained by dividing the entire image data into a plurality of parts. When the moving image data is the amount of data to be divided as the divided image data, the microcomputer 105 generates the divided moov data and records the divided moov file in the external memory 112. At this time, the divided image data file may be recorded in advance in the external memory 112 by the process of step S502. In this case, the microcomputer 105 executes padding after the divided image data file recorded in the external memory 112 so that the head of the divided moov data is the cluster boundary of the external memory 112. As a result, the divided image data file recorded in the external memory 112 becomes a multiple size of the cluster. After that, the microcomputer 105 writes the divided moov data. The divided moov data is padded in advance so as to ensure cluster size alignment. The divided moov data is recorded in the external memory 112 as a file having a data amount that is a multiple of the size of the cluster. Therefore, the head of the next divided image data to be later recorded in the external memory 112 is recorded from the cluster boundary of the external memory 112. The divided image data is recorded in the external memory 112 as a divided moving image data file separate from the divided moov file by the above-mentioned padding. As a result, the divided moving image data file and the divided moov file can be recorded in the external memory 112 so as to be arranged alternately.

ステップS505において、マイクロコンピュータ105は、動画ストリームファイルを生成するための動画撮像が撮像装置1において停止または終了したか否かを判断する。マイクロコンピュータ105は、たとえば撮像装置1の操作部材114において動画撮像の終了ボタンが操作されると、動画撮像が終了したと判断してよい。動画撮像が終了していない場合、マイクロコンピュータ105は、処理をステップS502へ戻す。マイクロコンピュータ105は、動画撮像が終了するまで、ステップS502からステップS505処理を繰り返す。動画の撮像が継続される。動画撮像が終了すると、マイクロコンピュータ105は、処理をステップS506へ進める。ステップS506において、マイクロコンピュータ105は、分割動画データの生成のたびにステップS503の処理を繰り返すことにより生成している全体moovデータを用いて、全体moovファイルを生成処理を実行する。マイクロコンピュータ105は、ステップS503で最終的に生成した全体moovデータを含む全体moovファイルを、外部メモリ112に記録する。全体moovファイルの生成処理の詳細は、図7に後述する。 In step S505, the microcomputer 105 determines whether or not the moving image imaging for generating the moving image stream file has been stopped or ended in the image pickup apparatus 1. The microcomputer 105 may determine that the moving image imaging is completed when, for example, the operation member 114 of the imaging device 1 operates the moving image imaging end button. If the moving image acquisition is not completed, the microcomputer 105 returns the process to step S502. The microcomputer 105 repeats the process from step S502 to step S505 until the moving image imaging is completed. Video recording continues. When the moving image imaging is completed, the microcomputer 105 advances the process to step S506. In step S506, the microcomputer 105 executes the whole moov file generation process using the whole moov data generated by repeating the process of step S503 every time the divided moving image data is generated. The microcomputer 105 records the entire moov file including the entire moov data finally generated in step S503 in the external memory 112. Details of the generation process of the entire moov file will be described later in FIG.

ステップS507において、マイクロコンピュータ105は、以上の処理により外部メモリ112に記録した複数のファイルの結合処理を実行する。外部メモリ112には、以上の処理により、複数の分割動画データファイルと、複数の分割moovファイルと、全体moovファイルと、が記録されている。外部メモリ112は、FATファイルシステムを使用している。このため、マイクロコンピュータ105は、外部メモリ112のFATを書きかえることにより、外部メモリ112に記録している複数のファイルを結合する。ファイル結合処理の詳細は、後述する図8の例に倣ったものでよい。たとえば、FATにおいて全体moovファイルの最終セルには、1番目の分割moovファイルを記述し、1番目の分割moovファイルの最終セルには、1番目の分割動画データファイルを記述する。1番目の分割動画データファイルの最終セルには、2番目の分割moovファイルを記述し、2番目の分割moovファイルの最終セルには、2番目の分割動画ストリームファイルを記述する。この結合処理により、マイクロコンピュータ105は、外部メモリ112において動画ストリームファイルを生成して記録できる。 In step S507, the microcomputer 105 executes a combination process of a plurality of files recorded in the external memory 112 by the above process. By the above processing, the external memory 112 records a plurality of divided moving image data files, a plurality of divided moov files, and an entire moov file. The external memory 112 uses the FAT file system. Therefore, the microcomputer 105 combines a plurality of files recorded in the external memory 112 by rewriting the FAT of the external memory 112. The details of the file combination process may follow the example of FIG. 8 described later. For example, in FAT, the first divided moov file is described in the final cell of the entire moov file, and the first divided moving image data file is described in the final cell of the first divided moov file. The second divided video file is described in the final cell of the first divided video data file, and the second divided video stream file is described in the final cell of the second divided video file. By this combination processing, the microcomputer 105 can generate and record a moving image stream file in the external memory 112.

これにより、外部メモリ112には、撮像装置1で撮像した動画データをストリーミング再生可能なMP4形式の動画ストリームファイルが生成される。このように撮像装置1のマイクロコンピュータ105は、撮像による動画データを取得して、記録媒体としての外部メモリ112へ記録できる。また、マイクロコンピュータ105は、撮像による動画データの取得を繰り返し、動画データを取得するたびに動画データの全体管理情報である全体moovデータを更新し、最終的な全体管理情報としての全体moovデータを生成できる。 As a result, an MP4 format moving image stream file capable of streaming and playing back the moving image data captured by the imaging device 1 is generated in the external memory 112. As described above, the microcomputer 105 of the image pickup apparatus 1 can acquire the moving image data obtained by the image pickup and record the moving image data in the external memory 112 as a recording medium. Further, the microcomputer 105 repeatedly acquires the moving image data by imaging, updates the overall moov data which is the overall management information of the moving image data every time the moving image data is acquired, and obtains the overall moov data as the final overall management information. Can be generated.

図5は、図4の動画データファイル生成処理の詳細なフローチャートである。図1の撮像装置1のマイクロコンピュータ105は、図4のステップS502において、図5の動画データファイルの生成処理を実行する。ステップS601において、マイクロコンピュータ105は、ストリーミング再生に使用可能な動画データの生成処理を実行する。マイクロコンピュータ105は、撮像による動画データを取得すると、揮発性メモリ106に記録する。マイクロコンピュータ105は、動画コーデック108などに対して、ストリーミング再生に使用可能な動画データの生成を指示する。動画コーデック108などは、揮発性メモリ106に記録されている撮像による画像データを読み込み、ストリーミング再生に使用可能な動画データを生成する。動画コーデック108などは、生成した動画データを、揮発性メモリ106に記録する。 FIG. 5 is a detailed flowchart of the moving image data file generation process of FIG. The microcomputer 105 of the image pickup apparatus 1 of FIG. 1 executes the process of generating the moving image data file of FIG. 5 in step S502 of FIG. In step S601, the microcomputer 105 executes a process of generating moving image data that can be used for streaming playback. When the microcomputer 105 acquires the moving image data by imaging, it records it in the volatile memory 106. The microcomputer 105 instructs the video codec 108 and the like to generate video data that can be used for streaming playback. The moving image codec 108 or the like reads the image data recorded in the volatile memory 106 by imaging and generates moving image data that can be used for streaming playback. The moving image codec 108 or the like records the generated moving image data in the volatile memory 106.

ステップS602において、マイクロコンピュータ105は、動画データファイルが生成済みであるか否かを判断する。マイクロコンピュータ105は、たとえばステップS601で揮発性メモリ106に記録した動画データを最終的に書きだすためのstream.DATファイルが、外部メモリ112にすでに生成済みであるか否かを判断してよい。stream.DATファイルとは、MP4ファイルのmdatアトムとなるデータを格納するためのファイルである。この時点でのstream.DATファイルは、たとえば、サイズの大きい動画データを撮像している場合に、撮像中に外部メモリ112へ書きだした途中段階のものである。今回の撮像において動画データを一度も外部メモリ112へ書き出していない場合、外部メモリ112には、stream.DATファイルが記録されていない。今回の撮像についてのstream.DATファイルが外部メモリ112に記録されていない場合、マイクロコンピュータ105は、処理をステップS603へ進める。今回の撮像についてのstream.DATファイルがすでに外部メモリ112に記録されている場合、マイクロコンピュータ105は、処理をステップS604へ進める。 In step S602, the microcomputer 105 determines whether or not the moving image data file has been generated. The microcomputer 105 finally writes out the moving image data recorded in the volatile memory 106 in step S601, for example. It may be determined whether or not the DAT file has already been generated in the external memory 112. stream. The DAT file is a file for storing data that is an mdat atom of an MP4 file. At this point, stream. The DAT file is, for example, a file in the middle of being written to the external memory 112 during imaging when a large-sized moving image data is being imaged. If the moving image data has never been written to the external memory 112 in this imaging, the external memory 112 may have a stream. The DAT file is not recorded. The stream for this imaging. If the DAT file is not recorded in the external memory 112, the microcomputer 105 advances the process to step S603. The stream for this imaging. If the DAT file has already been recorded in the external memory 112, the microcomputer 105 advances the process to step S604.

ステップS603において、マイクロコンピュータ105は、今回の撮像についてのstream.DATファイルを、外部メモリ112に新規に生成する。その後、マイクロコンピュータ105は、処理をステップS604へ進める。ステップS604において、マイクロコンピュータ105は、揮発性メモリ106に記録されていれるストリーミング再生に使用可能な動画データを、外部メモリ112に生成されているstream.DATファイルに記録する。外部メモリ112のstream.DATファイルにすでに動画データが記録されている場合、マイクロコンピュータ105は、その後に揮発性メモリ106に記録されていれる動画データを付け足すように記録する。これにより、stream.DATファイルは、更新される。図4のステップS502が繰り返し実行されることにより、マイクロコンピュータ105は、図5の処理を繰り返す。これにより、動画撮像の終了時には、外部メモリ112には、撮像の最初から最後までの動画データが、ストリーミング再生に使用可能な形式で記録される。外部メモリ112には、撮像された動画データをストリーミング再生可能に含むstream.DATファイルが生成される。 In step S603, the microcomputer 105 determines the stream for this imaging. A DAT file is newly generated in the external memory 112. After that, the microcomputer 105 advances the process to step S604. In step S604, the microcomputer 105 generates moving image data recorded in the volatile memory 106 that can be used for streaming playback in the external memory 112. Record in a DAT file. The stream of the external memory 112. If the moving image data is already recorded in the DAT file, the microcomputer 105 records it so as to add the moving image data recorded in the volatile memory 106 thereafter. As a result, stream. The DAT file is updated. By repeatedly executing step S502 of FIG. 4, the microcomputer 105 repeats the process of FIG. As a result, at the end of the moving image imaging, the moving image data from the beginning to the end of the imaging is recorded in the external memory 112 in a format that can be used for streaming reproduction. The external memory 112 contains the captured moving image data so that it can be streamed and played back. A DAT file is generated.

図6は、図4の全体moovデータ生成処理の詳細なフローチャートである。図1の撮像装置1のマイクロコンピュータ105は、図4のステップS503において、図6の全体moovデータ生成処理を実行する。ステップS701において、マイクロコンピュータ105は、揮発性メモリ106に、全体moovデータが生成済みであるか否かを判断する。今回の撮像についての全体moovデータは、図4の処理が開始された直後には生成されていない。今回の撮像についての全体moovデータが生成済みでない場合、マイクロコンピュータ105は、処理をステップS702へ進める。今回の撮像についての全体moovデータが生成済みである場合、マイクロコンピュータ105は、処理をステップS703へ進める。 FIG. 6 is a detailed flowchart of the entire moov data generation process of FIG. The microcomputer 105 of the image pickup apparatus 1 of FIG. 1 executes the entire moov data generation process of FIG. 6 in step S503 of FIG. In step S701, the microcomputer 105 determines whether or not the entire moov data has been generated in the volatile memory 106. The overall moov data for this imaging was not generated immediately after the process of FIG. 4 was started. If the entire moov data for this imaging has not been generated, the microcomputer 105 advances the process to step S702. If the entire moov data for this imaging has already been generated, the microcomputer 105 advances the process to step S703.

ステップS702において、マイクロコンピュータ105は、揮発性メモリ106に、全体moovデータを新規に生成する。全体moovデータとは、MP4ファイルのmoovアトムとなるデータである。全体moovデータは、動画データと対応するように、stcoアトムのデータ、stscアトムのデータ、stszアトムのデータ、その他の必要なデータを有する。その後、マイクロコンピュータ105は、処理をステップS703へ進める。ステップS703において、マイクロコンピュータ105は、揮発性メモリ106に生成されている全体moovデータを更新する。マイクロコンピュータ105は、処理時点までの画像データに対応するように、全体moovデータに含まれているstcoアトムのデータ、stscアトムのデータ、stszアトムのデータ、その他の必要なデータを更新する。図4のステップS503が繰り返し実行されることにより、マイクロコンピュータ105は、図6の処理を繰り返す。これにより、揮発性メモリ106に生成される全体moovデータは更新される。動画撮像の終了時には、揮発性メモリ106には、撮像された動画データの最初から最後までの全体についての全体moovデータが生成される。 In step S702, the microcomputer 105 newly generates the entire moov data in the volatile memory 106. The whole moov data is data that becomes a moov atom of the MP4 file. The whole moov data has stco atom data, stsc atom data, stsz atom data, and other necessary data so as to correspond to the moving image data. After that, the microcomputer 105 advances the process to step S703. In step S703, the microcomputer 105 updates the entire moov data generated in the volatile memory 106. The microcomputer 105 updates the stco atom data, the stsc atom data, the stsz atom data, and other necessary data contained in the entire moov data so as to correspond to the image data up to the processing time point. By repeatedly executing step S503 of FIG. 4, the microcomputer 105 repeats the process of FIG. As a result, the entire moov data generated in the volatile memory 106 is updated. At the end of moving image imaging, the volatile memory 106 generates overall moov data for the entire captured moving image data from the beginning to the end.

図7は、図4の全体moovファイル生成処理の詳細なフローチャートである。図1の撮像装置1のマイクロコンピュータ105は、図4のステップS506において、図7の全体moovファイルの生成処理を実行する。ステップS801において、マイクロコンピュータ105は、揮発性メモリ106に生成されている全体moovデータの最終的なサイズが、FATで管理されている外部メモリ112のクラスタサイズアライメントになっているか否かを判断する。FATにおけるクラスタサイズとは、データを記録したことによって、使用してしまうデータ単位サイズのことである。仮にクラスタサイズが32KByteである場合、1Byteのデータを記録したとしても、32KByteの領域が使用されることになる。マイクロコンピュータ105は、全体moovデータの最終的なサイズが、クラスタサイズの倍数になっているか否かを判断してよい。全体moovデータの最終的なサイズがクラスタサイズの倍数となっていない場合、マイクロコンピュータ105は、処理をステップS802へ進める。たとえば全体moovデータが50KByteであり、外部メモリ112のクラスタサイズが32KByteである場合、全体moovデータの最終的なサイズはクラスタサイズの倍数ではない。マイクロコンピュータ105は、処理をステップS802へ進める。全体moovデータの最終的なサイズがクラスタサイズの倍数となっている場合、マイクロコンピュータ105は、処理をステップS803へ進める。たとえば全体moovデータが64KByteであり、外部メモリ112のクラスタサイズが32KByteである場合、全体moovデータの最終的なサイズはクラスタサイズの倍数となる。マイクロコンピュータ105は、処理をステップS803へ進める。 FIG. 7 is a detailed flowchart of the entire moov file generation process of FIG. The microcomputer 105 of the image pickup apparatus 1 of FIG. 1 executes the generation process of the entire moov file of FIG. 7 in step S506 of FIG. In step S801, the microcomputer 105 determines whether or not the final size of the total moov data generated in the volatile memory 106 is the cluster size alignment of the external memory 112 managed by the FAT. .. The cluster size in FAT is the data unit size that is used by recording data. If the cluster size is 32KByte, even if the data of 1Byte is recorded, the area of 32KByte will be used. The microcomputer 105 may determine whether the final size of the total moov data is a multiple of the cluster size. If the final size of the total moov data is not a multiple of the cluster size, the microcomputer 105 proceeds to step S802. For example, if the total moov data is 50 KByte and the cluster size of the external memory 112 is 32 KByte, the final size of the total moov data is not a multiple of the cluster size. The microcomputer 105 advances the process to step S802. If the final size of the total moov data is a multiple of the cluster size, the microcomputer 105 advances the process to step S803. For example, if the total moov data is 64KByte and the cluster size of the external memory 112 is 32KByte, the final size of the total moov data will be a multiple of the cluster size. The microcomputer 105 advances the process to step S803.

ステップS802において、マイクロコンピュータ105は、freeアトムの追加処理を実行する。マイクロコンピュータ105は、クラスタアライメントサイズでない全体moovデータに対してfreeアトムを付け足して、全体moovデータをクラスタサイズアライメントとする。freeアトムは、元の全体moovデータの後に付け足されてよい。これにより、全体moovデータは、外部メモリ112のクラスタサイズの倍数のものになる。ここで、freeアトムとは、文字通り自由に定義できるデータであり、一般的には空白を示すデータが使用されている。たとえば元の全体moovデータが50Kbyteであり、外部メモリ112のクラスタサイズが32KByteである場合、元の全体moovデータの後には、freeアトムが追加される。この場合、追加後の全体moovデータは、たとえば64KByteでよい。その後、マイクロコンピュータ105は、処理をステップS803へ進める。ステップS803において、マイクロコンピュータ105は、全体moovファイルの記録処理を実行する。マイクロコンピュータ105は、揮発性メモリ106に記録されている全体moovデータを、全体moovファイルとして外部メモリ112に記録する。外部メモリ112に記録される全体moovファイルのファイル名は、動画ストリームファイルのファイル名とされてよい。ファイル名は、たとえばMVI_0001.MP4でよい。図4のステップS505が実行されることにより、マイクロコンピュータ105は、図7の処理を実行する。これにより、動画撮像の終了後に、外部メモリ112には、撮像された動画データの最初から最後までの全体についての全体moovファイルが記録される。 In step S802, the microcomputer 105 executes additional processing of the free atom. The microcomputer 105 adds a free atom to the total moov data that is not the cluster alignment size, and sets the total moov data as the cluster size alignment. The free atom may be added after the original whole moov data. As a result, the total moov data becomes a multiple of the cluster size of the external memory 112. Here, the free atom is data that can be literally freely defined, and generally, data indicating a blank is used. For example, if the original total moov data is 50 Kbytes and the cluster size of the external memory 112 is 32 KBbytes, a free atom is added after the original total moov data. In this case, the total moov data after addition may be, for example, 64KByte. After that, the microcomputer 105 advances the process to step S803. In step S803, the microcomputer 105 executes the recording process of the entire moov file. The microcomputer 105 records the entire moov data recorded in the volatile memory 106 as an overall moov file in the external memory 112. The file name of the entire moov file recorded in the external memory 112 may be the file name of the video stream file. The file name is, for example, MVI_0001. MP4 is fine. By executing step S505 of FIG. 4, the microcomputer 105 executes the process of FIG. 7. As a result, after the end of the moving image imaging, the entire moov file for the entire imaged moving image data from the beginning to the end is recorded in the external memory 112.

図8は、動画ストリームファイルを生成するためのFAT処理の一例の説明図である。図8の例において外部メモリ112には、撮像された動画データをストリーミング再生可能な形式で含む動画データファイルと、その動画データについてのmoovファイルと、が記録される。マイクロコンピュータ105は、ステップS507において、外部メモリ112のFATを書き換えて外部メモリ112に記録されている複数のファイルを結合して、動画ストリームファイルを外部メモリ112に生成して記録する。 FIG. 8 is an explanatory diagram of an example of FAT processing for generating a moving image stream file. In the example of FIG. 8, in the external memory 112, a moving image data file including the captured moving image data in a format that can be streamed and reproduced, and a video file about the moving image data are recorded. In step S507, the microcomputer 105 rewrites the FAT of the external memory 112, combines a plurality of files recorded in the external memory 112, and generates and records a moving image stream file in the external memory 112.

図8(a)は、動画データを含む動画データファイルが書き込まれた外部メモリ112の説明図である。図8(a)に斜線範囲として示すように、動画データファイルは、外部メモリ112の1番目のクラスタと2番目のクラスタとにまたがって記録されている。この場合、外部メモリ112のFATには、動画データファイルの開始位置である1番目のクラスタに対応するセルに、0x02が記録される。0x02は、1番目のクラスタのデータが、2番目のクラスタのデータとつながった一連のデータであることを示している。FATの2番目のクラスタに対応するセルには、0xFFが記録される。0xFFは、ファイルのデータが、セルに対応するクラスタで終了することを意味する。これにより、外部メモリ112のFATには、外部メモリ112の1番目のクラスタから2番目のクラスタにかけて1つの動画データファイル(stream.DATファイル)が記録されていることが、記録される。外部メモリ112のFATには、動画データファイルを読み出す際には、図中に矢印で示す順番で複数のクラスタを読み出すことが記録される。 FIG. 8A is an explanatory diagram of the external memory 112 in which the moving image data file including the moving image data is written. As shown in FIG. 8A as a shaded area, the moving image data file is recorded across the first cluster and the second cluster of the external memory 112. In this case, 0x02 is recorded in the FAT of the external memory 112 in the cell corresponding to the first cluster, which is the start position of the moving image data file. 0x02 indicates that the data of the first cluster is a series of data connected to the data of the second cluster. 0xFF is recorded in the cell corresponding to the second cluster of FAT. 0xFF means that the data in the file ends in the cluster corresponding to the cell. As a result, it is recorded that one moving image data file (stream.DAT file) is recorded in the FAT of the external memory 112 from the first cluster to the second cluster of the external memory 112. When reading the moving image data file, the FAT of the external memory 112 records that a plurality of clusters are read in the order indicated by the arrows in the figure.

図8(b)は、動画データファイルに加えて、動画ストリームファイルについてのmoovファイルと、が書き込まれた外部メモリ112の説明図である。図8(b)に点領域として示すように、moovファイルは、外部メモリ112の3番目のクラスタに記録される。moovファイルの前半部分には、moovアトムのデータが含まれ、後半部分には、クラスタサイズアライメントをとるために付け足したfreeアトムのデータが含まれる。freeアトムのデータが付加されることにより、moovファイルのサイズは、クラスタの倍数のデータ量となり、クラスタに収まっている。この場合、外部メモリ112のFATには、moovファイルが記録される3番目のクラスタに対応するセルに、0xFFが記録される。これにより、外部メモリ112のFATには、外部メモリ112の3番目のクラスタに1つのmoovファイル(MVI_0001.MP4ファイル)が記録されていることが、記録される。 FIG. 8B is an explanatory diagram of the external memory 112 in which the moov file for the video stream file and the video data file are written in addition to the video data file. As shown as a point region in FIG. 8 (b), the moov file is recorded in a third cluster of external memory 112. The first half of the moov file contains the data of the moov atom, and the second half contains the data of the free atom added for cluster size alignment. By adding the data of the free atom, the size of the moov file becomes a multiple of the data amount of the cluster and fits in the cluster. In this case, 0xFF is recorded in the FAT of the external memory 112 in the cell corresponding to the third cluster in which the moov file is recorded. As a result, it is recorded in the FAT of the external memory 112 that one moov file (MVI_0001.MP4 file) is recorded in the third cluster of the external memory 112.

図8(c)は、ステップS507によるFATの書き換え処理後の外部メモリ112の説明図である。動画ストリームファイルをストリーミング再生するためには、図3(a)の形式が適している。一方で、動画ストリームファイルを生成するためには、図3(b)の形式が適している。FATの書き換え処理前の図8(b)の外部メモリ112では、動画ストリームファイルのクラスタの後に、moovファイルのクラスタが位置している。外部メモリ112の先頭から順番にこれらのデータを読み出した場合、それによるストリーミング再生データは、図3(b)の形式のものになる。 FIG. 8C is an explanatory diagram of the external memory 112 after the FAT rewriting process in step S507. In order to stream the video stream file, the format shown in FIG. 3A is suitable. On the other hand, in order to generate a moving image stream file, the format of FIG. 3B is suitable. In the external memory 112 of FIG. 8B before the FAT rewriting process, the moov file cluster is located after the video stream file cluster. When these data are read out in order from the beginning of the external memory 112, the streaming playback data resulting from the reading is in the format shown in FIG. 3 (b).

そこで、マイクロコンピュータ105は、ステップS507において、FATを書きかえて外部メモリ112に記録されている動画データファイルとmoovファイルとを結合する。マイクロコンピュータ105は、結合後に動画ストリームファイルの先頭にmoovデータが位置するように結合処理を実行する。具体的には、マイクロコンピュータ105は、FATにおいてmoovファイルが記録される3番目のクラスタに対応するセルを、動画データファイルの先頭を記録しているクラスタを示す値に書き換える。図8(b)の外部メモリ112では、動画データファイルの先頭は1番目のクラスタである。マイクロコンピュータ105は、3番目のクラスタに対応するセルを、0x01に書き換える。これにより、外部メモリ112には、撮像装置1で撮像した動画データをストリーミング再生可能なMP4形式の動画ストリームファイルが生成される。外部メモリ112のFATには、動画ストリームファイルを読み出す際には、図中に矢印で示す順番で複数のクラスタを読み出すことが記録される。この動画ストリームファイルでは、図3(a)のように、ファイルの先頭にmoovデータが含まれる。moovデータの後に、動画データが含まれる。生成される動画ストリームファイルでは、ファイルの先頭にmdatアトムが含まれ、moovアトムの後にmoovアトムが含まれることになる。マイクロコンピュータ105は、動画データファイルであるstream.DATを揮発性メモリ106へ読みだして、外部メモリ112へ再度書き込む処理を実行することなく、ストリーミング再生可能な動画ストリームファイルを生成できる。再書き込みでは、マイクロコンピュータ105は、揮発性メモリ106へ読みだしたstream.DATを、moovファイルであるMVI_0001.MP4の後に続けるように書き込むことになる。 Therefore, in step S507, the microcomputer 105 rewrites the FAT and combines the moving image data file and the moov file recorded in the external memory 112. After the combination, the microcomputer 105 executes the combination process so that the moov data is located at the beginning of the moving image stream file. Specifically, the microcomputer 105 rewrites the cell corresponding to the third cluster in which the moov file is recorded in the FAT to a value indicating the cluster in which the head of the moving image data file is recorded. In the external memory 112 of FIG. 8B, the head of the moving image data file is the first cluster. The microcomputer 105 rewrites the cell corresponding to the third cluster to 0x01. As a result, an MP4 format moving image stream file capable of streaming and playing back the moving image data captured by the imaging device 1 is generated in the external memory 112. When reading the moving image stream file, the FAT of the external memory 112 records that a plurality of clusters are read in the order indicated by the arrows in the figure. In this moving image stream file, as shown in FIG. 3A, moov data is included at the beginning of the file. Video data is included after the moov data. In the generated video stream file, the mdat atom is included at the beginning of the file, and the moov atom is included after the moov atom. The microcomputer 105 is a video data file, stream. A video stream file that can be streamed can be generated without performing a process of reading the DAT to the volatile memory 106 and writing it to the external memory 112 again. In the rewrite, the microcomputer 105 reads the stream to the volatile memory 106. DAT is a moov file, MVI_0001. It will be written to continue after MP4.

図9は、動画ストリームファイル生成処理により外部メモリ112に生成される動画ストリームファイルの説明図である。マイクロコンピュータ105が図4の動画ストリームファイル生成処理を実行することにより、図9の動画ストリームファイルが外部メモリ112に生成して記録される。 FIG. 9 is an explanatory diagram of a video stream file generated in the external memory 112 by the video stream file generation process. When the microcomputer 105 executes the moving image stream file generation process of FIG. 4, the moving image stream file of FIG. 9 is generated and recorded in the external memory 112.

図9の動画ストリームファイルは、動画データをストリーミング再生するための全体管理情報を構成する全体moovアトム1301およびmdat全体の全体ヘッダ領域1302、を有する。全体ヘッダ領域1302の後には、外部メモリ112のクラスタ境界となる領域まで、パディングデータ1303が記録される。また、図9の動画ストリームファイルは、パディングデータ1303の後に、1番目の分割moovアトム1304と、1番目の分割ヘッダ領域1305と、1番目のmdatアトム1306と、が記録される。1番目のmdatアトム1306の後には、外部メモリ112のクラスタ境界となる領域まで、パディングデータ1307が記録される。また、図9の動画ストリームファイルは、パディングデータ1307の後に、2番目の分割moovアトム1308と、2番目の分割ヘッダ領域1309と、2番目のmdatアトム1310と、が記録される。2番目のmdatアトム1310の後には、外部メモリ112のクラスタ境界となる領域まで、不図示のパディングデータが記録されてもよい。 The moving image stream file of FIG. 9 has an entire moov atom 1301 and an overall header area 1302 of the entire mdat that constitute overall management information for streaming and reproducing the moving image data. After the entire header area 1302, the padding data 1303 is recorded up to the area that becomes the cluster boundary of the external memory 112. Further, in the moving image stream file of FIG. 9, the first divided moov atom 1304, the first divided header area 1305, and the first mdat atom 1306 are recorded after the padding data 1303. After the first mdat atom 1306, the padding data 1307 is recorded up to the cluster boundary area of the external memory 112. Further, in the moving image stream file of FIG. 9, a second divided moov atom 1308, a second divided header area 1309, and a second mdat atom 1310 are recorded after the padding data 1307. After the second mdat atom 1310, padding data (not shown) may be recorded up to the cluster boundary area of the external memory 112.

このような動画ストリームファイルにおいて、パディングデータ1303,1307、分割moovアトム1304,1308、分割ヘッダ領域1305,1309は、全体moovアトム1301からは参照されないデータ領域とされている。参照されないというのは、全体moovアトム1301に格納されるstcoおよびstszから算出されるデータ格納領域に該当しない領域であるということを意味する。これに対し、複数のmdatアトム1306,1310は、全体moovアトム1301からは連続したデータ領域として参照される。また、分割moovアトム1304,1308には、mdatアトム1306,1310に格納される分割画像データについてのstcoおよびstszが構築される。そして、mdat全体の全体ヘッダ領域1302には、パディングデータ1303からmdatアトム1310までの、パッティングデータを含む動画データのサイズが記録される。 In such a moving image stream file, the padding data 1303, 1307, the divided moov atom 1304, 1308, and the divided header areas 1305, 1309 are regarded as data areas that are not referenced from the entire moov atom 1301. Not referenced means that the area does not correspond to the data storage area calculated from stco and stsz stored in the entire moov atom 1301. On the other hand, the plurality of mdat atoms 1306 and 1310 are referred to as continuous data areas from the whole moov atom 1301. Further, in the divided moov atom 1304, 1308, stco and stsz for the divided image data stored in the mdat atom 1306, 1310 are constructed. Then, the size of the moving image data including the putting data from the padding data 1303 to the mdat atom 1310 is recorded in the entire header area 1302 of the entire mdat.

また、図9の動画ストリームファイルは、動画データを複数の分割動画データに分けて記録し、さらに分割動画データごとの複数の分割管理情報を含んでいる。しかも、パディングデータ1303と分割moovアトム1304とは、外部メモリ112においてクラスタ境界の前後に分けて記録される。また、パディングデータ1307と分割moovアトム1308とは、外部メモリ112においてクラスタ境界の前後に分けて記録される。したがって、図9の動画ストリームファイルからたとえばmdatアトム1306を切り出す編集処理では、mdatアトム1306とともにその分割管理情報である分割moovアトム1304および分割ヘッダ領域1305を含めて切り出すことが可能である。これにより、mdatアトム1306の画像データをストリーミング再生可能なファイルを切り出すことができる。このファイルは、mdatアトム1105の分割動画データをストリーミング再生可能な分割動画ストリームファイルとすることができる。分割動画ストリームファイルの一からの再構築は不要である。動画データの一部を切り出す編集処理は、短時間で終了できる。また、図9の動画ストリームファイルは、ほぼそのままのデータ構造で切り出すだけで、容易に複数の分割動画ストリームファイルに分けて記録することができる。このため、図9の動画ストリームファイルを編集、コピー、転送する際には、複数の分割動画ストリームファイルを替わりに用いることが可能である。複数の分割動画ストリームファイルを用いることにより、処理時間の短縮が期待し得る。 Further, the moving image stream file of FIG. 9 divides and records the moving image data into a plurality of divided moving image data, and further includes a plurality of divided management information for each divided moving image data. Moreover, the padding data 1303 and the divided moov atom 1304 are separately recorded before and after the cluster boundary in the external memory 112. Further, the padding data 1307 and the divided moov atom 1308 are separately recorded before and after the cluster boundary in the external memory 112. Therefore, in the editing process for cutting out, for example, the mdat atom 1306 from the moving image stream file of FIG. 9, it is possible to cut out the mdat atom 1306 together with the divided moov atom 1304 and the divided header area 1305 which are the division management information. As a result, it is possible to cut out a file in which the image data of mdat atom 1306 can be streamed and reproduced. This file can be a split video stream file capable of streaming playback of the split video data of mdat atom 1105. There is no need to rebuild the split video stream file from scratch. The editing process for cutting out a part of the video data can be completed in a short time. Further, the moving image stream file of FIG. 9 can be easily divided into a plurality of divided moving image stream files and recorded by simply cutting out the moving image stream file with almost the same data structure. Therefore, when editing, copying, and transferring the moving image stream file of FIG. 9, a plurality of divided moving image stream files can be used instead. By using a plurality of divided video stream files, it can be expected that the processing time will be shortened.

ところで、このように外部メモリ112においてストリーミング再生可能に生成される動画ストリームファイルは、撮像装置1から外部装置200へ転送されることがある。そして、動画ストリームファイルのデータ量が多くなると、転送処理に時間がかかる。特に、近年の外付けの記録媒体は大容量化している。また、ライブ動画発信の機会は増加している。これらの要因により、1つの動画ストリームファイルに記録される動画データの再生時間が長くなる傾向にあり、その転送処理も時間がかかる。また、転送先のたとえば外部装置200では、動画ストリームファイルの転送が終了しなければ、動画ストリームファイルに含まれる動画データの内容を確認することができない。このため、長時間の撮影によりデータサイズが大きくなっている動画ストリームファイルの転送については、転送を開始してもその後に長時間にわたって動画データの内容を確認することができなくなる。次に、このような転送処理の効率化を期待できる、本実施形態での動画ストリームファイルの転送処理について説明する。本実施形態での動画ストリームファイルの転送処理を用いることにより、動画ストリームファイルの転送が終了していなくとも、転送先のたとえば外部装置200では、転送中の動画ファイルの動画データの内容を確認することが可能となる。 By the way, the moving image stream file thus generated so as to be streamably reproducible in the external memory 112 may be transferred from the image pickup apparatus 1 to the external apparatus 200. When the amount of data in the video stream file is large, the transfer process takes time. In particular, the capacity of external recording media has increased in recent years. In addition, opportunities for live video transmission are increasing. Due to these factors, the reproduction time of the moving image data recorded in one moving image stream file tends to be long, and the transfer process also takes time. Further, at the transfer destination, for example, the external device 200, the contents of the moving image data included in the moving image stream file cannot be confirmed until the transfer of the moving image stream file is completed. For this reason, regarding the transfer of a moving image stream file whose data size has become large due to long-time shooting, even if the transfer is started, the contents of the moving image data cannot be confirmed for a long time thereafter. Next, the transfer processing of the moving image stream file in the present embodiment, which can be expected to improve the efficiency of such transfer processing, will be described. By using the video stream file transfer process in the present embodiment, even if the video stream file transfer is not completed, the transfer destination, for example, the external device 200 confirms the content of the video data of the video file being transferred. It becomes possible.

図10は、第一実施形態における動画ストリームファイルの転送元処理のフローチャートである。図1の撮像装置1のマイクロコンピュータ105は、撮像装置1が撮像により生成した動画ストリームファイルを、通信部材115から転送先の外部装置200へ転送するために、図10の転送元処理を実行する。転送元の図1の撮像装置1の外部メモリ112には、撮像装置1が撮像により生成した動画ストリームファイルが、FAT(FAT Allocation Table)ファイルシステムを使用して記録されている。 FIG. 10 is a flowchart of the transfer source processing of the moving image stream file in the first embodiment. The microcomputer 105 of the image pickup apparatus 1 of FIG. 1 executes the transfer source process of FIG. 10 in order to transfer the moving image stream file generated by the image pickup apparatus 1 from the communication member 115 to the transfer destination external device 200. .. In the external memory 112 of the image pickup device 1 of FIG. 1 which is the transfer source, the moving image stream file generated by the image pickup device 1 by the image pickup device 1 is recorded by using the FAT (FAT Allocation Table) file system.

ステップS1301において、マイクロコンピュータ105は、転送する動画ストリームファイルを分割転送するか否かを判断する。分割転送するか否かは、たとえば、動画ストリームファイルのサイズであるデータ量、動画ストリームファイルに管理情報として含まれる再生時間などの情報に基づいて判断してよい。また、分割転送するか否かは、ユーザーによる設定に基づいて判断してよい。分割転送すると判断すると、マイクロコンピュータ105は、処理をステップS1302へ進める。分割転送しないと判断すると、マイクロコンピュータ105は、処理をステップS1308へ進める。 In step S1301, the microcomputer 105 determines whether or not to divide and transfer the moving image stream file to be transferred. Whether or not to perform split transfer may be determined based on, for example, information such as the amount of data which is the size of the video stream file and the playback time included in the video stream file as management information. Further, whether or not to perform split transfer may be determined based on the setting by the user. If it is determined that the transfer is divided, the microcomputer 105 advances the process to step S1302. If it is determined that the transfer is not divided, the microcomputer 105 advances the process to step S1308.

ステップS1302から、マイクロコンピュータ105は、動画ストリームファイルを分割転送するための処理を開始する。マイクロコンピュータ105は、まず、動画ストリームファイルを分割転送する分割転送ストリームファイルのファイル数を算出する。たとえば動画データを30分毎に分割して転送しようとする場合、マイクロコンピュータ105は、80分の動画データを、30分、30分、20分の3つの分割転送動画データに分割する。この場合、マイクロコンピュータ105は、分割転送ストリームファイルのファイル数として、3を算出する。 From step S1302, the microcomputer 105 starts a process for dividing and transferring the video stream file. First, the microcomputer 105 calculates the number of files of the divided transfer stream file for which the moving image stream file is divided and transferred. For example, when the moving image data is to be divided and transferred every 30 minutes, the microcomputer 105 divides the 80-minute moving image data into three divided transfer moving image data of 30 minutes, 30 minutes, and 20 minutes. In this case, the microcomputer 105 calculates 3 as the number of files of the divided transfer stream file.

ステップS1303において、マイクロコンピュータ105は、転送する動画ストリームファイルから、そのヘッダ部分を切り離し、転送する動画ストリームファイルの動画データを得る。マイクロコンピュータ105は、たとえば、全体moovデータと、その直後のmdatとの境界部分で切り離す。この場合、少なくとも全体管理情報がヘッダ部分として切り離される。 In step S1303, the microcomputer 105 separates the header portion from the video stream file to be transferred, and obtains the video data of the video stream file to be transferred. The microcomputer 105 is separated, for example, at the boundary portion between the entire moov data and the mdat immediately after that. In this case, at least the overall management information is separated as the header part.

ステップS1304において、マイクロコンピュータ105は、転送する動画ストリームファイルの画像データの一部をストリーミング再生可能に含む分割転送ストリームファイルを生成する。分割転送ストリームファイルの生成処理の詳細は、図11に後述する。
マイクロコンピュータ105は、分割転送ファイル生成手段として、複数の分割転送ストリームファイルを生成する。分割転送ストリームファイルは、転送する動画ストリームファイルの動画データを複数に分割した分割動画データの各々をストリーミング再生可能に含む。
In step S1304, the microcomputer 105 generates a split transfer stream file that includes a part of the image data of the moving image stream file to be transferred so that it can be streamed and played back. Details of the split transfer stream file generation process will be described later in FIG.
The microcomputer 105 generates a plurality of divided transfer stream files as a divided transfer file generation means. The divided transfer stream file includes each of the divided moving image data obtained by dividing the moving image data of the moving image stream file to be transferred into a plurality of pieces so that the moving image data can be streamed and played back.

ステップS1305において、マイクロコンピュータ105は、ステップS1304で生成した分割転送ストリームファイルを転送する。通信部材115は、分割転送ストリームファイルを外部装置200へ送信する。これにより、外部装置200は、撮像装置1において動画ストリームファイルの転送が開始されてから少しの時間の後に、撮像装置1から分割転送ストリームファイルを受信できる。外部装置200は、たとえば受信した分割転送ストリームファイルを再生して、動画ストリームファイルの画像データの一部を再生して確認することができる。たとえば動画ストリームファイルが3つに分割して転送される場合、外部装置200において確認が可能となるまで待ち時間は、約3分の1になる。 In step S1305, the microcomputer 105 transfers the split transfer stream file generated in step S1304. The communication member 115 transmits the divided transfer stream file to the external device 200. As a result, the external device 200 can receive the divided transfer stream file from the image pickup device 1 shortly after the transfer of the moving image stream file is started in the image pickup device 1. The external device 200 can reproduce, for example, a received split transfer stream file, and reproduce and confirm a part of the image data of the moving image stream file. For example, when the moving image stream file is divided into three and transferred, the waiting time until the external device 200 can confirm the file is reduced to about one-third.

ステップS1306において、マイクロコンピュータ105は、転送する動画ストリームファイルの画像データの分割転送が終了したか否かを判断する。分割転送が終了していない場合、マイクロコンピュータ105は、処理をステップS1304へ戻す。マイクロコンピュータ105は、分割転送が終了したと判断するまで、ステップS1304からステップS1306の処理を繰り返し、複数の分割転送ストリームファイルを順番に送信する。そして、この繰り返し回数がステップS1302のファイル数と同数となると、マイクロコンピュータ105は、分割転送が終了したと判断し、処理をステップS1307へ進める。この間に、転送する動画ストリームファイルの画像データは、複数の分割転送ストリームファイルに分けて、外部装置200へ転送される。 In step S1306, the microcomputer 105 determines whether or not the divided transfer of the image data of the moving image stream file to be transferred is completed. If the split transfer is not completed, the microcomputer 105 returns the process to step S1304. The microcomputer 105 repeats the processes of steps S1304 to S1306 until it is determined that the divided transfer is completed, and transmits a plurality of divided transfer stream files in order. Then, when the number of repetitions becomes the same as the number of files in step S1302, the microcomputer 105 determines that the divided transfer is completed, and proceeds to the process in step S1307. During this time, the image data of the moving image stream file to be transferred is divided into a plurality of divided transfer stream files and transferred to the external device 200.

ステップS1307では、転送する動画ストリームファイルに対応する複数の分割転送ストリームファイルのすべてについての転送が終了している。マイクロコンピュータ105は、ステップS1303において切り離したヘッダ部分を含むヘッダファイルを生成して外部装置200へ転送する。マイクロコンピュータ105は、ヘッダファイル生成手段として、ヘッダファイルを、分割転送ストリームファイルとは別に生成して転送する。ヘッダファイルは、複数の分割転送ストリームファイルに分割して含まれる複数の分割動画データをまとめてストリーミング再生するための管理情報を含むが、分割動画データを含まないファイルでよい。通信部材115は、ヘッダファイルを外部装置200へ送信する。これにより、外部装置200は、撮像装置1が転送しようとしていた動画ストリームファイルについてのすべてのデータを受信できる。その後、マイクロコンピュータ105は、本処理を終了する。 In step S1307, the transfer of all of the plurality of divided transfer stream files corresponding to the moving image stream files to be transferred is completed. The microcomputer 105 generates a header file including the header portion separated in step S1303 and transfers it to the external device 200. As a header file generation means, the microcomputer 105 generates and transfers a header file separately from the divided transfer stream file. The header file may be a file that does not include the divided moving image data, although the header file contains management information for collectively streaming playback of a plurality of divided moving image data included in the divided transfer stream file. The communication member 115 transmits the header file to the external device 200. As a result, the external device 200 can receive all the data about the moving image stream file that the image pickup device 1 was about to transfer. After that, the microcomputer 105 ends this process.

ステップS1308は、転送する動画ストリームファイルを分割転送しない場合に実行される処理である。マイクロコンピュータ105は、転送する動画ストリームファイルをそのまま転送する。通信部材115は、動画ストリームファイルを外部装置200へ送信する。これにより、外部装置200は、撮像装置1から、動画ストリームファイルを受信できる。 Step S1308 is a process executed when the moving image stream file to be transferred is not divided and transferred. The microcomputer 105 transfers the moving image stream file to be transferred as it is. The communication member 115 transmits the moving image stream file to the external device 200. As a result, the external device 200 can receive the moving image stream file from the image pickup device 1.

図11は、図10のステップS1304の分割転送ストリームファイルの生成処理の詳細なフローチャートである。マイクロコンピュータ105は、図10のステップS1304において図11の生成処理を実行することにより、転送する動画ストリームファイルを分割した複数の分割転送ストリームファイルを生成する。ステップS1401において、マイクロコンピュータ105は、図10のステップS1301で分割転送すると判断した動画ストリームファイルの動画データについての分割位置を決定する。たとえば80分の動画データを30分、30分、20分の3つの分割転送ストリームファイルに分割する場合、マイクロコンピュータ105は、動画データにおける各分割の境界が1Chunkの境界位置となるように、分割位置を決定してよい。 FIG. 11 is a detailed flowchart of the process of generating the split transfer stream file in step S1304 of FIG. The microcomputer 105 generates a plurality of divided transfer stream files by dividing the moving image stream file to be transferred by executing the generation process of FIG. 11 in step S1304 of FIG. In step S1401, the microcomputer 105 determines the division position for the moving image data of the moving image stream file determined to be divided and transferred in step S1301 of FIG. For example, when the 80-minute video data is divided into three divided transfer stream files of 30 minutes, 30 minutes, and 20 minutes, the microcomputer 105 divides the video data so that the boundary of each division is the boundary position of 1 Chunk. The position may be determined.

ステップS1402において、マイクロコンピュータ105は、S1401で決定した分割位置に対応する動画ファイルヘッダを生成する。動画ファイルヘッダは、分割された動画データをストリーミング再生するための管理情報である。マイクロコンピュータ105は、ステップS1303で切り離した動画ストリームファイルのヘッダ情報を元にして、分割された動画データについてのファイルオフセット、データサイズを抽出する。これにより、マイクロコンピュータ105は、決定した分割位置に対応する動画ファイルヘッダを再構築できる。ステップS1403において、マイクロコンピュータ105は、S1401で決定した分割位置で分割した分割動画データを、動画ストリームファイルから切り出す。分割動画データは、動画と音声との双方を含んでよい。マイクロコンピュータ105は、分割動画データを、mdat構成のアトム構造に再構築するために、分割動画データの先頭にmdatアトムのヘッダを生成して付加する。ステップS1404において、マイクロコンピュータ105は、S1402で生成した動画ファイルヘッダと、S1403で生成した分割動画データとを結合して、1つの分割転送ストリームファイルを生成する。このように撮像装置1のマイクロコンピュータ105は、転送部材として、動画ストリームファイルを転送しようとする場合に、動画ストリームファイルをそのまま転送しない。マイクロコンピュータ105は、替わりに、転送する動画ストリームファイルについて生成される複数の分割転送ストリームファイルを順番に転送する。また、マイクロコンピュータ105は、複数の分割転送ストリームファイルを転送した後に、分割動画データを含まないヘッダファイルを転送する。 In step S1402, the microcomputer 105 generates a moving image file header corresponding to the division position determined in S1401. The video file header is management information for streaming and playing the divided video data. The microcomputer 105 extracts the file offset and the data size of the divided video data based on the header information of the video stream file separated in step S1303. As a result, the microcomputer 105 can reconstruct the moving image file header corresponding to the determined division position. In step S1403, the microcomputer 105 cuts out the divided moving image data divided at the divided position determined in S1401 from the moving image stream file. The divided moving image data may include both moving images and audio. The microcomputer 105 generates and adds a header of the mdat atom to the beginning of the divided moving image data in order to reconstruct the divided moving image data into an atom structure having an mdat configuration. In step S1404, the microcomputer 105 combines the moving image file header generated in S1402 with the divided moving image data generated in S1403 to generate one divided transfer stream file. As described above, the microcomputer 105 of the image pickup apparatus 1 does not transfer the moving image stream file as it is when trying to transfer the moving image stream file as a transfer member. Instead, the microcomputer 105 sequentially transfers a plurality of divided transfer stream files generated for the moving image stream file to be transferred. Further, the microcomputer 105 transfers a header file that does not include the divided moving image data after transferring a plurality of divided transfer stream files.

図12は、第一実施形態における動画ストリームファイルの転送先処理のフローチャートである。撮像装置1から動画ストリームファイルが複数の分割転送ストリームファイルとヘッダファイルとに分けて転送される外部装置200は、図12の転送先処理を実行する。外部装置200は、たとえば図1の撮像装置1と同様のものでよい。この場合、外部装置200としての撮像装置1のマイクロコンピュータ105は、図12の転送先処理を実行する。このような撮像装置1は、動画ストリームファイルを他の装置へ転送し、他の装置から動画ストリームファイルの転送を受けることができる。 FIG. 12 is a flowchart of the transfer destination processing of the moving image stream file in the first embodiment. The external device 200, in which the moving image stream file is separately transferred from the image pickup device 1 to a plurality of divided transfer stream files and header files, executes the transfer destination process of FIG. 12. The external device 200 may be, for example, the same as the image pickup device 1 of FIG. In this case, the microcomputer 105 of the image pickup apparatus 1 as the external apparatus 200 executes the transfer destination process of FIG. Such an image pickup apparatus 1 can transfer a moving image stream file to another device and receive the transfer of the moving image stream file from the other device.

ステップS1601において、外部装置200のマイクロコンピュータ105は、動画ストリームファイルについての転送依頼を、転送元の撮像装置1へ送信する。転送依頼は、転送先の外部装置200の通信部材115から、転送元の撮像装置1の通信部材115へ送信される。転送元の撮像装置1のマイクロコンピュータ105は、転送依頼を取得すると、図10の動画ストリームファイルの転送元処理を実行する。転送元の撮像装置1のマイクロコンピュータ105は、転送依頼に係る動画ストリームファイルについて複数の分割転送ファイルおよびヘッダファイルを生成して順番に転送することを開始する。ステップS1602において、外部装置200のマイクロコンピュータ105は、転送元の撮像装置1が転送したファイルを受信する。 In step S1601, the microcomputer 105 of the external device 200 transmits a transfer request for the moving image stream file to the image pickup device 1 of the transfer source. The transfer request is transmitted from the communication member 115 of the external device 200 of the transfer destination to the communication member 115 of the image pickup device 1 of the transfer source. Upon acquiring the transfer request, the microcomputer 105 of the image pickup device 1 of the transfer source executes the transfer source process of the moving image stream file of FIG. The microcomputer 105 of the image pickup apparatus 1 of the transfer source starts to generate a plurality of divided transfer files and header files for the moving image stream file related to the transfer request and transfer them in order. In step S1602, the microcomputer 105 of the external device 200 receives the file transferred by the image pickup device 1 of the transfer source.

ステップS1603において、外部装置200のマイクロコンピュータ105は、ヘッダファイルを受信したから否かを判断する。ヘッダファイルを受信していない場合、外部装置200のマイクロコンピュータ105は、処理をステップS1602へ戻す。外部装置200のマイクロコンピュータ105は、ステップS1602からステップS1603の処理を繰り返して、転送元の撮像装置1が順番に転送する複数の分割転送ファイルおよびヘッダファイルを受信する。ヘッダファイルを受信すると、外部装置200のマイクロコンピュータ105は、処理をステップS1604へ進める。ステップS1604において、外部装置200のマイクロコンピュータ105は、転送元の撮像装置1が順番に転送した複数のファイルを結合して、結合ファイルを生成する。この際、外部装置200のマイクロコンピュータ105は、たとえば、転送された各分割転送ファイルの分割moovデータとmdatデータとを切り離す。外部装置200のマイクロコンピュータ105は、再生の先頭の分割転送ファイル以外についてのmdatデータを、再生の順番で、再生の先頭の分割転送ファイルのmdatデータの後に結合する。外部装置200のマイクロコンピュータ105は、再生の先頭のmdatデータのヘッダに記載されるデータサイズを、結合後のサイズに書き換える。外部装置200のマイクロコンピュータ105は、ヘッダファイルを、結合後のmdatデータに結合する。ヘッダファイルは、好ましくは結合後のmdatデータの前に結合する。これにより、外部装置200には、転送依頼に係る動画ストリームファイルが再構築される。このように外部装置200には、その転送部材としての通信部材115に対して、他の装置である転送元の撮像装置1から、分割動画データを含む複数の分割転送ストリームファイルの後に、分割動画データを含まないヘッダファイルが転送される。外部装置200は、統合手段として、転送されてきた複数の分割転送ストリームファイルとヘッダファイルとを結合し、統合の結果として1つの動画ストリームファイルを生成する。この動画ストリームファイルは、統合動画ファイルの一例である。 In step S1603, the microcomputer 105 of the external device 200 determines whether or not the header file has been received. If the header file has not been received, the microcomputer 105 of the external device 200 returns the process to step S1602. The microcomputer 105 of the external device 200 repeats the processes of steps S1602 to S1603 to receive a plurality of divided transfer files and header files to be sequentially transferred by the image pickup device 1 of the transfer source. Upon receiving the header file, the microcomputer 105 of the external device 200 advances the process to step S1604. In step S1604, the microcomputer 105 of the external device 200 combines a plurality of files sequentially transferred by the image pickup device 1 of the transfer source to generate a combined file. At this time, the microcomputer 105 of the external device 200 separates the divided moov data and the mdat data of each transferred divided transfer file, for example. The microcomputer 105 of the external device 200 combines the mdat data other than the divided transfer file at the beginning of reproduction after the mdat data of the divided transfer file at the beginning of reproduction in the order of reproduction. The microcomputer 105 of the external device 200 rewrites the data size described in the header of the mdat data at the beginning of the reproduction to the size after the combination. The microcomputer 105 of the external device 200 combines the header file with the combined mdat data. The header file is preferably combined before the combined mdat data. As a result, the moving image stream file related to the transfer request is reconstructed in the external device 200. As described above, in the external device 200, the communication member 115 as the transfer member is subjected to the split moving image after the plurality of divided transfer stream files including the divided moving image data from the image pickup device 1 of the transfer source which is another device. Header files that do not contain data are transferred. As an integration means, the external device 200 combines a plurality of transferred split transfer stream files and a header file, and generates one moving image stream file as a result of the integration. This video stream file is an example of an integrated video file.

以上のように、本実施形態では、動画ストリームファイルを転送する場合に、動画ストリームファイルをそのまま転送する替わりに、複数の分割転送ストリームファイルを順番に転送する。複数の分割転送ストリームファイルは、転送する動画ストリームファイルを複数に分割した分割動画データの各々をストリーミング再生可能に含む。これにより、転送先の外部装置200には、動画ストリームファイルに含まれるすべての動画データが転送される前に、その一部の分割動画データをストリーミング再生可能に含む分割転送ストリームファイルが転送される。転送先の外部装置200は、転送に係る動画ストリームファイルに含まれるすべての動画データが転送される前に、その一部の分割動画データをストリーミング再生して確認することができる。転送先の外部装置200は、転送に係る動画ストリームファイルに含まれるすべての動画データが転送されるまで待たないで、早期に、動画データの内容確認を開始できる。また、本発明において転送部材は、複数の分割転送ストリームファイルを転送した後に、複数の分割転送ストリームファイルに分割して含まれる複数の分割動画データをまとめてストリーミング再生するためのヘッダファイルを生成して転送する。ヘッダファイルは、全体管理情報を含むが、分割動画データを含まない。ヘッダファイルは、分割転送ストリームファイルとは別に生成して転送される。転送先の外部装置200では、複数の分割転送ストリームファイルが順番に転送されてくるだけでは、動画ストリームファイルの替わりの転送が終了したことを判断することが難しい。本発明では、複数の分割転送ストリームファイルを転送した後に、分割動画データを含まないヘッダファイルを転送する。転送先の外部装置200は、分割動画データを含まないヘッダファイルの転送により、動画ストリームファイルの替わりの転送が終了したことを容易に判断することができる。本発明では、動画ファイルを複数の装置の間で転送する場合での転送先の装置において、転送に係る動画ファイルに含まれるすべての動画データが転送されるまで待つことなく、転送中の動画ストリームファイルの動画データの内容を確認することができる。 As described above, in the present embodiment, when the video stream file is transferred, instead of transferring the video stream file as it is, a plurality of divided transfer stream files are transferred in order. The plurality of divided transfer stream files include each of the divided moving image data obtained by dividing the moving image stream file into a plurality of divided video stream files so that they can be streamed and played back. As a result, the split transfer stream file containing a part of the split video data so that it can be streamed is transferred to the transfer destination external device 200 before all the video data included in the video stream file is transferred. .. The transfer destination external device 200 can stream and reproduce a part of the divided video data before the video data included in the video stream file related to the transfer is transferred. The transfer destination external device 200 can start checking the contents of the video data at an early stage without waiting until all the video data included in the video stream file related to the transfer is transferred. Further, in the present invention, the transfer member generates a header file for collectively streaming and playing a plurality of divided moving image data included in a plurality of divided transfer stream files after transferring a plurality of divided transfer stream files. And transfer. The header file contains the overall management information, but does not include the divided video data. The header file is generated and transferred separately from the split transfer stream file. In the transfer destination external device 200, it is difficult to determine that the transfer instead of the moving image stream file is completed only by transferring the plurality of divided transfer stream files in order. In the present invention, after transferring a plurality of divided transfer stream files, a header file that does not include the divided moving image data is transferred. The transfer destination external device 200 can easily determine that the transfer instead of the moving image stream file has been completed by transferring the header file that does not include the divided moving image data. In the present invention, in the transfer destination device when the video file is transferred between a plurality of devices, the video stream being transferred without waiting until all the video data included in the video file related to the transfer is transferred. You can check the contents of the video data in the file.

[第二実施形態]
次に、本発明の第二実施形態に係る動画ファイル転送装置を有する撮像装置1を説明する。以下の説明では、主に上述した実施形態との相違点について説明する。本実施形態では、図9の動画ストリームファイルの動画データを、転送のために複数の分割転送ファイルの分割動画データに分割する仕方が、上述した実施形態と異なる。本実施形態では、具体的には、図9の動画ストリームファイルの複数の動画データファイルおよび複数の分割moovファイルの各々が、外部メモリ112のクラスタの単位となっていることを利用して、分割転送ファイルの生成処理を簡略化している。
[Second Embodiment]
Next, the image pickup apparatus 1 having the moving image file transfer apparatus according to the second embodiment of the present invention will be described. In the following description, differences from the above-described embodiments will be mainly described. In the present embodiment, the method of dividing the moving image data of the moving image stream file of FIG. 9 into the divided moving image data of a plurality of divided transfer files for transfer is different from the above-described embodiment. In the present embodiment, specifically, each of the plurality of video data files and the plurality of divided moov files of the video stream file of FIG. 9 is divided by utilizing the fact that each of them is a unit of a cluster of external memory 112. The transfer file generation process is simplified.

図13は、第二実施形態における、図10のステップS1304の分割転送ストリームファイルの生成処理の詳細なフローチャートである。図1の撮像装置1のマイクロコンピュータ105は、撮像装置1が撮像により生成した動画ストリームファイルを、通信部材115から転送先の外部装置200へ転送するために、図10の転送元処理を実行する。そして、図10のステップS1304において、撮像装置1のマイクロコンピュータ105は、図13の分割転送ストリームファイルの生成処理を実行する。 FIG. 13 is a detailed flowchart of the process of generating the split transfer stream file in step S1304 of FIG. 10 in the second embodiment. The microcomputer 105 of the image pickup apparatus 1 of FIG. 1 executes the transfer source process of FIG. 10 in order to transfer the moving image stream file generated by the image pickup apparatus 1 from the communication member 115 to the transfer destination external device 200. .. Then, in step S1304 of FIG. 10, the microcomputer 105 of the image pickup apparatus 1 executes the process of generating the divided transfer stream file of FIG.

ステップS1501において、マイクロコンピュータ105は、外部メモリ112のクラスタ境界を、分割位置として決定する。ステップS1502において、マイクロコンピュータ105は、ステップS1501で決定した分割位置までの分割動画データを切り出して、それを含む分割転送ファィルを生成する。 In step S1501, the microcomputer 105 determines the cluster boundary of the external memory 112 as the division position. In step S1502, the microcomputer 105 cuts out the divided moving image data up to the divided position determined in step S1501 and generates a divided transfer file including the divided moving image data.

マイクロコンピュータ105は、図10のステップS1304の処理を繰り返すことにより、図13のステップS1501からステップS1502までの処理を繰り返す。たとえば図10のステップS1304の処理を最初に実行する場合、マイクロコンピュータ105は、ステップS1501において、1番目の分割画像データの後端としてのクラスタ境界C2を分割位置として決定する。ステップS1502において、マイクロコンピュータ105は、図9の動画ストリームファイルについてのファイルヘッダとのクラスタ境界C1から、決定した分割位置C2までのデータを切り出して、それを含む分割転送ファィルを生成する。切り出し領域には、1番目の分割moovアトム1304と、1番目の分割ヘッダ領域1305と、1番目のmdatアトム1306と、が含まれる。したがって、この切り出し領域のデータを含む1つ目の分割転送ファィルは、1番目のmdatアトム1306の分割動画データをストリーミング再生可能なMP4形式の動画ファイルとなる。マイクロコンピュータ105は、切り出した分割動画データをストリーミング再生可能とするようにファイルの再構築の処理を実行することなく簡単に、切り出した分割動画データをストリーミング再生可能に含む1つ目の分割転送ファイルを生成できる。 The microcomputer 105 repeats the processes from step S1501 to step S1502 of FIG. 13 by repeating the process of step S1304 of FIG. For example, when the process of step S1304 of FIG. 10 is executed for the first time, the microcomputer 105 determines in step S1501 the cluster boundary C2 as the rear end of the first divided image data as the divided position. In step S1502, the microcomputer 105 cuts out the data from the cluster boundary C1 with the file header for the moving image stream file of FIG. 9 to the determined division position C2, and generates a division transfer file including the data. The cutout region includes a first split moov atom 1304, a first split header area 1305, and a first mdat atom 1306. Therefore, the first divided transfer file including the data in the cutout area is an MP4 format moving image file capable of streaming and playing the divided moving image data of the first mdat atom 1306. The microcomputer 105 is a first split transfer file that includes the cut out split video data in a streamable playable manner without performing a file reconstruction process so that the cut out split video data can be streamed and played back. Can be generated.

また、図10のステップS1304の処理を二回目に実行する場合、マイクロコンピュータ105は、ステップS1501において、2番目の分割画像データの後端としてのクラスタ境界C3を分割位置として決定する。ステップS1502において、マイクロコンピュータ105は、図9の動画ストリームファイルについての前回の決定位置であるクラスタ境界C2から、新たに決定した分割位置C3までのデータを切り出して、それを含む分割転送ファィルを生成する。切り出し領域には、2番目の分割moovアトム1308と、2番目の分割ヘッダ領域1309と、2番目のmdatアトム1310と、が含まれる。したがって、この切り出し領域のデータを含む2つ目の分割転送ファィルは、2番目のmdatアトム1310の分割動画データをストリーミング再生可能なMP4形式の動画ファイルとなる。マイクロコンピュータ105は、切り出した分割動画データをストリーミング再生可能とするようにファイルの再構築の処理を実行することなく簡単に、切り出した分割動画データをストリーミング再生可能に含む2つ目の分割転送ファイルを生成できる。 Further, when the process of step S1304 of FIG. 10 is executed for the second time, the microcomputer 105 determines in step S1501 the cluster boundary C3 as the rear end of the second divided image data as the divided position. In step S1502, the microcomputer 105 cuts out the data from the cluster boundary C2, which is the previously determined position for the video stream file of FIG. 9, to the newly determined division position C3, and generates a division transfer file containing the data. do. The cutout region includes a second split moov atom 1308, a second split header area 1309, and a second mdat atom 1310. Therefore, the second divided transfer file including the data in the cutout area becomes an MP4 format moving image file capable of streaming and playing the divided moving image data of the second mdat atom 1310. The microcomputer 105 is a second split transfer file that includes the cut out split video data in a streamable playable manner without performing a file reconstruction process so that the cut out split video data can be streamed and played back. Can be generated.

マイクロコンピュータ105は、動画ストリームファイルの最後まで、図10のステップS1304の処理を繰り返し、図13のステップS1501からステップS1502までの処理を繰り返す。これにより、図9の動画ストリームファイルに含まれる動画データはすべて、複数の分割転送ファイルに含まれて外部装置200へ転送される。その後、マイクロコンピュータ105は、図10のステップS1307において、図9の動画ストリームファイルの全体管理情報を含むファイルヘッダを、ヘッダファイルとして外部装置200へ転送する。 The microcomputer 105 repeats the process of step S1304 in FIG. 10 until the end of the moving image stream file, and repeats the processes from step S1501 to step S1502 in FIG. As a result, all the moving image data included in the moving image stream file of FIG. 9 is included in the plurality of divided transfer files and transferred to the external device 200. After that, in step S1307 of FIG. 10, the microcomputer 105 transfers the file header including the overall management information of the moving image stream file of FIG. 9 to the external device 200 as a header file.

以上のように、本実施形態では、撮像装置1は、撮像による動画データとともに動画データの全体をストリーミング再生するために全体管理情報としてのファイルヘッダを含む動画ストリームファイルを、記録部材としての外部メモリ112に記録する。そして、撮像装置1のマイクロコンピュータ105は、ヘッダファイル生成手段として、全体管理情報を含むヘッダファイルを、分割転送ストリームファイルとは別に生成する。また、本実施形態では、外部メモリ112に記録されている動画ストリームファイルにおいて、動画データは、複数の分割データに分割されている。そして、撮像装置1のマイクロコンピュータ105は、分割転送ファイル生成手段として、外部メモリ112におけるクラスタを単位とした分割動画データを、ストリーミング再生可能に含む分割転送ストリームファイルを生成して転送する。また、本実施形態では、外部メモリ112に記録されている動画ストリームファイルは、複数の分割動画データの各々をストリーミング再生するための複数の分割管理情報を、全体管理情報からは参照されないように含む。そして、撮像装置1のマイクロコンピュータ105は、分割転送ファイル生成手段として、外部メモリ112における分割動画データと分割管理情報とを含む分割転送ストリームファイルを生成する。これにより、本実施形態では、撮像装置1のマイクロコンピュータ105は、ファイルの再構築の処理を実行することなく簡単に、切り出した分割動画データをストリーミング再生可能に含む分割転送ファイルを生成できる。 As described above, in the present embodiment, the image pickup apparatus 1 records a moving image stream file including a file header as overall management information in order to stream and reproduce the entire moving image data together with the moving image data obtained by imaging, as an external memory as a recording member. Record at 112. Then, the microcomputer 105 of the image pickup apparatus 1 generates a header file including the overall management information separately from the divided transfer stream file as a header file generation means. Further, in the present embodiment, in the moving image stream file recorded in the external memory 112, the moving image data is divided into a plurality of divided data. Then, the microcomputer 105 of the image pickup apparatus 1 generates and transfers a divided transfer stream file including the divided moving image data in the external memory 112 in units of clusters so that it can be streamed and reproduced as the divided transfer file generation means. Further, in the present embodiment, the moving image stream file recorded in the external memory 112 includes a plurality of divided management information for streaming and reproducing each of the plurality of divided moving image data so as not to be referred to from the overall management information. .. Then, the microcomputer 105 of the image pickup apparatus 1 generates a divided transfer stream file including the divided moving image data and the divided management information in the external memory 112 as the divided transfer file generation means. Thereby, in the present embodiment, the microcomputer 105 of the image pickup apparatus 1 can easily generate a divided transfer file including the cut out divided moving image data so that it can be streamed and reproduced without executing the process of reconstructing the file.

また、転送先の外部装置200のマイクロコンピュータ105は、図12のステップS1604において、転送元の撮像装置1が順番に転送した複数のファイルを結合して、結合ファイルを生成する。この際、マイクロコンピュータ105は、転送された複数の分割転送ファイルのデータとヘッダファイルのデータとを単純に連結するように結合することにより、図9の元の動画ストリームファイルのデータを生成できる。転送先の外部装置200のマイクロコンピュータ105は、複数のファイルを結合する際に、動画データをストリーミング再生可能とするための情報を再構築する必要がない。 Further, the microcomputer 105 of the external device 200 at the transfer destination combines a plurality of files sequentially transferred by the image pickup device 1 at the transfer source in step S1604 of FIG. 12 to generate a combined file. At this time, the microcomputer 105 can generate the data of the original moving image stream file of FIG. 9 by simply combining the transferred data of the plurality of divided transfer files and the data of the header file so as to be concatenated. When combining a plurality of files, the microcomputer 105 of the external device 200 at the transfer destination does not need to reconstruct the information for making the moving image data streamable and playable.

以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。本発明は、上述の実施の形態の1以上の機能を実現するプログラムを、ネットワークや記録媒体を介してシステムや装置に供給し、そのシステム又は装置のコンピュータの1つ以上のプロセッサーがプログラムを読み出して実行する処理でも実現可能である。また、本発明は、1以上の機能を実現する回路(たとえば、ASIC)によっても実現可能である。 Although the present invention has been described in detail based on the preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various embodiments within the range not deviating from the gist of the present invention are also included in the present invention. included. The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or recording medium, and one or more processors of the computer of the system or device reads the program. It can also be realized by the processing to be executed. The present invention can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

1 撮像装置(動画ファイル転送装置)
20 動画ストリームファイル
31 動画ストリームファイル
32 動画ストリームファイル
21 moovアトム
22 mdatアトム
105 マイクロコンピュータ
106 揮発性メモリ
112 外部メモリ(記憶部材)
115 通信部材(転送部材)
200 外部装置
300 転送システム
1301 全体moovアトム
1302 全体ヘッダ領域
1303,1307 パディングデータ
1304,1308 分割moovアトム
1305,1309 分割ヘッダ領域
1306,1310 mdatアトム
1 Imaging device (video file transfer device)
20 Video stream file 31 Video stream file 32 Video stream file 21 moov atom 22 mdat atom 105 Microcomputer 106 Volatile memory 112 External memory (storage member)
115 Communication member (transfer member)
200 External device 300 Transfer system 1301 Overall moov atom 1302 Overall header area 1303, 1307 Padding data 1304, 1308 Divided moov atom 1305, 1309 Divided header area 1306, 1310 mdat atom

Claims (8)

動画ファイルを外部装置に転送する動画ファイル転送装置であって、
転送対象の動画ファイルに含まれる動画データを複数に分割した分割動画データと、当該分割動画データの管理情報とをそれぞれ含む、複数の分割転送ファイルを生成する分割転送ファイル生成手段と、
前記複数の分割転送ファイルと、前記動画ファイルに含まれる管理情報とを、前記外部装置に転送する転送手段と、
を有する、
動画ファイル転送装置。
A video file transfer device that transfers video files to an external device.
A split transfer file generation means for generating a plurality of split transfer files, each of which includes split video data obtained by dividing the video data included in the video file to be transferred into a plurality of divided video data and management information of the divided video data.
A transfer means for transferring the plurality of divided transfer files and management information included in the moving image file to the external device, and
Have,
Video file transfer device.
前記転送手段は、前記複数の分割転送ファイルを転送した後に、前記動画ファイルに含まれる管理情報を転送する、
請求項1に記載の動画ファイル転送装置。
The transfer means transfers the management information included in the moving image file after transferring the plurality of divided transfer files.
The moving image file transfer device according to claim 1.
撮像により取得した動画データと、当該動画データの全体の全体管理情報とを含む動画ファイルを生成して記録媒体に記録する記録手段、を有し、
前記記録媒体に記録された前記動画ファイルを転送する際に、前記分割転送ファイル生成手段は、前記動画ファイルから複数の分割転送ファイルを生成し、前記転送手段は、前記複数の分割転送ファイルと、前記動画ファイルの全体管理情報とを前記付外部装置に転送する、
請求項1または2に記載の、動画ファイル転送装置。
It has a recording means for generating and recording a moving image file including the moving image data acquired by imaging and the overall management information of the moving image data on a recording medium.
When transferring the moving image file recorded on the recording medium, the divided transfer file generation means generates a plurality of divided transfer files from the moving image file, and the transfer means includes the plurality of divided transfer files and the plurality of divided transfer files. Transfer the overall management information of the moving image file to the external device.
The moving image file transfer device according to claim 1 or 2.
前記記録手段は、前記動画データを複数に分割した状態で前記動画ファイルを記録し、
前記分割転送ファイル生成手段は、分割した状態で前記動画ファイルに記録されている分割動画データから、前記複数の分割転送ファイルを生成する、
請求項3記載の、動画ファイル転送装置。
The recording means records the moving image file in a state where the moving image data is divided into a plurality of parts.
The divided transfer file generation means generates the plurality of divided transfer files from the divided moving image data recorded in the moving image file in the divided state.
The video file transfer device according to claim 3.
前記動画ファイルに含まれる動画データを含まず、前記動画ファイルに含まれる管理情報を含むヘッダファイルを生成するヘッダファイル生成手段を有し、
前記転送手段は、前記複数の分割転送ファイルと、前記ヘッダファイルとを、前記外部装置に転送する、
請求項1乃至4のいずれか1項に記載の動画ファイル転送装置。
It has a header file generation means for generating a header file that does not include the moving image data included in the moving image file but includes the management information contained in the moving image file.
The transfer means transfers the plurality of divided transfer files and the header file to the external device.
The moving image file transfer device according to any one of claims 1 to 4.
ファイル転送装置から外部装置へファイルを転送する転送システムであって、
前記ファイル転送装置は、
転送対象の動画ファイルに含まれる動画データを複数に分割した分割動画データと、当該分割動画データの管理情報とをそれぞれ含む、複数の分割転送ファイルを生成する分割転送ファイル生成手段と、
前記複数の分割転送ファイルと、前記動画ファイルに含まれる管理情報とを、前記外部装置に転送する転送手段と、を有し、
前記外部装置は、
ファイルに含まれる動画データを再生する再生手段と、
前記転送手段により転送された前記複数の分割転送ファイルと前記動画ファイルの管理情報とに基づいて、前記分割転送ファイルの管理情報を含まず、前記複数の分割動画データと前記動画ファイルの管理情報とを含む統合動画ファイルを生成する統合手段、を有する、
転送システム。
A transfer system that transfers files from a file transfer device to an external device.
The file transfer device is
A split transfer file generation means for generating a plurality of split transfer files, each of which includes split video data obtained by dividing the video data included in the video file to be transferred into a plurality of divided video data and management information of the divided video data.
It has a transfer means for transferring the plurality of divided transfer files and management information included in the moving image file to the external device.
The external device is
A playback method for playing the video data contained in the file, and
Based on the plurality of divided transfer files transferred by the transfer means and the management information of the moving image file, the management information of the divided transfer file is not included, and the plurality of divided moving image data and the management information of the moving image file are used. Has integrated means to generate integrated video files, including
Transfer system.
動画ファイルを外部装置に転送する動画ファイル転送装置の転送方法であって、
転送対象の動画ファイルに含まれる動画データを複数に分割した分割動画データと、当該分割動画データの管理情報とをそれぞれ含む、複数の分割転送ファイルを生成する分割転送ファイル生成工程と、
前記複数の分割転送ファイルと、前記動画ファイルに含まれる管理情報とを、前記外部装置に転送する転送工程と、
を有する、
動画ファイル転送装置の転送方法。
It is a transfer method of a video file transfer device that transfers a video file to an external device.
A split transfer file generation process for generating a plurality of split transfer files, each of which includes split video data obtained by dividing the video data included in the video file to be transferred into a plurality of divided video data and management information of the divided video data.
A transfer step of transferring the plurality of divided transfer files and management information included in the moving image file to the external device, and
Have,
How to transfer a video file transfer device.
動画ファイルを外部装置に転送する動画ファイル転送装置の転送方法をコンピュータに実行させるプログラムであって、
前記動画ファイル転送装置の転送方法は、
転送対象の動画ファイルに含まれる動画データを複数に分割した分割動画データと、当該分割動画データの管理情報とをそれぞれ含む、複数の分割転送ファイルを生成する分割転送ファイル生成工程と、
前記複数の分割転送ファイルと、前記動画ファイルに含まれる管理情報とを、前記外部装置に転送する転送工程と、
を有する、
プログラム。
A program that causes a computer to execute the transfer method of a video file transfer device that transfers a video file to an external device.
The transfer method of the video file transfer device is
A split transfer file generation process for generating a plurality of split transfer files, each of which includes split video data obtained by dividing the video data included in the video file to be transferred into a plurality of divided video data and management information of the divided video data.
A transfer step of transferring the plurality of divided transfer files and management information included in the moving image file to the external device, and
Have,
program.
JP2020209344A 2020-12-17 2020-12-17 Moving image file transfer device, transfer system, transfer method for moving image file transfer device, and program Pending JP2022096304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020209344A JP2022096304A (en) 2020-12-17 2020-12-17 Moving image file transfer device, transfer system, transfer method for moving image file transfer device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020209344A JP2022096304A (en) 2020-12-17 2020-12-17 Moving image file transfer device, transfer system, transfer method for moving image file transfer device, and program

Publications (1)

Publication Number Publication Date
JP2022096304A true JP2022096304A (en) 2022-06-29

Family

ID=82163972

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020209344A Pending JP2022096304A (en) 2020-12-17 2020-12-17 Moving image file transfer device, transfer system, transfer method for moving image file transfer device, and program

Country Status (1)

Country Link
JP (1) JP2022096304A (en)

Similar Documents

Publication Publication Date Title
US8659678B2 (en) Image recording apparatus, image reproducing apparatus, method of controlling image recording apparatus, method of controlling image reproducing apparatus, computer program, and recording medium, with storing of a plurality of frame images, a plurality of attribute information in EXIF format, and plurality of offset data in one image file
JP4332365B2 (en) METADATA DISPLAY SYSTEM, VIDEO SIGNAL RECORDING / REPRODUCING DEVICE, IMAGING DEVICE, METADATA DISPLAY METHOD
JP4332364B2 (en) Video recording system and video recording method
JP4450021B2 (en) Recording / reproducing apparatus, recording apparatus, reproducing apparatus, recording method, reproducing method, and computer program
US20120054370A1 (en) Data file transfer apparatus and control method of the data file transfer apparatus
JP2001078166A (en) Program providing system
KR20040102078A (en) Information recording medium and manufacturing method thereof
JP2004312281A (en) Video image editing apparatus and processing method thereof
JP3814565B2 (en) Recording device
JP4115061B2 (en) Recording medium and video recording / reproducing apparatus using the same
JP4330968B2 (en) REPRODUCTION DEVICE, RECORDING DEVICE, REPRODUCTION PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE REPRODUCTION PROGRAM
JP2012156587A (en) Video recording device
JP2022096304A (en) Moving image file transfer device, transfer system, transfer method for moving image file transfer device, and program
JP2012147288A (en) Broadcasting system
JP2011147119A (en) Image processing apparatus and image processing program
JP2005303336A (en) Video signal recording apparatus and video signal reproducing apparatus
JP6278353B2 (en) RECORDING DEVICE, RECORDING METHOD, PROGRAM, AND IMAGING DEVICE
JP2022095374A (en) Moving image file creation device, creation method for the same, and program
JP4724551B2 (en) Moving image processing apparatus and moving image processing method
JP2013141065A (en) Image pickup device and control method
JP2013141074A (en) Image pickup device
JP2007158434A (en) Camera recorder
JP2013141064A (en) Image pickup device and control method
WO2020170659A1 (en) Editing system
JP7327950B2 (en) IMAGING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM