KR20200061559A - Method and system for additional data insertion between chunk - Google Patents

Method and system for additional data insertion between chunk Download PDF

Info

Publication number
KR20200061559A
KR20200061559A KR1020180146997A KR20180146997A KR20200061559A KR 20200061559 A KR20200061559 A KR 20200061559A KR 1020180146997 A KR1020180146997 A KR 1020180146997A KR 20180146997 A KR20180146997 A KR 20180146997A KR 20200061559 A KR20200061559 A KR 20200061559A
Authority
KR
South Korea
Prior art keywords
additional data
chunk
video file
data
video
Prior art date
Application number
KR1020180146997A
Other languages
Korean (ko)
Inventor
양창모
송재종
김동칠
Original Assignee
전자부품연구원
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 전자부품연구원 filed Critical 전자부품연구원
Priority to KR1020180146997A priority Critical patent/KR20200061559A/en
Publication of KR20200061559A publication Critical patent/KR20200061559A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/236Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
    • H04N21/23614Multiplexing of additional data and video streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present invention relates to a method for inserting additional data to a video file. According to the present invention, the method for inserting additional data to a video file comprises: a step of analyzing a structure of a video file; a step of inserting at least a part of additional data between chunks; a step of modifying size information of media data of the video file; and a step of modifying chunk position information of the video file. The step of inserting additional data comprises the steps of reading a chunk based on the position and size information of the chunk, and inserting additional data after the read chunk, wherein other additional data is inserted after the next chunk of the chunk when there is other additional data and repeatedly perform the process until there is no additional data to be inserted or there is no free space between chunks.

Description

MPEG-4 표준 규격 동영상에서의 청크 간 부가데이터 삽입 방법{Method and system for additional data insertion between chunk}{Method and system for additional data insertion between chunk} in MPEG-4 standard video

본 발명은 동영상의 재생에는 영향을 미치지 않으면서도 사용자가 원하는 부가데이터들을 동영상 파일(예컨대, MPEG-4 표준 규격 동영상 파일)에 삽입하는 방법에 관한 것으로서, 더 구체적으로는 동영상 재생에 영향을 주지 않으면서도 보다 많은 양의 부가데이터를 동영상 파일에 삽입할 수 있는 방법 및 시스템에 관한 것이다. The present invention relates to a method of inserting additional data desired by a user into a video file (eg, MPEG-4 standard video file) without affecting the video playback, and more specifically, if it does not affect video playback It also relates to a method and system for inserting a larger amount of additional data into a video file.

최근, 동영상 파일에 관하여, 프레임 단위의 위변조 방지 데이터, 프레임 단위의 특징 데이터, 업체의 사용자 데이터 등과 같은 다양한 형태의 부가데이터를 생성하고 이를 저장하는 방법들이 연구되고 있다. Recently, with respect to a video file, methods for generating and storing various types of additional data such as frame-based forgery prevention data, frame-based feature data, and company user data have been studied.

종래에는 이러한 부가데이터들을 동영상과는 별개의 메타데이터로 생성한 후, 동영상과 메타데이터를 별개의 파일로 저장 및 관리하는 방법들이 주로 사용되었다. 그러나 이러한 방법은 파일 관리의 어려움에 따른 비용 증가의 원인이 되는 한편, 동영상이나 메타데이터의 전송시에 데이터 누락이나 잘림 현상에 취약하다는 단점을 가질 수 밖에 없다.In the related art, after generating these additional data as metadata separate from a video, methods for storing and managing the video and metadata as separate files have been mainly used. However, this method has a disadvantage of being vulnerable to data omission or truncation when transferring video or metadata while causing a cost increase due to difficulty in file management.

또한, 종래의 기술 중에는 MPEG-4 동영상 표준에서 정의한 파일 포맷 중 사용자 데이터를 추가할 수 있는 공간에 부가데이터를 삽입하거나 파일 헤더의 뒤 공간에 부가데이터를 삽입하는 방법이 일부 사용되었으나, 이러한 방법들은 큰 크기의 부가데이터를 삽입하기에 적절하지 않을 뿐만 아니라 동영상 데이터의 잘림 현상 등이 발생하였을 때 부가데이터 전체를 손실할 수 있는 단점을 가진다. In addition, in the prior art, among the file formats defined in the MPEG-4 video standard, a method of inserting additional data in a space to which user data can be added or inserting additional data in a space behind the file header was partially used, but these methods are Not only is it not suitable for inserting large sized additional data, but also has the disadvantage that the entire additional data can be lost when a truncation of video data occurs.

본 발명은, 동영상 재생에 영향을 주지 않는, 부가데이터를 동영상 파일에 삽입할 수 있는 방법 및 시스템을 제공하고자 한다.The present invention is to provide a method and system for inserting additional data into a video file that does not affect video playback.

또한, 다양한 및/또는 다량의 부가데이터를 삽입하면서도 파일 관리가 용이한 부가데이터 삽입 방법 및 시스템을 제공하는 것을 다른 목적으로 한다. Another object is to provide a method and system for inserting additional data that is easy to manage files while inserting various and/or large amounts of additional data.

전술한 목적을 이루고자, 본 발명에 따른 동영상 파일에 부가데이터를 삽입하는 방법은, 동영상 파일의 구조를 분석하는 단계와, 부가데이터의 적어도 일부를 상기 각 청크 사이에 삽입하는 단계와, 상기 동영상 파일의 미디어 데이터의 크기 정보를 수정하는 단계와, 상기 동영상 파일의 청크 위치정보를 수정하는 단계를 포함한다. To achieve the above object, a method of inserting additional data into a video file according to the present invention includes analyzing a structure of a video file, inserting at least a portion of the additional data between the chunks, and the video file And modifying the size information of the media data and modifying the chunk location information of the video file.

부가데이터의 삽입은 청크의 위치와 크기 정보를 토대로 청크를 독출하는 단계와, 독출된 상기 청크 뒤에 부가데이터를 삽입하는 단계를 포함하되, 삽입할 다른 부가데이터가 또 있으면, 상기 청크의 다음 청크 뒤에 상기 다른 부가데이터를 삽입하며, 전술한 과정을 더 이상 삽입할 부가데이터가 없거나 청크 간의 여유 공간이 없을 때까지 반복하여 수행하여 이루어진다.Insertion of additional data includes reading a chunk based on the location and size information of the chunk, and inserting additional data after the read chunk, but if there is another additional data to be inserted, the next chunk of the chunk is inserted. The other additional data is inserted later, and the above-described process is repeatedly performed until there is no additional data to be inserted or there is no free space between chunks.

본 발명에 따른 동영상 파일에 부가데이터를 부가하는 시스템은, 하나 이상의 동영상 파일을 저장하는 동영상 저장부와, 상기 동영상 파일 중 부가데이터를 삽입할 동영상 파일의 구조를 분석하는 분석부와, 상기 분석부의 분석결과에 기초하여 부가데이터를 삽입하는 부가데이터 삽입부와, 상기 동영상 파일의 메타데이터를 수정하는 메타데이터 수정부를 포함한다.The system for adding additional data to a video file according to the present invention includes a video storage unit for storing one or more video files, an analysis unit for analyzing a structure of a video file to insert additional data among the video files, and the analysis unit And an additional data inserting unit for inserting additional data based on the analysis result and a metadata correcting unit for correcting metadata of the video file.

본 발명에 따르면, MPEG-4 동영상의 재생에는 영향을 미치지 않으면서도 다양한, 그리도 다량의 부가데이터 삽입할 수 있다. According to the present invention, various and even large amounts of additional data can be inserted without affecting the reproduction of the MPEG-4 video.

또한, 동영상과 부가데이터를 하나의 파일로 관리할 수 있는 장점을 가지므로, 동영상과 부가데이터를 별도의 파일로 관리하는 방법과 비교하여 파일 관리의 효율성이 증가한다.In addition, since it has the advantage of managing video and additional data as a single file, the efficiency of file management increases compared to a method of managing video and additional data as separate files.

아울러, 청크간 부가데이터 삽입을 통해, 영상의 잘림과 같은 현상이 발생했을 때에도 적어도 일부의 부가데이터를 사용할 수 있는 효과를 발휘한다. In addition, through the insertion of additional data between chunks, even when a phenomenon such as truncation of an image occurs, at least some additional data can be used.

도 1은 본 발명의 일 실시예에 따른 부가데이터 삽입 시스템의 구성도.
도 2는 본 발명의 일 실시예에 따른 부가데이터 삽입 방법을 도시한 순서도.
도 3은 본 발명의 다른 실시예에 따른 부가데이터 삽입 방법을 도시한 순서도.
도 4는 본 발명의 또 다른 실시예에 따른 부가데이터 삽입 방법을 도시한 순서도.
1 is a configuration diagram of an additional data insertion system according to an embodiment of the present invention.
2 is a flowchart illustrating a method for inserting additional data according to an embodiment of the present invention.
3 is a flowchart illustrating a method for inserting additional data according to another embodiment of the present invention.
4 is a flowchart illustrating a method for inserting additional data according to another embodiment of the present invention.

본 발명의 목적 및 효과는 이상에서 언급한 것으로 제한되지 않으며, 본 발명의 목적 및 효과, 그리고 그것들을 달성하기 위한 기술적 구성들은 첨부 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. The objects and effects of the present invention are not limited to those mentioned above, and the objects and effects of the present invention and technical configurations for achieving them will be clarified with reference to embodiments described below in detail together with the accompanying drawings.

본 발명을 설명함에 있어서 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다. 또한, 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있다. 이하의 각 실시예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며 본 발명의 범위를 제한하고자 하는 것이 아니다. In the description of the present invention, when it is determined that a detailed description of known functions or configurations may unnecessarily obscure the subject matter of the present invention, the detailed description will be omitted. In addition, the present invention is not limited to the embodiments disclosed below, but may be implemented in various different forms. Each of the following embodiments is provided to make the disclosure of the present invention complete, and to provide a complete knowledge of the scope of the invention to those skilled in the art to which the invention pertains, and to limit the scope of the invention. no.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함" 또는 "구비"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "...유닛", "...장치", "...디바이스", "...부" 또는 "...모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.Throughout the specification, when a part is said to "include" or "equipment" a component, this means that other components may be further included instead of excluding other components, unless specifically stated to the contrary. . In addition, terms such as "...unit", "...device", "...device", "...unit" or "...module" described in the specification may have at least one function or operation. Means a unit of processing, which may be implemented in hardware or software or a combination of hardware and software.

한편, 본 발명의 각 실시예에 있어서, 각 구성요소들, 기능 블록들 또는 수단들은 하나 또는 그 이상의 하부 구성요소로 구성될 수 있으며, 각 구성요소들이 수행하는 전기, 전자, 기계적 기능들은 전자회로, 집적회로, ASIC(Application Specific Integrated Circuit) 등 공지된 다양한 소자들 또는 기계적 요소들로 구현될 수 있으며, 각각 별개로 구현되거나 2 이상이 하나로 통합되어 구현될 수도 있다.On the other hand, in each embodiment of the present invention, each component, functional blocks or means may be composed of one or more sub-components, the electrical, electronic, and mechanical functions performed by each component are electronic circuits , It may be implemented with various known devices such as an integrated circuit, an ASIC (Application Specific Integrated Circuit), or mechanical elements, or may be implemented separately, or two or more may be integrated into one.

본 발명에서는 비디오나 오디오와 같은 페이로드 데이터(사용자에게 재생되는 미디어 데이터)의 연속된 집합 단위인 청크(Chunk) 간에 부가데이터를 삽입하는 방법을 사용한다. 즉, 동영상 파일은 대용량 파일이므로 데이터 전송을 위해서라도 사용자에게 재생되는 미디어 데이터는 여러 개의 조각을 분할되어 관리되므로, 이들 조각들 사이에 부가 데이터를 삽입하는 것이 본 발명의 기술적 핵심이다.In the present invention, a method of inserting additional data between chunks, which are consecutive units of payload data (media data played to a user) such as video or audio, is used. That is, since the video file is a large file, the media data played back to the user is managed by dividing and managing multiple pieces, so inserting additional data between these pieces is a technical core of the present invention.

이와 같은 방법을 사용함으로써, 기존의 방법들과 비교하여 동영상 재생에 영향을 주지 않으면서도 보다 많고 다양한 부가데이터를 삽입할 수 있으며, 동영상과 부가데이터를 하나의 파일로 관리할 수 있는 장점을 가진다.By using such a method, more and more additional data can be inserted without affecting the video playback as compared with the existing methods, and the video and additional data can be managed as a single file.

이를 위해서는 입력되는 동영상의 파일 구조를 분석한 후, 청크 간에 부가데이터를 삽입하는 과정 및 부가데이터 삽입을 통해 변경된 파일의 정보를 반영하여 파일의 메타정보 및 헤더 정보를 변경하는 일련의 과정이 수행된다. To this end, after analyzing the file structure of the input video, a process of inserting additional data between chunks and a process of changing meta information and header information of the file by reflecting information of the changed file through inserting additional data is performed. .

이하, 첨부 도면을 참조하여 본 발명의 바람직한 일 실시예(MPEG-4 동영상에서의 부가데이터 삽입례)를 통하여 본 발명의 구성에 대하여 상세히 설명하겠으나. 본 발명의 기술적 사상이 MPEG-4에만 국한되는 것은 아니며, 동일 또는 유사한 범주 내의 다른 포맷의 동영상 파일에 대한 부가데이터 삽입에 그대로 적용될 수 있음은 물론이다. Hereinafter, the configuration of the present invention will be described in detail through a preferred embodiment of the present invention (an example of inserting additional data in an MPEG-4 video) with reference to the accompanying drawings. It goes without saying that the technical idea of the present invention is not limited to MPEG-4, and can be applied to inserting additional data into video files of different formats within the same or similar categories.

MPEG-4 표준 규격에서는 모든 콘텐츠를 청크(청크) 단위로 요청하고 내려받는다. 청크란 콘텐츠의 세그멘트를 의미한다. 크기에 제한이 없지만 보통 2~5초 분량의 세그멘트로 나누어진다. 어떤 크기의 청크가 어디에 있는지를 서비스 시작 전에 클라이언트(예컨대, 사용자 단말)에게 알려주고, 클라이언트가 청크 단위로 요청해서 내려받는다. 하나의 콘텐츠에 대해서 품질이 다른 여러 벌의 청크를 가지고 있어서, 상황에 맞게 선택하여 요청하는 방식으로 적응(adaptation)이 가능하다. 예컨대, 망사정이 좋으면 고급 품질의 청크를 요청하고, 나쁘면 낮은 품질의 청크를 요청한다. In the MPEG-4 standard, all content is requested and downloaded in chunks. Chunk means a segment of content. It is not limited in size, but is usually divided into segments of 2 to 5 seconds. Before the service is started, the size of the chunk of the size is notified to the client (eg, the user terminal), and the client requests and downloads the chunk. Since there are several chunks of different quality for one content, adaptation is possible by selecting and requesting according to the situation. For example, if the mesh is good, a high quality chunk is requested, and if it is bad, a low quality chunk is requested.

MPEG-4 동영상은 다음과 같이 계층화된 구조를 가진다. MPEG-4 video has a hierarchical structure as follows.

● ftyp : 파일의 호환성을 확인하는 파일 타입 박스 (file type box)● ftyp: File type box to check file compatibility

● moov : 미디어의 모든 메타 데이타를 저장하는 무비 박스 (movie box)● moov: A movie box that stores all metadata on the media (movie box)

⊙ mvhd: 무비 헤더 박스 (movie header box) ⊙ mvhd: movie header box

⊙ trak : 무비 안의 단일 트랙을 정의하는 박스 (track box) ⊙ trak: A track box that defines a single track in a movie

Figure pat00001
tkhd : 트랙의 특성을 기술 (track header box)
Figure pat00001
tkhd: Describe the characteristics of the track (track header box)

Figure pat00002
edts : (edit box)
Figure pat00002
edts: (edit box)

elst : (edit list box) elst: (edit list box)

Figure pat00003
mdia : 트랙의 미디어 타입과 샘플 데이타 (media box)
Figure pat00003
mdia: Media type of track and sample data (media box)

mdhd : 미디어의 특성을 기술 (media header box) mdhd: describes the characteristics of the media (media header box)

hdlr : (handler reference box) hdlr: (handler reference box)

minf : (media information box) minf: (media information box)

hdlr : (handler reference box) hdlr: (handler reference box)

stbl : (sample table box) stbl: (sample table box)

stsd : 트랙의 디코딩에 필요한 코덱의 정보 (sample description box) stsd: Codec information required for decoding the track (sample description box)

stts : 샘플의 시간 (time-to-sample box) stts: time of sample (time-to-sample box)

stsz : 청크 내 샘플의 크기 (sample size box) stsz: the size of the sample in the chunk (sample size box)

stsc : 청크 내 샘플의 수 (sample to chunk box) stsc: number of samples in chunk (sample to chunk box)

stco : 청크의 위치 (chunk offset box) stco: the position of the chunk (chunk offset box)

... ...

⊙ trak... ⊙ trak...

⊙ trak... ⊙ trak...

... ...

● mdat : 실제 미디어를 저장하는 미디어 데이타 박스(media data box)● mdat: media data box that stores actual media

즉, ftyp(file type box, 파일의 호환성을 확인하는 파일 타입 박스), moov(movie box, 미디어의 모든 메타데이터를 저장하는 무비 박스), mdat(media data box, 실제 미디어를 저장하는 미디어 데이터 박스)로 구성되며, moov는 mvhd(movie header box, 무비 헤더 박스)와 다수개의 trak(track box, 무비안의 단일 트랙을 정의하는 박스)로 구성되며, trak는 미디어 샘플 데이터의 정보를 기술하는 stbl(sample table box)를 포함하고 있음. stbl은 stsd(sample description box), stts(time-to-sample box), stsz(sample size box), stsc(sample to 청크 box), stco(청크 offset box) 등과 같은 테이블 박스 정보를 포함한다. That is, ftyp (file type box, file type box to check file compatibility), moov (movie box, movie box to store all metadata of the media), mdat (media data box), media data box to store actual media ), and moov consists of mvhd (movie header box) and multiple trak (track box, box defining a single track in the movie), where trak is stbl (describing information of media sample data). sample table box). stbl includes table box information such as stsd (sample description box), stts (time-to-sample box), stsz (sample size box), stsc (sample to chunk box), and stco (chunk offset box).

본 발명에 따라 위와 같은 정보를 분석하여 동영상 파일의 구조를 파악하고 부가데이터를 삽입하는 시스템의 개략적 구성도를 도 1에 도시하였다.1 is a schematic configuration diagram of a system for analyzing the above information and grasping the structure of a video file and inserting additional data according to the present invention.

본 발명의 일 실시예에 따른 동영상 파일에 부가데이터를 삽입하는 시스템은 동영상 저장부(110), 분석부(120), 부가데이터 삽입부(130), MOOV 수정부(메타데이터 수정부; 140)을 포함한다.A system for inserting additional data into a video file according to an embodiment of the present invention includes a video storage unit 110, an analysis unit 120, an additional data insertion unit 130, and a MOOV correction (metadata correction) 140 It includes.

동영상 저장부(110)는 서비스되고 또한 부가데이터가 삽입될 동영상을 저장하고, 분석부(120)는 MPEG-4 등 각 규격에 따른 동영상의 구조를 분석한다. The video storage unit 110 stores a video to be serviced and additional data is inserted, and the analysis unit 120 analyzes the structure of a video according to each standard such as MPEG-4.

부가데이터 삽입부(130)는 상기 분석부에 의하여 파악된 청크의 위치와 크기 정보를 토대로 청크를 독출하여 해당 청크의 뒤에 부가데이터를 삽입하되, 삽입할 다른 부가데이터가 또 있으면, 상기 해당 청크의 다음 청크 뒤에 상기 다른 부가데이터를 삽입하며, 전술한 과정을 더 이상 삽입할 부가데이터가 없거나 마지막 청크에 이를 때까지 반복한다(이에 대해서는 도 2를 참조하여 상세하게 후술함). The additional data inserting unit 130 reads a chunk based on the position and size information of the chunk identified by the analysis unit, inserts additional data after the chunk, and if there is another additional data to be inserted, the additional chunk The other additional data is inserted after the next chunk, and the above-described process is repeated until there is no additional data to be inserted or until the last chunk is reached (this will be described later in detail with reference to FIG. 2).

MOOV 수정부(140)는 부가데이터 삽입 후 해당 동영상 파일의 메타데이터를 수정하여 동영상 재생에 문제가 발생하지 않도록 한다. 즉, MOOV 수정부(140)는 최소한 미디어 데이터의 크기 정보 및 각 청크의 위치 정보를 수정한다. The MOOV correction unit 140 corrects metadata of a corresponding video file after inserting additional data so that no problem occurs in video playback. That is, the MOOV correction unit 140 at least corrects the size information of the media data and the location information of each chunk.

본 발명의 바람직한 일 실시예에 따른 부가데이터 삽입 방법은 도 2에 도시하였으며, 구체적인 설명은 아래와 같다.A method of inserting additional data according to an exemplary embodiment of the present invention is illustrated in FIG. 2, and a detailed description is as follows.

① 우선, 청크 간에 부가데이터를 삽입할 MPEG-4 동영상 파일을 연다(S210); ① First, open an MPEG-4 video file to insert additional data between chunks (S210);

② 상기 단계 (S210)을 통해 입력된 MPEG-4 동영상 파일의 구조를 분석한다. 구체적으로는 전술한 ftyp, mdat, moov에 대해 파일의 시작을 기준으로 하는 위치 정보와 각 데이터의 크기 정보를 분석한다. 또한, moov가 포함하고 있는 정보 중, 각 청크의 위치 정보를 포함하고 있는 stco(청크 offset box) 정보를 분석한다(S220). ② The structure of the MPEG-4 video file input through the above step (S210) is analyzed. Specifically, for the above-described ftyp, mdat, and moov, location information based on the start of a file and size information of each data are analyzed. In addition, among the information included in the moov, stco (chunk offset box) information including location information of each chunk is analyzed (S220).

③ 그 뒤에 부가데이터를 삽입할 하나의 청크 데이터를 읽어낸다(S230). 청크 데이터를 읽어내기 위해서는 현재 청크의 위치 정보와 크기 정보가 필요하며, 현재 청크의 위치 정보는 stco의 기술된 현재 청크의 인덱스 값이 사용되며, 크기 정보는 다음 청크의 인덱스 값에서 현재 청크의 인덱스 값을 뺀 값을 사용하면 된다.③ After that, one chunk data to insert additional data is read (S230). In order to read the chunk data, the position information and the size information of the current chunk are required, and the position information of the current chunk uses the index value of the current chunk described in stco, and the size information is the index of the current chunk from the index value of the next chunk. You can use the value minus the value.

④ 상기 단계(S230)을 통해 읽어낸 청크 데이터 뒤에 부가데이터를 삽입한다(S240).④ Insert the additional data after the chunk data read through the step (S230) (S240).

⑤ 청크 간에 부가데이터 삽입 과정을 끝마친 후, mdat의 크기 정보와 moov를 수정/변경한다(S250).⑤ After completing the process of inserting additional data between chunks, modify/change mdat size information and moov (S250).

MPEG-4 규격의 mdat는 4bytes의 크기(size) 정보, 4bytes의 타입(type) 정보, 다수의 청크 데이터로 구성되는데, 청크 간에 삽입된 부가데이터들의 크기와 청크 데이터 크기를 합산하여 mda의 크기 정보 수정한다. The mdat of the MPEG-4 standard consists of 4 bytes of size information, 4 bytes of type information, and a large number of chunk data. The size information of mda is added by adding the size of additional data and chunk data inserted between chunks. Correct it.

mdat의 데이터 변경 과정을 끝마친 후, moov를 변경한다. 부가데이터를 삽입한 이후에도 동영상의 정상적 재생이 가능하기 위해서는 moov 정보를 변경하여야 한다. 구체적으로, moov의 정보 중 청크의 위치정보를 포함하고 있는 stco 정보를 수정하는데, stco는 각 청크의 위치정보(offset)를 가지고 있으므로, 기존의 offset 정보에서 청크 간에 삽입된 부가데이터의 크기를 더하여 stco의 offset 정보를 업데이트한다.After finishing the process of changing the data of mdat, change the moov. After inserting additional data, moov information must be changed to enable normal playback of video. Specifically, among the moov information, stco information including the location information of the chunk is modified. Since the stco has the location information (offset) of each chunk, the size of additional data inserted between the chunks is added from the existing offset information. Update the offset information of stco.

이상 본 발명의 바람직한 실시예에 따라 부가데이터를 삽입하는 방법을 설명하였다. 그런데, 부가데이터 삽입 후, 아직 추가로 삽입할 부가데이터가 남아 있을 수 있다. 따라서, 도 3에 도시된 바와 같이 부가데이터의 삽입 후, 추가로 삽입할 부가데이터가 존재하는지를 확인하는 과정을 포함하는 것이 바람직하다.As described above, a method of inserting additional data according to a preferred embodiment of the present invention has been described. However, after inserting additional data, additional data to be additionally inserted may still remain. Therefore, it is preferable to include a process of confirming whether additional data to be additionally inserted after insertion of additional data as shown in FIG. 3.

⑥ 즉, 단계(S240)에서 부가데이터를 삽입한 후 부가데이터 잔존여부를 확인하고(S310), 더 이상 삽입할 부가데이터가 없다면 다음의 단계(S250)로 진행하여 mdat의 크기 정보와 moov를 수정/변경하고 종료한다.⑥ That is, after inserting additional data in step S240, check whether there is additional data remaining (S310), and if there is no more additional data to insert, proceed to the next step (S250) to correct the size information and moov of mdat. /Change and exit.

⑦ 만약, 추가로 삽입할 부가데이터가 있다면 삽입할 청크 사이 공간이 있는지를 확인하고(S320), 공간이 있다면 단계(S230)으로 돌아가서 청크를 읽고 그 뒤에 부가 데이터를 삽입한다. 단계(S320)의 확인 결과, 만약 부가데이터를 삽입할 수 있는 청크 간 빈 공간이 없는 경우에는 단계(S250)으로 진행하여 mdat의 크기 정보와 moov를 수정/변경하고 종료한다.⑦ If there is additional data to be inserted, check whether there is space between the chunks to be inserted (S320), and if there is space, return to step (S230) to read the chunks and insert additional data thereafter. As a result of checking in step S320, if there is no empty space between chunks into which additional data can be inserted, the process proceeds to step S250, where mdat size information and moov are corrected/changed and ended.

도 4은 전술한 도 3과는 다른 실시예를 도시한다. FIG. 4 shows an embodiment different from FIG. 3 described above.

도 4는 1번째 청크와 2번째 청크 사이에 부가데이터를 삽입하고 그 다음에는, 2번째 청크와 3번째 청크 사이에 다음 부가데이터를 삽입하는 것과 같이 처음부터 또는 중간부터 일련되게 삽입하는 방식을 취할 경우, 효율적인 방법이다.FIG. 4 takes a method of inserting additional data between the first chunk and the second chunk, and then inserting the additional data between the second chunk and the third chunk from the beginning or the middle in series. If it is, it is an efficient way.

단계(S230)에서 청크를 읽으면 곧바로 이 독출된 청크가 마지막 청크인지를 확인하고(S410), 확인결과 마지막 청크이면 단계(S250)으로 진입하여 mdat의 크기 정보와 moov를 수정/변경하고 종료하고, 그렇지 않은 경우에 단계(240)으로 진행하여 부가데이터를 삽입한다. As soon as the chunk is read in step S230, it is checked whether the read chunk is the last chunk (S410), and if the result of the check is the last chunk, it enters step S250, corrects/changes mdat size information and moov, exits, Otherwise, the process proceeds to step 240 to insert additional data.

이와 같이, 추가할 부가데이터가 남아 있는지 그리고 추가할 수 있는 청크 간 빈 공간이 남아있는지에 대한 확인과 이 확인결과에 따른 후속의 진행 절차는 도 3 및 도 4의 실시예와 같이 여러 경우가 방식이 있을 수 있으며, 그 외에도 다양한 변형례들이 있을 수 있는데, 이들 모두 본 발명의 기술적 사상의 범주에 속함은 자명하다.In this way, the check of whether the additional data to be added remains and whether there is an empty space between chunks to be added, and a subsequent process according to the result of the check are various cases as in the embodiments of FIGS. 3 and 4. There may be, there may be a variety of other modifications, it is obvious that they all fall within the scope of the technical idea of the present invention.

한편, 본 발명의 다른 실시예에 따라 부가데이터를 삽입할 청크의 위치를 선택하는 단계(미도시)를 더 포함할 수 있다.Meanwhile, according to another embodiment of the present invention, a step (not shown) of selecting a location of a chunk to insert additional data may be further included.

MPEG-4 동영상 파일과 같이 동영상 파일은 미디어 데이터를 일정 길이의 청크로 분할하여 포함하므로 통상 복수의 청크(세그먼트)가 있으므로, 부가데이터의 삽입에 있어서 복수의 청크 중 어느 하나에 삽입할 모든 부가데이터를 삽입하는 방식, 삽입할 부가데이터를 분할하여 복수의 청크 간 공간에 나누어 삽입하는 방식이 있을 수 있다.Since a video file, such as an MPEG-4 video file, divides and includes media data into chunks of a certain length, there are usually a plurality of chunks (segments). There may be a method of inserting, and a method of dividing and inserting additional data to be inserted into a space between a plurality of chunks.

또한, 복수의 청크 간 공간에 나누어 부가데이터를 삽입하는 방식은 다시 1번째 청크와 2번째 청크 사이에 부가데이터를 삽입하고 그 다음에는, 2번째 청크와 3번째 청크 사이에 다음 부가데이터를 삽입하는 것과 같이 처음부터 또는 중간부터 일련되게 삽입하는 방식을 취할 수 있으며, 이와 달리 5번째 청크와 6번째 청크 사이에 부가데이터를 삽입하고 그 다음, 10번째 청크와 11번째 청크 사이에 다음 부가데이터를 삽입하는 것과 같이 간격을 두고 부가데이터를 삽입하는 방식을 취할 수도 있다.In addition, the method of inserting additional data by dividing it into a space between a plurality of chunks inserts additional data between the first chunk and the second chunk, and then inserts the additional data between the second chunk and the third chunk. As described above, a method of serially inserting from the beginning or the middle may be used. Alternatively, additional data is inserted between the 5th and 6th chunks, and then the additional data is inserted between the 10th and 11th chunks. You can also take a method of inserting additional data at intervals.

그리고, 하나의 부가데이터를 삽입함에 있어서, 하나의 부가데이터 전체를 그대로 삽입할 수도 있고, 이를 분할하여 3개 이상의 청크 사이에 분산하여 삽입할 수도 있다.In addition, when inserting one additional data, the entire one additional data may be inserted as it is, or it may be divided and distributed and inserted between three or more chunks.

이와 같이 다양한 삽입 방식에 있어서, 부가데이터를 삽입할 위치의 선택 및 부가데이터의 분할 삽입 여부는 부가데이터를 삽입한 이후에도 동영상 파일의 재생에 있어서 영향을 미치지 않거나 최소한의 영향을 미치도록 결정하는 것이 바람직함은 물론이므로, 부가데이터가 삽입될 청크간 공간의 선택은 동영상 파일의 분석 결과(예컨대, 청크의 수, 미디어 데이터의 크기, 각 청크의 크기 등) 및 부가데이터의 속성과 크기를 토대로 결정함이 바람직하다.In such various insertion methods, it is preferable to determine whether to select a location to insert additional data and whether to insert additional data in a divided manner to have no or minimal effect on the playback of a video file even after inserting the additional data. Of course, the selection of the space between chunks where additional data will be inserted is determined based on the analysis result of the video file (eg, the number of chunks, the size of media data, the size of each chunk, etc.) and the properties and sizes of additional data This is preferred.

이상, 본 발명의 바람직한 실시예에 대하여 개시하였으며, 이는 단지 본 발명의 기술 내용을 쉽게 설명하고 발명의 이해를 돕기 위한 일반적인 의미에서 사용된 것이지, 본 발명의 범위를 한정하고자 하는 것은 아니다. 여기에 개시된 실시예 외에도 본 발명의 기술적 사상에 바탕을 둔 다른 변형예들이 실시 가능하다는 것은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 자명할 것이다. 예컨데, 발명의 명칭과 전술한 실시예는 MPEG-4 동영상 파일에 부가데이터를 삽입하는 것을 중심으로 기재하였으나, 이러한 기재가 다른 포맷의 동영상 파일에 적용되는 것을 배제하는 것은 아니다. 따라서 본 발명의 권리범위의 이하의 특허청구범위의 기재에 의하여 정하여져야 할 것이다.The preferred embodiments of the present invention have been described above, which are merely used in a general sense to easily describe the technical contents of the present invention and to help understand the present invention, and are not intended to limit the scope of the present invention. It will be apparent to those of ordinary skill in the art to which the present invention pertains that other modifications based on the technical spirit of the present invention can be implemented in addition to the embodiments disclosed herein. For example, although the name of the invention and the above-described embodiment are mainly described as embedding additional data in an MPEG-4 video file, the description is not excluded from being applied to video files of other formats. Therefore, it should be determined by the following claims in the scope of the present invention.

Claims (8)

동영상 파일의 구조를 분석하는 단계와,
부가데이터의 적어도 일부를 상기 각 청크 사이에 삽입하는 단계와,
상기 동영상 파일의 미디어 데이터의 크기 정보를 수정하는 단계와,
상기 동영상 파일의 청크 위치정보를 수정하는 단계
를 포함하는 동영상 파일의 부가데이터 삽입 방법.
Analyzing the structure of the video file,
Inserting at least a portion of additional data between the chunks;
Modifying the size information of the media data of the video file;
Modifying the chunk location information of the video file
Method of inserting additional data of a video file containing a.
제1항에 있어서, 상기 분석하는 단계는,
상기 동영상 파일의 메타데이터의 일부인 청크 오프셋값을 판독하여 각 청크의 위치를 파악하는 단계를 포함하는 것
인 동영상 파일의 부가데이터 삽입 방법.
The method of claim 1, wherein the analyzing step,
And reading a chunk offset value that is part of the metadata of the video file to determine the position of each chunk.
How to insert additional data in a video file.
제1항에 있어서, 상기 삽입하는 단계는,
청크의 위치와 크기 정보를 토대로 청크를 독출하는 단계와,
독출된 상기 청크 뒤에 부가데이터를 삽입하는 단계를 포함하되,
삽입할 다른 부가데이터가 또 있으면, 상기 청크의 다음 청크 뒤에 상기 다른 부가데이터를 삽입하며, 전술한 과정을 더 이상 삽입할 부가데이터가 없거나 청크 간의 여유 공간이 없을 때까지 반복하여 수행하는 것
인 동영상 파일의 부가데이터 삽입 방법.
According to claim 1, The step of inserting,
Reading the chunk based on the position and size information of the chunk,
And inserting additional data after the read chunk,
If there is another additional data to be inserted, the other additional data is inserted after the next chunk of the chunk, and the above-described process is repeatedly performed until there is no additional data to be inserted or there is no free space between chunks.
How to insert additional data in a video file.
제3항에 있어서, 상기 각 청크의 크기 정보를 확인하는 단계는,
크기를 확인할 청크의 다음 청크의 인덱스 값에서 상기 크기를 확인할 청크의 인덱스 값을 차감하여 계산하는 것
인 동영상 파일의 부가데이터 삽입 방법.
According to claim 3, The step of checking the size information of each chunk,
Calculate by subtracting the index value of the chunk to check the size from the index value of the next chunk to check the size
How to insert additional data in a video file.
제1항에 있어서, 미디어 데이터의 크기 정보를 수정하는 단계는,
삽입된 부가데이터들의 크기와, 청크들의 크기를 합한 값을 상기 미디어 데이터의 새로운 크기로 수정하는 것
인 동영상 파일의 부가데이터 삽입 방법.
The method of claim 1, wherein modifying the size information of the media data,
Modifying the sum of the size of inserted additional data and the size of chunks to the new size of the media data
How to insert additional data in a video file.
하나 이상의 동영상 파일을 저장하는 동영상 저장부와,
상기 동영상 파일 중 부가데이터를 삽입할 동영상 파일의 구조를 분석하는 분석부와,
상기 분석부의 분석결과에 기초하여 부가데이터를 삽입하는 부가데이터 삽입부와,
상기 동영상 파일의 메타데이터를 수정하는 메타데이터 수정부
를 포함하는 동영상 파일의 부가데이터 삽입 시스템.
A video storage unit that stores one or more video files,
Analysis unit for analyzing the structure of the video file to insert additional data among the video files,
An additional data insertion unit for inserting additional data based on the analysis result of the analysis unit;
Metadata correction to modify the metadata of the video file
Additional data insertion system of a video file containing a.
제6항에 있어서, 상기 부가데이터 삽입부는,
상기 분석부에 의하여 파악된 청크의 위치와 크기 정보를 토대로 청크를 독출하여 해당 청크의 뒤에 부가데이터를 삽입하되, 삽입할 다른 부가데이터가 또 있으면, 상기 해당 청크의 다음 청크 뒤에 상기 다른 부가데이터를 삽입하며, 전술한 과정을 더 이상 삽입할 부가데이터가 없거나 마지막 청크에 이를 때까지 반복하는 것
인 동영상 파일의 부가데이터 삽입 시스템.
The method of claim 6, wherein the additional data insertion unit,
Based on the position and size information of the chunk identified by the analysis unit, the chunk is read and additional data is inserted after the chunk. If there is another additional data to be inserted, the additional chunk data is added after the next chunk of the chunk. Inserting and repeating the above process until there is no additional data to insert or the last chunk is reached.
System for inserting additional data of video files.
제6항에 있어서, 상기 메타데이터 수정부는,
부가데이터가 삽입 완료된 이후에, 미디어 데이터의 크기 정보 및 각 청크의 위치 정보를 수정하는 것
인 부가데이터 삽입 시스템.
The method of claim 6, wherein the metadata correction unit,
After the additional data is inserted, the size information of the media data and the position information of each chunk are corrected.
Phosphorus data insertion system.
KR1020180146997A 2018-11-26 2018-11-26 Method and system for additional data insertion between chunk KR20200061559A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180146997A KR20200061559A (en) 2018-11-26 2018-11-26 Method and system for additional data insertion between chunk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180146997A KR20200061559A (en) 2018-11-26 2018-11-26 Method and system for additional data insertion between chunk

Publications (1)

Publication Number Publication Date
KR20200061559A true KR20200061559A (en) 2020-06-03

Family

ID=71087817

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180146997A KR20200061559A (en) 2018-11-26 2018-11-26 Method and system for additional data insertion between chunk

Country Status (1)

Country Link
KR (1) KR20200061559A (en)

Similar Documents

Publication Publication Date Title
JP7015617B2 (en) Content transmission / reception method and equipment
EP1980958A2 (en) Apparatus and method for generating a data file or for reading a data file
US7772998B2 (en) Method and apparatus for encoding/decoding metadata
US9262419B2 (en) Syntax-aware manipulation of media files in a container format
US10469915B2 (en) Apparatus and method for delivering and receiving multimedia data in hybrid network
JP5587779B2 (en) Apparatus and method for storing and reading a file having a media data container and a metadata container
US8401370B2 (en) Application tracks in audio/video containers
US9998768B1 (en) Apparatus and methods for generating clips using recipes with slice definitions
CN110784741A (en) Time-shifting response method and device of media data
JP2022510366A (en) Devices and methods for signaling information in container file format
US9305602B2 (en) Object-based audio system, object-based audio providing method, and object-based audio playing method using preset function
JP4719506B2 (en) Terminal device, content reproduction method, and computer program
KR20200061559A (en) Method and system for additional data insertion between chunk
CN115250266B (en) Video processing method and device, streaming media equipment and storage on-demand system
EP2378441A1 (en) Method and system for comparing media assets
CN114390319B (en) MP4 file reading and downloading method and device, electronic equipment and storage medium
US20130124699A1 (en) Apparatus and method for transceiving a streaming service
CN113852857A (en) Sound playing method and system based on HTML5 video frame stepping
US20080235401A1 (en) Method of storing media data delivered through a network
JP4383721B2 (en) Demultiplexer
CN116489458B (en) MP4 repairing method, device, terminal and medium based on file byte analysis
US10091536B2 (en) Method for transmitting an on-demand video file
CN116189721A (en) MP4 file processing method and device, electronic equipment and storage medium
CN115640612A (en) Integrity verification code setting method and verification method
CN115269883A (en) Data reading method, device, equipment and storage medium