JP2020005213A - Transmitter, receiver, control method of transmitter, control method of receiver, and program - Google Patents

Transmitter, receiver, control method of transmitter, control method of receiver, and program Download PDF

Info

Publication number
JP2020005213A
JP2020005213A JP2018125518A JP2018125518A JP2020005213A JP 2020005213 A JP2020005213 A JP 2020005213A JP 2018125518 A JP2018125518 A JP 2018125518A JP 2018125518 A JP2018125518 A JP 2018125518A JP 2020005213 A JP2020005213 A JP 2020005213A
Authority
JP
Japan
Prior art keywords
header
moving image
data
size
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018125518A
Other languages
Japanese (ja)
Inventor
新司 加納
Shinji Kano
新司 加納
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 JP2018125518A priority Critical patent/JP2020005213A/en
Publication of JP2020005213A publication Critical patent/JP2020005213A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a communication system which allows for transmission of data before completion of conversion of a video file, and which can acquire the video file simply without requiring any special processing such as reconstitution of received data on a receiving side.SOLUTION: A communication system includes: first control means (S307, S308) for controlling to estimate the size of a first header of converted video data before completion of conversion of video data (S310), and to transmit data corresponding to the estimated size of the first header to an external device; second control means (S311) for controlling to transmit the converted video data to the external device after transmitting the data according to the size of the first header; and third control means (S313, S319) for controlling to generate the first header corresponding to the converted video data after transmitting the converted video data, and to transmit the generated first header to the external device.SELECTED DRAWING: Figure 3

Description

本発明は、動画ファイルを送信する送信装置、受信する受信装置に関し、時に、動画ファイルを変換(トランスコード)して送信、または、受信する装置に関する。   The present invention relates to a transmitting device for transmitting a moving image file and a receiving device for receiving the moving image file, and more particularly to a device for converting (transcoding) a moving image file and transmitting or receiving the moving image file.

無線通信の普及に伴い、デジタルカメラなどの携帯型端末に無線通信機能を搭載した通信装置間で映像ファイルなどのデータを送信することが提案されている。   With the spread of wireless communication, it has been proposed to transmit data such as video files between communication devices equipped with a wireless communication function in a portable terminal such as a digital camera.

例えば、特許文献1では、デジタルカメラから外部装置に動画ファイルを送信する際にトランスコード処理を行ってから動画ファイルを送信することがされている。   For example, in Patent Literature 1, when a moving image file is transmitted from a digital camera to an external device, a transcoding process is performed, and then the moving image file is transmitted.

特開2017−62626号公報JP 2017-62626 A

上述の特許文献1に開示された従来技術では、動画ファイルのトランスコード処理が完了してから動画ファイルを送信するため、動画ファイルの送信が完了するまでに時間がかかってしまう。これに対して、トランスコードを完了する前にトランスコード済みのデータの送信を開始することも可能である。しかし、この場合、動画ファイルのヘッダ情報等は、動画データのトランスコード後でないと生成できないため、動画データの後にヘッダ情報を送信することになり、受信側の装置では、動画データとヘッダ情報とを結合する、または、動画データとヘッダ情報の記録順を変える並べ替え等のデータの再構成処理が必要となる。   In the related art disclosed in Patent Document 1, since the moving image file is transmitted after the transcoding process of the moving image file is completed, it takes time until the transmission of the moving image file is completed. On the other hand, it is also possible to start transmitting the transcoded data before completing the transcoding. However, in this case, since the header information and the like of the moving image file cannot be generated until after the transcoding of the moving image data, the header information is transmitted after the moving image data. , Or rearrangement processing of data such as rearrangement for changing the recording order of moving image data and header information.

そこで、本発明は、送信装置において動画ファイルを変換して受信装置に転送する場合に、動画ファイルの変換が完了する前にデータの送信を可能とし、また、受信側において受信したデータの再構成等の特別な処理を行わずに簡単に動画ファイルを取得可能な通信システムを提供することを目的とする。   In view of the above, the present invention enables a transmission device to convert a moving image file and transfer it to a receiving device, thereby enabling data transmission before the conversion of the moving image file is completed, and reconstructing the received data on the receiving side. It is an object of the present invention to provide a communication system capable of easily acquiring a moving image file without performing special processing such as the above.

上記目的を達成するために、本発明の送信装置は、
動画ファイルのデータを外部装置に送信する送信装置であって、動画ファイルの動画データを変換する変換手段と、変換手段により変換された動画データの動画ファイルを外部装置に送信するための制御を行う制御手段と、を有し、制御手段は、変換手段により動画データの変換を完了する前に、変換手段により変換された動画データの第1のヘッダのサイズを推定し、推定した第1のヘッダのサイズに応じたデータを外部装置に送信するように制御する第1の制御手段と、第1のヘッダのサイズに応じたデータの送信後、変換手段により変換された動画データを外部装置に送信するように制御する第2の制御手段と、変換された動画データの送信後、当該変換された動画データに対応する第1のヘッダを生成し、生成した第1のヘッダを外部装置に送信するように制御する第3の制御手段と、を有することを特徴とする。
In order to achieve the above object, the transmitting device of the present invention is
A transmitting device for transmitting data of a moving image file to an external device, the converting device converting the moving image data of the moving image file, and performing control for transmitting the moving image file of the moving image data converted by the converting device to the external device. And control means for estimating the size of the first header of the moving image data converted by the converting means before completing the conversion of the moving image data by the converting means, and estimating the estimated first header. First control means for controlling transmission of data corresponding to the size of the first header to the external device, and transmission of the moving image data converted by the conversion means to the external device after transmission of the data corresponding to the size of the first header A second control means for controlling the processing so as to generate a first header corresponding to the converted moving image data after transmitting the converted moving image data, and removing the generated first header. And third control means for controlling to transmit device, characterized by having a.

また、本発明の受信装置は、
外部装置から受信したデータを、記録媒体に記録する受信装置であって、第1の送信処理で外部装置から送信される動画ファイルのデータを受信する場合は、動画データのヘッダサイズに関するデータを受信したことに応じて、受信したデータに対応するサイズ分のダミーデータを記録媒体に記録し、その後、受信した動画データを記録媒体のダミーデータに続く領域に記録し、その後、受信したヘッダをダミーデータに上書きして記録するように制御する第1の制御手段と、第2の送信処理で外部装置から送信される動画ファイルのデータを受信する場合は、外部装置から受信したデータを、記録媒体に順次記録するように制御する第2の制御手段と、を有することを特徴とする。
Further, the receiving device of the present invention,
When receiving data of a moving image file transmitted from the external device in the first transmission process, the receiving device receives the data related to the header size of the moving image data. In response to this, dummy data of a size corresponding to the received data is recorded on the recording medium, and then the received moving image data is recorded in an area following the dummy data on the recording medium. First control means for controlling to overwrite and record data; and when receiving data of a moving image file transmitted from the external device in the second transmission processing, the data received from the external device is stored in a recording medium. And a second control means for controlling the recording to be performed sequentially.

本発明によれば、動画ファイルの変換が完了する前にデータの送信を可能とし、また、受信側において受信したデータの再構成等の特別な処理を行わずに簡単に動画ファイルを取得可能な通信システムを提供することができる。   According to the present invention, data can be transmitted before the conversion of the moving image file is completed, and the moving image file can be easily obtained without performing special processing such as reconstructing the received data on the receiving side. A communication system can be provided.

デジタルカメラ100のブロック図である。FIG. 2 is a block diagram of the digital camera 100. 本実施形態における通信システムの構成例を示す図である。It is a figure showing the example of composition of the communication system in this embodiment. 送信装置210における動画ファイルの送信処理を示すフローチャートである。5 is a flowchart illustrating a moving image file transmission process in the transmission device 210. 受信装置220における動画ファイルの受信処理を示すフローチャートである。5 is a flowchart illustrating a process of receiving a moving image file in the receiving device 220. 動画ファイルの構成および第3のヘッダの構成示す図である。It is a figure showing composition of a moving picture file, and composition of a 3rd header. 受信装置220が記録媒体109に記録するファイルを示す図である。FIG. 3 is a diagram showing a file recorded on the recording medium 109 by the receiving device 220.

(第1の実施形態)
以下に、本発明の好ましい実施の形態を、添付の図面に基づいて説明する。なお、以下では通信装置の一例として、通信によってデータを送受信可能な任意のデジタルカメラに本発明を適用した例を説明する。しかし、本発明は、デジタルカメラに限らず、通信によってデータを送受信可能な任意の電子機器にも適用可能である。これらの機器には、例えば携帯電話機、ゲーム機、タブレット端末、パーソナルコンピュータなどが含まれてもよい。また、下記の実施形他では、データ送信側の通信装置(送信装置)をデジタルカメラ、データ受信側の通信装置(受信装置)をデジタルカメラとして説明する。しかし、送信装置と受信装置は、データ通信が可能であれば、それぞれ異なる種類の通信装置を用いてもよい。
(1st Embodiment)
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings. Hereinafter, as an example of a communication device, an example in which the present invention is applied to an arbitrary digital camera capable of transmitting and receiving data by communication will be described. However, the present invention is not limited to a digital camera, and is applicable to any electronic device capable of transmitting and receiving data by communication. These devices may include, for example, mobile phones, game machines, tablet terminals, personal computers, and the like. In the following embodiments and the like, a communication device (transmission device) on the data transmission side is described as a digital camera, and a communication device (reception device) on the data reception side is described as a digital camera. However, the transmitting device and the receiving device may use different types of communication devices as long as data communication is possible.

(デジタルカメラの構成)
図1は、本発明の実施形態におけるデジタルカメラ100の構成を示す図である。以下、本発明の実施形態におけるデジタルカメラの構成について説明する。
(Digital camera configuration)
FIG. 1 is a diagram illustrating a configuration of a digital camera 100 according to an embodiment of the present invention. Hereinafter, the configuration of the digital camera according to the embodiment of the present invention will be described.

デジタルカメラ100は、中央処理部(CPU)101、撮影レンズ102、撮像部103、表示部104、操作部105、画像処理部106、不揮発性メモリ107、主記憶部108、記録媒体109、通信インターフェース110、無線通信用アンテナ111を備えている。   The digital camera 100 includes a central processing unit (CPU) 101, a photographing lens 102, an imaging unit 103, a display unit 104, an operation unit 105, an image processing unit 106, a non-volatile memory 107, a main storage unit 108, a recording medium 109, a communication interface. 110 and an antenna 111 for wireless communication.

中央処理部(CPU)101は、後述する各種処理を実行する1つ以上のマイクロプロセッサ等から構成されており、不揮発性メモリ107からプログラムを読み出し、読みだしたプログラムに基づいて、各部の制御や、各種演算を行う。また、読みだしたプログラムに基づいて、後述の図3、図4のフローチャートに示す処理等を実行する。   The central processing unit (CPU) 101 includes one or more microprocessors or the like that execute various processes described below, reads a program from the nonvolatile memory 107, and controls each unit based on the read program. Perform various calculations. Further, based on the read program, it executes processing shown in flowcharts of FIGS.

撮像部103は、撮像素子等で構成されており、撮影レンズ102を介して取得した被写体像を画像データ変換して、静止画像や動画の撮像を行う。   The imaging unit 103 includes an imaging element and the like, and converts a subject image acquired via the imaging lens 102 into image data to capture a still image or a moving image.

表示部104は、撮像部103により撮影した静止画や動画、撮影中のライブ画像、ユーザ設定画面、ライブビュー画像の表示等を行う。   The display unit 104 displays a still image or a moving image captured by the imaging unit 103, a live image being captured, a user setting screen, a live view image, and the like.

操作部105は、ユーザからの操作を受け付けるための、電源ボタン、シャッターボタン、動画撮影開始/停止ボタン、メニューボタン、十字キー等から構成され、これらのボタンからの入力指示を受け付ける。中央処理部101は、操作部105への操作に応じて、操作に対応する処理を実行する実際の静止画や動画の撮影の操作を行う場合や、ユーザ設定画面から所望の設定を入力する場合等に用いる。   The operation unit 105 includes a power button, a shutter button, a moving image shooting start / stop button, a menu button, a cross key, and the like for receiving an operation from a user, and receives an input instruction from these buttons. The central processing unit 101 performs an operation of actually photographing a still image or a moving image that executes a process corresponding to the operation in response to an operation on the operation unit 105, or a case where a desired setting is input from a user setting screen. Used for etc.

画像処理部106は、撮像部103により撮影した画像の画像解析等の画像処理、表示部104へ表示するための画像処理等を行う処理部である。さらに、記録媒体109へ記録するため画像ファイルを生成するための画像の圧縮符号化処理、記録媒体109から読み出した画像ファイルの画像データの復号処理等の各種画像処理も実行する。   The image processing unit 106 is a processing unit that performs image processing such as image analysis of an image captured by the imaging unit 103, image processing for displaying the image on the display unit 104, and the like. Further, various image processes such as a compression encoding process of an image for generating an image file to be recorded on the recording medium 109 and a decoding process of image data of an image file read from the recording medium 109 are executed.

不揮発性メモリ107は、フラッシュメモリ等で構成されており、ユーザの設定情報等のデジタルカメラ100の電源がOFFの間も保持すべき情報等を記憶するものである。また、不揮発性メモリ107は、デジタルカメラ100の制御や各種処理(画像データの圧縮処理、データの転送処理等)を行うプログラムコードやオペレーティングシステム(OS)等も格納している。   The non-volatile memory 107 is configured by a flash memory or the like, and stores information such as user setting information that should be retained even while the power of the digital camera 100 is off. The nonvolatile memory 107 also stores a program code and an operating system (OS) for controlling the digital camera 100 and performing various processes (image data compression process, data transfer process, and the like).

主記憶部108は、RAM等で構成されており、中央処理部101、撮像部103、画像処理部106のデータを一時的に保存するために使われる。   The main storage unit 108 includes a RAM or the like, and is used to temporarily store data of the central processing unit 101, the imaging unit 103, and the image processing unit 106.

記録媒体109は、例えば、取り外し可能なカード型記録媒体等から構成されており、撮影した静止画データや動画データを保存する。   The recording medium 109 is formed of, for example, a removable card-type recording medium, and stores captured still image data and moving image data.

通信インターフェース110は、無線通信用アンテナ111を介して外部機器と接続するインターフェースである。本実施形態では、無線通信用アンテナ111を介して外部装置と無線通信を行う場合について説明するが、ローカルエリアネットワークやUSBを用いて外部機器と接続してもよい。   The communication interface 110 is an interface that connects to an external device via the wireless communication antenna 111. In the present embodiment, a case will be described in which wireless communication is performed with an external device via the wireless communication antenna 111. However, the wireless device may be connected to an external device using a local area network or USB.

デジタルカメラ100は、撮影モードにおいてシャッターボタンが操作されると、撮像部103により画像を撮影し、画像処理部106で静止画用の画像処理を行った画像データをJPEG形式に圧縮する。そして、中央処理部101の制御により、JPEG形式の画像データをJPEGファイルとして記録媒体109に記録する。また、動画撮影開始/停止ボタンが操作されると、撮像部103により画像を連続的に撮影する。画像処理部106で動画用の画像処理を行った画像データをMPEG形式に圧縮する。そして、中央処理部101の制御により、MPEG形式の画像データをMP4ファイルとして記録媒体109に記録する。   When the shutter button is operated in the shooting mode, the digital camera 100 shoots an image by the imaging unit 103 and compresses the image data subjected to image processing for a still image by the image processing unit 106 into a JPEG format. Then, under the control of the central processing unit 101, the image data in the JPEG format is recorded on the recording medium 109 as a JPEG file. In addition, when the moving image shooting start / stop button is operated, the image is continuously shot by the imaging unit 103. The image data subjected to the image processing for the moving image by the image processing unit 106 is compressed into the MPEG format. Then, under the control of the central processing unit 101, the image data in the MPEG format is recorded on the recording medium 109 as an MP4 file.

操作部105を操作して、デジタルカメラ100を再生モードに切り替えると、中央処理部101は、記録媒体109に記録されている画像ファイルを読み出し、表示部104に表示する。操作部105への操作に応じて、表示部104に表示された画像に対して、画像処理部106により編集を行って記録媒体109に記録することができる。また、記録媒体109に記録されている複数の画像ファイルの中から、操作部105への操作により選択された画像ファイルを、通信インターフェース110により無線通信用アンテナ111を介して無線接続された外部装置に対して送信することもできる。   When the operation unit 105 is operated to switch the digital camera 100 to the playback mode, the central processing unit 101 reads out the image file recorded on the recording medium 109 and displays it on the display unit 104. In accordance with an operation on the operation unit 105, the image displayed on the display unit 104 can be edited by the image processing unit 106 and recorded on the recording medium 109. The image file selected by the operation on the operation unit 105 from the plurality of image files recorded on the recording medium 109 is transmitted to the external device wirelessly connected by the communication interface 110 via the wireless communication antenna 111. Can also be sent.

(通信システムのシステム構成)
本実施形態では、ファイルを送信する側のデジタルカメラを送信装置210、ファイルを受信する側のデジタルカメラを受信装置220とする。送信装置210のデジタルカメラと、受信装置220のデジタルカメラは、それぞれ、図1の構成を有している。
(System configuration of communication system)
In the present embodiment, the digital camera on the transmitting side of the file is the transmitting device 210, and the digital camera on the receiving side of the file is the receiving device 220. The digital camera of the transmitting device 210 and the digital camera of the receiving device 220 each have the configuration shown in FIG.

図2は、送信装置210と、受信装置220とから構成される通信システムの例を示している。   FIG. 2 illustrates an example of a communication system including a transmission device 210 and a reception device 220.

送信装置210と受信装置220は、形成された無線ネットワーク200に通信インタフェース11と無線通信用アンテナ111を介して参加し、例えばIEEE802.11シリーズに準拠した無線通信を確立する。なお、本実施形態ではIEEE802.11シリーズに準拠した無線LANシステムを用いた例について説明するが、通信形態は必ずしもIEEE802.11準拠の無線LANには限らず他の方式であってもよい。すなわちワイヤレスUSB、MBOA、Bluetooth(登録商標)、UWB、ZigBee(登録商標)などの他の無線通信方式を用いてもよい。また、有線LAN等の有線通信媒体において実施してもよい。なおMBOAは、Multi Band OFDM Allianceの略である。また、UWBは、ワイヤレスUSB、ワイヤレス1934、WINETなどが含まれる。   The transmitting device 210 and the receiving device 220 participate in the formed wireless network 200 via the communication interface 11 and the wireless communication antenna 111, and establish wireless communication compliant with, for example, the IEEE 802.11 series. In this embodiment, an example in which a wireless LAN system compliant with the IEEE 802.11 series is used will be described. However, the communication mode is not limited to the wireless LAN compliant with IEEE 802.11, and another method may be used. That is, other wireless communication methods such as wireless USB, MBOA, Bluetooth (registered trademark), UWB, and ZigBee (registered trademark) may be used. Further, the present invention may be implemented in a wired communication medium such as a wired LAN. MBOA is an abbreviation for Multi Band OFDM Alliance. UWB includes wireless USB, wireless 1934, WINET, and the like.

(動画ファイルの送信処理)
次に、図3に、送信装置210が受信装置220に動画ファイルを送信する動作のフローチャートを示す。本処理は、送信装置210が動画ファイルの送信開始指示を受けることに応じて、送信装置210の中央処理部101により、本フローチャートは開始される。なお、送信開始指示を受け付ける前に、ユーザは、送信装置210の表示部104、操作部105を用いて、記録媒体109の中から、送信対象の動画ファイルの選択、および、送信設定を行う。送信装置210の中央処理部101は、送信対象として選択された動画ファイルの情報や、送信設定の情報を、送信装置210の不揮発性メモリ107に保持する。その後、送信装置210の操作部105で動画ファイルの送信開始の操作を受け付けたことに応じて、中央処理部101は送信開始指示を受け付ける。本実施形態では、送信装置210において送信開始指示を受け付ける場合について説明するが、受信装置220側で送信装置210の記録媒体109に記録されている動画ファイルの送信開始指示を受け付けるようにしてもよい。この場合、送信対象の動画ファイルの選択、送信設定も受信装置220側で行う。そして、送信開始指示を受け付けたことに応じて、受信装置220は、送信開始指示と共に、送信対象の動画ファイルの情報、送信設定の情報を送信装置210に送信し、送信装置210はこれらを送信装置210の不揮発性メモリ107に保持する。また、本実施形態においては、送信設定として、画像変換処理を行って動画ファイルを送信する「トランスコード送信」の設定が可能である。「トランスコード送信」が設定された場合、送信対象の動画ファイルのファイルサイズを小さくするための画像変換処理を施してから、変換後の動画ファイルを送信装置210から受信装置220に送信する。
(Video file transmission processing)
Next, FIG. 3 shows a flowchart of an operation in which the transmission device 210 transmits a moving image file to the reception device 220. In this process, the flowchart is started by the central processing unit 101 of the transmission device 210 in response to the transmission device 210 receiving a moving image file transmission start instruction. Before receiving the transmission start instruction, the user uses the display unit 104 and the operation unit 105 of the transmission device 210 to select a moving image file to be transmitted from the recording medium 109 and make transmission settings. The central processing unit 101 of the transmitting device 210 stores information of the moving image file selected as the transmission target and information of the transmission setting in the nonvolatile memory 107 of the transmitting device 210. After that, the central processing unit 101 accepts a transmission start instruction in response to the operation unit 105 of the transmission device 210 accepting the operation of starting the transmission of the moving image file. In the present embodiment, a case will be described where the transmission device 210 receives a transmission start instruction. However, the reception device 220 may receive a transmission start instruction for a moving image file recorded on the recording medium 109 of the transmission device 210. . In this case, the receiving apparatus 220 also selects the moving image file to be transmitted and sets the transmission. Then, in response to receiving the transmission start instruction, the reception device 220 transmits the information of the moving image file to be transmitted and the information of the transmission setting to the transmission device 210 together with the transmission start instruction, and the transmission device 210 transmits these. It is stored in the non-volatile memory 107 of the device 210. In the present embodiment, “Transcode transmission” for transmitting a moving image file by performing image conversion processing can be set as the transmission setting. When “Transcode transmission” is set, after performing image conversion processing for reducing the file size of the moving image file to be transmitted, the converted moving image file is transmitted from the transmitting device 210 to the receiving device 220.

送信開始指示を受け付けると、ステップS301において、送信装置210の中央処理部101は、不揮発性メモリ107に保持されている送信設定が、トランスコード送信である、通常送信であるかを判定する。トランスコード送信であると判定した場合、処理をステップS302に進める。トランスコード送信ではないと判定した場合、処理をステップS330の通常送信の処理に進める。   Upon receiving the transmission start instruction, in step S301, the central processing unit 101 of the transmission device 210 determines whether the transmission setting stored in the nonvolatile memory 107 is transcode transmission, that is, normal transmission. If it is determined that the transmission is transcode transmission, the process proceeds to step S302. If it is determined that the transmission is not transcode transmission, the process proceeds to the normal transmission process of step S330.

ステップS302において、送信装置210の中央処理部101は、動画ファイルの送信先である受信装置220の再生能力情報を取得する。再生能力情報を取得するとは、送信装置210が無線ネットワーク200を介して受信装置220から取得して主記憶部108に保持していた情報を取得することである。また、再生能力情報とは、再生可能な動画ファイルの映像データの圧縮形式、解像度、ビットレート、フレームレートや、音声データの圧縮形式、ビットレート、チャネル数等のことである。   In step S302, the central processing unit 101 of the transmission device 210 acquires reproduction capability information of the reception device 220 that is the destination of the moving image file. Acquiring the reproduction capability information means acquiring the information acquired by the transmitting device 210 from the receiving device 220 via the wireless network 200 and held in the main storage unit 108. The reproduction capability information includes a compression format, a resolution, a bit rate, a frame rate of video data of a reproducible moving image file, a compression format of audio data, a bit rate, the number of channels, and the like.

ステップS303において、送信装置210の中央処理部101は、動画ファイルの送信先である受信装置220の再生能力情報に応じて、動画ファイルのトランスコード形式(変換形式)を決定する。動画ファイルのトランスコード形式とは、動画ファイルをトランスコードして生成する際の動画ファイルの映像データの圧縮形式、解像度、ビットレート、フレームレートや、音声データの圧縮形式、ビットレート、チャネル数等のことである。なお、本実施形態では、受信装置の再生能力に応じて、送信装置においてトランスコード形式を決定するものとしたが、トランスコード形式を送信設定においてユーザが設定できるようにしてもよい。   In step S303, the central processing unit 101 of the transmission device 210 determines the transcoding format (conversion format) of the moving image file according to the reproduction capability information of the receiving device 220 to which the moving image file is transmitted. The video file transcode format is the video data compression format, resolution, bit rate, frame rate, and audio data compression format, bit rate, number of channels, etc. when transcoding the video file. That is. In the present embodiment, the transcoding format is determined in the transmitting device according to the reproduction capability of the receiving device. However, the transcoding format may be set by the user in the transmission setting.

ステップS304において、送信装置210の中央処理部101は、記録媒体109に記録されている送信する動画ファイルのヘッダ情報を主記憶部108に読み込む。そして、中央処理部101は、読み込んだヘッダ情報の解析処理を行い、解析結果を基にトランスコード可能な動画ファイルであるか否かを判定する。トランスコード可能な動画ファイルであると判定した場合、処理をステップS305に進める。トランスコード可能な動画ファイルではないと判定した場合、処理をステップS330の通常送信の処理に進める。ここで、トランスコード可能な動画ファイルであるか否かをヘッダ情報の解析結果に基づいて判定する条件について説明する。   In step S304, the central processing unit 101 of the transmission device 210 reads the header information of the moving image file to be transmitted recorded on the recording medium 109 into the main storage unit 108. Then, the central processing unit 101 analyzes the read header information, and determines whether or not the file is a moving image file that can be transcoded based on the analysis result. If it is determined that the moving image file can be transcoded, the process proceeds to step S305. If it is determined that the file is not a transcoding-capable moving image file, the process proceeds to a normal transmission process in step S330. Here, a description will be given of a condition for determining whether or not a moving image file can be transcoded based on the analysis result of the header information.

・トランスコードする必要のない動画ファイルの場合
動画ファイルがトランスコードしても変わらない動画ファイルや、既にトランスコードされた動画ファイルであると判断された場合には、トランスコードを行う必要が無いため、トランスコード可能なファイルではないと判定する。
-For video files that do not need to be transcoded If there is a video file that does not change when transcoded, or if it is determined that the video file has already been transcoded, there is no need to perform transcoding. It is determined that the file cannot be transcoded.

・再生時間が短時間の動画ファイルの場合
動画ファイルの再生時間が短時間である場合、トランスコード処理を行えない場合があるため、トランスコード可能なファイルではないと判定する。
In the case of a moving image file having a short playback time If the playback time of a moving image file is short, transcoding processing may not be performed.

・他機器で記録された動画ファイルの場合
動画ファイルが他機器で記録されている場合には、トランスコードできない場合があるため、トランスコード可能なファイルではないと判定する。
-In the case of a moving image file recorded by another device If a moving image file is recorded by another device, it may not be possible to transcode it, so it is determined that the file cannot be transcoded.

以上が、トランスコード可能な動画ファイルであるか否かを判定する条件である。   The above is the condition for determining whether or not the video file can be transcoded.

ステップS305において、送信装置210の中央処理部101は、受信装置220がトランスコードしながら転送に対応しているか否かの情報を取得する。ここで、トランスコードしながら転送とは、トランスコードしたデータから順次送信する機能のことである。トランスコードしながら転送に対応しているか否かの情報の取得とは、送信装置210が無線ネットワーク200を介して受信装置220から取得して主記憶部108に保持していたトランスコードしながら転送に対応しているか否かの情報を取得することである。また、トランスコードしながら転送とは異なる機能として、動画ファイルをすべてトランスコードし終えてからデータを転送するトランスコードしてから転送という機能もある。   In step S305, the central processing unit 101 of the transmitting device 210 acquires information on whether the receiving device 220 supports transfer while transcoding. Here, the transfer while transcoding is a function of sequentially transmitting the transcoded data. Acquisition of information as to whether or not transfer is supported while transcoding is performed when the transmitting device 210 transfers from the receiving device 220 via the wireless network 200 and transfers the transcoding while holding it in the main storage unit 108. Is to acquire information on whether or not it corresponds to Also, as a function different from transfer while transcoding, there is also a function of transcoding and then transferring data after all the moving image files have been transcoded.

ステップS306において、送信装置210の中央処理部101は、受信装置220がトランスコードしながら転送に対応しているか否かを判定する。トランスコードしながら転送に対応していると判定した場合、処理をステップS307に進め、ステップS307〜S319のトランスコードしながら動画ファイルを送信する処理を実行する。トランスコードしながら転送に対応していないと判定した場合、処理をステップS320に進める。なお、フローチャートには記載していないが、送信装置210の中央処理部101は、データの送信を開始する前に、動画ファイルのデータの送信を開始することを受信装置220に通知する。この通知の際に、ステップS306でYesと判定された場合は、トランスコードしながら動画ファイルを送信することも通知する。また、ステップS306でNoと判定された場合は、トランスコードしながら動画ファイルを送信すること示す通知は行わずに、動画ファイルのデータの送信を開始することをのみを受信装置220に通知する。   In step S306, the central processing unit 101 of the transmitting device 210 determines whether the receiving device 220 supports the transfer while transcoding. If it is determined that the transfer is supported while transcoding, the process proceeds to step S307, and the process of transmitting a moving image file while transcoding is performed in steps S307 to S319. If it is determined that the transfer is not supported while transcoding, the process proceeds to step S320. Although not described in the flowchart, the central processing unit 101 of the transmitting device 210 notifies the receiving device 220 that transmission of moving image file data is to be started before starting data transmission. At this time, when the determination is Yes in step S306, it also notifies that the moving image file is transmitted while transcoding. If No is determined in step S306, a notification indicating that the moving image file is to be transmitted while transcoding is not performed, and only the reception device 220 is notified that transmission of the moving image file data is to be started.

ステップS307において、送信装置210の中央処理部101は、記録媒体109に記録されている送信対象の動画ファイルのヘッダ情報を主記憶部108に読み込む。そして、読み込んだヘッダ情報に基づいて、動画データをトランスコードした後の第1のヘッダのサイズを推定する処理を行う。   In step S307, the central processing unit 101 of the transmitting device 210 reads the header information of the moving image file to be transmitted recorded on the recording medium 109 into the main storage unit 108. Then, a process of estimating the size of the first header after transcoding the moving image data is performed based on the read header information.

ここで、動画ファイル(MP4ファイル)のファイル構造について、図5(a)、(b)を参照して説明する。   Here, the file structure of the moving image file (MP4 file) will be described with reference to FIGS.

図5(a)は、MP4ファイルのファイル構造を示している。MP4ファイルは、ボックス構造であり、複数のボックス(データ格納領域)から構成される。MP4ファイルには、ftypボックス、moovボックス、mdatボックスが含まれている。ftypボックスには、ファイルタイプが記述され、MP4ファイルの先頭に1つだけ含まれる、moovボックスは、メタ情報を含むコンテナであり、MP4ファイルの中に1つだけ含まれる。メタ情報としては、動画データの撮影日時や撮影条件の情報、サムネイル画像等が含まれる。moovボックス内には、さらに複数のボックスを含めることが可能であり、メタ情報の種類ごとボックスを分けてmoovボックス内にメタ情報を格納することができる。mdatボックスについては、1つのMP4ファイルに複数のmdatボックスを含めることも可能である。しかし、本実施形態のデジタルカメラ100においては、MP4ファイルを生成する際には、1つのMP4ファイルに1つのmdatボックスを設け、mdatボックスに、圧縮した動画データ(映像データおよび音声データ)を格納している。   FIG. 5A shows the file structure of the MP4 file. The MP4 file has a box structure and includes a plurality of boxes (data storage areas). The MP4 file includes an ftyp box, a moov box, and an mdat box. The ftype box describes the file type and is included only at the beginning of the MP4 file. The moov box is a container that includes meta information, and is included only once in the MP4 file. The meta information includes information on the shooting date and time of the moving image data, shooting conditions, thumbnail images, and the like. The moov box can further include a plurality of boxes, and the meta information can be stored in the moov box by dividing the box for each type of meta information. As for the mdat box, a single MP4 file can include a plurality of mdat boxes. However, in the digital camera 100 of the present embodiment, when generating an MP4 file, one mdat box is provided in one MP4 file, and compressed moving image data (video data and audio data) is stored in the mdat box. are doing.

図5(b)は各ボックスの構成を示す図である。各ボックスは、先頭の8byteがボックスを識別するためのボックスヘッダとなっており、先頭の4bypeがボックスのサイズを示しており、続く4byteがボックスのタイプ(エントリ名)を示している。これに続く領域には、ボックスサイズが示す領域まで、そのボックスのデータが格納される。   FIG. 5B is a diagram showing the configuration of each box. In each box, the first 8 bytes are a box header for identifying the box, the first 4 bytes indicate the size of the box, and the next 4 bytes indicate the type (entry name) of the box. In the subsequent area, data of the box is stored up to the area indicated by the box size.

ステップS307において、サイズを推定する、第1のヘッダとはftypボックスおよびmoovボックスを指す。つまり、動画ファイルの先頭から、moovボックスの後端までを第1のヘッダとする。トランスコード後(変換後)の動画ファイルにおける第1のヘッダのサイズの推定処理は、ステップS307で主記憶部108に読み込んだ変換前のヘッダ情報と、捨て覆うS303で決定した形式(変換形式)とに基づいて算出する。トランスコード形式(変換形式)として、トランスコードして生成する動画ファイルの映像データの圧縮形式、解像度、フレームレートや、音声データの圧縮形式、ビットレート、チャネル数等のうちの少なくとも1つを用いて、第1のヘッダの推定を行う。第1のヘッダサイズを推定する際には、推定した第1のヘッダのサイズが、実際にトランスコードした後に生成する第1のヘッダのサイズよりも小さくならないように算出する。また、本実施形態のトランスコードにおいては、ファイル形式は変更していないため、ftypボックスのサイズは、トランスコード前(変換前)とトランスコード後(変換後)とで変化しない。そのため、変換後のmoovボックスのサイズの推定を行い、変換前のftypボックスのサイズと、推定したmoovボックスのサイズの合計サイズを、第1のヘッダのサイズとする。   In step S307, the first header for estimating the size refers to the ftyp box and the moov box. That is, the first header extends from the beginning of the moving image file to the end of the moov box. The process of estimating the size of the first header in the moving image file after transcoding (after conversion) includes the header information before conversion read into the main storage unit 108 in step S307 and the format determined in step S303 to be discarded (conversion format). Is calculated based on As the transcoding format (conversion format), at least one of a compression format, a resolution, a frame rate, a compression format, a bit rate, and the number of channels of video data of a moving image file generated by transcoding is used. Then, the first header is estimated. When estimating the first header size, calculation is performed so that the estimated size of the first header does not become smaller than the size of the first header generated after actually transcoding. In the transcoding of the present embodiment, since the file format is not changed, the size of the ftyp box does not change before transcoding (before conversion) and after transcoding (after conversion). Therefore, the size of the moov box after conversion is estimated, and the total size of the size of the ftyp box before conversion and the estimated size of the moov box is set as the size of the first header.

次に、ステップS308において、送信装置210の中央処理部101は、第3のヘッダのサイズを決定し、無線ネットワーク200を介して受信装置220に第3のヘッダのサイズを送信する。さらに、第3のヘッダのサイズを主記憶部108に記録する。ここで、第3のヘッダは、図5(c)のように、第1のヘッダと、第2のヘッダを含むヘッダである。第1のヘッダは、前に説明したように、ftypボックスとmoovボックスである。そして、第2のヘッダは、mdatボックスのボックスヘッダ(ボックスのサイズ情報とボックスのタイプ情報)である。つまり、第2のヘッダサイズは、8byteとなる。このように、第3のヘッダは、図5(c)に示すように、ftypボックス全体、moovボックス全体、mdatボックスのボックスヘッダから構成され、動画ファイルの先頭から、mdatボックスのボックスヘッダまでのデータとなる。第3のヘッダは、動画ファイルのヘッダ(ftypボックス、moovボックス)、および、動画ファイル内の動画データ(mdatボックス)のヘッダであるとも言うことができる。そして、第3のヘッダサイズは、S307で推測した第1のヘッダのサイズと第2のヘッダのサイズ(8byte)の合計となる。   Next, in step S308, the central processing unit 101 of the transmitting device 210 determines the size of the third header, and transmits the size of the third header to the receiving device 220 via the wireless network 200. Further, the size of the third header is recorded in the main storage unit 108. Here, the third header is a header including the first header and the second header as shown in FIG. The first header is an ftyp box and a moov box, as described above. The second header is a box header (box size information and box type information) of the mdat box. That is, the second header size is 8 bytes. As described above, the third header is composed of the entire ftyp box, the entire moov box, and the box header of the mdat box, as shown in FIG. 5C, from the beginning of the moving image file to the box header of the mdat box. Data. The third header can be said to be a header of a moving image file (ftyp box, moov box) and a header of moving image data (mdat box) in the moving image file. Then, the third header size is the sum of the size of the first header and the size (8 bytes) of the second header estimated in S307.

ステップS309において、送信装置210の中央処理部101は、記録媒体109に記録されている動画ファイルのmdatボックスに格納されている動画データ(映像データ、音声データ)の一部を主記憶部108に読み込む。ここで、動画データの一部を読み込むのは、主記憶部108の動画ファイルを一度に読み込めるサイズに対して、記録媒体109に記録されている動画ファイルのサイズが大きい場合があるためである。   In step S309, the central processing unit 101 of the transmission device 210 stores a part of the moving image data (video data and audio data) stored in the mdat box of the moving image file recorded on the recording medium 109 in the main storage unit 108. Read. Here, a part of the moving image data is read because the size of the moving image file recorded on the recording medium 109 may be larger than the size at which the moving image file in the main storage unit 108 can be read at one time.

ステップS310において、送信装置210の中央処理部101は、主記憶部108に読み込まれた動画ファイルの動画データに対して画像処理部106でトランスコード(変換)を行い、主記憶部108に記録する。そして、送信装置210の中央処理部101は、トランスコードを行った際のトランスコード情報を主記憶部108に記録しておく。   In step S310, the central processing unit 101 of the transmission device 210 performs transcoding (conversion) on the moving image data of the moving image file read into the main storage unit 108 by the image processing unit 106, and records the data in the main storage unit 108. . Then, the central processing unit 101 of the transmission device 210 records the transcode information at the time of performing the transcoding in the main storage unit 108.

ステップS311において、送信装置210の中央処理部101は、ステップS310において主記憶部108に記録されたトランスコードされたデータを、無線ネットワーク200を介して受信装置220に送信する。   In step S311, the central processing unit 101 of the transmitting device 210 transmits the transcoded data recorded in the main storage unit 108 in step S310 to the receiving device 220 via the wireless network 200.

ステップS312において、送信装置210の中央処理部101は、記録媒体109に記録されている送信する動画ファイルのデータをすべて読み込み完了したか否かを判定する。すべて読み込み完了したと判定した場合、処理をステップS313に進める。すべて読み込み完了していないと判定した場合、処理をステップS309に戻す。   In step S312, the central processing unit 101 of the transmission device 210 determines whether or not all the data of the moving image file to be transmitted recorded on the recording medium 109 has been read. If it is determined that the reading has been completed, the process proceeds to step S313. If it is determined that the reading has not been completed, the process returns to step S309.

ステップS313において、送信装置210の中央処理部101は、ステップS310で主記憶部108に記録したトランスコード情報を基に、第1のヘッダを生成し、主記憶部108に記録する。   In step S313, the central processing unit 101 of the transmission device 210 generates a first header based on the transcode information recorded in the main storage unit 108 in step S310, and records the first header in the main storage unit 108.

ステップS314において、送信装置210の中央処理部101は、ステップS310で主記憶部108に記録したトランスコード情報を基に、第2のヘッダを生成し、主記憶部108に記録する。   In step S314, the central processing unit 101 of the transmission device 210 generates a second header based on the transcode information recorded in the main storage unit 108 in step S310, and records the second header in the main storage unit 108.

ステップS315において、送信装置210の中央処理部101は、ステップS313、ステップS314で生成した第1のヘッダと第2のヘッダのサイズの合計と、ステップS308で主記憶部108に記録された第3のヘッダのサイズとを比較する。つまり、ステップS313、ステップS314で生成した第1のヘッダと第2のヘッダから構成される、トランスコード後の動画ファイルにおける第3のヘッダのサイズと、受信装置220に送信した第3のヘッダのサイズとを比較する。変換後の第3のヘッダサイズと、送信した第3のヘッダのサイズと等しいと判定した場合は、処理をステップS317に進める。変換後の第3のヘッダサイズと、送信した第3のヘッダのサイズとが等しくない、つまり、変換後の第3のヘッダサイズの方が送信した第3のヘッダのサイズよりも小さいと判定した場合は、処理をステップS316に進める。ここで、ステップS307、S308の処理により算出し受信装置に送信した第3のヘッダのサイズは、トランスコード後に生成される第1のヘッダと第2のヘッダのサイズの合計を超えないように算出されている。そのため、受信装置に送信した第3のヘッダのサイズが、ステップS313、S314で生成される第1のヘッダと第2のヘッダのサイズの合計を下回ることは無い。ステップS315では、トランスコード後に生成した第1のヘッダと第2のヘッダの合計サイズと、トランスコード前に決定して受信装置に送信した第3のヘッダのサイズを比較した。ここで、トランスコード前に決定した第3のヘッダのサイズは第1のヘッダと第2のヘッダの合計サイズであり、第2のヘッダのサイズは固定である。そのため、実質は、トランスコード後に生成した第1のヘッダのサイズとトランスコード前に推定した第1のヘッダのサイズとを比較することと同じである。したがって、ステップS315において、トランスコード後に生成した第1のヘッダのサイズとトランスコード前に推定した第1のヘッダのサイズとを比較してもよい。   In step S315, the central processing unit 101 of the transmission device 210 determines the total size of the first header and the second header generated in steps S313 and S314 and the third header recorded in the main storage unit 108 in step S308. With the size of the header. That is, the size of the third header in the video file after transcoding composed of the first header and the second header generated in steps S313 and S314, and the size of the third header transmitted to the receiving device 220 Compare with size. If it is determined that the converted third header size is equal to the size of the transmitted third header, the process proceeds to step S317. It is determined that the converted third header size is not equal to the size of the transmitted third header, that is, the converted third header size is smaller than the transmitted third header size. In this case, the process proceeds to step S316. Here, the size of the third header calculated by the processing of steps S307 and S308 and transmitted to the receiving device is calculated so as not to exceed the sum of the sizes of the first header and the second header generated after transcoding. Have been. Therefore, the size of the third header transmitted to the receiving device does not fall below the sum of the sizes of the first header and the second header generated in steps S313 and S314. In step S315, the total size of the first header and the second header generated after the transcoding was compared with the size of the third header determined before the transcoding and transmitted to the receiving device. Here, the size of the third header determined before transcoding is the total size of the first header and the second header, and the size of the second header is fixed. Therefore, it is substantially the same as comparing the size of the first header generated after transcoding with the size of the first header estimated before transcoding. Therefore, in step S315, the size of the first header generated after transcoding may be compared with the size of the first header estimated before transcoding.

ステップS316において、送信装置210の中央処理部101は、第1のヘッダのサイズと第2のヘッダサイズの合計と、受信装置220に送信した第3のヘッダのサイズとの差を算出し、その差をパディングのサイズとして決定する。   In step S316, the central processing unit 101 of the transmission device 210 calculates a difference between the total of the first header size and the second header size and the size of the third header transmitted to the reception device 220. The difference is determined as the size of the padding.

ステップS317において、送信装置210の中央処理部101は、図5(e)のような第3のヘッダを生成する。具体的には、ステップS313で生成した第1のヘッダに、ステップS316で決定したパディングデータを追加することにより、第1のヘッダをステップS307で推定したヘッダサイズにする。そして、パディングデータを追加した第1のヘッダの後に、ステップpS314で生成した第2のヘッダを連結して、ステップS308で送信したサイズの第3のヘッダを生成し、主記憶部108に記録する。ステップS316でパディングサイズを決定していない、つまり、送信した第3のヘッダサイズと第1、第2のヘッダサイズの合計が等しい場合は、ステップS317では、パディングデータを追加せずに、図5(d)のような第3のヘッダを生成する。つまり、S313、S314で生成した第1のヘッダと第2のヘッダを連結して、第3のヘッダを生成する。このように、ステップS317では、ステップS308で送信した第3のヘッダサイズとなるように、ステップS313、S314で生成した第1、第2のヘッダから、第3のヘッダを生成する。   In step S317, the central processing unit 101 of the transmitting device 210 generates a third header as shown in FIG. Specifically, by adding the padding data determined in step S316 to the first header generated in step S313, the first header has the header size estimated in step S307. Then, after the first header to which the padding data has been added, the second header generated in step pS314 is concatenated, and a third header having the size transmitted in step S308 is generated and recorded in the main storage unit 108. . If the padding size has not been determined in step S316, that is, if the transmitted third header size is equal to the sum of the first and second header sizes, in step S317, the padding data is not added and FIG. A third header as shown in (d) is generated. That is, the third header is generated by concatenating the first header and the second header generated in S313 and S314. As described above, in step S317, a third header is generated from the first and second headers generated in steps S313 and S314 so as to have the third header size transmitted in step S308.

ステップS318において、送信装置210の中央処理部101は、無線ネットワーク200を介して受信装置220にヘッダの上書き指示を送信する。   In step S318, the central processing unit 101 of the transmitting device 210 transmits a header overwriting instruction to the receiving device 220 via the wireless network 200.

ステップS319において、送信装置210の中央処理部101は、ステップS317で生成して主記憶部108に記録した第3のヘッダを、無線ネットワーク200を介して受信装置220に送信する。そして、トランスコードを行いながら動画ファイルの送信を行うトランスコード送信処理を終了する。   In step S319, the central processing unit 101 of the transmission device 210 transmits the third header generated in step S317 and recorded in the main storage unit 108 to the reception device 220 via the wireless network 200. Then, the transcode transmitting process for transmitting the moving image file while performing the transcoding is ended.

トランスコード送信が設定されており、受信装置220がトランスコードしながら転送に対応していない場合、ステップS320において、送信装置210の中央処理部101は、記録媒体109に十分な空き容量があるか否かを判定する。十分な空き容量があると判定した場合、処理をステップS321に進め、ステップS321〜S329のトランスコードしてから送信する処理を実行する。十分な空き容量が無いと判定した場合、処理をステップS330の通常送信処理に進める。ここで、十分な空き容量とは、記録媒体109に記録されている送信対象の動画ファイルをトランスコードして生成される動画ファイルを一時的に記録できるだけの空き容量を指す。また、トランンスコードして生成する動画ファイルのサイズは、映像データの圧縮形式、解像度、フレームレートや、音声データの圧縮形式、ビットレート、チャネル数等の情報を基に推定することができる。   If transcode transmission is set and the receiving device 220 does not support transfer while transcoding, in step S320, the central processing unit 101 of the transmitting device 210 checks whether the recording medium 109 has sufficient free space. Determine whether or not. If it is determined that there is sufficient free space, the process proceeds to step S321, and the process of transcoding and transmitting in steps S321 to S329 is executed. If it is determined that there is not enough free space, the process proceeds to a normal transmission process in step S330. Here, the sufficient free space refers to a free space that can temporarily store a moving image file generated by transcoding a moving image file to be transmitted recorded on the recording medium 109. The size of a moving image file generated by transcoding can be estimated based on information such as the compression format, resolution, and frame rate of video data, the compression format of audio data, the bit rate, and the number of channels.

ステップS321において、送信装置210の中央処理部101は、記録媒体109に記録されている動画ファイルの動画データ(映像データ、音声データ)の一部を主記憶部108に読み込む。ここで、動画データの一部を読み込むのは、主記憶部108の動画ファイルを一度に読み込めるサイズに対して、記録媒体109に記録されている動画ファイルのサイズが大きい場合があるためである。   In step S321, the central processing unit 101 of the transmission device 210 reads a part of the moving image data (video data and audio data) of the moving image file recorded on the recording medium 109 into the main storage unit 108. Here, a part of the moving image data is read because the size of the moving image file recorded on the recording medium 109 may be larger than the size at which the moving image file in the main storage unit 108 can be read at one time.

ステップS322において、送信装置210の中央処理部101は、主記憶部108に読み込まれた動画ファイルの動画データに対して画像処理部106でトランスコードを行い、主記憶部108に記録する。また、送信装置210の中央処理部101は、トランスコードを行った際のトランスコード情報を主記憶部108に記録しておく。   In step S322, the central processing unit 101 of the transmission device 210 transcodes the moving image data of the moving image file read into the main storage unit 108 by the image processing unit 106, and records the transcoded moving image data in the main storage unit 108. Further, the central processing unit 101 of the transmission device 210 records the transcode information at the time of performing the transcoding in the main storage unit 108.

ステップS323において、送信装置210の中央処理部101は、ステップS322で主記憶部108に記録されたトランスコードされた動画データを、記録媒体109に記録する。   In step S323, the central processing unit 101 of the transmission device 210 records the transcoded moving image data recorded in the main storage unit 108 in step S322 on the recording medium 109.

ステップS324において、送信装置210の中央処理部101は、記録媒体109に記録されている送信する動画ファイルのデータをすべて読み込み完了したか否かを判定する。すべて読み込み完了したと判定した場合、処理をステップS315に進める。すべて読み込み完了していないと判定した場合、処理をステップS324に戻す。   In step S324, the central processing unit 101 of the transmission device 210 determines whether all the data of the moving image file to be transmitted recorded on the recording medium 109 has been read. If it is determined that the reading has been completed, the process proceeds to step S315. If it is determined that the reading has not been completed, the process returns to step S324.

ステップS325において、送信装置210の中央処理部101は、ステップS322で主記憶部108に記録したトランスコード情報を基に、第1のヘッダ(ftypボックス、moovボックス)、第2のヘッダ(mdatボックスのヘッダ)を生成し、主記憶部108に記録する。   In step S325, the central processing unit 101 of the transmitting device 210 uses the first header (ftyp box, moov box) and the second header (mdat box) based on the transcode information recorded in the main storage unit 108 in step S322. Is generated and recorded in the main storage unit 108.

ステップS326において、送信装置210の中央処理部101は、ステップS325で主記憶部108に記録した第1のヘッダ(ftypボックス、moovボックス)を、無線ネットワーク200を介して受信装置220に送信する。   In step S326, the central processing unit 101 of the transmitting device 210 transmits the first header (ftyp box, moov box) recorded in the main storage unit 108 in step S325 to the receiving device 220 via the wireless network 200.

ステップS327において、送信装置210の中央処理部101は、ステップS323で記録媒体109に記録したトランスコードされたデータ(mdatボックス)の一部を主記憶部108に読み込む。ここで、データの一部を読み込むのは、主記憶部108の動画ファイルを一度に読み込めるサイズに対して、記録媒体109に記録されているトランスコードされたデータのサイズが大きい場合があるためである。   In step S327, the central processing unit 101 of the transmission device 210 reads a part of the transcoded data (mdat box) recorded on the recording medium 109 in step S323 into the main storage unit 108. Here, the reason why a part of the data is read is that the size of the transcoded data recorded on the recording medium 109 may be larger than the size at which the moving image file in the main storage unit 108 can be read at one time. is there.

ステップS328において、送信装置210の中央処理部101は、ステップS327で主記憶部108に読み込まれたトランスコードされたデータを、無線ネットワーク200を介して受信装置220に送信する。なお、ステップS327、S328の処理においては、mdatボックスのヘッダ(第2のヘッダ)も含むmdatボックス全体をトランスコードされたデータとして受信装置220に送信する処理を行う。   In step S328, the central processing unit 101 of the transmitting device 210 transmits the transcoded data read into the main storage unit 108 in step S327 to the receiving device 220 via the wireless network 200. In steps S327 and S328, a process of transmitting the entire mdat box including the header (second header) of the mdat box as transcoded data to the receiving device 220 is performed.

ステップS329において、送信装置210の中央処理部101は、記録媒体109に記録されているトランスコードされた動画データをすべて読み込み完了したか否かを判定する。すべて読み込み完了したと判定した場合、動画ファイルのトランスコードが完了してから動画ファイルのデータを送信するトランスコード送信処理を終了する。すべて読み込み完了していないと判定した場合、処理をステップS327に戻り、すべての動画データの読み込み、および送信処理が完了するまで、ステップS327S328の処理を繰り返す。   In step S329, the central processing unit 101 of the transmission device 210 determines whether or not reading of all the transcoded moving image data recorded on the recording medium 109 has been completed. If it is determined that the reading has been completed, the transcode transmission process for transmitting the data of the moving image file is completed after the transcoding of the moving image file is completed. If it is determined that the reading has not been completed, the process returns to step S327, and the processes of steps S327 and S328 are repeated until reading and transmission of all moving image data are completed.

次に、トランスコード送信ではなく、トランスコードせずに動画ファイルを送信する通常送信処理について説明する。   Next, a description will be given of a normal transmission process for transmitting a moving image file without transcoding, instead of transcoding transmission.

ステップS330において、送信装置210の中央処理部101は、記録媒体109に記録されている動画ファイルのヘッダ(ftypボックス、moovボックス)を主記憶部108に読み込む。   In step S330, the central processing unit 101 of the transmission device 210 reads the header (ftyp box, moov box) of the moving image file recorded on the recording medium 109 into the main storage unit 108.

ステップS331において、送信装置210の中央処理部101は、ステップS330で主記憶部108に読み込んだヘッダを、無線ネットワーク200を介して受信装置220に送信する。   In step S331, the central processing unit 101 of the transmitting device 210 transmits the header read into the main storage unit 108 in step S330 to the receiving device 220 via the wireless network 200.

ステップS332において、送信装置210の中央処理部101は、記録媒体109に記録されている動画ファイルの動画データ(mdatボックス)の一部を主記憶部108に読み込む。ここで、データの一部を読み込むのは、主記憶部108の動画ファイルを一度に読み込めるサイズに対して、記録媒体109に記録されている動画ファイルのサイズが大きい場合があるためである。   In step S332, the central processing unit 101 of the transmission device 210 reads a part of the moving image data (mdat box) of the moving image file recorded on the recording medium 109 into the main storage unit 108. Here, part of the data is read because the size of the moving image file recorded on the recording medium 109 may be larger than the size at which the moving image file in the main storage unit 108 can be read at one time.

ステップS333において、送信装置210の中央処理部101は、ステップS332で主記憶部108に読み込んだデータを、無線ネットワーク200を介して受信装置220に送信する。   In step S333, the central processing unit 101 of the transmitting device 210 transmits the data read into the main storage unit 108 in step S332 to the receiving device 220 via the wireless network 200.

ステップS334において、送信装置210の中央処理部101は、記録媒体109に記録されている送信する動画ファイルのデータをすべて読み込み完了したか否かを判定する。すべて読み込み完了したと判定した場合、通常送信処理を終了する。すべて読み込み完了していないと判定した場合、処理をステップS332に戻す。   In step S334, the central processing unit 101 of the transmission device 210 determines whether all the data of the moving image file to be transmitted recorded on the recording medium 109 has been read. If it is determined that the reading has been completed, the normal transmission process ends. If it is determined that the reading has not been completed, the process returns to step S332.

(動画ファイルの受信処理)
次に、図3のフローチャートのように送信装置210から送信される動画ファイルのデータを受信する際の受信装置220の受信処理について説明する。図4は、受信装置220が送信装置210から動画ファイルを受信する受信処理のフローチャートを示している。
(Video file reception processing)
Next, the receiving process of the receiving device 220 when receiving the data of the moving image file transmitted from the transmitting device 210 as in the flowchart of FIG. 3 will be described. FIG. 4 shows a flowchart of a receiving process in which the receiving device 220 receives a moving image file from the transmitting device 210.

ステップS401において、受信装置220の中央処理部101は、動画ファイルをトランスコードしながらデータを送信する送信処理により、送信装置210から動画ファイルのデータが送信されるか否かを判定する。具体的には、受信装置220の中央処理部101は、無線ネットワーク200を介して送信装置210から動画ファイルの送信を開始する通知と共に、トランスコードしながら動画ファイルが送信される通知があったかを判定する。トランスコードしながら送信する送信処理により動画ファイルのデータが送信される判定した場合、処理をステップS402に進める。トランスコードしながら送信される送信処理ではない送信処理により動画ファイルのデータが送信されると判定した場合、処理をステップS410に進める。なお、トランスコードしながら送信される送信処理ではない送信処理については、トランスコードを完了した後にトランスコード後の動画ファイルを送信する送信処理(S321〜S329)、トランスコードせずに動画ファイルを送信する通常送信処理(S330〜S334)がある。   In step S401, the central processing unit 101 of the receiving device 220 determines whether or not data of a moving image file is transmitted from the transmitting device 210 by a transmission process of transmitting data while transcoding the moving image file. Specifically, the central processing unit 101 of the receiving device 220 determines whether there has been a notification that the transmission of the moving image file is transmitted from the transmitting device 210 via the wireless network 200 and a notification that the moving image file is transmitted while being transcoded. I do. If it is determined that the data of the moving image file is transmitted by the transmission process of transmitting while transcoding, the process proceeds to step S402. If it is determined that the data of the moving image file is transmitted by a transmission process other than the transmission process of transmitting while transcoding, the process proceeds to step S410. In addition, regarding the transmission processing that is not the transmission processing that is transmitted while transcoding, the transmission processing (S321 to S329) in which the transcoded video file is transmitted after transcoding is completed, and the video file is transmitted without transcoding Normal transmission processing (S330 to S334).

ステップS402において、受信装置220の中央処理部101は、ステップS308の処理により送信装置210から送信される第3のヘッダのサイズを受信する。   In step S402, the central processing unit 101 of the receiving device 220 receives the size of the third header transmitted from the transmitting device 210 in the process of step S308.

ステップS403において、受信装置220の中央処理部101は、図6(a)のように、ステップS403で受信した第3のヘッダのサイズ分のダミーデータを、受信装置220の記録媒体109に記録する。図6(a)は、ステップS404において、受信装置220の中央処理部101が記録媒体109に記録するファイルを示している。このダミーデータのサイズはステップS403で受信した第3のヘッダのサイズと一致している。   In step S403, the central processing unit 101 of the receiving device 220 records the dummy data for the size of the third header received in step S403 on the recording medium 109 of the receiving device 220, as shown in FIG. . FIG. 6A shows a file that the central processing unit 101 of the receiving device 220 records on the recording medium 109 in step S404. The size of the dummy data matches the size of the third header received in step S403.

ステップS404において、受信装置220の中央処理部101は、ステップS311の処理により送信装置210から送信されたトランスコードされた動画データを受信し、受信装置220の主記憶部108に記録する。   In step S404, the central processing unit 101 of the receiving device 220 receives the transcoded moving image data transmitted from the transmitting device 210 by the process of step S311 and records the data in the main storage unit 108 of the receiving device 220.

ステップS405において、受信装置220の中央処理部101は、ステップS404で送信装置210から受信して受信装置220の主記憶部108に記録したトランスコードされた動画データを、受信装置220の記録媒体109に記録する。記録する際には、図6(b)に示すように、ステップS403で記録媒体109に記録したダミーデータに続けて、受信したトランスコードされた動画データを記録する。図6(b)は、ステップS405において、受信装置220の中央処理部101が記録媒体109に記録するファイルを示している。ダミーデータに続く領域にトランスコードされた動画データ_1が記録されている。   In step S405, the central processing unit 101 of the receiving device 220 transmits the transcoded moving image data received from the transmitting device 210 in step S404 and recorded in the main storage unit 108 of the receiving device 220 to the recording medium 109 of the receiving device 220. To record. At the time of recording, as shown in FIG. 6B, the received transcoded moving image data is recorded following the dummy data recorded on the recording medium 109 in step S403. FIG. 6B illustrates a file that the central processing unit 101 of the receiving device 220 records on the recording medium 109 in step S405. The transcoded moving image data_1 is recorded in an area following the dummy data.

ステップS406において、受信装置220の中央処理部101は、ステップS318の処理により送信装置210から送信されたヘッダの上書き指示を受信したか否かを判定する。受信したと判定した場合、処理をステップS408に進める。受信しなかったと判定した場合、処理をステップS405に戻り、ヘッダの上書き指示を受信するまで、つまり、トランスコードされた全ての動画データを受信するまでステップS404,S405の処理を繰り返す。図6(c)は、ステップS404,S405の処理を繰り返すことにより、受信装置220の中央処理部101が記録媒体109に記録するファイルを示している。受信したトランスコードされた動画データは、記録媒体109に記録したデータに続けて記録される。全てのトランスコードされた動画データの受信が完了すると、図6(c)のように、ダミーデータとトランスコードされた全ての動画データが受信順に連続して記録される。この時点では、第1のヘッダや第2のヘッダの代わりに、ダミーデータが記録されているため、ファイルとして読み取ることのできないデータが記録されていることになる。   In step S406, the central processing unit 101 of the receiving device 220 determines whether or not the header overwriting instruction transmitted from the transmitting device 210 by the process of step S318 has been received. If it is determined that it has been received, the process proceeds to step S408. If it is determined that it has not been received, the process returns to step S405, and the processes of steps S404 and S405 are repeated until a header overwrite instruction is received, that is, until all transcoded moving image data is received. FIG. 6C shows a file that the central processing unit 101 of the receiving device 220 records on the recording medium 109 by repeating the processing of steps S404 and S405. The received transcoded moving image data is recorded subsequent to the data recorded on the recording medium 109. When the reception of all the transcoded moving image data is completed, the dummy data and all the transcoded moving image data are sequentially recorded as shown in FIG. At this point, since the dummy data is recorded instead of the first header and the second header, data that cannot be read as a file is recorded.

ステップS407において、受信装置220の中央処理部101は、ステップS319の処理により送信装置210から送信される第3のヘッダを受信し、受信装置220の主記憶部108に記録する。   In step S407, the central processing unit 101 of the receiving device 220 receives the third header transmitted from the transmitting device 210 by the process of step S319, and records the third header in the main storage unit 108 of the receiving device 220.

ステップS408において、受信装置220の中央処理部101は、ステップS408で送信装置210から受信して受信装置220の主記憶部108に記録した第3のヘッダを、受信装置220の記録媒体109に記録する。受信した第3のヘッダを記録媒体109に記録する際には、図5(d―1)、(d−2)のように、ステップS403で記録したダミーデータの位置に上書きして記録する。   In step S408, the central processing unit 101 of the reception device 220 records the third header received from the transmission device 210 in step S408 and recorded in the main storage unit 108 of the reception device 220 in the recording medium 109 of the reception device 220. I do. When the received third header is recorded on the recording medium 109, as shown in FIGS. 5D-1 and 5D-2, the third header is overwritten and recorded on the position of the dummy data recorded in step S403.

図5(d−1)、(d−2)は、ステップS408において、受信装置220の中央処理部101が記録媒体109に記録するファイルを示している。図5(c)ではダミーデータだった領域を、図5(d−1)、(d−2)では受信した第3のヘッダで上書きしている。図5(d−1)は、パディングデータを含まない第3のヘッダを受信した場合に記録されるファイルを示しており、図5(d−2)は、パディングデータを含む第3のヘッダを受信した場合に記録されるファイルを示している。第3のヘッダには、第1のヘッダであるftypボックスおよびmoovボックスと、第2のヘッダであるmdatボックスのヘッダが含まれている。そのため、ダミーデータを第3のヘッダで上書きすることにより、記録媒体109に記録されたファイルは、図6(e)のように、ftypボックス、moovボックス、mdatボックスを有するMP4形式の動画ファイルの構造となる。   FIGS. 5D-1 and 5D-2 show files recorded on the recording medium 109 by the central processing unit 101 of the receiving device 220 in step S408. The area which was the dummy data in FIG. 5C is overwritten by the received third header in FIGS. 5D-1 and 5D-2. FIG. 5D-1 shows a file recorded when a third header not containing padding data is received. FIG. 5D-2 shows a file recorded with the third header containing padding data. This shows a file recorded when received. The third header includes an ftyp box and a moov box that are the first header, and a header of the mdat box that is the second header. Therefore, by overwriting the dummy data with the third header, the file recorded on the recording medium 109 becomes an MP4 format moving image file having an ftyp box, a moov box, and an mdat box as shown in FIG. Structure.

MP4形式の動画ファイルの構造とするためには、第2のヘッダ(mdatボックスのヘッダ)に続けてトランスコードされた動画データを記録する必要があるため、ステップS404では、ダミーデータに続けてトランスコードされた動画データを記録している。また、ダミーデータを第3のヘッダで上書きしたときに、第2のヘッダ(mdatボックスのヘッダ)とトランスコードされた動画データが連続するように、ステップS317の第3のヘッダの生成を行っている。つまり、送信装置210の中央処理部101は、第2のヘッダの後にパディングデータを追加するのではなく、第1のヘッダにパディングデータを追加し、パディングデータが追加された第1のヘッダと第2のヘッダを結合して第3のヘッダを生成している。   In order to have the structure of the MP4 format moving image file, it is necessary to record the transcoded moving image data following the second header (header of the mdat box). Records coded video data. Further, when the dummy data is overwritten by the third header, the third header is generated in step S317 so that the second header (header of the mdat box) and the transcoded moving image data are continuous. I have. That is, instead of adding padding data after the second header, the central processing unit 101 of the transmitting device 210 adds padding data to the first header, and adds the first header to which the padding data has been added to the first header. The second header is combined to generate a third header.

次に、トランスコードしながら送信される送信処理ではない送信処理で送信装置210から送信される動画ファイルを受信する場合について説明する。   Next, a case will be described in which a moving image file transmitted from the transmission device 210 is received in a transmission process other than the transmission process transmitted while transcoding.

ステップS410において、受信装置220の中央処理部101は、ステップS326またはS331の処理により送信装置210から送信される動画ファイルのヘッダ(ftypボックス、moovボックス)を受信し、受信装置220の主記憶部108に記録する。   In step S410, the central processing unit 101 of the reception device 220 receives the header (ftyp box, moov box) of the moving image file transmitted from the transmission device 210 by the processing of step S326 or S331, and the main storage unit of the reception device 220. Record at 108.

ステップS411において、受信装置220の中央処理部101は、ステップS410で送信装置210から受信して受信装置220の主記憶部108に記録した動画ファイルのヘッダを、受信装置220の記録媒体109に記録する。   In step S411, the central processing unit 101 of the receiving device 220 records the header of the moving image file received from the transmitting device 210 in step S410 and recorded in the main storage unit 108 of the receiving device 220 on the recording medium 109 of the receiving device 220. I do.

ステップS412において、受信装置220の中央処理部101は、ステップS328またはS333の処理により送信装置210から送信されるデータ(mdatボックス)を受信し、受信装置220の主記憶部108に記録する。   In step S412, the central processing unit 101 of the receiving device 220 receives the data (mdat box) transmitted from the transmitting device 210 by the processing of step S328 or S333, and records the data in the main storage unit 108 of the receiving device 220.

ステップS413において、受信装置220の中央処理部101は、ステップS412で送信装置210から受信し受信装置220の主記憶部108に記録したデータを、受信装置220の記録媒体109に記録する。受信したデータは、ステップS411で記録したヘッダに続けて記録する。   In step S413, the central processing unit 101 of the reception device 220 records the data received from the transmission device 210 in step S412 and recorded in the main storage unit 108 of the reception device 220 on the recording medium 109 of the reception device 220. The received data is recorded following the header recorded in step S411.

ステップS414において、受信装置220の中央処理部101は、全てのデータを受信完了したか否かの判定を行う。全てのデータを受信完了したと判定した場合、処理を終了する。全てのデータを受信完了していないと判定した場合は、ステップに戻り、全てのデータの受信が完了するまでS411、S412の処理を繰り返す。   In step S414, the central processing unit 101 of the receiving device 220 determines whether reception of all data has been completed. If it is determined that reception of all data has been completed, the process ends. If it is determined that the reception of all data has not been completed, the process returns to the step, and the processing of S411 and S412 is repeated until the reception of all data is completed.

このように、トランスコード後の動画ファイルを送信する送信処理または通常送信処理の場合のステップS410〜S414の処理においては、受信した動画ファイルのヘッダ、動画データを、受信した順で受信装置220の記録媒体109に記録する。トランスコード後の動画ファイルを送信する送信処理の場合は、トランスコード後の動画データの動画ファイルのヘッダ、トランスコード後の動画データを順に受信し、受信した順で受信装置220の記録媒体109の連続する領域に順次記録することになる。通常送信処理の場合は、送信対象の動画ファイルのヘッダ、送信対象の動画ファイルの動画データを順に受信し、受信した順で受信装置220の記録媒体109の連続する領域に記録することになる。   As described above, in the transmission processing of transmitting the transcoded moving image file or the processing of steps S410 to S414 in the case of the normal transmission processing, the header of the received moving image file and the moving image data are transmitted to the receiving device 220 in the order received. The information is recorded on the recording medium 109. In the case of the transmission process of transmitting the transcoded video file, the header of the video file of the transcoded video data and the transcoded video data are sequentially received, and the recording medium 109 of the receiving device 220 is received in the received order. Recording is sequentially performed in a continuous area. In the case of the normal transmission processing, the header of the transmission target moving image file and the moving image data of the transmission target moving image file are sequentially received, and are recorded in a continuous area of the recording medium 109 of the receiving device 220 in the order of reception.

以上説明したように本実施形態によれば、トランスコードを行いながら動画ファイルの送信を行うトランスコード送信処理においては、送信装置において動画ファイルのトランスコード処理が完了する前に、動画ファイルのデータの送信を開始する。第1のヘッダ、第2のヘッダは、動画ファイルにおいて動画データよりも前に格納されるが、動画データのトランスコード処理を完了しないとトランスコード後の第1のヘッダ、第2のヘッダを生成することができない。そこで、本実施形態では、第1のヘッダおよび第2のヘッダから構成される第3のヘッダのヘッダサイズを推定して受信装置220に送信し、トランスコード後に、第3のヘッダを送信している。これにより、受信装置220は、第3のヘッダの記録領域を確保し、確保した領域に続けてトランスコードされた動画データを記録した後、確保した領域に第3のヘッダを記録するため、ファイルの結合処理を行うことなく、動画ファイルを記録することができる。   As described above, according to the present embodiment, in the transcode transmission process of transmitting a moving image file while performing transcoding, the data of the moving image file is transmitted before the transcoding process of the moving image file is completed in the transmitting device. Start sending. The first header and the second header are stored before the moving image data in the moving image file, but if the transcoding process of the moving image data is not completed, the first header and the second header after the transcoding are generated. Can not do it. Thus, in the present embodiment, the header size of the third header composed of the first header and the second header is estimated and transmitted to the receiving device 220, and after transcoding, the third header is transmitted. I have. As a result, the receiving apparatus 220 secures a recording area for the third header, records the transcoded moving image data following the secured area, and then records the third header in the secured area. A moving image file can be recorded without performing the combining process.

上述の実施形態において、ステップS308で送信装置210は第3のヘッダのサイズを送信し、ステップS403で受信装置220は受信したサイズに応じたダミーヘッダを受信装置220の記録媒体109に記録するものとした。しかし、ステップS308において送信装置210は、第3のヘッダのサイズを送信せずに、第3のヘッダサイズのダミーデータを送信し、受信装置220は、受信したダミーデータを記録するようにしてもよい。また、第3のヘッダは、第1のヘッダと第2のヘッダとで構成されるが、第2のヘッダのサイズは固定である。そのため、第3のヘッダサイズではなく、推定した第1のヘッダサイズを送信し、受信装置側で、受信した第1のヘッダサイズに第2のヘッダサイズを加算して第3のヘッダのサイズを求めるようにしてもよい。   In the above embodiment, the transmitting device 210 transmits the size of the third header in step S308, and the receiving device 220 records a dummy header corresponding to the received size on the recording medium 109 of the receiving device 220 in step S403. And However, in step S308, the transmitting apparatus 210 transmits the third header size dummy data without transmitting the third header size, and the receiving apparatus 220 may record the received dummy data. Good. The third header includes a first header and a second header, but the size of the second header is fixed. Therefore, the estimated first header size is transmitted instead of the third header size, and the receiving device adds the second header size to the received first header size to reduce the size of the third header. You may ask for it.

上述の実施形態において、動画データのトランスコード処理を開始する前に、ステップS308で送信装置210は第3のヘッダサイズを送信する構成とした。しかし、第3のヘッダサイズを送信する前に、動画データのトランスコード処理を開始してもよい。ただし、第3のヘッダサイズの送信処理は、動画データのトランスコード処理の完了前であって、トランスコードされた動画データの受信装置への送信を開始する前に行う。   In the above-described embodiment, the transmission device 210 transmits the third header size in step S308 before starting the transcoding process of the moving image data. However, the transcoding process of the moving image data may be started before transmitting the third header size. However, the transmission processing of the third header size is performed before the completion of the transcoding processing of the moving image data and before the transmission of the transcoded moving image data to the receiving device is started.

上述の実施形態においては、第1のヘッダは、ftypボックスおよびmoovボックスとから構成されるものとした。しかし、ftypボックスは、動画データのトランスコード処理の完了前にも生成可能であるため、第1のヘッダはmoovボックスのみであってもよい。この場合、送信装置210は、ftypボックスを受信装置220に送信し、ftypボックスの送信後、第1のヘッダと第2のヘッダから構成される第3のヘッダのサイズを送信する。そして、受信装置は、受信したftypボックスを受信装置220の記録媒体109に記録し、その後、受信した第3のヘッダサイズと同じサイズのダミーデータを、ftypボックスに続けて記録するようにする。そして、動画データのトランスコード後に、送信装置210は、第1のヘッダ、第2のヘッダを生成して第3のヘッダとして受信装置220に送信し、受信装置220は、受信した第3のヘッダをダミーデータを記録した領域に上書き記録する。   In the above-described embodiment, the first header is composed of the ftyp box and the moov box. However, since the ftyp box can be generated even before the completion of the transcoding process of the moving image data, the first header may be only the moov box. In this case, the transmitting device 210 transmits the ftyp box to the receiving device 220, and after transmitting the ftyp box, transmits the size of the third header including the first header and the second header. Then, the receiving device records the received ftyp box on the recording medium 109 of the receiving device 220, and thereafter records the received dummy data having the same size as the third header size in the ftyp box. Then, after transcoding the moving image data, the transmitting device 210 generates a first header and a second header and transmits the first header and the second header to the receiving device 220 as a third header, and the receiving device 220 Over the area where the dummy data is recorded.

上述の実施形態において、動画ファイルは、ftypボックス、moovボックス、mdatボックスを有する構成とした。しかし、mdatボックスの後に、動画データ以外の、例えば、動画データを撮影した際の各種検出結果等を格納する追加のボックスを有する場合にも本発明は適応可能である。追加のボックスを有する動画ファイルにおいてトランスコードしながらの送信処理を行う場合、mdatボックスに格納されている動画データをトランスコードして送信装置210から受信装置220に送信した後に、追加のボックスを送信するようにする。追加のボックスのデータはトランスコートせずにそのまま送信する。そしてその後、S313以降のヘッダの生成および送信処理を行いようにするとよい。受信装置220においては、mdatボックスのデータとしてトランスコード済みの動画データを記録媒体109に記録した後、その後に受信した追加のボックスを、記録媒体109のmdatボックスに続く領域に記録する。その後、S406でヘッダの上書き指示を受信したら、S407以降の処理を実施する。   In the above embodiment, the moving image file has an ftype box, a moov box, and an mdat box. However, the present invention is also applicable to a case where an additional box other than the moving image data, for example, for storing various detection results when the moving image data is captured, is provided after the mdat box. When performing a transmission process while transcoding a moving image file having an additional box, the additional box is transmitted after the moving image data stored in the mdat box is transcoded and transmitted from the transmitting device 210 to the receiving device 220. To do. The data in the additional box is transmitted without transcoding. Then, it is preferable to perform the generation and transmission processing of the header after S313. In the receiving device 220, after the transcoded moving image data is recorded on the recording medium 109 as the data of the mdat box, the additional box received thereafter is recorded in the area of the recording medium 109 following the mdat box. After that, when a header overwrite instruction is received in S406, the processing in S407 and thereafter is performed.

上述の実施形態において、動画ファイル内の各ボックスの構造は、最初の4Byteがボックスのサイズ、次の4Byteがボックスのタイプ、その後にボックスのデータを格納するものとした。しかし、この場合、サイズのデータを4byteで記載しなければならないため、ボックスサイズとして4GByteまでしか表現できなくなってしまう。それに対し、動画データを格納するmdatボックスについては、4GByteを超える場合もある。4GByte以上のデータをmdatボックスに格納するため、mdatボックスの最初の4Bypteに拡張フラグを格納し、その後の4Bypeにタイプ、その後の8Byteにボックスのサイズを格納して、その後にmdatボックスのデータを格納する方法がある。この方法で生成された動画ファイルについては、mdatボックスの最初の16Bype、つまり、拡張フラグが格納されるサイズ格納領域(4Byte)、タイプ格納領域(4Byte)、ボックスの実際のサイズが格納される拡張機能におけるサイズ格納領域(8Byte)を、第2のヘッダとする。   In the above-described embodiment, the structure of each box in the moving image file is such that the first 4 bytes store the size of the box, the next 4 bytes store the type of the box, and the box data thereafter. However, in this case, the size data must be described in 4 bytes, so that the size of the box can be expressed only up to 4 Gbytes. On the other hand, the mdat box for storing moving image data may exceed 4 Gbytes. In order to store data of 4 GB or more in the mdat box, the extension flag is stored in the first 4 Bytes of the mdat box, the type is stored in the subsequent 4 Bytes, the size of the box is stored in the subsequent 8 Bytes, and then the data in the mdat box is stored. There is a way to store. For the moving image file generated by this method, the first 16 bytes of the mdat box, that is, the size storage area (4 bytes) for storing the extension flag, the type storage area (4 bytes), and the extension for storing the actual size of the box The size storage area (8 bytes) in the function is used as a second header.

(他の実施形態)
以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。上述の実施形態の一部を適宜組み合わせてもよい。
(Other embodiments)
As described above, the present invention has been described in detail based on the preferred embodiments. However, the present invention is not limited to these specific embodiments, and various forms that do not depart from the gist of the present invention are also included in the present invention. included. A part of the above-described embodiments may be appropriately combined.

また、本発明の目的は、以下の処理を実行することによっても達成される。即ち、上述の実施形態の機能を実現するソフトウェアのプログラムを、不揮発性記録媒体から直接、または、通信を用いてプログラムを実行可能な1つ以上コンピュータを有するシステム又は装置に供給し、そのプログラムを実行する場合も本発明に含む。また、本発明の機能処理をコンピュータで実現するために、該コンピュータに供給、インストールされるプログラムコード自体も本発明を実現するものである。   The object of the present invention is also achieved by executing the following processing. That is, a software program for realizing the functions of the above-described embodiments is supplied to a system or an apparatus having one or more computers capable of executing the program directly from a non-volatile recording medium or using communication, and the program is executed. The present invention includes the case of executing. In addition, since the functions of the present invention are implemented by computer, the program code supplied and installed in the computer also implements the present invention.

101 中央処理部
102 撮影レンズ
103 撮像部
104 表示部
105 操作部
106 画像処理部
107 不揮発性メモリ
108 主記憶部
109 記録媒体
110 通信インターフェース
111 無線通信用アンテナ
Reference Signs List 101 Central processing unit 102 Imaging lens 103 Imaging unit 104 Display unit 105 Operation unit 106 Image processing unit 107 Non-volatile memory 108 Main storage unit 109 Recording medium 110 Communication interface 111 Wireless communication antenna

Claims (19)

動画ファイルのデータを外部装置に送信する送信装置であって、
動画ファイルの動画データを変換する変換手段と、
前記変換手段により変換された動画データの動画ファイルを前記外部装置に送信するための制御を行う制御手段と、を有し、
前記制御手段は、
前記変換手段により前記動画データの変換を完了する前に、前記変換手段により変換された動画データの第1のヘッダのサイズを推定し、前記推定した第1のヘッダのサイズに応じたデータを前記外部装置に送信するように制御する第1の制御手段と、
前記第1のヘッダのサイズに応じたデータの送信後、前記変換手段により変換された動画データを前記外部装置に送信するように制御する第2の制御手段と、
前記変換された動画データの送信後、当該変換された動画データに対応する第1のヘッダを生成し、前記生成した第1のヘッダを前記外部装置に送信するように制御する第3の制御手段と、
を有することを特徴とする送信装置。
A transmission device for transmitting data of a video file to an external device,
Conversion means for converting the video data of the video file;
Control means for performing control for transmitting a moving image file of the moving image data converted by the converting means to the external device,
The control means includes:
Before the conversion of the moving image data by the conversion unit is completed, the size of the first header of the moving image data converted by the conversion unit is estimated, and data corresponding to the estimated first header size is converted to the data. First control means for controlling transmission to an external device;
A second control unit that controls transmission of the moving image data converted by the conversion unit to the external device after transmission of data according to the size of the first header;
After transmitting the converted moving image data, a third control unit that generates a first header corresponding to the converted moving image data and controls the generated first header to be transmitted to the external device. When,
A transmission device comprising:
前記第1の制御手段は、前記推定した第1のヘッダのサイズに応じたヘッダサイズの情報を前記外部装置に送信するように制御することを特徴とする請求項1に記載の送信装置。   The transmitting apparatus according to claim 1, wherein the first control means controls to transmit information of a header size corresponding to the estimated first header size to the external device. 前記第1の制御手段は、前記推定した第1のヘッダのサイズに応じたダミーデータを前記外部装置に送信するように制御することを特徴とする請求項1に記載の送信装置。   The transmitting apparatus according to claim 1, wherein the first control means controls to transmit dummy data corresponding to the estimated size of the first header to the external device. 前記第3の制御手段は、前記変換された動画データに対応する前記第1のヘッダ及び第2のヘッダを生成し、前記生成した前記第1のヘッダ及び前記第2のヘッダを前記外部装置に送信するように制御することを特徴とする請求項1に記載の送信装置。   The third control means generates the first header and the second header corresponding to the converted moving image data, and sends the generated first header and the second header to the external device. The transmitting device according to claim 1, wherein the transmitting device is controlled to transmit. 前記第3の制御手段は、前記生成した前記第1のヘッダの後に前記第2のヘッダを連結した第3のヘッダを、前記外部装置に送信するように制御することを特徴とする請求項1に記載の送信装置。   2. The control device according to claim 1, wherein the third control unit controls the external device to transmit a third header obtained by connecting the second header after the generated first header. 3. The transmitting device according to claim 1. 前記第1の制御手段は、前記第1のヘッダと第2のヘッダとを含むヘッダのサイズに対応するデータを前記外部装置に送信するように制御することを特徴とする請求項4に記載の送信装置。   5. The apparatus according to claim 4, wherein the first control unit controls to transmit data corresponding to a header size including the first header and the second header to the external device. 6. Transmission device. 前記第1の制御手段は、前記変換手段により動画データを変換する際の変換形式と、変換前の動画データのサイズとに応じて、前記第1のヘッダのサイズを推定することを特徴とする請求項1に記載の送信装置。   The first control unit estimates the size of the first header according to a conversion format when converting the moving image data by the conversion unit and a size of the moving image data before conversion. The transmission device according to claim 1. 前記変換手段は、動画ファイルに含まれる動画データの、圧縮形式、解像度、ビットレート、フレームレートのうちの少なくともいずれか1つを変換することを特徴とする請求項1に記載の送信装置。   The transmission device according to claim 1, wherein the conversion unit converts at least one of a compression format, a resolution, a bit rate, and a frame rate of the moving image data included in the moving image file. 前記第1の制御手段により推定した前記第1のヘッダのサイズが、前記第3の制御手段により生成した前記第1のヘッダのサイズよりも大きい場合には、前記第3の制御手段は、前記第1のヘッダにパディングデータを追加して前記外部装置に送信するように制御することを特徴とする請求項1に記載の送信装置。   When the size of the first header estimated by the first control means is larger than the size of the first header generated by the third control means, the third control means The transmitting apparatus according to claim 1, wherein padding data is added to the first header to control transmission to the external apparatus. 前記第3の制御手段は、前記パディングデータを追加した前記第1のヘッダと前記第2のヘッダとを連結した第3のヘッダを前記外部装置に送信するように制御することを特徴とする請求項4及び9に記載の送信装置。   The third control means controls so as to transmit to the external device a third header obtained by connecting the first header to which the padding data is added and the second header. Item 10. The transmitting device according to any one of Items 4 and 9. 前記第1のヘッダは、動画ファイルのヘッダであり、
前記第2のヘッダは、動画データのヘッダである、ことを特徴とする請求項4に記載の送信装置。
The first header is a video file header,
The transmission device according to claim 4, wherein the second header is a header of moving image data.
前記動画ファイルは、ftypボックス、メタ情報を格納するmoovボックス、動画データを格納するmdatボックスで構成され、
前記第1のヘッダは、ftypボックスおよびmoovボックス、または、moovボックスであり、
前記第2のヘッダは、mdatボックスのヘッダであることを特徴とする請求項4に記載の送信装置。
The moving image file includes an ftype box, a moov box for storing meta information, and an mdat box for storing moving image data.
The first header is an ftyp box and a moov box, or a moov box;
The transmission device according to claim 4, wherein the second header is a header of an mdat box.
前記変換手段により変換された動画データを変換した後に、変換後の動画データに対応するヘッダおよび変換後の動画データを、前記外部装置に送信するように制御する第4の制御手段と、を有し、
第1の送信処理により動画ファイルを送信する場合は、前記第1の制御手段、前記第2の制御手段、及び、前記第3の制御手段の制御により、動画ファイルのデータを前記外部機器に送信するように制御し、第2の送信処理により動画ファイルを送信する場合は、前記第4の制御手段の制御により、動画ファイルのデータを前記外部機器に送信するように制御することを特徴とする請求項1に記載の送信装置。
After converting the moving image data converted by the converting unit, a fourth control unit controls the header corresponding to the converted moving image data and the converted moving image data to be transmitted to the external device. And
When transmitting the moving image file by the first transmission processing, the data of the moving image file is transmitted to the external device under the control of the first control means, the second control means, and the third control means. And transmitting the moving image file by the second transmission process, wherein the control of the fourth control means controls to transmit the data of the moving image file to the external device. The transmission device according to claim 1.
前記第2の制御手段は、全ての動画データの変換が完了する前に、前記変換手段により変換された一部の動画データの送信を開始することを特徴とする請求項1に記載の送信装置。   2. The transmitting apparatus according to claim 1, wherein the second control unit starts transmission of a part of the moving image data converted by the converting unit before conversion of all the moving image data is completed. . 外部装置から受信したデータを、記録媒体に記録する受信装置であって、
第1の送信処理で前記外部装置から送信される動画ファイルのデータを受信する場合は、前記動画データのヘッダサイズに関するデータを受信したことに応じて、前記受信したデータに対応するサイズ分のダミーデータを前記記録媒体に記録し、その後、受信した動画データを前記記録媒体の前記ダミーデータに続く領域に記録し、その後、受信したヘッダを前記ダミーデータに上書きして記録するように制御する第1の制御手段と、
第2の送信処理で前記外部装置から送信される動画ファイルのデータを受信する場合は、前記外部装置から受信したデータを、前記記録媒体に順次記録するように制御する第2の制御手段と、
を有することを特徴とする受信装置。
A receiving device that records data received from an external device on a recording medium,
When receiving data of a moving image file transmitted from the external device in the first transmission processing, in response to receiving data relating to a header size of the moving image data, a dummy corresponding to the size of the received data is received. Recording data on the recording medium, thereafter recording the received moving image data in an area following the dummy data on the recording medium, and then controlling to overwrite and record the received header over the dummy data. 1 control means;
When receiving data of a moving image file transmitted from the external device in the second transmission process, a second control unit that controls the data received from the external device to be sequentially recorded on the recording medium,
A receiving device comprising:
前記変換手段により変換された動画データの動画ファイルを外部装置に送信するための送信装置の制御方法であって、
前記変換手段により前記動画データの変換を完了する前に、前記変換手段により変換された動画データの第1のヘッダのサイズを推定し、前記推定した第1のヘッダのサイズに応じたデータを前記外部装置に送信するように制御する第1の制御工程と、
前記第1のヘッダのサイズに応じたデータの送信後、前記変換手段により変換された動画データを前記外部装置に送信するように制御する第2の制御工程と、
前記変換された動画データの送信後、当該変換された動画データに対応する第1のヘッダを生成し、前記生成した第1のヘッダを前記外部装置に送信するように制御する第3の制御工程と、
を有することを特徴とする送信装置制御方法。
A control method of a transmission device for transmitting a moving image file of moving image data converted by the conversion unit to an external device,
Before the conversion of the moving image data by the conversion unit is completed, the size of the first header of the moving image data converted by the conversion unit is estimated, and data corresponding to the estimated first header size is converted to the data. A first control step of controlling transmission to an external device;
A second control step of controlling to transmit the moving image data converted by the conversion unit to the external device after transmitting the data according to the size of the first header;
A third control step of generating a first header corresponding to the converted moving image data after transmitting the converted moving image data, and controlling transmission of the generated first header to the external device; When,
A transmission device control method, comprising:
外部装置から動画ファイルを受信する受信装置の制御方法であって、
第1の送信処理で前記外部装置から送信される動画ファイルのデータを受信する場合は、前記動画データのヘッダサイズに関するデータを受信したことに応じて、前記受信したデータに対応するサイズ分のダミーデータを前記記録媒体に記録し、その後、受信した動画データを前記記録媒体の前記ダミーデータに続く領域に記録し、その後、受信したヘッダを前記ダミーデータに上書きして記録するように制御する第1の制御工程と、
第2の送信処理で前記外部装置から送信される動画ファイルのデータを受信する場合は、前記外部装置から受信したデータを、前記記録媒体に順次記録するように制御する第2の制御工程と、
を有することを特徴とする受信装置の制御方法。
A method for controlling a receiving device that receives a moving image file from an external device,
When receiving data of a moving image file transmitted from the external device in the first transmission processing, in response to receiving data relating to a header size of the moving image data, a dummy corresponding to the size of the received data is received. Recording data on the recording medium, thereafter recording the received moving image data in an area following the dummy data on the recording medium, and then controlling to overwrite and record the received header over the dummy data. 1 control process;
When receiving data of a moving image file transmitted from the external device in the second transmission process, a second control step of controlling to sequentially record the data received from the external device on the recording medium,
A method for controlling a receiving device, comprising:
コンピュータを請求項1ないし14のいずれか1項に記載の送信装置の各手段として機能させるためのプログラム。   A program for causing a computer to function as each unit of the transmission device according to any one of claims 1 to 14. コンピュータを請求項15に記載の受信装置の各手段として機能させるためのプログラム。   A program for causing a computer to function as each unit of the receiving device according to claim 15.
JP2018125518A 2018-06-29 2018-06-29 Transmitter, receiver, control method of transmitter, control method of receiver, and program Pending JP2020005213A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018125518A JP2020005213A (en) 2018-06-29 2018-06-29 Transmitter, receiver, control method of transmitter, control method of receiver, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018125518A JP2020005213A (en) 2018-06-29 2018-06-29 Transmitter, receiver, control method of transmitter, control method of receiver, and program

Publications (1)

Publication Number Publication Date
JP2020005213A true JP2020005213A (en) 2020-01-09

Family

ID=69100671

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018125518A Pending JP2020005213A (en) 2018-06-29 2018-06-29 Transmitter, receiver, control method of transmitter, control method of receiver, and program

Country Status (1)

Country Link
JP (1) JP2020005213A (en)

Similar Documents

Publication Publication Date Title
US7107607B2 (en) Image data communication system and method thereof, and image pickup apparatus and image data processing method
JP2006325150A (en) Method, system and apparatus for imaging
JP2016053827A (en) Communication device, control method of communication device, and program
JP6385429B2 (en) Method and apparatus for reproducing stream media data
JP2017501598A5 (en)
US9462216B2 (en) Recording apparatus, image capture apparatus, and recording method for recording position information in one time interval irrespective of position information in another time interval
JP5605608B2 (en) Transmission apparatus and method, and program
US11017817B2 (en) Image processing apparatus, image processing method, camera apparatus, remote control apparatus, and camera system
JP2009027647A (en) Captured image recording system, photographic device, captured image recording method
JP2009171060A (en) Image processing device and its control method
JP6467395B2 (en) Image transmitting apparatus, image receiving apparatus, control method therefor, and image communication system
JP4399121B2 (en) Imaging system
US9307113B2 (en) Display control apparatus and control method thereof
JP5990055B2 (en) Imaging apparatus and control method thereof
JP2020005213A (en) Transmitter, receiver, control method of transmitter, control method of receiver, and program
JP6719932B2 (en) Information setting device, information management device, information generating device, control method thereof, and program
JP2009265850A (en) Data transfer method, data transmission device, data reception device, and computer program
US9967408B2 (en) Information setting apparatus, information management apparatus, information generation apparatus, and method and program for controlling the same
JP6524865B2 (en) CONTENT MANAGEMENT DEVICE, CONTENT MANAGEMENT METHOD, AND CONTENT MANAGEMENT PROGRAM
JP3988075B2 (en) Image transmission equipment
KR101053045B1 (en) System for feeding information to image and method thereof
JP4202546B2 (en) Imaging apparatus and method
JP2011204101A (en) Server device
JP2004228991A (en) Digital camera
JP2010233165A (en) Image reproducing apparatus and imaging apparatus with the same