JP6478626B2 - Recording apparatus, control method therefor, and program - Google Patents

Recording apparatus, control method therefor, and program Download PDF

Info

Publication number
JP6478626B2
JP6478626B2 JP2014263354A JP2014263354A JP6478626B2 JP 6478626 B2 JP6478626 B2 JP 6478626B2 JP 2014263354 A JP2014263354 A JP 2014263354A JP 2014263354 A JP2014263354 A JP 2014263354A JP 6478626 B2 JP6478626 B2 JP 6478626B2
Authority
JP
Japan
Prior art keywords
moving image
data
file
image data
recording
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014263354A
Other languages
Japanese (ja)
Other versions
JP2016123049A (en
Inventor
洋平 藤谷
洋平 藤谷
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 JP2014263354A priority Critical patent/JP6478626B2/en
Publication of JP2016123049A publication Critical patent/JP2016123049A/en
Application granted granted Critical
Publication of JP6478626B2 publication Critical patent/JP6478626B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は記録装置およびその制御方法、プログラムに関する。   The present invention relates to a recording apparatus, a control method therefor, and a program.

従来、静止画や動画に対してBGM(BackGroundMusic)としての音楽を合成して表示、或いは記録する装置が知られている(特許文献1参照)。   2. Description of the Related Art Conventionally, an apparatus that synthesizes and displays or records music as BGM (BackGroundMusic) with a still image or a moving image is known (see Patent Document 1).

特開2008−124666号公報JP 2008-124666 A

しかし、このようなBGMの合成された動画を生成することに加えて、一度生成した動画に対して、さらにその一部を削除するなどして編集を行いたい場合がある。さらに、BGMの合成された動画を編集する場合、編集内容によってはBGMが不連続となるなど、編集後の動画が違和感のあるものになる場合がある。このため、ユーザが簡単な操作で、BGMを合成した動画を適切に編集できるようにすることが望ましい。   However, in addition to generating such a BGM-combined moving image, there is a case where it is desired to edit the moving image once generated by deleting a part of the moving image. Furthermore, when editing a BGM-composed moving image, the edited moving image may be uncomfortable, for example, depending on the editing content, the BGM may become discontinuous. For this reason, it is desirable that a user can appropriately edit a moving image obtained by synthesizing BGM with a simple operation.

本発明は、ユーザが簡単な操作で、BGMを合成した動画を生成し、適切に編集することが可能な記録装置およびその制御方法、プログラムを提供することを目的とする。   An object of the present invention is to provide a recording apparatus, a control method thereof, and a program that allow a user to generate a moving image obtained by synthesizing BGM and edit it appropriately with a simple operation.

この課題を解決するため、例えば本発明の記録装置は、以下の構成を備える。すなわち、動画データを取得する動画取得手段と、音楽データを取得する取得手段と、動画データと音楽データとを合成する指示に応じて、動画データと音楽データとを合成して記録媒体に記録するように制御する記録制御手段と、編集対象の動画データが、音楽データが合成されている動画データである場合編集対象の動画データの先頭から削除開始位置までと、削除終了位置から編集対象の動画データの終端位置までの部分とを結合する第1の編集処理は実行不可とし、編集対象の動画データにおいて、編集対象の動画データの先頭から削除終了位置までを削除する、または、削除開始位置から編集対象の動画データの終端までを削除する第2の編集処理は実行可能とするように制御する制御手段と、を有することを特徴とする。
In order to solve this problem, for example, a recording apparatus of the present invention has the following configuration. That is, in accordance with an instruction for synthesizing the moving image data and the music data, the moving image acquiring unit for acquiring the moving image data, the acquiring unit for acquiring the music data, and the instruction for combining the moving image data and the music data are recorded on the recording medium . and a recording control means for control in this way, the video data of the editing target, if music data is a moving image data that have been synthesized, and until the deletion start position from the beginning of the video data to be edited, from the deletion end position The first editing process that combines the portion up to the end position of the video data to be edited cannot be executed, and the video data to be edited is deleted from the beginning of the video data to be edited to the deletion end position, or Control means for controlling the second editing process to delete from the deletion start position to the end of the moving image data to be edited .

本発明によれば、ユーザが簡単な操作で、BGMを合成した動画を生成し、適切に編集することが可能になる。   According to the present invention, it is possible for a user to generate a moving image obtained by synthesizing BGM and edit it appropriately by a simple operation.

本発明の実施形態における撮像装置の構成を示すブロック図である。It is a block diagram which shows the structure of the imaging device in embodiment of this invention. 動画ファイルのフォーマットを示す図である。It is a figure which shows the format of a moving image file. 再生モードの処理を示すフローチャートである。It is a flowchart which shows the process of reproduction | regeneration mode. アルバム作成処理を示すフローチャートである。It is a flowchart which shows an album creation process. 空き容量の判定処理を示すフローチャートである。It is a flowchart which shows the determination process of free capacity. アルバムの種類の選択画面、及び、警告画面を示す図である。It is a figure which shows the selection screen of an album type, and a warning screen. BGMの設定処理を示すフローチャートである。It is a flowchart which shows the setting process of BGM. BGMの展開判定処理を示すフローチャートである。It is a flowchart which shows the expansion | deployment determination processing of BGM. プレビュー再生処理を示すフローチャートである。It is a flowchart which shows a preview reproduction process. アルバム動画の保存処理を示すフローチャートである。It is a flowchart which shows the preservation | save process of an album moving image. 静止画から動画への変換処理を示すフローチャートである。It is a flowchart which shows the conversion process from a still image to a moving image. 動画から動画への変換処理を示すフローチャートである。It is a flowchart which shows the conversion process from a moving image to a moving image. 動画ファイルの作成処理を示すフローチャートである。It is a flowchart which shows the production process of a moving image file. BGMの合成処理を示すフローチャートである。It is a flowchart which shows the synthesis | combination process of BGM. 動画撮影時にBGMを合成する場合の処理を示すフローチャートである。It is a flowchart which shows the process in the case of synthesize | combining BGM at the time of video recording. アルバムの設定に関するメニュー画面を示す図である。It is a figure which shows the menu screen regarding the setting of an album. アルバム作成処理により処理されるデータを示す図である。It is a figure which shows the data processed by an album creation process. 編集処理を示すフローチャートである。It is a flowchart which shows an edit process.

以下、本発明の実施形態について説明する。図1は本発明の実施形態としての撮像装置100の構成を示す図である。図1において、撮像部101はレンズ等の光学系、CMOS等の撮像素子、AD変換部、画像処理部等を有し、被写体の画像を撮影して画像データを出力する。撮像部101は、例えば、1フレームが横1920画素×縦1080画素、30フレーム毎秒(30fps)の動画データを出力することができる。撮像部101は、後述のように、制御部109からの指示により、30fpsの動画データと、25fpsの動画データの何れかを出力する。また、撮像部101は、制御部109から静止画記録の指示があった場合、1画面の静止画データを出力する。   Hereinafter, embodiments of the present invention will be described. FIG. 1 is a diagram illustrating a configuration of an imaging apparatus 100 as an embodiment of the present invention. In FIG. 1, an image pickup unit 101 includes an optical system such as a lens, an image pickup device such as a CMOS, an AD conversion unit, an image processing unit, and the like, takes an image of a subject and outputs image data. The imaging unit 101 can output, for example, moving image data of one frame of 1920 pixels × vertical 1080 pixels and 30 frames per second (30 fps). As will be described later, the imaging unit 101 outputs either 30 fps moving image data or 25 fps moving image data in accordance with an instruction from the control unit 109. In addition, the imaging unit 101 outputs still image data of one screen when there is an instruction to record a still image from the control unit 109.

画像処理部102は、動画データの記録時においては、撮像部101により得られた動画データをH.264等の所定の符号化方式に従って符号化し、その情報量を圧縮する。また、画像処理部102は、静止画の記録時においては、撮像部101により得られた静止画データをJPEG等の符号化方式に従って符号化し、その情報量を圧縮する。また、画像処理部102は、動画、或いは静止画データの再生時においては、再生された動画データや静止画データを復号し、その情報量を伸長する。また、画像処理部102は、後述のように、アルバムモードにおいて、記録媒体108から読み出された動画データや静止画データを一旦復号し、再度、符号化する処理を行う。   At the time of recording moving image data, the image processing unit 102 converts the moving image data obtained by the imaging unit 101 to H.264. It is encoded according to a predetermined encoding method such as H.264 and the amount of information is compressed. In addition, when recording a still image, the image processing unit 102 encodes the still image data obtained by the imaging unit 101 according to an encoding method such as JPEG, and compresses the amount of information. The image processing unit 102 decodes the reproduced moving image data or still image data and expands the amount of information when reproducing the moving image or still image data. Further, as will be described later, the image processing unit 102 once decodes moving image data and still image data read from the recording medium 108 in the album mode, and performs encoding processing again.

音声入力部103は、マイクロフォンやアンプ、AD変換器等を有し、撮像装置100の周囲の音声を取得し、音声データを出力する。音声処理部104は、記録時においては、音声入力部103により得られた音声データのレベルを適正なレベルに変換する処理やノイズの低減処理等を行う。また、音声処理部104は、記録時においては、音声入力部103より得られた音声データを所定の符号化方式に従って符号化してその情報量を圧縮し、再生時においては、再生された音声データを復号し、その情報量を伸長する。また、音声処理部104は、後述のように、アルバムモードにおいて、不揮発性メモリ112に記憶されたBGM用の音楽ファイルに含まれる音声データを伸長する処理を行う。また、音声処理部104は、アルバムモードにおいて、伸長された動画データ共に記録された音声データとBGM用の音楽データを合成する処理等を行う。   The audio input unit 103 includes a microphone, an amplifier, an AD converter, and the like, acquires audio around the imaging apparatus 100, and outputs audio data. During recording, the audio processing unit 104 performs processing for converting the level of audio data obtained by the audio input unit 103 to an appropriate level, noise reduction processing, and the like. Further, the audio processing unit 104 encodes the audio data obtained from the audio input unit 103 according to a predetermined encoding method at the time of recording and compresses the amount of information, and at the time of reproduction, the reproduced audio data Is decrypted and the amount of information is expanded. In addition, the audio processing unit 104 performs a process of expanding audio data included in the BGM music file stored in the nonvolatile memory 112 in the album mode, as will be described later. In the album mode, the audio processing unit 104 performs processing for synthesizing audio data recorded together with the expanded moving image data and music data for BGM.

表示制御部105は、撮像部101により得られた動画データに係る動画や、撮像装置100の操作のための操作画面(メニュー画面)等を表示部106に表示させる。表示部106は、例えば、液晶ディスプレイ、有機ELディスプレイ、電子ペーパー等の表示デバイスであれば何でもよい。   The display control unit 105 causes the display unit 106 to display a moving image related to the moving image data obtained by the imaging unit 101, an operation screen (menu screen) for operating the imaging device 100, and the like. The display unit 106 may be any display device such as a liquid crystal display, an organic EL display, and electronic paper.

記録再生部107は、動画データ、音声データ、或いは、静止画データ等の各種のデータを着脱可能な記録媒体108に記録して、記録したデータを読み出す記録制御を行うとともに、これらのデータを記録媒体から読み出して再生する再生制御を行う。記録媒体108は、メモリカード等の、大容量のランダムアクセス可能な記録媒体である。記録媒体108は、不図示の装着、排出機構により、撮像装置100に対してユーザが容易に装着し、また、取り外すことが可能となっている。また、本実施形態では、記録媒体108に記録される各種のデータは、FAT等の所定のファイルシステムに従い、制御部109によりファイルとして管理される。   The recording / playback unit 107 records various data such as moving image data, audio data, or still image data on a removable recording medium 108, performs recording control for reading the recorded data, and records these data. Playback control for reading out from the medium and playing back is performed. The recording medium 108 is a large capacity random accessible recording medium such as a memory card. The recording medium 108 can be easily mounted on and removed from the imaging apparatus 100 by a mounting / discharging mechanism (not shown). In the present embodiment, various data recorded on the recording medium 108 are managed as files by the control unit 109 according to a predetermined file system such as FAT.

制御部109は、例えば、CPU(MPU)、メモリ等を有し、不揮発性メモリ112に記憶されたプログラムを実行して撮像装置100の各ブロックを制御したり、各ブロック間でのデータ転送を制御したりする。また、制御部109は、ユーザからの操作を受け付ける操作部110からの操作信号に応じて、撮像装置100の各ブロックを制御する。操作部110は、例えば、電源ボタン、静止画記録ボタン、動画記録開始、停止を指示するボタンなどの撮影に関連する各種操作を入力するスイッチ類からなる。また、操作部110は、メニュー表示ボタン、決定ボタン、その他カーソルキー、ポインティングデバイス、タッチパネル等を有し、ユーザによりこれらのキーやボタンが操作されると制御部109に操作信号を送信する。   The control unit 109 includes, for example, a CPU (MPU), a memory, and the like, executes a program stored in the non-volatile memory 112 to control each block of the imaging apparatus 100, and transfers data between the blocks. Or control. In addition, the control unit 109 controls each block of the imaging apparatus 100 according to an operation signal from the operation unit 110 that receives an operation from the user. The operation unit 110 includes, for example, switches for inputting various operations related to shooting such as a power button, a still image recording button, and a button for instructing start and stop of moving image recording. The operation unit 110 includes a menu display button, a determination button, other cursor keys, a pointing device, a touch panel, and the like, and transmits an operation signal to the control unit 109 when these keys and buttons are operated by the user.

メモリ111は、動画データや静止画データ、音声データ等の各種のデータ、或いは、制御部109の処理に必要なデータ等を記憶する。メモリ111は、SDRAMなどの揮発メモリである。不揮発性メモリ112は、制御部109におけるCPUのためのプログラムや、動作用の定数などを記憶する。また、不揮発性メモリ112は、後述のアルバムモードにおいてBGM(BackGroundMusic)として使用される音楽ファイルを記憶する。本実施形態では、所定数、例えば三つの音楽ファイルが不揮発性メモリ112に記憶される。各音楽ファイルに格納される音楽データは所定の符号化方式により符号化され、圧縮された状態で不揮発性メモリ112に記憶されている。各音楽ファイルは、例えば、AAC(AdvancedAudioCoding)方式により、情報量が圧縮されているが、これ以外の圧縮方式を用いることも可能である。   The memory 111 stores various data such as moving image data, still image data, audio data, data necessary for processing by the control unit 109, and the like. The memory 111 is a volatile memory such as an SDRAM. The nonvolatile memory 112 stores a program for the CPU in the control unit 109, operation constants, and the like. The non-volatile memory 112 stores a music file used as BGM (BackGroundMusic) in an album mode to be described later. In the present embodiment, a predetermined number, for example, three music files are stored in the nonvolatile memory 112. The music data stored in each music file is encoded by a predetermined encoding method and is stored in the nonvolatile memory 112 in a compressed state. Each music file has an information amount compressed by, for example, an AAC (Advanced Audio Coding) method, but a compression method other than this can also be used.

出力部113は、撮像部101により得られた動画データや音声入力部103により得られた音声データ、或いは再生された動画、音声データ等を外部の表示装置等に出力する。スピーカ114は、動画の再生時、或いは、アルバムモードにおけるプレビュー時において、音声を出力する。通信部115は、撮像装置100と外部装置との間で通信を行う。通信部115は、例えば、音声信号、画像信号、圧縮音声信号、圧縮画像信号などのデータを送信したり受信したりする。通信部115は、例えば、赤外線通信モジュール、Bluetooth(登録商標)通信モジュール、無線LAN通信モジュール、WirelessUSB、GPS受信機等の無線通信モジュールである。また、バス116は、撮像装置100の各部の間で、データやコマンド等を転送する。   The output unit 113 outputs the moving image data obtained by the imaging unit 101, the audio data obtained by the audio input unit 103, the reproduced moving image, audio data, or the like to an external display device or the like. The speaker 114 outputs sound when reproducing a moving image or previewing in the album mode. The communication unit 115 performs communication between the imaging device 100 and an external device. For example, the communication unit 115 transmits and receives data such as an audio signal, an image signal, a compressed audio signal, and a compressed image signal. The communication unit 115 is, for example, a wireless communication module such as an infrared communication module, a Bluetooth (registered trademark) communication module, a wireless LAN communication module, a Wireless USB, or a GPS receiver. In addition, the bus 116 transfers data, commands, and the like between the units of the imaging apparatus 100.

次に、撮像装置100の記録動作について説明する。ユーザが操作部110を操作して電源オンの指示を出力すると、操作部110から制御部109に起動の指示が出される。この指示を受けて、制御部109は、不図示の電源供給部を制御して、撮像装置100の各ブロックに対して電源を供給させる。   Next, a recording operation of the imaging apparatus 100 will be described. When the user operates the operation unit 110 to output a power-on instruction, the operation unit 110 issues a start instruction to the control unit 109. Upon receiving this instruction, the control unit 109 controls a power supply unit (not shown) to supply power to each block of the imaging apparatus 100.

電源が供給されると、制御部109は、撮像装置100の各ブロックを記録待機状態に設定させる。記録待機状態では、制御部109は、撮像部101により動画データの撮影処理を行わせる。撮像部101から出力された動画データは一旦メモリ111に記憶され、画像処理部102によりそのサイズが表示部106のサイズに合わせて変更され、表示制御部105に出力される。表示制御部105は、画像処理部102からの動画データを表示部106に表示させる。ユーザはこの様に、表示部106に表示された画面を見ながら撮影の準備を行う。   When the power is supplied, the control unit 109 causes each block of the imaging device 100 to be set to a recording standby state. In the recording standby state, the control unit 109 causes the imaging unit 101 to perform moving image data shooting processing. The moving image data output from the imaging unit 101 is temporarily stored in the memory 111, the size is changed according to the size of the display unit 106 by the image processing unit 102, and is output to the display control unit 105. The display control unit 105 displays the moving image data from the image processing unit 102 on the display unit 106. In this way, the user prepares for shooting while looking at the screen displayed on the display unit 106.

ユーザは記録待機状態において操作部110を操作することにより、記録される動画の画素数やフレームレート、或いは記録される静止画の画素数などを変更することができる。なお、記録待機状態においては、撮像部101は所定のフレームレート、例えば30fpsの動画データを出力する。   The user can change the number of pixels and the frame rate of a moving image to be recorded or the number of pixels of a still image to be recorded by operating the operation unit 110 in a recording standby state. In the recording standby state, the imaging unit 101 outputs moving image data having a predetermined frame rate, for example, 30 fps.

記録待機状態で、ユーザが操作部110の静止画記録ボタンを操作することにより静止画の記録指示が出力されると、制御部109は制御信号を撮像装置100の各ブロックに送信し、以下のような動作をさせるように制御する。   When a still image recording instruction is output by the user operating the still image recording button of the operation unit 110 in the recording standby state, the control unit 109 transmits a control signal to each block of the imaging apparatus 100, and the following It controls to make it operate like this.

撮像部101は、レンズにより取り込まれた被写体の光学像を撮像素子により画像信号に変換し、デジタル信号に変換し、1フレームの静止画データを取得する。撮像部101は更に、この静止画データに対して、各種の画質調整処理(ホワイトバランスや色、明るさなど)を行い、メモリ111及び、表示制御部105に送る。画像処理部102は、メモリ111に記憶された静止画データを読みだして圧縮し、圧縮された静止画データをメモリ111に記憶する。記録再生部107は、メモリ111から1画面の静止画データを読み出し、この静止画データを含む静止画ファイルを記録媒体108に記録する。また、画像処理部102は、メモリ111より静止画データを読み出し、そのサイズを縮小することによりサムネイル用の画像データを生成する。記録再生部107は、サムネイル用の画像データを読み出し、記録媒体108に記録された静止画ファイルに格納する。   The imaging unit 101 converts an optical image of a subject captured by a lens into an image signal using an imaging element, converts the image signal into a digital signal, and acquires still image data of one frame. The imaging unit 101 further performs various image quality adjustment processes (white balance, color, brightness, etc.) on the still image data, and sends them to the memory 111 and the display control unit 105. The image processing unit 102 reads and compresses still image data stored in the memory 111, and stores the compressed still image data in the memory 111. The recording / playback unit 107 reads still image data of one screen from the memory 111 and records a still image file including the still image data on the recording medium 108. The image processing unit 102 reads still image data from the memory 111 and reduces the size of the still image data to generate thumbnail image data. The recording / playback unit 107 reads out the thumbnail image data and stores it in the still image file recorded on the recording medium 108.

また、表示制御部105は、メモリ111より静止画データを読み出し、所定期間、表示部106に表示する。表示部106に表示された静止画を見ることで、ユーザは撮影した静止画を確認することができる。このように、1画面の静止画の記録処理が終了すると、制御部109は、記録待機状態に移行させるように制御信号を撮像装置100の各ブロックに送信して、記録待機状態に戻る。   The display control unit 105 reads still image data from the memory 111 and displays the still image data on the display unit 106 for a predetermined period. By viewing the still image displayed on the display unit 106, the user can confirm the captured still image. As described above, when the recording process of the still image of one screen is completed, the control unit 109 transmits a control signal to each block of the imaging apparatus 100 so as to shift to the recording standby state, and returns to the recording standby state.

また、記録待機状態において、ユーザが操作部110の動画記録ボタンを操作することにより動画の記録開始の指示が出力されると、制御部109は動画の記録を指示する制御信号を撮像装置100の各ブロックに送信する。   In the recording standby state, when the user operates the moving image recording button of the operation unit 110 to output a moving image recording start instruction, the control unit 109 transmits a control signal for instructing moving image recording to the imaging apparatus 100. Send to each block.

撮像部101は、レンズにより取り込まれた被写体の光学像を撮像素子により画像信号に変換し、デジタル信号に変換し、動画データを取得する。このとき、撮像部101は、制御部109からの制御信号に従い、ユーザにより設定された画素数、フレームレートの動画データを取得する。撮像部101は更に、動画データに対して所定の画質調整処理を行い、メモリ111に順次記憶する。   The imaging unit 101 converts an optical image of a subject captured by a lens into an image signal using an imaging element, converts the image signal into a digital signal, and acquires moving image data. At this time, the imaging unit 101 acquires moving image data having the number of pixels and the frame rate set by the user in accordance with a control signal from the control unit 109. The imaging unit 101 further performs predetermined image quality adjustment processing on the moving image data, and sequentially stores them in the memory 111.

一方、音声入力部103は、音声データを取得してレベル調整等の処理を施して出力する。制御部109は、音声入力部103により得られた音声データをメモリ111に順次記憶する。   On the other hand, the voice input unit 103 acquires voice data, performs level adjustment and the like, and outputs it. The control unit 109 sequentially stores the audio data obtained by the audio input unit 103 in the memory 111.

画像処理部102は、メモリ111に一時的に記憶された動画データを読み出して符号化し、圧縮された動画データを生成してメモリ111に記憶する。また、音声処理部104は、メモリ111に一時的に記憶された音声データを読み出して符号化し、圧縮された音声データを生成してメモリ111に記憶する。記録再生部107は、これらの圧縮された動画データと音声データとを所定のタイミングで読み出して多重し、一つの動画ファイルとして記録媒体108に記録する。前述したように、記録媒体108に記録された動画データと音声データは、一つの動画ファイルとして管理される。   The image processing unit 102 reads and encodes moving image data temporarily stored in the memory 111, generates compressed moving image data, and stores the compressed moving image data in the memory 111. Also, the audio processing unit 104 reads out and encodes audio data temporarily stored in the memory 111, generates compressed audio data, and stores the compressed audio data in the memory 111. The recording / playback unit 107 reads out the compressed moving image data and audio data at a predetermined timing, multiplexes them, and records them on the recording medium 108 as one moving image file. As described above, the moving image data and audio data recorded on the recording medium 108 are managed as one moving image file.

また、表示制御部105は、メモリ111より動画データを順次読み出してその画面サイズを表示部106に合わせて変更し、表示部106に表示する。   Further, the display control unit 105 sequentially reads the moving image data from the memory 111, changes the screen size according to the display unit 106, and displays it on the display unit 106.

制御部109は、動画ファイルの記録中、この動画ファイルに格納される管理情報を生成し、順次メモリ111に記憶する。   During recording of the moving image file, the control unit 109 generates management information stored in the moving image file and sequentially stores it in the memory 111.

このように動画の記録が行われているときに、ユーザが操作部110を操作して、記録停止が指示された場合、制御部109は各部に対して動画の記録を停止するための制御信号を出力する。画像処理部102は記録停止の指示に応じて、動画データの符号化を停止し、また、音声処理部104は、記録停止の指示に応じて音声データの符号化を停止する。   When the user operates the operation unit 110 and the recording stop is instructed while the moving image is being recorded as described above, the control unit 109 controls each unit to stop recording the moving image. Is output. The image processing unit 102 stops encoding moving image data in response to a recording stop instruction, and the audio processing unit 104 stops encoding audio data in response to a recording stop instruction.

そして、記録再生部107は、記録停止の指示までの間に符号化された動画データと音声データをメモリ111より読み出し、記録媒体108に記録する。制御部109は、動画データと音声データの記録停止後、記録再生部107を制御して、動画データの先頭のフレームを読み出す。そして、制御部109は、この先頭フレームを画像処理部102により復号し、更に、そのサイズを縮小することによりサムネイル用の画像データを生成する。記録再生部107は、このサムネイル用の画像データを、記録媒体108に記録された動画ファイルの所定の位置に格納する。   Then, the recording / playback unit 107 reads the moving image data and audio data encoded before the recording stop instruction from the memory 111 and records them on the recording medium 108. After the recording of the moving image data and the audio data is stopped, the control unit 109 controls the recording / reproducing unit 107 to read out the first frame of the moving image data. Then, the control unit 109 decodes the head frame by the image processing unit 102 and further reduces the size of the frame to generate thumbnail image data. The recording / playback unit 107 stores the thumbnail image data at a predetermined position of the moving image file recorded on the recording medium 108.

制御部109は更に、記録停止の指示に応じて、この動画ファイルの管理情報をメモリ111より読み出し、動画ファイルに格納するように記録再生部107を制御する。記録再生部107は、記録媒体108に記録された動画ファイルの所定の位置に管理情報を格納する。このようにサムネイル用画像データと、管理情報の記録が完了すると、制御部109は、記録再生部107を制御し、動画ファイルをクローズして記録を終了する。   The control unit 109 further controls the recording / playback unit 107 so as to read the management information of the moving image file from the memory 111 and store it in the moving image file in response to an instruction to stop recording. The recording / playback unit 107 stores management information at a predetermined position of the moving image file recorded on the recording medium 108. When the recording of thumbnail image data and management information is completed in this way, the control unit 109 controls the recording / playback unit 107 to close the moving image file and end the recording.

動画ファイルの記録が終了すると、制御部109は、撮像装置100を記録待機状態に設定する。なお、記録媒体108に記録される静止画ファイルおよび動画ファイルは、DCF(Design rule for Camera File system)に従って記録されるものとする。   When the recording of the moving image file ends, the control unit 109 sets the imaging apparatus 100 to a recording standby state. In addition, the still image file and moving image file recorded on the recording medium 108 shall be recorded according to DCF (Design rule for Camera File system).

次に、記録媒体108に記録された動画ファイルと静止画ファイルの再生処理について説明する。ユーザが操作部110を操作して、再生モードを指示すると、制御部109は、各部を制御して再生モードに設定する。   Next, playback processing of a moving image file and a still image file recorded on the recording medium 108 will be described. When the user operates the operation unit 110 to instruct the playback mode, the control unit 109 controls each unit to set the playback mode.

制御部109は、記録再生部107を制御して、記録媒体108に記録された各静止画ファイル、及び動画ファイルのサムネイル用の画像データを読み出す。読み出されたサムネイル用の画像データは、一旦、メモリ111に記憶される。表示制御部105は、メモリ111よりサムネイル用の画像データを読み出し、複数のサムネイル画像を含むインデックス画面を生成して表示部106に表示する。ユーザが操作部110を操作して、いずれかのサムネイル画像を選択し、再生を指示すると、制御部109は、選択されたサムネイル画像に対応する静止画ファイル、或いは動画ファイルを再生するように、記録再生部107に指示する。   The control unit 109 controls the recording / playback unit 107 to read out the image data for each still image file and the thumbnail of the moving image file recorded on the recording medium 108. The read thumbnail image data is temporarily stored in the memory 111. The display control unit 105 reads the thumbnail image data from the memory 111, generates an index screen including a plurality of thumbnail images, and displays the index screen on the display unit 106. When the user operates the operation unit 110 to select any thumbnail image and instruct to play back, the control unit 109 plays back a still image file or a moving image file corresponding to the selected thumbnail image. It instructs the recording / reproducing unit 107.

記録再生部107は、指定された静止画ファイル或いは動画ファイルを記録媒体108より読み出し、メモリ111に記憶する。画像処理部102は、静止画ファイルの再生が指示された場合には、メモリ111より静止画データを読み出して復号し、メモリ111に記憶する。また、画像処理部102は、動画ファイルの再生が指示された場合、メモリ111より動画データを順次読み出して復号し、復号された動画データをメモリ111に記憶する。また、音声処理部104は、動画ファイルの再生が指示された場合、メモリ111より、動画データと共に再生された音声データを復号し、復号された音声データをメモリ111に記憶する。   The recording / playback unit 107 reads the specified still image file or moving image file from the recording medium 108 and stores it in the memory 111. When the reproduction of the still image file is instructed, the image processing unit 102 reads out still image data from the memory 111, decodes it, and stores it in the memory 111. When the reproduction of the moving image file is instructed, the image processing unit 102 sequentially reads and decodes moving image data from the memory 111 and stores the decoded moving image data in the memory 111. When the reproduction of the moving image file is instructed, the audio processing unit 104 decodes the audio data reproduced together with the moving image data from the memory 111 and stores the decoded audio data in the memory 111.

表示制御部105は、メモリ111より、復号された静止画データ、或いは動画データを読み出し、これらを表示部106に表示する。また、制御部109は、メモリ111より復号された音声データを読み出し、スピーカ114から出力する。   The display control unit 105 reads the decoded still image data or moving image data from the memory 111 and displays them on the display unit 106. In addition, the control unit 109 reads the audio data decoded from the memory 111 and outputs it from the speaker 114.

静止画再生中において、操作部110よりインデックス表示の指示があった場合、制御部109は静止画の再生を停止して、再度、インデックス画面を表示部106に表示させる。また、動画再生中に操作部110より再生停止の指示があった場合、制御部109は、動画の再生を停止して、再度、インデックス画面を表示部106に表示させる。   If there is an index display instruction from the operation unit 110 during still image reproduction, the control unit 109 stops reproduction of the still image and displays the index screen on the display unit 106 again. In addition, when an instruction to stop reproduction is given from the operation unit 110 during moving image reproduction, the control unit 109 stops reproduction of the moving image and causes the display unit 106 to display the index screen again.

次に、図2を用いて動画ファイルのフォーマットについて説明する。本実施形態で扱う動画ファイルの形式(コンテナ形式)はMP4とする。また、動画データはH.264方式で符号化され、音声データはAAC方式で圧縮される。   Next, the format of the moving image file will be described with reference to FIG. The video file format (container format) handled in this embodiment is MP4. The moving image data is H.264. The audio data is encoded by the H.264 system and compressed by the AAC system.

MP4では、ファイルに格納されるデータはボックスと呼ばれるデータ構造の内部に記述され、ボックスを単位としてファイルに記録される。ボックスは次のようなフィールドから構成される。
Size:Sizeフィールドを含む、ボックス全体のデータサイズを表す4バイトのフィールド。
Type:ボックスの種類を表す4バイトのタイプ識別子。
Typeフィールド以降のフィールドはボックスによってはオプションであるため、ここでは説明を省略する。また、ボックス内にボックスを包含することが可能であり、それにより入れ子構造を実現している。
In MP4, data stored in a file is described in a data structure called a box, and is recorded in the file in units of boxes. A box consists of the following fields:
Size: A 4-byte field representing the data size of the entire box including the Size field.
Type: A 4-byte type identifier representing the type of box.
Since the fields after the Type field are optional depending on the box, the description is omitted here. Further, the box can be included in the box, thereby realizing a nested structure.

201はftyp(ファイルタイプボックス)であり、ファイルの種別を表すボックスである。202はmoov(ムービーボックス)であり、後述のmvhd(ムービーヘッダボックス)やtrak(トラックボックス)などを含む、音声や映像に関する情報が格納されている。203はmdat(ムービーデータボックス)であり、音声データや動画データ、テキストなどの実データが格納されている。   Reference numeral 201 denotes an ftyp (file type box), which represents a file type. Reference numeral 202 denotes a moov (movie box), which stores information related to audio and video including mvhd (movie header box) and trak (track box) described later. Reference numeral 203 denotes an mdat (movie data box) that stores actual data such as audio data, moving image data, and text.

moov202の代表的なボックスについて述べる。204はuuid(汎用一意識別子ボックス)であり、任意の識別子やデータが格納される。205はudta(ユーザーデータボックス)であり、撮像装置100のモデル名や通信部115で受信した撮像装置100の位置情報やUTC時刻などのメタデータが格納される。206はmvhdであり、動画の作成日時や修正日時、タイムスケール、Duraionなどが記載されている。   A typical box of the moov 202 will be described. Reference numeral 204 denotes a uuid (general-purpose unique identifier box) in which arbitrary identifiers and data are stored. Reference numeral 205 denotes an udta (user data box) that stores metadata such as the model name of the imaging apparatus 100, position information of the imaging apparatus 100 received by the communication unit 115, and UTC time. Reference numeral 206 denotes mvhd, which describes the creation date / time and modification date / time, time scale, duration and the like of the moving image.

207は動画用のtrak(映像トラック)であり、動画データの符号化の種類や後述のstts(時間サンプルボックス)やstsc(サンプルチャンクボックス)やstss(同期サンプルボックス)、stsz(サンプルサイズボックス)、stco(チャンクオフセット)などmdat内の動画データに関する情報が格納される。208は音声用のtrakであり、サンプリング周波数やビット数、チャンネル数などのmdat内の音声データに関する情報が格納されている。209はテキスト用のtrakであり、mdat内のテキストデータに関する情報が格納されている。   Reference numeral 207 denotes a trak (video track) for moving images, the type of encoding of the moving image data, stts (time sample box), stsc (sample chunk box), stss (synchronous sample box), and stsz (sample size box) described later. , Stco (chunk offset), etc., information related to moving image data in mdat is stored. Reference numeral 208 denotes an audio trak, which stores information related to audio data in the mdat such as the sampling frequency, the number of bits, and the number of channels. Reference numeral 209 denotes a text trak, which stores information on text data in the mdat.

210はtkhdであり、そのトラックの作成日時やDuration、そしてIDなどが格納されている。本実施形態では、映像トラックのIDは1、音声トラックのIDは2、テキストトラックのIDは3、とする。   Reference numeral 210 denotes tkhd, which stores the creation date and time, duration, and ID of the track. In this embodiment, the video track ID is 1, the audio track ID is 2, and the text track ID is 3.

211はedts(エディットボックス)であり、トラックの再生開始時間が記載されている。例えば、動画の再生開始よりも音声の再生開始を後ろにずらしたい場合には、音声のedtsに値を記載することで実現することが可能である。212はtrefであり、トラック間の参照情報が記載されている。本実施形態では、映像トラックがテキストトラックをチャプタとして参照するため、映像トラックのtrefには、テキストトラックのIDである3が記載され、それをチャプタとして参照するため、識別子として‘chap’と記載されている。音声トラックも同様である。テキストトラックにはtrefは存在しない。   Reference numeral 211 denotes an edts (edit box), which describes the playback start time of the track. For example, in the case where it is desired to shift the audio playback start later than the video playback start, it can be realized by writing a value in the audio edts. Reference numeral 212 denotes tref, which describes reference information between tracks. In the present embodiment, since the video track refers to the text track as a chapter, the video track tref is described with 3 being the ID of the text track, and to refer to it as a chapter, the identifier “chap” is described. Has been. The same applies to the audio track. There is no tref in the text track.

213はstscであり、1チャンクがいくつのサンプル(動画の場合はフレーム)数で構成されているかを表している。214はsttsであり、サンプル数と各サンプルのDurationが格納されている。215はstssであり、キーフレーム番号が記載されており、映像trakにのみ存在する。たとえば、GOP(Group of Pictures)が3の場合は、1、4、7・・・と記載されており、GOPが12の場合は、1、13、25・・・・、GOPが15の場合は、1、16、31・・・と記載されている。216はstszであり、各サンプルのデータサイズが格納されている。217はstcoであり、動画データにおける各チャンクのファイル先頭からのオフセットが格納されている。   Reference numeral 213 denotes stsc, which represents how many samples (frames in the case of moving images) each chunk is composed of. Reference numeral 214 denotes stts, which store the number of samples and the duration of each sample. Reference numeral 215 denotes stss, which describes a key frame number and exists only in the video trak. For example, when GOP (Group of Pictures) is 3, it is written as 1, 4, 7... When GOP is 12, 1, 13, 25. Are described as 1, 16, 31. Reference numeral 216 denotes stsz, which stores the data size of each sample. Reference numeral 217 denotes stco, which stores an offset from the beginning of each chunk file in the moving image data.

218はWideであり、動画ファイルサイズが4GB以上の場合の64Bit拡張用のボックスである。219、220はmdat内に格納されているテキストチャンクであり、各チャプタのタイトルがテキストデータとして記載されている。221および222はmdat内に格納されている音声チャンクデータを表している。223および224はmdat内に格納されている映像チャンクデータを表している。
以上のように、映像用のstszおよびstcoに格納されている情報を用いることで、mdat内の任意の動画フレームや音声データ、チャプタにアクセスすることが可能である。
Reference numeral 218 denotes Wide, which is a 64-bit expansion box when the moving image file size is 4 GB or more. Reference numerals 219 and 220 denote text chunks stored in the mdat, and the titles of the chapters are described as text data. Reference numerals 221 and 222 denote audio chunk data stored in the mdat. Reference numerals 223 and 224 denote video chunk data stored in the mdat.
As described above, by using the information stored in the video stsz and stco, it is possible to access any video frame, audio data, and chapter in the mdat.

次に、アルバムモード処理について説明する。撮像装置100は、記録媒体108に記録された静止画ファイルと動画ファイルが所定の順序で再生されるように合成し、一つの動画を生成する機能を持つ。このように生成される一つの動画を本実施形態ではアルバムと呼ぶ。本実施形態では、記録媒体108に記録された静止画ファイル或いは動画ファイルから所定の条件に従って制御部109が自動的に選択したファイル、或いは、ユーザの指示により選択されたファイルから、一つのアルバムを生成する。   Next, the album mode process will be described. The imaging apparatus 100 has a function of generating a single moving image by combining the still image file and the moving image file recorded on the recording medium 108 so as to be reproduced in a predetermined order. One moving image generated in this way is called an album in this embodiment. In the present embodiment, one album is selected from a file automatically selected by the control unit 109 from a still image file or a moving image file recorded on the recording medium 108 according to a predetermined condition, or a file selected by a user instruction. Generate.

また、本実施形態では、アルバムの動画に対し、不揮発性メモリ112に記憶されたBGMの音楽データを合成することができる。そのため、記録媒体108に記録された静止画ファイルと動画ファイルをアルバムの動画データに変換して、一時的に記録媒体108に記録する。その後、一時的に記録された動画データを読み出し、更に、後述のように記録媒体108に予め記録しておいた音楽ファイルを読み出し、BGMとして動画データに合成する。その後、BGMが合成された動画データを圧縮して、最終的なアルバムの動画データとして記録媒体108に記録する。その後、一時的に記録された動画データを記録媒体から消去する。   In the present embodiment, the music data of BGM stored in the nonvolatile memory 112 can be combined with the moving image of the album. Therefore, the still image file and the moving image file recorded on the recording medium 108 are converted into album moving image data and temporarily recorded on the recording medium 108. Thereafter, the temporarily recorded moving image data is read out, and further, a music file recorded in advance on the recording medium 108 is read out as will be described later, and is combined with the moving image data as BGM. Thereafter, the moving image data combined with the BGM is compressed and recorded on the recording medium 108 as the moving image data of the final album. Thereafter, the temporarily recorded moving image data is erased from the recording medium.

図3は、このようなアルバムモード処理を含む、再生モードの処理を示すフローチャートである。図3の処理は、制御部109が各部を制御することにより実行される。前述のように、ユーザが操作部110を操作して、再生モードを指示した場合に、図3の処理が開始される。   FIG. 3 is a flowchart showing the playback mode processing including such album mode processing. The processing in FIG. 3 is executed by the control unit 109 controlling each unit. As described above, when the user operates the operation unit 110 to instruct the reproduction mode, the process of FIG. 3 is started.

再生モードが指示された場合、制御部109は、記録再生部107を制御し、記録媒体108に記録された静止画ファイル、動画ファイルの情報を取得し(S301)、前述のようにインデックス画面を表示部106に表示する(S302)。   When the playback mode is instructed, the control unit 109 controls the recording / playback unit 107 to acquire information on still image files and moving image files recorded on the recording medium 108 (S301), and displays the index screen as described above. The information is displayed on the display unit 106 (S302).

この状態で、制御部109は、アルバムモードへの切り替えが指示されたか否かを判別する(S303)。ユーザは操作部110を操作し、メニュー画面を表示部106に表示させることにより、アルバムモードへの切り替えを指示することができる。アルバムモードへの切り替え指示がない場合、再生モードにおける他の処理を行う(S311)。   In this state, the control unit 109 determines whether switching to the album mode is instructed (S303). The user can instruct switching to the album mode by operating the operation unit 110 and displaying the menu screen on the display unit 106. If there is no instruction to switch to the album mode, other processing in the playback mode is performed (S311).

また、アルバムモードへの切り替え指示があった場合、制御部109は、S301で取得した情報を用いて、アルバム生成のために使うことができる静止画、或いは動画ファイルが記録媒体108に記録されているか否かを判別する(S304)。本実施形態では、図1の撮像装置100自身により記録された静止画ファイル、或いは動画ファイルをアルバム生成のために使用し、他の装置により記録されたファイルを使用しないものとする。アルバム生成のために用いることができるファイルが記録媒体108に記録されていない場合、アルバムモードでの対象画像を選択するメニューをグレーアウト表示する(S310)。このときに表示されるメニュー画面601を図6(a)に示す。これにより、ユーザに対し、アルバム生成の対象となる画像が記録媒体108に記録されていない旨を知らせることができる。   When there is an instruction to switch to the album mode, the control unit 109 records the still image or moving image file that can be used for album generation on the recording medium 108 using the information acquired in S301. It is determined whether or not there is (S304). In the present embodiment, it is assumed that a still image file or a moving image file recorded by the imaging apparatus 100 itself in FIG. 1 is used for album generation, and a file recorded by another apparatus is not used. When a file that can be used for album generation is not recorded on the recording medium 108, a menu for selecting a target image in the album mode is displayed in gray out (S310). A menu screen 601 displayed at this time is shown in FIG. As a result, it is possible to notify the user that an image for which album generation is to be performed has not been recorded on the recording medium 108.

また、アルバム生成のために使用することができるファイルが記録媒体108に記録されていた場合、制御部109は、アルバム生成のための条件をユーザに選択させるためのメニュー画面を表示部106に表示する。本実施形態では、条件として、イベント、日付、人物、及び、カスタムが用意される。ここで、イベントが選択された場合、ユーザが指定した日付の期間に記録された画像からアルバムが生成される。また、日付が選択された場合、ユーザが指定した日付に記録された画像からアルバムが生成される。また、人物が選択された場合、予めユーザが撮像装置に登録した人物の顔の情報に基づいてアルバムを生成するために使用する画像が選択される。また、カスタムが選択された場合、ユーザが自分でアルバムを生成するために使用する画像を選択する。   When a file that can be used for album generation is recorded on the recording medium 108, the control unit 109 displays a menu screen on the display unit 106 for allowing the user to select conditions for album generation. To do. In this embodiment, an event, a date, a person, and custom are prepared as conditions. Here, when an event is selected, an album is generated from images recorded during a date period specified by the user. When a date is selected, an album is generated from images recorded on the date designated by the user. Further, when a person is selected, an image used for generating an album is selected based on information on the face of the person registered in advance in the imaging apparatus by the user. When custom is selected, the user selects an image to be used to generate an album by himself.

制御部109は、いずれかの種類が選択されたか否かを判別し(S305)、アルバムの種類が選択された場合、アルバムの作成処理を実行する(S306)。アルバムの作成処理については、図4を用いて説明する。次に、制御部109は、アルバムモードを終了するか否かを判別する(S307)。アルバムモードを終了しない場合、S304に戻る。また、アルバムモードを終了する場合、制御部109は、再度、インデックス画面を表示部106に表示し(S308)、再生モードを終了するか否かを判別する(S309)。再生モード終了する場合、再生モード処理を終了し、再生モードを終了しない場合S303に戻る。   The control unit 109 determines whether any type is selected (S305), and when an album type is selected, executes an album creation process (S306). The album creation process will be described with reference to FIG. Next, the control unit 109 determines whether or not to end the album mode (S307). If the album mode is not terminated, the process returns to S304. When the album mode is ended, the control unit 109 displays the index screen again on the display unit 106 (S308), and determines whether or not to end the reproduction mode (S309). When the reproduction mode is ended, the reproduction mode process is ended, and when the reproduction mode is not ended, the process returns to S303.

次に、アルバムの作成処理について説明する。図4は、アルバムの作成処理を示すフローチャートである。まず、制御部109は、所定の条件に従ってシナリオを生成する(S401)。ここで、シナリオとは、記録媒体108に記録された静止画ファイルや動画ファイルのうち、アルバムを生成するために使用されるファイルとその再生順序、各ファイルから生成される動画のフレーム数等を示す情報である。アルバムの種類としてイベント、或いは、日付が選択された場合、制御部109は、指定された日付に記録された画像から、所定の条件に従ってファイルを選択する。例えば、制御部109は、各静止画や動画を画像処理部102により解析した結果や、一つのアルバムを生成するために使用する静止画、動画の数等の条件に従い、アルバムを生成するために用いるファイルを選択し、シナリオを生成する。   Next, album creation processing will be described. FIG. 4 is a flowchart showing album creation processing. First, the control unit 109 generates a scenario according to a predetermined condition (S401). Here, the scenario refers to a file used to generate an album among still image files and moving image files recorded on the recording medium 108, a reproduction order thereof, the number of moving image frames generated from each file, and the like. Information. When an event or date is selected as the type of album, the control unit 109 selects a file from an image recorded on the specified date according to a predetermined condition. For example, the control unit 109 generates an album according to the result of analysis of each still image or moving image by the image processing unit 102 or the conditions such as the number of still images and moving images used to generate one album. Select a file to use and generate a scenario.

以下、アルバムにおいて、一つの静止画ファイル、或いは、動画ファイルから生成された一部の動画の期間をチャプタという。また、制御部109は、アルバム中でのチャプタ間のフェード処理等の画像効果等の情報もシナリオに記述する。また、ユーザが、生成されるアルバムのフレームレートを設定できるように構成してもよい。この場合、制御部109は、アルバムのフレームレートの情報もシナリオに記述する。本実施形態では、記録されている動画のフレームレートにかかわらず、アルバムのフレームレートは30fpsとする。制御部109は、生成したシナリオ情報をメモリ111に記憶する。   Hereinafter, a part of a moving image generated from one still image file or a moving image file in an album is referred to as a chapter. The control unit 109 also describes information such as image effects such as fade processing between chapters in the album in the scenario. Moreover, you may comprise so that a user can set the frame rate of the album produced | generated. In this case, the control unit 109 also describes album frame rate information in the scenario. In this embodiment, the album frame rate is set to 30 fps regardless of the frame rate of the recorded moving image. The control unit 109 stores the generated scenario information in the memory 111.

次に、制御部109は、記録媒体108が、書き込み禁止(ライトプロテクト)の状態に設定されているか否かを判別する(S402)。例えば、記録媒体108がメモリカードである場合、書き込み禁止を設定するための部材の状態を検出することにより、書き込み禁止の状態となっているか否かを判別することができる。記録媒体108が書き込み禁止の状態でない場合、制御部109は、生成したアルバムの動画ファイルに対して付加されるファイル名を作成可能であるか否かを判別する(S403)。   Next, the control unit 109 determines whether or not the recording medium 108 is set in a write-protected state (S402). For example, when the recording medium 108 is a memory card, it is possible to determine whether or not the writing is prohibited by detecting the state of the member for setting the writing prohibition. If the recording medium 108 is not in a write-protected state, the control unit 109 determines whether it is possible to create a file name to be added to the generated movie file of the album (S403).

本実施形態では、生成されたアルバムの動画ファイルを記録媒体108に記録する。制御部109は、アルバムの動画ファイルに対して所定のルールに従うファイル名を付加することができるか否かを判別する。前述のように、本実施形態では、DCFに従い動画ファイルと静止画ファイルを管理する。DCFでは、DCFディレクトリに格納可能なディレクトリ数の上限(999まで)、及び、一つのディレクトリに格納可能なファイル数の上限(9999まで)が規定されている。ここでは、上限の番号のディレクトリ(ディレクトリ番号999)に、上限のファイル(ファイル名に含まれるファイル番号が9999)が格納されている場合、ファイル名が作成できないと判別する。   In this embodiment, the generated moving image file of the album is recorded on the recording medium 108. The control unit 109 determines whether or not a file name according to a predetermined rule can be added to the moving image file of the album. As described above, in this embodiment, a moving image file and a still image file are managed according to the DCF. In DCF, an upper limit (up to 999) of the number of directories that can be stored in the DCF directory and an upper limit (up to 9999) of the files that can be stored in one directory are defined. Here, it is determined that the file name cannot be created when the upper limit file (directory number 999) contains the upper limit file (file number included in the file name is 9999).

アルバムの動画ファイルのファイル名が作成可能である場合、制御部109は、空き容量の判定処理を行う(S404)。空き容量の判定処理については、図5を用いて説明する。そして、制御部109は、アルバムを保存するために必要な容量の空き容量が記録媒体108に存在するか否かを判別する(S405)。   If the file name of the movie file of the album can be created, the control unit 109 performs free space determination processing (S404). The free space determination process will be described with reference to FIG. Then, the control unit 109 determines whether or not the recording medium 108 has a free space necessary for storing the album (S405).

記録媒体108が書き込み禁止である場合(S402)、ファイル名を作成可能でない場合(S403)、及び、空き容量が不足していると判別した場合(S405)、制御部109は、プレビュー再生の確認画面を表示部106に表示させる(S406)。例えば、S402で記録媒体が書き込み禁止の状態に設定されていた場合、図6(b)の確認画面602が表示部106に表示される。また、S403でファイル名を作成できないと判別された場合、図6(c)の確認画面603が表示部106に表示される。また、S405で空き容量が不足していると判別された場合、図6(d)の確認画面604が表示部106に表示される。   When the recording medium 108 is write-protected (S402), when a file name cannot be created (S403), and when it is determined that the free space is insufficient (S405), the control unit 109 confirms preview reproduction. The screen is displayed on the display unit 106 (S406). For example, when the recording medium is set in a write-inhibited state in S402, a confirmation screen 602 in FIG. 6B is displayed on the display unit 106. If it is determined in S403 that a file name cannot be created, a confirmation screen 603 in FIG. 6C is displayed on the display unit 106. If it is determined in S405 that the free space is insufficient, a confirmation screen 604 in FIG. 6D is displayed on the display unit 106.

制御部109は、確認画面を表示した後、プレビュー再生が指示されたか否かを判別する(S407)。プレビュー再生が指示された場合、制御部109は、S401で生成したシナリオに従い、プレビュー再生処理を行う(S408)。プレビュー再生処理については、図9を用いて後述する。   After displaying the confirmation screen, the control unit 109 determines whether preview reproduction has been instructed (S407). When preview playback is instructed, the control unit 109 performs preview playback processing according to the scenario generated in S401 (S408). The preview reproduction process will be described later with reference to FIG.

プレビュー再生のキャンセルが選択された場合、及び、プレビュー再生が終了した場合、制御部109は、アルバム設定のメニュー画面に表示される、アルバム動画作成の項目とBGM設定の項目を共にグレーアウト表示するように設定する(S409)。そして、制御部109は、アルバム設定のメニュー画面を表示部106に表示する(S410)。ここでは、図16(b)に示すように、アルバム動画作成の項目1607と、BGM設定の項目1608が共にグレーアウト表示され、ユーザが選択できないように設定される。   When canceling preview playback is selected and when preview playback ends, the control unit 109 displays both the album video creation item and the BGM setting item displayed in gray on the album setting menu screen. (S409). Then, the control unit 109 displays an album setting menu screen on the display unit 106 (S410). Here, as shown in FIG. 16B, the album moving image creation item 1607 and the BGM setting item 1608 are both grayed out and set so that the user cannot select them.

この状態で、制御部109は、ユーザによりアルバムモードの終了が指示されたか否かを判別し(S411)、アルバムモードの終了が指示された場合、アルバム作成処理が終了する。また、アルバムモード終了指示がない場合、S407に戻る。   In this state, the control unit 109 determines whether or not the end of the album mode is instructed by the user (S411). When the end of the album mode is instructed, the album creating process ends. If there is no instruction to end the album mode, the process returns to S407.

一方、S405で空き容量ありと判別された場合、制御部109は、S401で生成したシナリオに従い、プレビュー再生処理を行う(S412)。ここで、空き容量ありと判別した場合は、ユーザに対してプレビュー再生を行うか否かを確認すること無く、プレビュー再生処理が実行される。なお、S413以降で説明するBGM設定処理がシナリオに対して行われていないときは当該プレビュー再生は静止画および動画について行われる。   On the other hand, when it is determined in S405 that there is free space, the control unit 109 performs a preview reproduction process according to the scenario generated in S401 (S412). Here, when it is determined that there is free space, the preview reproduction process is executed without confirming whether the user performs preview reproduction. Note that when the BGM setting process described in and after S413 is not performed for the scenario, the preview reproduction is performed for still images and moving images.

プレビュー再生処理が終了した後、制御部109はBGMファイルの構成を確認する処理を行う(S413)。本実施形態では、不揮発性メモリ112に記憶されたBGM用の音楽データを、アルバムの動画と合成する機能を持つ。そのため、圧縮された状態で不揮発性メモリ112に記憶されたBGM用の音楽データを伸長し、予め記録媒体108に記憶しておく。この処理を音楽ファイル(BGMファイル)の展開処理という。そして、アルバムの動画を生成する際に、記録媒体108に展開済みの音楽ファイルを、アルバムの動画と合成する。   After the preview reproduction process is completed, the control unit 109 performs a process for confirming the configuration of the BGM file (S413). In this embodiment, the music data for BGM stored in the non-volatile memory 112 has a function of synthesizing with the movie of the album. Therefore, the music data for BGM stored in the nonvolatile memory 112 in a compressed state is expanded and stored in the recording medium 108 in advance. This process is called a music file (BGM file) development process. Then, when generating the album moving image, the music file developed on the recording medium 108 is combined with the album moving image.

また、本実施形態では、不揮発性メモリ112に記憶された音楽データを伸長し、所定のファイル名を付加して記録媒体108に記憶する。そのため、ここではまず、不揮発性メモリ112に記憶された音楽データを記録媒体108に展開した際に付加されるファイル名と同じ名前のディレクトリ(フォルダ)が、記録媒体108に存在するか否かを判別する。音楽ファイルと同じ名前のディレクトリが記録媒体108に存在しない場合は、音楽ファイルの構成が正常であると判定する。   In the present embodiment, the music data stored in the nonvolatile memory 112 is decompressed, added with a predetermined file name, and stored in the recording medium 108. Therefore, here, first, whether or not a directory (folder) having the same name as the file name added when the music data stored in the nonvolatile memory 112 is expanded on the recording medium 108 exists in the recording medium 108. Determine. If a directory having the same name as the music file does not exist in the recording medium 108, it is determined that the music file structure is normal.

また、制御部109は、音楽ファイルを記録媒体108に展開した際に付加されるファイル名と同じ名前で、且つ、展開後の音楽ファイルと同じ拡張子のファイルが記録媒体108に記録されていた場合、そのファイルサイズを検出する。そして、検出された音楽ファイルのファイルサイズが、所定のファイルサイズ以下であるか否かを判別する。検出された音楽ファイルのサイズが、所定のファイルサイズ以下である場合、音楽ファイルの構成が正常であると判定する。本実施形態では、記録媒体108に展開された音楽ファイルのサイズが所定のファイルサイズとなるように、不揮発性メモリ112に記憶された音楽データを伸長し、記録媒体108に展開する。   In addition, the control unit 109 records a file having the same name as the file name added when the music file is expanded on the recording medium 108 and the same extension as the expanded music file on the recording medium 108. If so, the file size is detected. And it is discriminate | determined whether the file size of the detected music file is below a predetermined file size. When the size of the detected music file is equal to or smaller than the predetermined file size, it is determined that the music file configuration is normal. In the present embodiment, the music data stored in the nonvolatile memory 112 is expanded and expanded on the recording medium 108 so that the size of the music file expanded on the recording medium 108 becomes a predetermined file size.

次に、制御部109は、記録媒体108に記録された音楽ファイルの構成が正常であるか否かを判別する(S414)。ファイル構成が正常である場合、制御部109は、アルバム設定のメニュー画面に表示する全ての項目を通常表示するように設定する(S415)。また、ファイル構成が正常でない場合、制御部109は、BGMの設定が可能ではないと判別する。そして、制御部109は、アルバム設定のメニュー画面に表示する項目のうち、BGM設定の項目をグレーアウト表示とすると共に、所定の警告情報を表示するように設定する(S416)。   Next, the control unit 109 determines whether or not the structure of the music file recorded on the recording medium 108 is normal (S414). If the file structure is normal, the control unit 109 sets all items to be displayed on the album setting menu screen to be normally displayed (S415). If the file configuration is not normal, the control unit 109 determines that BGM setting is not possible. Then, the control unit 109 sets the BGM setting items to be grayed out among the items displayed on the album setting menu screen, and sets predetermined warning information to be displayed (S416).

次に、制御部109は、アルバム設定のためのメニュー画面を表示部106に表示する(S417)。S415で全ての設定項目を通常表示することが設定された場合、図16(a)のメニュー画面1601が表示される。メニュー画面1601は、四つの項目1602−1605を含む。メニュー画面1601は、何れの設定項目も有効な場合を示している。メニュー画面1601において、項目1602はプレビュー再生を指示するための項目、項目1603はアルバム動画の作成を指示するための項目である。また、項目1604は、アルバムの動画に合成されるBGMに関する設定を指示するための項目、項目1605はアルバムの動画に付加する色の効果の変更を指示するための項目である。   Next, the control unit 109 displays a menu screen for album setting on the display unit 106 (S417). If it is set in S415 that all setting items are normally displayed, the menu screen 1601 in FIG. 16A is displayed. The menu screen 1601 includes four items 1602-1605. A menu screen 1601 shows a case where any setting item is valid. In the menu screen 1601, an item 1602 is an item for instructing preview reproduction, and an item 1603 is an item for instructing creation of an album moving image. An item 1604 is an item for instructing a setting related to BGM to be combined with the moving image of the album, and an item 1605 is an item for instructing a change in the color effect added to the moving image of the album.

一方、S416で、BGM設定の項目をグレーアウト表示とすると共に、所定の警告情報を表示するように設定された場合、図16(c)のメニュー画面1609が表示される。メニュー画面1609では、BGM設定の項目1610がグレーアウト表示され、ユーザが選択できないようになっている。また、所定の警告情報1611がBGM設定の項目に表示される。この警告情報1611により、ユーザに対し、記録媒体108に展開されている音楽ファイルの構成が正常ではないことを知らせることができる。また、この状態では、BGM用の音楽ファイルを記録媒体108に記録する処理は行われない。また、アルバムの動画ファイルを記録媒体108に記録する処理、及び、アルバムの動画にBGMの音楽データを合成して記録する処理も行われない。   On the other hand, if the BGM setting item is grayed out and set to display predetermined warning information in S416, the menu screen 1609 in FIG. 16C is displayed. On the menu screen 1609, the BGM setting item 1610 is grayed out so that the user cannot select it. Further, predetermined warning information 1611 is displayed in the BGM setting item. The warning information 1611 can inform the user that the configuration of the music file developed on the recording medium 108 is not normal. In this state, the process of recording the BGM music file on the recording medium 108 is not performed. Further, neither the process of recording the moving image file of the album on the recording medium 108 nor the process of combining the BGM music data with the moving image of the album and recording it.

次に、制御部109は、BGMをアルバムと合成して記録するように設定することが可能であるか否かを判別する(S418)。BGMの設定が可能でない場合、制御部109は、ユーザによりアルバム保存の指示があったか否かを判別する(S419)。アルバム保存の指示があった場合、制御部109は各部を制御して、シナリオに従いアルバムの動画を生成し、記録媒体108に記録する処理を行う(S420)。アルバムの保存処理については、図10−図14を用いて後述する。   Next, the control unit 109 determines whether it is possible to set so that BGM is combined with the album and recorded (S418). If the BGM setting is not possible, the control unit 109 determines whether or not the user has instructed to save the album (S419). When there is an instruction to save the album, the control unit 109 controls each unit to generate a moving image of the album according to the scenario and record it on the recording medium 108 (S420). The album storage process will be described later with reference to FIGS.

S418で、BGMの設定が可能である場合、制御部109は、メニュー画面において、BGM設定の項目が選択されたか否かを判別する(S421)。BGM設定の項目が選択された場合、制御部109は、BGMの設定処理を行う(S423)。BGMの設定処理は、図7を用いて後述する。   If the setting of BGM is possible in S418, the control unit 109 determines whether or not an item for BGM setting has been selected on the menu screen (S421). When the BGM setting item is selected, the control unit 109 performs a BGM setting process (S423). The BGM setting process will be described later with reference to FIG.

また、S421でBGMの設定項目が選択されない場合、及び、S419でアルバムの保存指示の項目が選択されない場合、制御部109は、プレビュー再生が指示されたか否かを判別する(S422)。プレビュー再生が指示された場合、S412に戻り、プレビュー再生処理が行われる。また、プレビュー再生が指示されない場合はS418に戻る。   If the BGM setting item is not selected in S421, and if the album storage instruction item is not selected in S419, the control unit 109 determines whether preview reproduction is instructed (S422). If preview playback is instructed, the process returns to S412 to perform preview playback processing. If preview playback is not instructed, the process returns to S418.

次に、S404の空き容量の判定処理を説明する。図5は空き容量の判定処理を示すフローチャートである。制御部109は、まず、S401で生成されたシナリオにより、再生順序が先頭のファイルを選択する(S501)。そして、制御部109は、このファイルから生成されるアルバムのチャプタのフレーム数を取得して、このフレーム数に基づいて、このファイルから生成されるチャプタのデータ量を求める(S502)。   Next, the free capacity determination process in S404 will be described. FIG. 5 is a flowchart showing the free space determination process. First, the control unit 109 selects the first file in the playback order based on the scenario generated in S401 (S501). The control unit 109 obtains the number of chapter chapters of the album generated from this file, and obtains the amount of chapter data generated from this file based on the number of frames (S502).

ここで、静止画をアルバムの動画に変換する場合、1画面の静止画を所定数のフレーム、例えば60フレームの動画に変換する。アルバムのフレームレートが30fpsの場合、1画面の静止画が2秒分の動画に変換される。また、動画をアルバムに変換する場合は、元の動画の再生時間をアルバムのフレームレート(30fps)に変換することによりフレーム数が得られる。更に、得られたフレーム数と、生成されるアルバムの動画のデータレート(ビットレート)とから、各チャプタのデータ量を求める。   Here, when converting a still image into a moving image of an album, a still image of one screen is converted into a predetermined number of frames, for example, a moving image of 60 frames. When the album frame rate is 30 fps, a still image on one screen is converted into a moving image for 2 seconds. Also, when converting a moving image to an album, the number of frames can be obtained by converting the playback time of the original moving image to the frame rate (30 fps) of the album. Further, the data amount of each chapter is obtained from the obtained number of frames and the data rate (bit rate) of the moving image of the generated album.

次に、制御部109は、得られたチャプタのデータ量を、記録媒体108の書き込み単位であるクラスタ数に変換する(S503)。例えば、メモリカードにおいては、クラスタと呼ばれる所定の書き込み単位に基づいてデータの書き込みが行われる。次に、制御部109は、合計のフレーム数とクラスタ数に対し、新たに取得されたチャプタのフレーム数とクラスタ数を加算することによりこれらを更新する(S504)。   Next, the control unit 109 converts the obtained chapter data amount into the number of clusters which is a writing unit of the recording medium 108 (S503). For example, in a memory card, data is written based on a predetermined writing unit called a cluster. Next, the control unit 109 updates these by adding the newly acquired chapter frame number and cluster number to the total frame number and cluster number (S504).

そして、制御部109は、シナリオに指定された残りのファイルがあるか否かを判別し(S505)、残りのファイルがある場合はS502に戻り処理を続ける(S506)。また、シナリオに記述された全てのファイルについて処理が終了した場合、制御部109は、生成されるアルバムの動画ファイルのヘッダ(moov)のサイズを求める。そして、ヘッダのサイズをクラスタ数に変換し、合計のクラスタ数に加算する(S507)。ここで、制御部109は、S504で取得された合計のフレーム数に基づいて、アルバムの動画ファイルのヘッダサイズを求める。即ち、S504で取得された合計フレーム数は、生成されるアルバムの動画ファイルに含まれる動画のフレーム数である。また、図2を用いて説明したように、ヘッダ(moov)のサイズは、動画データのフレーム数に対応したサイズとなる。そのため、制御部109は、合計のフレーム数に基づいて、ヘッダのサイズを算出する。   Then, the control unit 109 determines whether there is a remaining file specified in the scenario (S505). If there is a remaining file, the process returns to S502 and continues the processing (S506). Further, when the processing is completed for all the files described in the scenario, the control unit 109 obtains the size of the header (moov) of the moving image file of the generated album. Then, the header size is converted into the number of clusters and added to the total number of clusters (S507). Here, the control unit 109 obtains the header size of the moving image file of the album based on the total number of frames acquired in S504. That is, the total number of frames acquired in S504 is the number of frames of the moving image included in the generated moving image file of the album. Further, as described with reference to FIG. 2, the size of the header (moov) is a size corresponding to the number of frames of moving image data. Therefore, the control unit 109 calculates the header size based on the total number of frames.

次に、制御部109は、アルバムの動画に対してBGMを多重するときに、一時的に生成される動画データのクラスタ数を、合計のクラスタ数に加算する(S508)。ここで加算するクラスタ数は、S504で求めた、全チャプタの合計クラスタ数である。   Next, the control unit 109 adds the number of clusters of moving image data temporarily generated to the total number of clusters when BGM is multiplexed on the moving images of the album (S508). The number of clusters to be added here is the total number of clusters of all chapters obtained in S504.

次に、制御部109は、不揮発性メモリ112に記憶されている、圧縮されたBGM用の音楽データを伸長し、記録媒体108に記録するために必要なサイズをクラスタ数に変換し、合計クラスタ数に加算する(S509)。ここでは、一つの音楽ファイルについて所定のサイズとして必要なクラスタ数を求める。   Next, the control unit 109 decompresses the compressed music data for BGM stored in the non-volatile memory 112, converts the size necessary for recording on the recording medium 108 into the number of clusters, and calculates the total cluster. Add to the number (S509). Here, the required number of clusters is obtained as a predetermined size for one music file.

次に、制御部109は、記録媒体108の空きクラスタ数(未記録であるクラスタ数)を検出し(S510)、空きクラスタ数が、S509で得られた合計のクラスタ数より大きいか否かを判別する(S511)。そして、制御部109は、空きクラスタ数が、合計のクラスタ数より大きい場合は、空き容量ありと判定する(S512)。また、空きクラスタ数が、合計のクラスタ数より大きくない場合は、制御部109は、空き容量不足と判定する(S513)。   Next, the control unit 109 detects the number of free clusters (number of unrecorded clusters) in the recording medium 108 (S510), and determines whether or not the number of free clusters is larger than the total number of clusters obtained in S509. It discriminate | determines (S511). If the number of free clusters is larger than the total number of clusters, the control unit 109 determines that there is free space (S512). If the number of free clusters is not larger than the total number of clusters, the control unit 109 determines that the free capacity is insufficient (S513).

このように、図5の処理によれば、シナリオに指定された静止画ファイルと動画ファイルから生成されるアルバムの動画データのデータ量を算出する。また、アルバムに対してBGMを合成する際に、一時的に生成される動画データのデータ量と、BGMの音楽ファイルを記録するのに必要なデータ量を求める。そして、これらの合計のデータ量に基づいて、アルバムを生成するために必要な分の空き容量が、記録媒体108に残っているかを判別する。   Thus, according to the processing of FIG. 5, the data amount of the moving image data of the album generated from the still image file and the moving image file specified in the scenario is calculated. Further, when the BGM is combined with the album, the data amount of the temporarily generated moving image data and the data amount necessary for recording the BGM music file are obtained. Then, based on the total data amount, it is determined whether or not the recording medium 108 has enough free space to generate the album.

次に、S423のBGMの設定処理を説明する。図7はBGMの設定処理を示すフローチャートである。まず、制御部109は、記録媒体108に対して展開済みの音楽ファイルを検出するためのBGMの展開判定の処理を行う(S701)。BGMの展開判定の処理については、図8を用いて説明する。次に、制御部109は、所定数のBGM用の音楽ファイルが記録媒体108に展開済みであるか否かを判別する(S702)。不揮発性メモリ112に記憶された所定数のBGM用の音楽データに対応する音楽ファイルが全て記録媒体108に記録済みの場合、制御部109は、BGMの設定画面を表示部106に表示する(S703)。図16(d)はBGMの設定画面1612を示している。そして、制御部109は、この設定画面を用いた設定処理を行う(S704)。   Next, the BGM setting process in S423 will be described. FIG. 7 is a flowchart showing BGM setting processing. First, the control unit 109 performs BGM expansion determination processing for detecting a music file that has been expanded on the recording medium 108 (S701). The BGM deployment determination process will be described with reference to FIG. Next, the control unit 109 determines whether or not a predetermined number of BGM music files have been developed on the recording medium 108 (S702). When all the music files corresponding to the predetermined number of BGM music data stored in the nonvolatile memory 112 have been recorded on the recording medium 108, the control unit 109 displays a BGM setting screen on the display unit 106 (S703). ). FIG. 16D shows a BGM setting screen 1612. Then, the control unit 109 performs setting processing using this setting screen (S704).

ユーザは、設定画面1612を用いて、BGMを合成するか否か、BGMを記録する場合に、音声と合成するかBGMのみを記録するか、BGMとして何れの音楽を使用するか、を設定することができる。また、設定画面1612を用いて、BGMの音楽の試聴を指示することができる。試聴が指示された場合、制御部109は、不揮発性メモリ112に記憶された音楽ファイルのうち、選択された音楽ファイルを読み出して音声処理部104により復号し、スピーカ114から出力する。   The user uses the setting screen 1612 to set whether or not to synthesize BGM, and when recording BGM, whether to synthesize with voice, record only BGM, or which music to use as BGM. be able to. In addition, the setting screen 1612 can be used to instruct trial listening to BGM music. When the audition is instructed, the control unit 109 reads out the selected music file among the music files stored in the nonvolatile memory 112, decodes it by the audio processing unit 104, and outputs it from the speaker 114.

また、S702で、所定数のBGM用の音楽ファイルが記録媒体108に展開済みでない場合、制御部109は、音楽ファイルを記録媒体108に展開するか否かをユーザに問い合わせるための確認画面を表示部106に表示する(S706)。そして、制御部109は、ユーザにより音楽ファイルの展開が指示されたか否かを判別する(S706)。音楽ファイルの展開処理を行わないことが指示された場合、制御部109は、アルバム設定のメニュー画面を表示部106に表示して処理を終了する(S714)。   In S702, when a predetermined number of BGM music files have not been developed on the recording medium 108, the control unit 109 displays a confirmation screen for inquiring the user whether or not to develop the music file on the recording medium 108. The information is displayed on the unit 106 (S706). Then, the control unit 109 determines whether or not the user has instructed expansion of the music file (S706). When it is instructed not to perform the music file development process, the control unit 109 displays the album setting menu screen on the display unit 106 and ends the process (S714).

また、音楽ファイルの展開が指示された場合、制御部109は、未展開の音楽データを不揮発性メモリ112から読み出して音声処理部104により伸長し、メモリ111に記憶する(S707)。次に、制御部109は、この伸長された音楽データを記録するためのファイルのヘッダ情報を生成してメモリ111に記憶する(S708)。記録再生部107は、伸長された音楽データとヘッダを音楽ファイルとして記録媒体108に記録する(S709)。本実施形態では、伸長された音楽データを圧縮せず、PCM形式で記録する。   If an instruction to expand the music file is given, the control unit 109 reads the unexpanded music data from the nonvolatile memory 112, decompresses it by the audio processing unit 104, and stores it in the memory 111 (S707). Next, the control unit 109 generates header information of a file for recording the decompressed music data and stores it in the memory 111 (S708). The recording / reproducing unit 107 records the decompressed music data and the header on the recording medium 108 as a music file (S709). In this embodiment, the decompressed music data is recorded in the PCM format without being compressed.

次に、制御部109は、所定数の音楽ファイルが記録媒体108に展開済みとなったか否かを判別し(S710)、展開済みである場合は、S703に進み、BGMの設定用画面を表示部106に表示する。一方、所定数の音楽ファイルが展開済みでない場合は、制御部109は、BGM設定処理のキャンセルが指示されたか否かを判別する(S711)。キャンセル指示がない場合、S707に戻り、未展開の音楽データの伸長処理と音楽ファイルの記録を続ける。   Next, the control unit 109 determines whether or not a predetermined number of music files have been developed on the recording medium 108 (S710). If the music file has been developed, the control unit 109 proceeds to S703 and displays a BGM setting screen. Displayed on the unit 106. On the other hand, when the predetermined number of music files have not been developed, the control unit 109 determines whether or not cancellation of the BGM setting process has been instructed (S711). If there is no cancel instruction, the process returns to S707 to continue decompression processing of undeveloped music data and recording of a music file.

また、キャンセル指示があった場合、制御部109は、現在処理中の音楽ファイルの伸長処理及び記録媒体108への記録処理を停止し(S712)、記録途中の音楽ファイルを記録媒体108より削除する(S713)。そして、アルバム設定のメニュー画面を表示部106に表示して処理を終了する(S714)。   If there is a cancel instruction, the control unit 109 stops the decompression process of the music file currently being processed and the recording process to the recording medium 108 (S712), and deletes the music file being recorded from the recording medium 108. (S713). Then, an album setting menu screen is displayed on the display unit 106, and the process is terminated (S714).

次に、S701のBGM展開の判定処理を説明する。この処理は、記録媒体108に対し、アルバムの動画と合成可能な状態で展開されているBGM用の音楽ファイルの数、及び、未展開の音楽ファイルを検出する処理である。図8はBGM展開の判定処理を示すフローチャートである。   Next, the BGM expansion determination process in S701 will be described. This process is a process of detecting the number of BGM music files developed in a state that can be combined with the moving image of the album on the recording medium 108 and undeveloped music files. FIG. 8 is a flowchart showing the BGM development determination process.

まず、制御部109は、記録媒体108に記録されている、BGM用の音楽ファイルの情報を取得する(S801)。ここでは、音楽ファイルのファイル名とヘッダの情報を取得する。前述のように、本実施形態では、不揮発性メモリ112に記憶された音楽データを伸長し、記録媒体108に記録する場合に、所定のファイル名を付加して記録する。また、記録される音楽ファイルの形式を所定の形式としている。例えば、本実施形態では、記録媒体108に展開される音楽ファイルをWAV形式とし、その拡張子を.wavとする。   First, the control unit 109 acquires information about a music file for BGM recorded on the recording medium 108 (S801). Here, the file name and header information of the music file are acquired. As described above, in the present embodiment, when music data stored in the nonvolatile memory 112 is expanded and recorded on the recording medium 108, a predetermined file name is added and recorded. Also, the format of the music file to be recorded is a predetermined format. For example, in the present embodiment, the music file developed on the recording medium 108 is in the WAV format, and its extension is. Let it be wav.

また、制御部109は、不揮発性メモリ112に記憶された、BGM用の圧縮された音楽データのうちの一つを選択する。そして、S801で取得した情報を元に、この圧縮された音楽データに対応する音楽ファイルが記録媒体108に展開されているか否かを判別する(S802)。即ち、選択されたBGM用の音楽データに対応するファイル名を持つ音楽ファイルが記録媒体108に記録されているか否かを判別する。対応する音楽ファイルが記録媒体108に記録されていない場合、制御部109は、この音楽データを未展開のファイルとして記憶する(S806)。   Further, the control unit 109 selects one of the music data compressed for BGM stored in the nonvolatile memory 112. Then, based on the information acquired in S801, it is determined whether or not the music file corresponding to the compressed music data is expanded on the recording medium 108 (S802). That is, it is determined whether or not a music file having a file name corresponding to the selected BGM music data is recorded on the recording medium 108. If the corresponding music file is not recorded on the recording medium 108, the control unit 109 stores this music data as an unexpanded file (S806).

不揮発性メモリ112に記憶された音楽データに対応する音楽ファイルが記録媒体108に記録されていた場合、制御部109は、記録済みのファイルが、アルバムに合成するために使用可能であるか否かを判別する(S803)。ヘッダには、音楽データのサンプリング周波数、或いはチャンネル数など、音楽データを再生するために必要な情報が含まれている。制御部109は、音楽データのサンプリング周波数、或いはチャンネル数などが、撮像装置100により処理可能な値であるか否かを判別する。撮像装置100が音楽データを処理できないと判別された場合、アルバムに合成するために使用可能でないと判別する。記録済みのファイルが、アルバムに合成するために使用可能でない場合、制御部109は、この音楽データが未展開のBGMファイルであると記憶する(S806)。また、記録済みの音楽ファイルが、アルバムに合成するために使用可能である場合、制御部109は、この音楽データが展開済みのBGMファイルであると記憶する(S804)。   When a music file corresponding to the music data stored in the nonvolatile memory 112 is recorded on the recording medium 108, the control unit 109 determines whether the recorded file can be used for synthesizing the album. Is discriminated (S803). The header includes information necessary for reproducing music data, such as the sampling frequency of music data or the number of channels. The control unit 109 determines whether the sampling frequency of music data, the number of channels, or the like is a value that can be processed by the imaging apparatus 100. When it is determined that the image capturing apparatus 100 cannot process music data, it is determined that the image capturing apparatus 100 cannot be used to compose the album. If the recorded file is not usable for combining with the album, the control unit 109 stores that the music data is an undeveloped BGM file (S806). If the recorded music file can be used to synthesize the album, the control unit 109 stores that the music data is a developed BGM file (S804).

次に、制御部109は、不揮発性メモリ112に記憶された全ての音楽データについて、展開済みの判定処理を行ったか否かを判別する(S805)。全ての音楽データについて展開済みの判定処理が完了した場合、処理を終了する。また、全ての音楽データについて展開済みの判定処理が完了していない場合、制御部109は、不揮発性メモリ112に記憶された音楽データから、次の音楽データを選択し、S702に戻る(S807)。   Next, the control unit 109 determines whether or not an expanded determination process has been performed for all music data stored in the nonvolatile memory 112 (S805). When the developed determination process is completed for all music data, the process ends. In addition, when the expanded determination processing has not been completed for all music data, the control unit 109 selects the next music data from the music data stored in the nonvolatile memory 112, and returns to S702 (S807). .

このように、図7、図8の処理によれば、BGM用の音楽ファイルが全て記録媒体108に展開済みの場合、BGMの設定指示により、設定用画面が表示される。また、BGM用の音楽ファイルが全て記録媒体108に展開済みでなくても、BGMの設定指示により、自動的に未展開の音楽ファイルが記録媒体108に展開される。   As described above, according to the processing of FIGS. 7 and 8, when all the music files for BGM have been developed on the recording medium 108, the setting screen is displayed in accordance with the setting instruction of BGM. Further, even if not all BGM music files have been developed on the recording medium 108, an undeveloped music file is automatically developed on the recording medium 108 in accordance with the BGM setting instruction.

また、不揮発性メモリ112に記憶された所定数の音楽データに対応する音楽ファイルが全て記録媒体108に記録されていない状態では、BGMの設定用画面が表示されず、ユーザはBGMの合成を指示することができない。そのためアルバムの動画に対してBGMを合成する処理は行われない。   In addition, when all music files corresponding to a predetermined number of music data stored in the non-volatile memory 112 are not recorded on the recording medium 108, the BGM setting screen is not displayed, and the user instructs to synthesize BGM. Can not do it. For this reason, the process of synthesizing BGM with the moving image of the album is not performed.

このように、撮像装置100では、BGM用の音楽データを圧縮した状態で不揮発性メモリ112に記憶しておき、これを伸長した後に音楽ファイルとして記録媒体108に記録する。そのため、BGM用の音楽データを保存するために必要な、不揮発性メモリ112の記憶容量が少なくて済む。また、記録媒体108は着脱自在に構成されるので、音楽ファイルが未展開の記録媒体108が装着された場合には、再度、音楽ファイルを記録媒体108に記録する。そのため、記録媒体108が交換された場合であっても、アルバムの動画にBGMを合成することができる。また、本実施形態では、アルバムの動画にBGMを合成する処理に先だって、音楽データを伸長し、音楽ファイルとして記録媒体108に記録する。このようにすれば、アルバムの動画にBGMを合成する処理において、不揮発性メモリ112から音楽データを読み出して伸長する処理と、当該音楽データを合成する処理とを同時に行わない等、処理負荷を低減することができる。   As described above, in the imaging apparatus 100, the music data for BGM is stored in the nonvolatile memory 112 in a compressed state, and is decompressed and then recorded on the recording medium 108 as a music file. Therefore, the storage capacity of the non-volatile memory 112 required for storing BGM music data can be reduced. Further, since the recording medium 108 is configured to be detachable, when the recording medium 108 to which the music file is not developed is loaded, the music file is recorded on the recording medium 108 again. Therefore, even when the recording medium 108 is replaced, BGM can be combined with the moving image of the album. In the present embodiment, prior to the process of synthesizing the BGM with the moving image of the album, the music data is decompressed and recorded on the recording medium 108 as a music file. In this way, in the process of synthesizing BGM with the moving picture of the album, the processing load is reduced, for example, the process of reading out and decompressing music data from the nonvolatile memory 112 and the process of synthesizing the music data are not performed simultaneously. can do.

次に、S408、S412におけるプレビュー再生処理を説明する。図9はプレビュー再生処理を示すフローチャートである。制御部109はまず、BGMを合成する設定となっているか否かを判別する(S901)。BGM合成が設定されていた場合、制御部109は、記録再生部107により、BGMとして選択された音楽ファイルを記録媒体108から再生する(S902)。そして、音声処理部104は、再生された音楽ファイルを処理して順次メモリ111に記憶する。   Next, the preview reproduction process in S408 and S412 will be described. FIG. 9 is a flowchart showing the preview reproduction process. First, the control unit 109 determines whether or not it is set to synthesize BGM (S901). When the BGM composition is set, the control unit 109 reproduces the music file selected as BGM from the recording medium 108 by the recording / reproducing unit 107 (S902). Then, the audio processing unit 104 processes the reproduced music file and sequentially stores it in the memory 111.

次に、制御部109は、シナリオにより指定されたファイルのうち、再生順が先頭のファイルを選択し(S903)、このファイルが静止画ファイルと動画ファイルの何れであるかを判別する(S904)。静止画ファイルである場合、制御部109は、記録媒体108より選択された静止画ファイルを再生する。そして、画像処理部102により、再生された静止画データを復号し、YUV形式の画像データに変換してメモリ111に記憶する(S905)。次に、制御部109は、BGMを合成する設定となっているか否かを判別し(S906)、BGM合成の設定である場合は、再生された音楽ファイルに含まれる音声データをスピーカ114から出力する(S907)。   Next, the control unit 109 selects the first file in the playback order from the files specified by the scenario (S903), and determines whether the file is a still image file or a moving image file (S904). . In the case of a still image file, the control unit 109 reproduces the still image file selected from the recording medium 108. Then, the reproduced still image data is decoded by the image processing unit 102, converted into YUV format image data, and stored in the memory 111 (S905). Next, the control unit 109 determines whether or not it is set to synthesize BGM (S906). If it is set to synthesize BGM, audio data included in the reproduced music file is output from the speaker 114. (S907).

また、制御部109は、復号された1画面の静止画データをメモリ111から読み出し、画像処理部102により所定の処理を施す(S908)。ここでは、静止画データの画素数を表示部106の画素数に合わせて変更する処理や、記録日時等の各種の情報を静止画に合成する処理、或いは、各種の画像効果の処理等を行う。そして、制御部109は、表示部106に1フレーム分の静止画を表示し(S909)、静止画ファイルの1チャプタ当たりに設定されたフレーム数の静止画を表示したか否かを判別する(S910)。設定されたフレーム数の静止画を表示していない場合はS906に戻る。また、設定されたフレーム数の静止画を表示済みの場合、制御部109は、シナリオに指定された全てのファイルの再生が終了したか否かを判別する(S911)。   Further, the control unit 109 reads the decoded still image data of one screen from the memory 111, and performs predetermined processing by the image processing unit 102 (S908). Here, processing for changing the number of pixels of still image data in accordance with the number of pixels of the display unit 106, processing for combining various information such as recording date and time into a still image, processing for various image effects, and the like are performed. . Then, the control unit 109 displays a still image for one frame on the display unit 106 (S909), and determines whether or not a still image having the number of frames set per chapter of the still image file has been displayed (S909). S910). If no still image of the set number of frames is displayed, the process returns to S906. When the set number of still images have been displayed, the control unit 109 determines whether or not the reproduction of all the files specified in the scenario has been completed (S911).

全てのファイルの再生が終了した場合、制御部109は、BGMを合成する設定となっているか否かを判別し、BGMを再生する設定の場合は、記録媒体108からの音楽ファイルの再生を停止する(S914)。なお、本実施形態では、各BGM用の音楽ファイルに格納された音声データの再生時間は数秒から数十秒程度としている。そのため、プレビュー再生中、及び、後述のBGM合成処理中は、一つの音楽ファイルを繰り返し記録媒体108から再生する。或いは、一つの音楽ファイルを記録媒体108から読みだしてメモリ111に記憶しておき、メモリ111から繰り返し読みだして出力する構成としてもよい。   When the reproduction of all the files is completed, the control unit 109 determines whether or not the setting for synthesizing the BGM is made. When the setting for reproducing the BGM is made, the reproduction of the music file from the recording medium 108 is stopped. (S914). In the present embodiment, the reproduction time of the audio data stored in each BGM music file is set to several seconds to several tens of seconds. Therefore, one music file is repeatedly reproduced from the recording medium 108 during preview reproduction and during BGM synthesis processing described later. Alternatively, one music file may be read from the recording medium 108 and stored in the memory 111, and repeatedly read from the memory 111 and output.

S911で、シナリオに指定された全ファイルの再生が終了していない場合、制御部109は、シナリオの再生順で、次のファイルを選択し、S904に移行する。   If the reproduction of all the files specified in the scenario is not completed in S911, the control unit 109 selects the next file in the scenario reproduction order, and the process proceeds to S904.

また、S904で、選択されたファイルが動画ファイルである場合、制御部109は、選択された動画ファイルを記録媒体108より再生する。そして、再生された動画データを画像処理部102により復号し、YUV形式の画像データに変換してメモリ111に記憶する(S915)。また、制御部109は、再生された動画ファイルに、動画と共に音声が記録されているか否かを判別する(S916)。音声データが含まれている場合、再生された音声データを音声処理部104により復号し、順次メモリ111に記憶する(S917)。また、音声データが含まれていない場合、制御部109は、無音の音声データを出力するように音声処理部104を制御する(S918)。   In S904, when the selected file is a moving image file, the control unit 109 reproduces the selected moving image file from the recording medium 108. Then, the reproduced moving image data is decoded by the image processing unit 102, converted into YUV format image data, and stored in the memory 111 (S915). Further, the control unit 109 determines whether or not sound is recorded along with the moving image in the reproduced moving image file (S916). If audio data is included, the reproduced audio data is decoded by the audio processing unit 104 and sequentially stored in the memory 111 (S917). If no audio data is included, the control unit 109 controls the audio processing unit 104 to output silent audio data (S918).

次に、制御部109は、BGMを合成する設定となっているか否かを判別する(S919)。BGM合成の設定である場合は、再生された音楽ファイルに含まれる音声データと、動画データと共に再生された音声データ、あるいは、無音の音声データを音声処理部104により合成し、スピーカ114から出力する(S920)。   Next, the control unit 109 determines whether it is set to synthesize BGM (S919). If the BGM synthesis setting is used, the audio processing unit 104 synthesizes the audio data included in the reproduced music file and the audio data reproduced together with the moving image data or silent audio data, and outputs from the speaker 114. (S920).

このとき、BGMの音楽データと、再生された音声データとの合成比率は、シナリオに記述されている。即ち、S704のBGM設定処理において、BGM+音声が設定されていた場合は、BGMの音楽データと再生された音声データとの音声レベルがそれぞれ50%となるように合成される。また、BGMのみを出力するように設定されていた場合は、BGMの音楽データのレベルが100%となり、再生された音声データが出力されないように合成される。また、BGMを合成する設定でない場合、動画と共に再生された音声データ、或いは、無音の音声データをスピーカ114から出力する(S921)。   At this time, the composition ratio between the music data of BGM and the reproduced audio data is described in the scenario. That is, in the BGM setting process of S704, when BGM + audio is set, the BGM music data and the reproduced audio data are synthesized so that the audio levels are 50%, respectively. Further, if it is set to output only BGM, the music data level of BGM becomes 100% and synthesis is performed so that reproduced audio data is not output. If it is not set to synthesize BGM, audio data reproduced together with the moving image or silent audio data is output from the speaker 114 (S921).

また、制御部109は、復号された動画データの1画面をメモリ111から読み出し、画像処理部102により所定の処理を施す(S922)。ここでは、静止画のときと同様に、データの画素数を表示部106の画素数に合わせて変更する処理や、記録日時等の各種の情報を静止画に合成する処理、或いは、各種の画像効果の処理等を行う。また、動画データの場合、アルバムの動画のフレームレートと動画データのフレームレートが異なる場合は、フレームレートの変換処理も行う。   In addition, the control unit 109 reads one screen of the decoded moving image data from the memory 111, and performs predetermined processing by the image processing unit 102 (S922). Here, as in the case of a still image, processing for changing the number of data pixels to match the number of pixels in the display unit 106, processing for combining various information such as recording date and time into a still image, or various images Process effects, etc. In the case of moving image data, if the frame rate of the moving image of the album is different from the frame rate of the moving image data, a frame rate conversion process is also performed.

そして、制御部109は、表示部106に1フレーム分の動画を表示し(S923)、1チャプタ当たりに設定された表示フレーム数の動画を表示したか否かを判別する(S924)。動画ファイルについては、一つのファイルに含まれる動画データを全て表示する。設定されたフレーム数の動画データを表示していない場合はS915に戻る。動画データの全てのフレームの表示が終了した場合、動画ファイルの再生を停止して(S925)、S911に移行する。   Then, the control unit 109 displays one frame of moving image on the display unit 106 (S923), and determines whether or not a moving image having the number of display frames set per chapter is displayed (S924). For video files, all the video data contained in one file is displayed. If the moving image data of the set number of frames is not displayed, the process returns to S915. When the display of all the frames of the moving image data is completed, the reproduction of the moving image file is stopped (S925), and the process proceeds to S911.

次に、S420のアルバム保存処理を説明する。図10はアルバムの保存処理を示すフローチャートである。アルバムの保存処理においては、シナリオに指定された各静止画ファイル、動画ファイルがそれぞれシナリオの1チャプタの動画に変換され、各チャプタが一つの動画ファイルとして記録媒体108に記録される。そして、これらの動画ファイルが一つのファイルに結合される。BGMを合成しない場合には、結合されたファイルがアルバムの動画ファイルとして記録される。また、BGMを合成する場合、結合されたファイルを一時変換の動画データとして記録媒体108から読み出すと共に、記録媒体108に展開済みのBGM用の音楽データを読み出す。そして、読み出された動画データと音声データを復号した後、BGMの音楽データと合成後、再度圧縮して記録媒体108に記録する。   Next, the album storage process in S420 will be described. FIG. 10 is a flowchart showing album storage processing. In the album saving process, each still image file and moving image file specified in the scenario is converted into one chapter moving image of the scenario, and each chapter is recorded on the recording medium 108 as one moving image file. These moving image files are combined into one file. When BGM is not synthesized, the combined file is recorded as a movie file of the album. When synthesizing BGM, the combined file is read from the recording medium 108 as temporarily converted moving image data, and music data for BGM that has been developed on the recording medium 108 is read. The read moving image data and audio data are decoded, synthesized with BGM music data, then compressed again and recorded on the recording medium 108.

図10において、制御部109は、シナリオにより指定されたファイルのうち、再生順が先頭のファイルを選択し(S1001)、このファイルが静止画ファイルと動画ファイルの何れであるかを判別する(S1002)。静止画ファイルである場合、制御部109は、静止画から動画への変換処理を行う(S1003)。また、動画ファイルの場合、動画から動画への変換処理を行う(S1004)。   In FIG. 10, the control unit 109 selects a file in the playback order from the files specified by the scenario (S1001), and determines whether the file is a still image file or a moving image file (S1002). ). If the file is a still image file, the control unit 109 performs conversion processing from a still image to a moving image (S1003). In the case of a moving image file, conversion processing from a moving image to a moving image is performed (S1004).

一つのファイルについての処理が完了すると、制御部109は、シナリオに指定された全てのファイルについて、動画への変換処理が終了したか否かを判別し(S1005)、終了していない場合には、次のファイルを選択してS1002に戻る(S1006)。   When the process for one file is completed, the control unit 109 determines whether or not the conversion process to the moving image has been completed for all the files specified in the scenario (S1005). Then, the next file is selected and the process returns to S1002 (S1006).

また、シナリオに指定された全てのファイルについての処理が完了した場合、制御部109は、変換された各チャプタの動画から、一つの動画ファイルを生成する処理を行う(S1007)。別途後述するが、本実施形態における動画ファイル生成処理では、一つの動画ファイルを生成する場合のファイル名を、BGMを合成する設定か否かによって異ならせる。例えば、BGMを合成する設定である場合、生成する動画ファイルはBGMを合成するための一時的なファイルとなるため、例えば所定の一時的なファイル名を付加して、拡張子をtmpとする。一時的なファイル名は例えば固定のファイル名であってもよいし、ファイルの生成時刻のように動的に付加されるものであってもよい。また、BGMを合成しない設定である場合、DCFの規定に従ったファイル名および拡張子を付加する。次に、制御部109は、再度シナリオによりBGMを合成する設定となっているか否かを判別し(S1008)、BGMを合成する設定となっている場合には、BGM合成処理を行う(S1009)。BGM合成処理では、制御部109は、DCFの規定に従ったファイル名および拡張子を付加して、記録媒体108におけるDCFディレクトリに新たなアルバムの動画ファイルを生成する。また、BGMを合成する設定となっていない場合、制御部109は、動画ファイルをDCFディレクトリに移動することで、アルバムの動画ファイルとして記録媒体108に記録する(S1010)。   When the processing for all the files specified in the scenario is completed, the control unit 109 performs processing for generating one moving image file from the converted moving images of each chapter (S1007). As will be described later, in the moving image file generation processing in the present embodiment, the file name when generating one moving image file is changed depending on whether or not the setting for synthesizing BGM is made. For example, in the case of setting to synthesize BGM, the generated moving image file is a temporary file for synthesizing BGM. Therefore, for example, a predetermined temporary file name is added and the extension is tmp. The temporary file name may be a fixed file name, for example, or may be dynamically added like the file generation time. If the setting is not to synthesize BGM, a file name and extension according to the DCF rules are added. Next, the control unit 109 determines again whether or not it is set to synthesize BGM according to the scenario (S1008). If it is set to synthesize BGM, BGM synthesis processing is performed (S1009). . In the BGM synthesis process, the control unit 109 adds a file name and extension in accordance with the DCF rules, and generates a new album movie file in the DCF directory on the recording medium 108. If it is not set to synthesize BGM, the control unit 109 moves the moving image file to the DCF directory and records it on the recording medium 108 as an album moving image file (S1010).

次に、静止画から動画への変換処理を説明する。図11は静止画から動画への変換処理を示すフローチャートである。まず、制御部109は、変換された動画データを記録するためのファイルを記録媒体108に作成する(S1101)。本実施形態では、一つの静止画ファイル、或いは動画ファイルから生成される1チャプタの動画データを一つのファイルとして記録媒体108に記録する。そのため、ここでは、変換された動画データを記録するためのファイルを記録媒体108にオープンする。また、ここでは、DCFディレクトリとは異なるディレクトリに、変換された動画用のファイルを作成する。また、各チャプタの動画ファイルの形式はMP4形式とするが、これ以外の形式としてもよい。   Next, conversion processing from a still image to a moving image will be described. FIG. 11 is a flowchart showing a conversion process from a still image to a moving image. First, the control unit 109 creates a file for recording the converted moving image data on the recording medium 108 (S1101). In the present embodiment, one chapter of moving image data generated from one still image file or moving image file is recorded on the recording medium 108 as one file. Therefore, here, a file for recording the converted moving image data is opened on the recording medium 108. Here, the converted moving image file is created in a directory different from the DCF directory. Moreover, although the format of the video file of each chapter is the MP4 format, it may be a format other than this.

次に、制御部109は、選択された静止画ファイルを記録再生部107により記録媒体108から読み出す。そして、画像処理部102により、読み出された静止画データを復号し、YUV形式の画像データに変換してメモリ111に記憶する(S1102)。復号された1画面の静止画データをメモリ111から読み出し、画像処理部102により所定の処理を施す(S1103)。ここでは、画像データの画素数を所定の画素数、ここでは横1280画素×縦720画素に変換する処理や、先頭からのチャプタ数等の各種の情報を画像データに合成する処理、或いは、各種の画像効果の処理等を行う。   Next, the control unit 109 reads the selected still image file from the recording medium 108 by the recording / playback unit 107. Then, the read still image data is decoded by the image processing unit 102, converted into YUV format image data, and stored in the memory 111 (S1102). The decoded still image data of one screen is read from the memory 111, and predetermined processing is performed by the image processing unit 102 (S1103). Here, processing for converting the number of pixels of the image data to a predetermined number of pixels, here 1280 pixels by 720 pixels, processing for combining various types of information such as the number of chapters from the beginning, etc. The image effects are processed.

そして、画像処理部102により1フレーム分の静止画データを符号化し(S1104)、更に、音声処理部104により、無音の音声データを符号化してメモリ111に記憶する(S1105)。次に、記録再生部107は、メモリ111より符号化された画像データと音声データとを読み出し、記録媒体108に記録する(S1107)。なお、記録再生部107は、1フレームの画像データが符号化される度に記録するのではなく、所定量の符号化された画像データと音声データとがメモリ111に記憶されたことに応じて、符号化された画像データと音声データとを記録媒体108に記録する構成としてもよい。   Then, still image data for one frame is encoded by the image processing unit 102 (S1104), and silent audio data is encoded by the audio processing unit 104 and stored in the memory 111 (S1105). Next, the recording / reproducing unit 107 reads the encoded image data and audio data from the memory 111 and records them on the recording medium 108 (S1107). Note that the recording / reproducing unit 107 does not record each time one frame of image data is encoded, but in accordance with the fact that a predetermined amount of encoded image data and audio data are stored in the memory 111. The encoded image data and audio data may be recorded on the recording medium 108.

次に、制御部109は、静止画ファイルの1チャプタ当たりに設定されたフレーム数の画像データを符号化し、記録したか否かを判別する(S1107)。設定されたフレーム数の画像データを記録していない場合はS1103に戻る。また、設定されたフレーム数の静止画を記録済みの場合、制御部109は、画像データの記録を停止して、動画ファイルの管理情報(moov)を生成し、記録再生部107により記録媒体108に記録する(S1108)。そして、制御部109は、このチャプタの動画ファイルをクローズし、終了する(S1109)。   Next, the control unit 109 determines whether or not the image data having the number of frames set per chapter of the still image file is encoded and recorded (S1107). If image data of the set number of frames has not been recorded, the process returns to S1103. When the set number of still images have been recorded, the control unit 109 stops recording the image data, generates management information (moov) of the moving image file, and the recording / playback unit 107 causes the recording medium 108 to be recorded. (S1108). Then, the control unit 109 closes the chapter moving image file and ends the process (S1109).

次に、動画ファイルの変換処理を説明する。図12は動画ファイルの変換処理を示すフローチャートである。まず、制御部109は、変換された動画データを記録するためのファイルを記録媒体108に作成する(S1201)。次に、制御部109は、選択された動画ファイルを記録再生部107により記録媒体108から読み出す。そして、画像処理部102により、読み出された動画データを復号し、YUV形式の画像データに変換してメモリ111に記憶する(S1202)。また、制御部109は、読み出された動画ファイルに音声データが含まれているか否かを判別し(S1203)、音声データが含まれている場合には音声処理部104により復号し、メモリ111に記憶する(S1204)。また、音声データが含まれていない場合には、音声処理部104により無音の音声データを出力する(S1205)。   Next, the moving image file conversion process will be described. FIG. 12 is a flowchart showing a moving image file conversion process. First, the control unit 109 creates a file for recording the converted moving image data on the recording medium 108 (S1201). Next, the control unit 109 reads the selected moving image file from the recording medium 108 by the recording / playback unit 107. Then, the read moving image data is decoded by the image processing unit 102, converted into YUV format image data, and stored in the memory 111 (S1202). Further, the control unit 109 determines whether or not audio data is included in the read moving image file (S1203). If the audio data is included, the control unit 109 decodes the audio file and stores the data in the memory 111. (S1204). If no audio data is included, the audio processing unit 104 outputs silent audio data (S1205).

そして、制御部109は、復号された1画面の動画データをメモリ111から読み出し、画像処理部102により所定の処理を施す(S1206)。ここでは、画像データの画素数を所定の画素数、ここでは横1280画素×縦720画素に変換する処理や、先頭からのチャプタ数等の各種の情報を画像データに合成する処理、或いは、各種の画像効果の処理等を行う。   Then, the control unit 109 reads the decoded one-screen moving image data from the memory 111, and performs predetermined processing by the image processing unit 102 (S1206). Here, processing for converting the number of pixels of the image data to a predetermined number of pixels, here 1280 pixels by 720 pixels, processing for combining various types of information such as the number of chapters from the beginning, etc. The image effects are processed.

そして、画像処理部102により1フレーム分の動画データを符号化し(S1207)、更に、音声処理部104により音声データを符号化してメモリ111に記憶する(S1208)。このとき、符号化される音声データのデータレートを、BGM用の音楽データのデータレートよりも大きくすることで、アルバムの動画における音質を高めることができる。次に、記録再生部107は、符号化された動画データと音声データとをメモリ111より読み出し、記録媒体108に記録する(S1209)。なお、記録再生部107は、1フレームの画像データが符号化される度に記録するのではなく、所定量の符号化された画像データと音声データとがメモリ111に記憶されたことに応じて、符号化された画像データと音声データとを記録媒体108に記録する構成としてもよい。   Then, the moving image data for one frame is encoded by the image processing unit 102 (S1207), and the audio data is encoded by the audio processing unit 104 and stored in the memory 111 (S1208). At this time, by setting the data rate of the audio data to be encoded to be higher than the data rate of the music data for BGM, the sound quality in the moving image of the album can be improved. Next, the recording / reproducing unit 107 reads the encoded moving image data and audio data from the memory 111 and records them in the recording medium 108 (S1209). Note that the recording / reproducing unit 107 does not record each time one frame of image data is encoded, but in accordance with the fact that a predetermined amount of encoded image data and audio data are stored in the memory 111. The encoded image data and audio data may be recorded on the recording medium 108.

次に、制御部109は、動画ファイルの1チャプタ当たりに設定されたフレーム数の画像データを符号化し、記録したか否かを判別する(S1210)。設定されたフレーム数の画像データを記録していない場合はS1202に戻る。また、設定されたフレーム数の静止画を記録済みの場合、制御部109は、画像データの記録を停止して、動画ファイルの管理情報(moov)を生成し、記録再生部107により記録媒体108に記録する(S1211)。そして、制御部109は、このチャプタの動画ファイルをクローズし、終了する(S1212)。   Next, the control unit 109 determines whether or not the image data having the number of frames set per chapter of the moving image file is encoded and recorded (S1210). If image data having the set number of frames has not been recorded, the process returns to S1202. When the set number of still images have been recorded, the control unit 109 stops recording the image data, generates management information (moov) of the moving image file, and the recording / playback unit 107 causes the recording medium 108 to be recorded. (S1211). Then, the control unit 109 closes the chapter moving image file and ends the process (S1212).

このように、シナリオより指定された静止画ファイルと動画ファイルがそれぞれ、アルバムにおける1チャプタの動画に変換され、動画ファイルとして記録媒体108に記録される。   As described above, the still image file and the moving image file specified by the scenario are each converted into one chapter moving image in the album, and are recorded on the recording medium 108 as the moving image file.

次に、S1007の動画ファイル作成処理を説明する。動画ファイル作成処理は、図11、図12の処理により記録媒体108に記録された、各チャプタの動画ファイルを結合して、一つの動画ファイルを生成する処理である。図13は動画ファイルの作成処理を示すフローチャートである。   Next, the moving image file creation process in S1007 will be described. The moving image file creation process is a process of generating one moving image file by combining the moving image files of the chapters recorded on the recording medium 108 by the processes of FIGS. 11 and 12. FIG. 13 is a flowchart showing a moving image file creation process.

まず、制御部109は、シナリオによりBGMを合成する設定となっているか否かを判別する(S1301)。BGMを合成する設定である場合、制御部109は、例えば所定の一時的なファイル名であって拡張子をtmpとしたファイル名を設定する(S1302)。また、BGMを合成しない設定である場合、DCFの規定に従ったファイル名および拡張子を設定する(S1303)。   First, the control unit 109 determines whether it is set to synthesize BGM according to the scenario (S1301). If the setting is to synthesize BGM, the control unit 109 sets, for example, a predetermined temporary file name and a file name with an extension of tmp (S1302). If the setting is not to synthesize BGM, the file name and extension according to the DCF rules are set (S1303).

次に、制御部109は、記録媒体108に記録された動画ファイルから、S401で生成されたシナリオにより再生順が先頭に指定されたファイルに対応するチャプタの動画ファイルを検出する。そして、この先頭のチャプタの動画ファイルに対し、次に再生されるチャプタの動画ファイルを結合するため、次のチャプタの動画ファイルに基づいて、先頭のチャプタの動画ファイルの管理情報を変更する(S1304)。   Next, the control unit 109 detects, from the moving image file recorded on the recording medium 108, the moving image file of the chapter corresponding to the file whose reproduction order is designated at the top by the scenario generated in S401. Then, in order to combine the moving image file of the next chapter to be reproduced with the moving image file of the first chapter, the management information of the moving image file of the first chapter is changed based on the moving image file of the next chapter (S1304). ).

そして、先頭のファイルに対し、次のチャプタの動画データ及び音声データを追加する(S1305)。ここでは、FATファイルシステムにおける、FATチェーンを変更することにより、動画データと音声データとを追加するが、動画データと音声データの記録位置を移動してもよい。次に、制御部109は、シナリオに指定された残りのチャプタがあるか否かを判別し(S1306)、残りのチャプタがある場合は、次のチャプタの動画ファイルを追加するため、S1304に戻る。このように、全てのチャプタの動画ファイルの結合が完了すると、処理を終了する。   Then, the moving image data and audio data of the next chapter are added to the top file (S1305). Here, the moving image data and the audio data are added by changing the FAT chain in the FAT file system, but the recording positions of the moving image data and the audio data may be moved. Next, the control unit 109 determines whether there is a remaining chapter specified in the scenario (S1306). If there is a remaining chapter, the control unit 109 returns to S1304 to add a moving image file of the next chapter. . As described above, when the combination of the moving image files of all the chapters is completed, the processing is ended.

このように、シナリオに指定された各ファイルに対応した動画が一つの動画に結合される。上述したように、本実施形態では、結合されたファイルのファイル名として、所定のファイル名を付加する。また、この結合後の動画ファイルは、DCFディレクトリとは別のディレクトリに格納される。   In this way, the moving images corresponding to the files specified in the scenario are combined into one moving image. As described above, in this embodiment, a predetermined file name is added as the file name of the combined file. Further, the combined moving image file is stored in a directory different from the DCF directory.

そして、結合後の動画ファイルに対し、BGMを合成しない場合には、S1010の処理において、結合後の動画ファイルがDCFディレクトリに移動され、アルバムの動画ファイルとして記録される。   If the BGM is not synthesized with the combined moving image file, the combined moving image file is moved to the DCF directory and recorded as an album moving image file in the process of S1010.

一方、BGM合成が設定されていた場合は、S1009の処理により、結合された動画ファイルを記録媒体108から読み出して復号し、BGMの音楽データを合成した後、再度、符号化してアルバムの動画ファイルとして記録する。従って、この場合は、図13の処理により記録された、結合後の動画ファイルが、BGM合成のための一時的な動画ファイルとして管理される。次に、このようなBGM合成処理を説明する。図14はBGM合成処理を示すフローチャートである。   On the other hand, if BGM composition is set, the combined moving image file is read from the recording medium 108 and decoded by the processing of S1009, and the BGM music data is synthesized, and then encoded again to be the album moving image file. Record as. Therefore, in this case, the combined moving image file recorded by the processing of FIG. 13 is managed as a temporary moving image file for BGM synthesis. Next, such BGM synthesis processing will be described. FIG. 14 is a flowchart showing BGM synthesis processing.

制御部109は、BGMとして選択された音楽ファイルを記録再生部107により記録媒体108から読み出す(S1401)。そして、音声処理部104は、読み出された音楽ファイルを順次メモリ111に記憶する。次に、記録再生部107は、結合された動画ファイルを記録媒体108より読み出す。そして、読み出された動画データを画像処理部102により復号してメモリ111に記憶するとともに、読み出された音声データを音声処理部104により復号してメモリ111に記憶する(S1402)。   The control unit 109 reads the music file selected as BGM from the recording medium 108 by the recording / playback unit 107 (S1401). Then, the audio processing unit 104 sequentially stores the read music files in the memory 111. Next, the recording / reproducing unit 107 reads the combined moving image file from the recording medium 108. The read moving image data is decoded by the image processing unit 102 and stored in the memory 111, and the read audio data is decoded by the audio processing unit 104 and stored in the memory 111 (S1402).

次に、制御部109は、音声処理部104を制御し、読み出された音楽ファイルに含まれる音声データと、復号されてメモリ111に記憶された音声データとを合成し、メモリ111に記憶する(S1403)。このとき、BGMの音楽データと、動画ファイルに含まれる音声データとの合成比率は、シナリオに記述されている。即ち、S704のBGM設定処理において、BGM+音声が設定されていた場合は、BGMの音楽データと動画ファイルに含まれる音声データとの音声レベルがそれぞれ50%となるように合成される。また、BGMのみを出力するように設定されていた場合は、BGMの音楽データのレベルが100%となり、動画ファイルに含まれる音声データが含まれないように合成される。   Next, the control unit 109 controls the audio processing unit 104 to synthesize the audio data included in the read music file and the audio data decoded and stored in the memory 111 and store the synthesized data in the memory 111. (S1403). At this time, the synthesis ratio between the music data of BGM and the audio data included in the moving image file is described in the scenario. That is, in the BGM setting process in S704, when BGM + audio is set, the BGM music data and the audio data included in the moving image file are combined so that the audio levels are 50%. Further, when it is set to output only BGM, the music data level of BGM becomes 100%, and the audio data included in the moving image file is not included.

なお、前述のように、BGM合成処理は、一つの音楽ファイルを繰り返し記録媒体108から読み出す。或いは、一つの音楽ファイルを記録媒体108から読みだしてメモリ111に記憶しておき、メモリ111から繰り返し読みだして出力する。   As described above, the BGM synthesis process repeatedly reads one music file from the recording medium 108. Alternatively, one music file is read from the recording medium 108 and stored in the memory 111, and is repeatedly read from the memory 111 and output.

次に、制御部109は、読み出された動画データの先頭からのフレーム数が、音声のフェードアウトを開始するフレーム数に達したか否かを判定する(S1404)。フェードアウトを開始するフレーム数に達していた場合、制御部109は、音声処理部104を制御して、BGMが合成された音声データのレベルを徐々に下げる(S1405)。   Next, the control unit 109 determines whether or not the number of frames from the beginning of the read moving image data has reached the number of frames for starting audio fade-out (S1404). When the number of frames for starting fade-out has been reached, the control unit 109 controls the audio processing unit 104 to gradually lower the level of audio data synthesized with BGM (S1405).

そして、メモリ111に記憶された動画データを画像処理部102により符号化し、メモリ111に記憶する。また、BGMが合成された音声データを音声処理部104によりメモリ111より読み出して符号化し、メモリ111に記憶する(S1406)。次に、制御部109は、記録再生部107を制御し、符号化された動画データと音声データをメモリ111から読み出し、記録媒体108に一つの動画ファイルとして記録する(S1407)。ここで記録される動画ファイルは、アルバムの動画ファイルである。そのため、ここではDCFフォルダに動画ファイルを格納し、更に、DCFフォルダに記憶済みのファイルのファイル名に基づいて、動画ファイルのファイル名が付加される。   Then, the moving image data stored in the memory 111 is encoded by the image processing unit 102 and stored in the memory 111. Also, the voice data synthesized with the BGM is read from the memory 111 by the voice processing unit 104, encoded, and stored in the memory 111 (S1406). Next, the control unit 109 controls the recording / playback unit 107 to read the encoded moving image data and audio data from the memory 111 and record them as one moving image file on the recording medium 108 (S1407). The moving image file recorded here is a moving image file of the album. Therefore, here, the moving image file is stored in the DCF folder, and further, the file name of the moving image file is added based on the file name of the file already stored in the DCF folder.

なお、記録再生部107は、所定量の符号化された画像データと音声データとがメモリ111に記憶されたことに応じて、符号化された画像データと音声データとを記録媒体108に記録する。また、ここで符号化される動画データに対しては、チャプタ情報などを付加しない。即ち、つまり、tref212やtrak(text)209、テキストチャンク219、220などは記録しない。   The recording / reproducing unit 107 records the encoded image data and audio data on the recording medium 108 in response to the predetermined amount of encoded image data and audio data being stored in the memory 111. . Also, chapter information or the like is not added to the moving image data encoded here. That is, tref 212, trak (text) 209, text chunks 219, 220, etc. are not recorded.

次に、制御部109は、設定されたフレーム数の動画データを処理したか否かを判別し(S1408)、処理が終了しない場合はS1402に戻る。ここでは、図13の処理により結合された動画ファイルに格納された動画データの全フレーム数が設定されたフレーム数となる。   Next, the control unit 109 determines whether or not moving image data having the set number of frames has been processed (S1408), and returns to S1402 if the processing is not completed. Here, the total number of frames of the moving image data stored in the moving image files combined by the processing of FIG. 13 is the set number of frames.

また、設定されたフレーム数の動画データの処理が終了した場合、制御部109は、記録再生部107による、結合された動画ファイルと、BGMの音楽ファイルの読み出しを停止する(S1409)。そして、制御部109は、BGMが合成された、アルバムの動画ファイルの管理情報(moov)を生成し、記録媒体108に記録する(S1410)。アルバムの動画ファイルの記録が完了すると、制御部109は、図13の処理により記録された、結合動画ファイルを記録媒体108から削除する(S1411)。   When the processing of the moving image data of the set number of frames is completed, the control unit 109 stops reading of the combined moving image file and BGM music file by the recording / reproducing unit 107 (S1409). Then, the control unit 109 generates management information (moov) of the moving image file of the album combined with the BGM, and records it on the recording medium 108 (S1410). When the recording of the album moving image file is completed, the control unit 109 deletes the combined moving image file recorded by the processing of FIG. 13 from the recording medium 108 (S1411).

以上のように、アルバムモードでは、図17(a)に示すように、シナリオにより指定された静止画ファイル1701と動画ファイル1702がそれぞれ1チャプタの動画データ1703、1704に変換される。変換された動画データは、それぞれ動画ファイルとして記録媒体108に記録される。更に、各チャプタの動画ファイルを結合し、結合動画ファイル1705が生成される。BGMが合成されない場合には、この結合動画ファイル1705の保存先ディレクトリが変更され、アルバムの動画ファイル1706として記録される。   As described above, in the album mode, as shown in FIG. 17A, the still image file 1701 and the moving image file 1702 specified by the scenario are converted into one chapter of moving image data 1703 and 1704, respectively. The converted moving image data is recorded on the recording medium 108 as a moving image file. Further, the moving image files of each chapter are combined to generate a combined moving image file 1705. When the BGM is not synthesized, the saving destination directory of the combined moving image file 1705 is changed and recorded as an album moving image file 1706.

また、BGMを合成する設定となっている場合、図17(b)に示すように、結合動画ファイル1705の動画データと音声データがそれぞれ復号される。一方、記録媒体108に展開済みのBGM用の音楽ファイル1710が読み出され、音声データと合成される。復号された動画データ1707と、合成された音声データ1708が再度符号化され、アルバムの動画ファイル1709として記録媒体108に記録される。また、結合動画ファイル1705が記録媒体から削除される。   If the setting is to synthesize BGM, the moving image data and audio data of the combined moving image file 1705 are respectively decoded as shown in FIG. On the other hand, the BGM music file 1710 developed on the recording medium 108 is read out and synthesized with the audio data. The decoded moving image data 1707 and the synthesized audio data 1708 are encoded again and recorded on the recording medium 108 as the moving image file 1709 of the album. Also, the combined moving image file 1705 is deleted from the recording medium.

このように、アルバムの動画ファイル1706と動画ファイル1709を順に生成すれば、例えば、アルバムの動画ファイルを作成する際に、画素数を変換する処理や各種画像効果の処理等とBGM用の音声データの復号、符号化または合成処理のいずれかとが処理負荷等によって同時に行えないような場合であっても、簡単な操作でアルバムファイルを生成することができる。また、動画ファイル1709を動画ファイル1706の保存先と異なる保存先に記録し、また動画ファイル1706の記録後に自動的に削除することによって、ユーザの使い勝手の低下や記録媒体の空き容量減少を防止することができる。   Thus, if the album moving image file 1706 and the moving image file 1709 are generated in order, for example, when creating an album moving image file, processing for converting the number of pixels, processing of various image effects, etc., and audio data for BGM Even when decoding, encoding, or synthesizing processing cannot be performed simultaneously due to processing load or the like, an album file can be generated with a simple operation. Further, the moving image file 1709 is recorded in a storage location different from the storage location of the moving image file 1706, and is automatically deleted after the moving image file 1706 is recorded, thereby preventing the user's usability and the free space of the recording medium from decreasing. be able to.

次に、動画の記録時に、音声データとBGMとを合成して記録する処理を説明する。図15は、BGMを合成して記録する場合の処理を示すフローチャートである。記録待機状態においてユーザが操作部110を操作し、BGM合成の記録モードを指示した場合に図15の処理が行われる。   Next, a process of synthesizing and recording audio data and BGM when recording a moving image will be described. FIG. 15 is a flowchart showing a process when BGM is synthesized and recorded. When the user operates the operation unit 110 in the recording standby state to instruct a recording mode for BGM synthesis, the processing in FIG. 15 is performed.

まず、制御部109は、BGMファイルの構成を確認する処理を行う(S1501)。この処理は、S413の処理と同様である。次に、制御部109は、記録媒体に記録された音楽ファイルの構成が正常であるか否かを判別する(S1502)。ファイル構成が正常である場合、制御部109は、図8に示すBGMの展開の判定処理を行う(S1503)。また、ファイル構成が正常でない場合、制御部109は、BGMの記録が可能ではないと判別し、BGMを記録できない旨の警告情報を表示部106に所定期間表示させ、処理を終了する(S1521)。   First, the control unit 109 performs processing for confirming the configuration of the BGM file (S1501). This process is the same as the process of S413. Next, the control unit 109 determines whether or not the configuration of the music file recorded on the recording medium is normal (S1502). If the file configuration is normal, the control unit 109 performs BGM expansion determination processing shown in FIG. 8 (S1503). If the file structure is not normal, the control unit 109 determines that BGM recording is not possible, displays warning information indicating that BGM cannot be recorded on the display unit 106 for a predetermined period, and ends the process (S1521). .

S1503での処理を終了した後、制御部109は、所定数のBGM用の音楽ファイルが記録媒体108に展開済みであるか否かを判別する(S1504)。展開済みの場合、制御部109は、図16(d)に示す、BGMの設定用画面を表示部106に表示させ(S1505)、ユーザによるBGMの設定処理が行われ(S1506)、設定されたBGMの音楽ファイルを記録媒体108より再生し、メモリ111に記憶する(S1507)。   After completing the processing in S1503, the control unit 109 determines whether or not a predetermined number of BGM music files have been developed on the recording medium 108 (S1504). In the case where the development has been completed, the control unit 109 displays the BGM setting screen shown in FIG. 16D on the display unit 106 (S1505), and the BGM setting process by the user is performed (S1506) and set. The BGM music file is reproduced from the recording medium 108 and stored in the memory 111 (S1507).

また、S1504で、所定数のBGMファイルが展開済みでないと判別された場合、制御部109は、BGM用の音楽ファイルを展開するために必要な容量が、記録媒体108にあるかどうかを判別する(S1518)。容量が不足している場合、制御部109は、BGMの記録が可能ではないと判別し、BGMを記録できない旨の警告情報を表示部106に所定期間表示させ、処理を終了する(S1521)。   If it is determined in S1504 that the predetermined number of BGM files have not been expanded, the control unit 109 determines whether the recording medium 108 has a capacity necessary for expanding the BGM music file. (S1518). If the capacity is insufficient, the control unit 109 determines that BGM recording is not possible, displays warning information indicating that BGM cannot be recorded on the display unit 106 for a predetermined period, and ends the process (S1521).

また、空き容量がある場合、制御部109は、不揮発性メモリ112に記憶されたBGM用の音楽ファイルのうち、未展開の音楽ファイルを読み出して音声処理部104により伸長する(S1519)。そして、制御部109は、記録再生部107により、伸長された音楽データを、BGM用の音楽ファイルとして記録媒体108に記録し(S1520)、BGMの設定画面を表示部106に表示する(S1505)。   If there is free space, the control unit 109 reads an unexpanded music file among the BGM music files stored in the nonvolatile memory 112 and decompresses it by the audio processing unit 104 (S1519). Then, the control unit 109 records the decompressed music data on the recording medium 108 as a BGM music file by the recording / playback unit 107 (S1520), and displays the BGM setting screen on the display unit 106 (S1505). .

S1507によるBGMの音楽ファイルの再生が完了した後、制御部109は、撮像装置100を記録待機状態に設定する(S1508)。また、記録待機状態で、再度BGMの設定指示があった場合(S1509)、S1505に戻り、BGM設定用画面を表示部106に表示する。また、制御部109は、記録待機状態において、記録開始の指示を検出し(S1510)、撮像部101による動画データの撮影を開始し、画像処理部102は、撮像部101からの動画データを符号化してメモリ111に記憶する(S1511)。これと共に、音声入力部103により音声データを取得し(S1512)、音声処理部104により、取得された音声データと、記録媒体108より読み出され、メモリ111に記憶されたBGMの音楽データとが合成される。このときの合成比率は、シナリオに記述された比率に従う。音声処理部104は、合成された音声データを符号化し、メモリ111に記憶する(S1513)。   After the reproduction of the BGM music file in S1507 is completed, the control unit 109 sets the imaging apparatus 100 to a recording standby state (S1508). If a BGM setting instruction is issued again in the recording standby state (S1509), the process returns to S1505, and a BGM setting screen is displayed on the display unit 106. The control unit 109 detects an instruction to start recording in the recording standby state (S1510), starts capturing moving image data by the imaging unit 101, and the image processing unit 102 encodes the moving image data from the imaging unit 101. And stored in the memory 111 (S1511). At the same time, audio data is acquired by the audio input unit 103 (S1512), and the acquired audio data and the BGM music data read from the recording medium 108 and stored in the memory 111 are stored by the audio processing unit 104. Synthesized. The composition ratio at this time follows the ratio described in the scenario. The voice processing unit 104 encodes the synthesized voice data and stores it in the memory 111 (S1513).

次に、制御部109は、符号化された動画データと音声データとをメモリ111より読み出し、動画ファイルとして記録媒体108に記録する(S1514)。このように動画データ及び、音声データとBGMとの合成音声データが記録される。制御部109は、記録停止の指示があったか否かを判別し(S1515)、記録停止の指示がない場合には、記録を続ける。また。記録停止の指示があった場合、制御部109は、記録媒体108に対する動画データと音声データの記録を停止する(S1516)。更に、制御部109は、記録媒体108からの音楽ファイルの読み出しを停止する(S1517)。   Next, the control unit 109 reads the encoded moving image data and audio data from the memory 111 and records them as a moving image file on the recording medium 108 (S1514). In this way, moving image data and synthesized voice data of voice data and BGM are recorded. The control unit 109 determines whether or not there is an instruction to stop recording (S1515), and when there is no instruction to stop recording, recording is continued. Also. If there is an instruction to stop recording, the control unit 109 stops recording moving image data and audio data on the recording medium 108 (S1516). Further, the control unit 109 stops reading the music file from the recording medium 108 (S1517).

なお、本実施形態では、各BGM用の音楽ファイルに格納された音声データの再生時間は数秒から数十秒程度としている。そのため、動画記録中は、一つの音楽ファイルを繰り返し記録媒体108から読み出しまたは再生する。或いは、一つの音楽ファイルを記録媒体108から読みだしてメモリ111に記憶しておき、メモリ111から繰り返し読みだして出力する構成としてもよい。   In the present embodiment, the reproduction time of the audio data stored in each BGM music file is set to several seconds to several tens of seconds. For this reason, during recording of a moving image, one music file is repeatedly read or reproduced from the recording medium 108. Alternatively, one music file may be read from the recording medium 108 and stored in the memory 111, and repeatedly read from the memory 111 and output.

次に、動画の編集処理を説明する。再生モードにおいて、ユーザが操作部110を操作して記録媒体108に記録された動画ファイルの一つを選択し、編集開始を指示することにより、動画の編集が可能となる。本実施形態では、指定された動画の一部を削除する編集処理を行う。ここでは、動画の前切り、後切り、中抜きの三種類の編集について説明する。   Next, a moving image editing process will be described. In the playback mode, the user can edit the moving image by operating the operation unit 110 to select one of the moving image files recorded on the recording medium 108 and instructing the start of editing. In the present embodiment, an editing process for deleting a part of the designated moving image is performed. Here, three types of editing, that is, before-cut, after-cut, and hollow out of a moving image will be described.

前切り編集とは、動画の先頭からユーザが指定した編集位置までを削除する処理である。後切り編集とは、ユーザが指定した編集位置から動画の終端までを削除する処理である。中抜き編集とは、ユーザが指定した削除開始位置から削除終了位置までを削除し、その前後の動画を結合して一つの動画とする処理である。即ち、中抜き編集処理によれば、動画の先頭から削除開始位置までと、削除終了位置から動画の終端位置までが結合され、一つの動画として記録される。また、前切り、後切り編集も可能である。この場合、動画の先頭からユーザが指定した編集開始位置(イン点)まで、及び、ユーザが指定した編集終了位置(アウト点)から動画の終端までを削除する処理である。   The pre-cut editing is a process of deleting from the beginning of the moving image to the editing position designated by the user. Post-cut editing is a process of deleting from the editing position designated by the user to the end of the moving image. The hollow edit is a process of deleting from the deletion start position specified by the user to the deletion end position, and combining the moving images before and after that to form one moving image. That is, according to the hollow edit process, the moving image from the beginning to the deletion start position and the deletion end position to the moving image end position are combined and recorded as one moving image. Also, pre-cut and post-cut edits are possible. In this case, the processing is to delete from the beginning of the moving image to the editing start position (In point) specified by the user and from the editing end position (Out point) specified by the user to the end of the moving image.

また、本実施形態では、アルバムモードにおいてBGMが合成されたアルバムの動画、及び、図15の処理によって撮影時にBGMが合成されて記録された動画に対し、BGMが合成されていることを示す付加情報を付加して記録する。例えば、制御部109は、図2における動画ファイルのヘッダにBGMが合成されていることを示す付加情報を付加して記録する。また、アルバムの動画に対してBGMを合成した際に、図2において説明したチャプタ情報が記録されないので、このチャプタ情報に基づいて、BGMが合成されているか否かを判別するようにしてもよい。   Further, in the present embodiment, an addition indicating that the BGM is synthesized with the movie of the album synthesized with the BGM in the album mode and the movie recorded with the BGM synthesized at the time of shooting by the processing of FIG. Add information and record. For example, the control unit 109 adds the additional information indicating that BGM is synthesized to the header of the moving image file in FIG. Further, when the BGM is synthesized with the moving image of the album, the chapter information described in FIG. 2 is not recorded. Therefore, based on this chapter information, it may be determined whether or not the BGM is synthesized. .

図18は編集処理を示すフローチャートである。ユーザが操作部110を操作して記録媒体108に記録された動画ファイルの一つを選択し、編集開始を指示すると、図18の処理が開始される。図18の処理は、制御部109が各部を制御することにより実行される。   FIG. 18 is a flowchart showing the editing process. When the user operates the operation unit 110 to select one of the moving image files recorded on the recording medium 108 and instruct to start editing, the processing in FIG. 18 is started. The processing in FIG. 18 is executed by the control unit 109 controlling each unit.

制御部109は、まず、編集対象として指定された動画ファイルのヘッダの情報に基づき、編集対象の動画ファイルに対してBGMが合成されているか否かを判別する(S1801)。BGMが合成された動画である場合、制御部109は中抜き編集を禁止する(S1802)。また、BGMが合成されていない動画である場合、制御部109は中抜き編集を許可する(S1803)。   First, the control unit 109 determines whether or not BGM is combined with the moving image file to be edited based on the header information of the moving image file designated as the editing target (S1801). When the BGM is a synthesized moving image, the control unit 109 prohibits the editing with no outline (S1802). If the BGM is a moving image that has not been combined, the control unit 109 permits hollow editing (S1803).

そして、制御部109は、表示制御部105を制御して、編集用画面を表示部106に表示する(S1804)。ここで、中抜き編集を許可した場合、前切り編集のための編集位置(編集開始位置)、後切り編集のための編集位置(編集終了位置)、及び、中抜き編集開始位置(削除開始位置)と終了位置(削除終了位置)を指定するためのアイコンが編集用画面に表示される。一方、中抜き編集を禁止した場合、前切り編集のための編集位置と後切り編集のための編集位置を指定するためのアイコンが編集用画面に表示され、中抜き編集開始位置と終了位置を指定するためのアイコンは表示されない。そのため、BGMが合成された動画については、中抜き編集が禁止される。ユーザは編集用画面を見ながら操作部110を操作することにより、編集位置を指定することができる。   Then, the control unit 109 controls the display control unit 105 to display an editing screen on the display unit 106 (S1804). If hollow editing is permitted, the editing position for the front-cut editing (editing start position), the editing position for the post-cut editing (editing end position), and the hollow-cut editing start position (deletion start position) ) And an icon for designating the end position (deletion end position) are displayed on the editing screen. On the other hand, when outline editing is prohibited, icons for specifying the edit position for front-cut edit and edit position for post-cut edit are displayed on the edit screen, and the edit start position and end position are specified. The icon for specifying is not displayed. Therefore, with respect to a moving image in which BGM is synthesized, editing with no outline is prohibited. The user can designate the editing position by operating the operation unit 110 while viewing the editing screen.

次に、制御部109は、編集位置が指定されたか否かを判別し(S1805)、編集位置が指定された場合、指定された編集位置をメモリ111に記憶する(S1806)。また、ユーザは操作部110を操作して、編集された動画の保存を指示することができる。制御部109は、編集された動画の保存が指示されたか否かを判別する(S1807)。保存が指示された場合、制御部109は、記録再生部107を制御して、指定された編集位置に基づいて動画データを編集し(S1808)、編集された動画データを記録媒体108に保存する(S1809)。また、S1807で保存指示がない場合、制御部109は、編集処理の終了が指示されたか否かを判別する(S1810)。編集処理の終了が指示された場合は処理を終了し、指示されない場合にはS1804に戻って処理を続ける。   Next, the control unit 109 determines whether or not an editing position has been designated (S1805), and if the editing position has been designated, stores the designated editing position in the memory 111 (S1806). Further, the user can operate the operation unit 110 to instruct to save the edited moving image. The control unit 109 determines whether saving of the edited moving image has been instructed (S1807). When the storage is instructed, the control unit 109 controls the recording / playback unit 107 to edit the moving image data based on the designated editing position (S1808), and stores the edited moving image data in the recording medium 108. (S1809). If there is no save instruction in S1807, the control unit 109 determines whether an instruction to end the editing process has been given (S1810). If the end of the editing process is instructed, the process ends. If not, the process returns to S1804 to continue the process.

BGMが合成された動画を中抜き編集した場合、動画の先頭部分と後端部分との結合部分においてBGMが不連続に再生されることが考えられる。本実施形態では、BGMが合成された動画については、中抜き編集を禁止している。そのため、中抜き編集によりBGMが不連続に再生されることを防ぐことが可能となる。   When the BGM-combined moving image is edited while being omitted, it is conceivable that the BGM is reproduced discontinuously at the joint portion between the head portion and the rear end portion of the moving image. In the present embodiment, hollow editing is prohibited for a moving image synthesized with BGM. For this reason, it is possible to prevent the BGM from being reproduced discontinuously due to the hollow editing.

(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

101…撮像部、102…画像処理部、103…音声入力部、104…音声処理部、107…記録再生部、108…記録媒体、109…制御部、111…メモリ、112…不揮発性メモリ、110…操作部 DESCRIPTION OF SYMBOLS 101 ... Imaging part, 102 ... Image processing part, 103 ... Audio | voice input part, 104 ... Audio | voice processing part, 107 ... Recording / reproducing part, 108 ... Recording medium, 109 ... Control part, 111 ... Memory, 112 ... Non-volatile memory, 110 ... Operation part

Claims (10)

動画データを取得する動画取得手段と、
音楽データを取得する取得手段と、
動画データと前記音楽データとを合成する指示に応じて、前記動画データと前記音楽データとを合成して記録媒体に記録するように制御する記録制御手段と
集対象の動画データが、音楽データが合成されている動画データである場合前記編集対象の動画データの先頭から削除開始位置までと、削除終了位置から前記編集対象の動画データの終端位置までの部分とを結合する第1の編集処理は実行不可とし、前記編集対象の動画データにおいて、前記編集対象の動画データの先頭から削除終了位置までを削除する、または、削除開始位置から前記編集対象の動画データの終端までを削除する第2の編集処理は実行可能とするように制御する制御手段と、
を有することを特徴とする記録装置。
A video acquisition means for acquiring video data ;
An acquisition means for acquiring music data;
In accordance with an instruction for combining the video data and the music data, and recording control means for control so as to record said music data and the video data to the combining to a recording medium,
Video data of the editing target, if music data is a moving image data that have been synthesized, and until the deletion start position from the beginning of the moving image data of the editing target, the end position of the moving image data of the editing target from the deletion end position The first editing process that combines the above-mentioned parts is not allowed to be executed, and the editing target moving image data is deleted from the beginning of the editing target moving image data to the deletion end position, or the editing starts from the deletion start position. Control means for performing control so that the second editing processing for deleting up to the end of the target moving image data is executable ;
Recording apparatus characterized by having a.
前記制御手段は、前記編集対象の動画データが、前記音楽データが合成されていない動画データである場合、前記第1の編集処理を実行可能とするように制御することを特徴とする請求項1に記載の記録装置。 Wherein, the moving image data of the edited, if the music data is a moving image data that has not been synthesized, claim 1, wherein the controller controls so as to enable execution of the first editing process The recording device described in 1. 前記記録制御手段は、動画データと前記音楽データとを合成して記録する場合、前記合成して記録する動画データに、音楽データを合成したことを示す情報を付加することを特徴とする請求項1または請求項2に記載の記録装置。 The recording control means, when combining and recording moving image data and the music data, adds information indicating that the music data has been combined to the moving image data to be combined and recorded. The recording apparatus according to claim 1 or 2. 前記記録制御手段は、前記音楽データを合成したことを示す情報を、前記合成して記録する動画データのヘッダに付加することを特徴とする請求項3に記載の記録装置。 The recording apparatus according to claim 3, wherein the recording control unit adds information indicating that the music data is combined to a header of the moving image data to be combined and recorded. 前記制御手段は、前記編集対象の動画データに含まれる情報に応じて前記音楽データが合成されているかを判定し、前記第1の編集処理を実行不可とするように制御することを特徴とする請求項1または請求項2に記載の記録装置。 The control means determines whether or not the music data is synthesized according to information included in the moving image data to be edited, and performs control so that the first editing process cannot be executed. The recording apparatus according to claim 1 or 2. 前記制御手段は、前記編集対象の動画データに前記音楽データを合成したことを示す情報が付加されている場合、前記第1の編集処理を実行不可とするように制御することを特徴とする請求項3または請求項4に記載の記録装置。 The control means performs control so that the first editing process cannot be executed when information indicating that the music data is synthesized is added to the moving image data to be edited. Item 5. The recording apparatus according to Item 3 or Item 4. 前記編集対象の動画データに対する編集位置の表示を制御する表示制御手段をさらに有し、
前記制御手段は、前記編集対象の動画データが、前記音楽データが合成されている動画データである場合、前記第1の編集処理に係る編集位置を表示しないように前記表示制御手段を制御することを特徴とする請求項に記載の記録装置。
Display control means for controlling the display of the editing position for the video data to be edited;
Wherein, the moving image data of the edited, if the music data is a moving image data that have been synthesized, controlling the display control means so as not to display an edit position of the first editing process The recording apparatus according to claim 1 .
前記表示制御手段は、前記削除開始位置および前記削除終了位置のそれぞれに対応する情報の表示を制御し、
前記制御手段は、前記編集対象の動画データが、前記音楽データが合成されている動画データである場合、前記削除開始位置および前記削除終了位置を表示させないように表示制御手段を制御することを特徴とする請求項に記載の記録装置。
It said display control means controls the display of information corresponding to the respective front Symbol deletion start position and the deletion end position,
Said control means, wherein the video data of the edited, the music data for controlling the display control means so that when a moving image data that has been synthesized, not display the deletion start position and the deletion end position The recording apparatus according to claim 7 .
動画取得手段が、動画データを取得する動画取得工程と、
取得手段が、音楽データを取得する取得工程と、
記録制御手段が、動画データと前記音楽データとを合成する指示に応じて、前記動画データと前記音楽データとを合成して記録媒体に記録するように制御する記録制御工程と、
御手段が、編集対象の動画データが、前記音楽データが合成されている動画データである場合、前記編集対象の動画データの先頭から削除開始位置までと、削除終了位置から前記編集対象の動画データの終端位置までの部分とを結合する第1の編集処理は実行不可とし、前記編集対象の動画データにおいて、前記編集対象の動画データの先頭から削除終了位置までを削除する、または、削除開始位置から前記編集対象の動画データの終端までを削除する第2の編集処理は実行可能とするように制御する制御工程と、
を有することを特徴とする記録装置の制御方法。
A video acquisition process in which the video acquisition means acquires video data;
An acquisition means for acquiring music data; and
Recording control means, in accordance with an instruction for combining the said the moving image data music data, a recording control step of controlling to record on a recording medium by combining with the music data and the video data,
Control means, the moving image data of the editing target, if the music data is a moving image data that have been synthesized, and until the deletion start position from the beginning of the moving image data of the edited, from the deletion end position of the editing target The first editing process for combining the portion up to the end position of the video data is not executable, and the video data to be edited is deleted from the beginning of the video data to be edited to the deletion end position, or is deleted A control step for controlling to enable execution of the second editing process for deleting from the start position to the end of the video data to be edited ;
Control method for a recording apparatus characterized in that it comprises a.
コンピュータを、請求項1からのいずれか1項に記載の記録装置の各手段として機能させるためのプログラム。 The program for functioning a computer as each means of the recording device of any one of Claim 1 to 8 .
JP2014263354A 2014-12-25 2014-12-25 Recording apparatus, control method therefor, and program Active JP6478626B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014263354A JP6478626B2 (en) 2014-12-25 2014-12-25 Recording apparatus, control method therefor, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014263354A JP6478626B2 (en) 2014-12-25 2014-12-25 Recording apparatus, control method therefor, and program

Publications (2)

Publication Number Publication Date
JP2016123049A JP2016123049A (en) 2016-07-07
JP6478626B2 true JP6478626B2 (en) 2019-03-06

Family

ID=56327616

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014263354A Active JP6478626B2 (en) 2014-12-25 2014-12-25 Recording apparatus, control method therefor, and program

Country Status (1)

Country Link
JP (1) JP6478626B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003168284A (en) * 2001-11-29 2003-06-13 Sharp Corp Data recording method and data editing method
JP4080923B2 (en) * 2002-05-24 2008-04-23 松下電器産業株式会社 Information recording medium, recording apparatus, reproducing apparatus, recording method and reproducing method
JP2004013493A (en) * 2002-06-06 2004-01-15 Megafusion Corp Contents writing management system
JP2004362655A (en) * 2003-06-03 2004-12-24 Canon Inc Information processing device and method
JP4293196B2 (en) * 2006-03-31 2009-07-08 ソニー株式会社 Playback device, editing method

Also Published As

Publication number Publication date
JP2016123049A (en) 2016-07-07

Similar Documents

Publication Publication Date Title
JP2006309867A (en) Image recording and reproducing device
JP2009118215A (en) Imaging apparatus
JP4829839B2 (en) Mobile communication terminal
JP4911008B2 (en) Image data recording apparatus and image data reproducing apparatus
JP2012049630A (en) Recording device and recording method
JP4330968B2 (en) REPRODUCTION DEVICE, RECORDING DEVICE, REPRODUCTION PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE REPRODUCTION PROGRAM
JP2001054042A (en) Recording/reproducing device and program recording medium
JP6478626B2 (en) Recording apparatus, control method therefor, and program
JP2008283708A (en) Playback apparatus
JP6639242B2 (en) Information processing device
JP2009232114A (en) Image reproducing apparatus, its method and image reproducing program
JP2016123047A (en) Recorder and control method, program therefor
JP2016123048A (en) Recorder and control method, program therefor
JP4257327B2 (en) Video editing device
JP6566826B2 (en) Image processing apparatus, control method thereof, and control program
JP2017108224A (en) Recording device
JP2019140568A (en) Image processing system
JP6218489B2 (en) Image processing device
JP6643081B2 (en) Album moving image generating apparatus, album moving image generating method, and program
JP6598670B2 (en) Image processing apparatus, control method thereof, and program
JP5414844B2 (en) Imaging device
KR101483995B1 (en) A electronic album and a method reproducing the electronic album
JP2008276899A (en) Recording and playback device and control method thereof
JP2007151023A (en) Recording apparatus
JP2008269747A (en) Recording and reproducing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180926

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181009

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181207

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190205

R151 Written notification of patent or utility model registration

Ref document number: 6478626

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151