KR20180086113A - Media playback apparatus and method for synchronously reproducing video and audio on a web browser - Google Patents

Media playback apparatus and method for synchronously reproducing video and audio on a web browser Download PDF

Info

Publication number
KR20180086113A
KR20180086113A KR1020170087661A KR20170087661A KR20180086113A KR 20180086113 A KR20180086113 A KR 20180086113A KR 1020170087661 A KR1020170087661 A KR 1020170087661A KR 20170087661 A KR20170087661 A KR 20170087661A KR 20180086113 A KR20180086113 A KR 20180086113A
Authority
KR
South Korea
Prior art keywords
data
audio
media
video
unit
Prior art date
Application number
KR1020170087661A
Other languages
Korean (ko)
Other versions
KR101986995B1 (en
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 US15/833,235 priority Critical patent/US10979785B2/en
Priority to CN201810049239.6A priority patent/CN108337545B/en
Publication of KR20180086113A publication Critical patent/KR20180086113A/en
Application granted granted Critical
Publication of KR101986995B1 publication Critical patent/KR101986995B1/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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4431OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB characterized by the use of Application Program Interface [API] libraries
    • 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/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2381Adapting the multiplex stream to a specific network, e.g. an Internet Protocol [IP] network
    • 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/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • 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/242Synchronization processes, e.g. processing of PCR [Program Clock References]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/637Control signals issued by the client directed to the server or network components
    • H04N21/6377Control signals issued by the client directed to the server or network components directed to server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/64322IP
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Library & Information Science (AREA)
  • Software Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The present invention relates to a media playback apparatus for synchronously reproducing video and audio on a web browser, and a method for the same. According to the present invention, audio is buffered to be outputted at a time point at which the video is outputted, thereby synchronizing outputs of video and audio. In addition, according to an embodiment of the present invention, video is synchronized with audio at a time point at which the audio is outputted. According to the present invention, video is synchronized with audio even when the video and the audio are decoded by different decoders, thereby providing an environment capable of separating and processing the video and the audio. Therefore, it is possible to implement a decoder separately from a decoder embedded in a web browser in a non-plug-in environment, thereby reducing dependency on a codec format of media according to a decoder.

Description

웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치 및 방법{Media playback apparatus and method for synchronously reproducing video and audio on a web browser}BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a media playback apparatus and method for synchronously reproducing video and audio on a web browser,

본 발명은 웹 브라우저에서 미디어를 재생하는 장치 및 방법에 관한 것으로서, 보다 상세하게는 비디오 또는 오디오를 컨테이너(container) 단위로 디코딩하는 경우 비디오와 오디오를 동기화하여 미디어를 재생하는 장치 및 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus and a method for reproducing media on a web browser, and more particularly, to an apparatus and a method for reproducing media by synchronizing video and audio when a video or audio is decoded in units of a container .

미디어 데이터를 사용자가 인터넷을 통해 웹 브라우저에서 재생하기 위해서, 코덱(code) 디코더(decoder) 및 렌더러(renderer)를 네이티브 코드(native code)로 작성한 플러그인을 이용하는 방법이 알려져 있다. 이러한 웹 브라우저 플러그인으로는 대표적으로 ActiveX와 NPAPI가 사용되고 있다.There is known a method of using a plug-in in which a codec decoder and a renderer are written in native code in order for a user to play media data on a web browser through the Internet. ActiveX and NPAPI are used for these web browser plugins.

ActivieX는 마이크로소프트(MicroSoft)가 COM(Component Object Model)과 OLE(Object Linking and Embedding) 두 개의 기술을 합쳐서 개발한 것을 말한다. 하지만 대개 좁은 의미로 웹 브라우저인 인터넷 익스플로러(Internet Explorer)에서 애드온(add-on)의 형태로 사용되는 ActiveX Control을 말한다. ActiveX는 인터넷 익스플로러 웹 브라우저에서 미디어를 재생하는데 사용된다.ActivieX is a combination of two technologies developed by MicroSoft, Component Object Model (COM) and Object Linking and Embedding (OLE). However, it is generally used in addtion form in internet explorer which is a narrow web browser. ActiveX is used to play media from Internet Explorer web browser.

NPAPI는 Netscape 시절에 개발된 API로 인터넷 익스플로러의 ActivieX와 기능이 유사하다. 초기 웹 환경이 열악할 때, 웹 브라우저의 기능을 강화하기 위하여 외부 응용프로그램을 플러그인 형식으로 끌어 쓰기 위해 제공된 API이다. 즉, 초기 웹 페이지에서 음악이나 동영상을 재생하기 위해 개발된 것으로, 자바의 애플릿(Applet), 어도비(Adobe)의 플래시(Flash), 리얼 플레이어 등이 있다.NPAPI is an API developed in Netscape, similar in functionality to Internet Explorer's ActivieX. It is an API provided for dragging an external application into a plug-in format to enhance the function of the web browser when the initial web environment is poor. In other words, it was developed for playing music and moving pictures on the initial web page, such as Applet of Java, Flash of Adobe, and Real Player.

하지만 플러그인은 해커들이 악성 코드를 배포하는 통로로 사용되면서, 웹 브라우저 업체들이 더 이상 지원을 하지 않는 추세다. NPAPI의 경우 크롬(Chrome)을 제작하여 배포하는 구글에서 크롬 45 버전 이후로는 더 이상 NPAPI의 지원을 하고 있지 않으며, ActiveX의 경우 마이크로소프트에서 윈도우 10의 기본 브라우저로 사용되는 엣지(Edge) 버전부터는 더 이상 ActivieX의 지원을 하고 있지 않다.But plug-ins are used by hackers as a way to distribute malicious code, and Web browser vendors are no longer supporting it. NPAPI is no longer supported by NPAPI since Chrome version 45 on Google, which makes and distributes Chrome. In the case of ActiveX, from the Edge version, which is used by Microsoft as the default browser for Windows 10, It is no longer supported by ActivieX.

플러그인 없이 웹 브라우저에서 미디어를 재생하기 위한 방법으로 HTML5의 비디오 태그를 이용하여 디코딩과 렌더링을 수행하는 방법이 있다. HTML5는 W3C와 웹 브라우저 개발사들에 의해 개발된 HTML의 5번째 마크업 언어로, 비디오 태그를 통해 플러그인 없이 미디어 재생이 가능한 환경을 제공한다. 크롬 4.0, 익스플로러 9.0, 파이어폭스 3.5, 사파리 4.0, 오페라 10.5 버전부터 HTML5의 비디오 태그를 전적으로 지원하고 있다.There is a method of performing decoding and rendering using a video tag of HTML5 as a method for playing media in a web browser without a plug-in. HTML5 is HTML's fifth markup language developed by W3C and web browser developers, providing an environment that allows media playback without plugins via video tags. It has full support for HTML5 video tags since Chrome 4.0, Explorer 9.0, Firefox 3.5, Safari 4.0, and Opera 10.5.

비디오 태그를 이용하여 디코딩을 수행할 경우 고해상도 비디오와 높은 fps의 비디오를 우수한 성능으로 처리할 수 있다. 그런데 비디오 태그에서 지원하는 비디오 형식(video formats)에는 제한이 있으며 현재 MP4, WebM, 그리고 Ogg의 세가지의 형식만을 지원하고 있다. 보다 자세히는 MP4의 H.264, ACC, MP3, WebM의 VP8, VP9, Vorbis, Opus, 그리고 Ogg의 Theora, Vorbis 등의 코덱 형식을 지원하며, 비디오 코덱 형식인 H.265나 오디오 코덱 형식인 G.711, G.726 등은 비디오 태그에서 지원하고 있지 않다.When decoding using video tags, high-resolution video and high-fps video can be processed with excellent performance. However, there are limitations on the video formats supported by video tags, and they currently support only three formats: MP4, WebM, and Ogg. More details include codec formats such as H.264, ACC, MP3, WebM VP8, VP9, Vorbis, Opus and Ogg Theora and Vorbis of MP4, and video codec format H.265 or audio codec format G .711, G.726, etc. are not supported by video tags.

비디오 태그의 코덱 형식 제한으로 인한 한계는 자바스크립트로 구현된 디코더를 사용할 경우 보완이 가능하다. 자바스크립트 디코더는 비디오 형식에 제한 없이 디코딩이 가능하므로 비디오 태그에서 지원하지 않는 코덱 형식의 미디어를 디코딩 하는 것이 가능하다. The limitations of the codec format limitations of video tags are complementary when using a decoder implemented in JavaScript. The JavaScript decoder can decode video in any format, so it is possible to decode media in codec format not supported by the video tag.

그러나 이러한 보완에도 여전히 한계가 존재한다. 비디오 태그는 기본적으로 복수의 프레임들을 패키징한 컨테이너(container) 단위로 비디오를 수신하여 디코딩을 수행하기 때문에 비디오 태그 디코더와 자바스크립트 디코더의 서로 다른 디코더를 이용하여 비디오와 오디오를 디코딩 할 경우 동기화가 문제될 수 있는 것이다. 예를 들어 H.264 형식의 비디오는 컨테이너 단위로 비디오 태그에 의해 디코딩되고 G.711 형식의 오디오는 자바스크립트 디코더로 디코딩되는 경우에 있어 컨테이너에 사용되는 프레임의 개수가 30이고 비디오의 fps가 1인 경우 최대 30초 후에 비디오가 출력되어 오디오가 먼저 재생될 수 있다. But there is still a limit to this complement. Since the video tag basically performs decoding by receiving video in units of a container packaging a plurality of frames, when video and audio are decoded by using different decoders of the video tag decoder and the JavaScript decoder, It can be. For example, if video in H.264 format is decoded by a video tag in container units and audio in G.711 format is decoded by a JavaScript decoder, the number of frames used in the container is 30 and fps of video is 1 , Video can be output up to 30 seconds after the audio is played back first.

이에 본 발명은 비디오와 오디오의 동기화 문제 없이 미디어 재생이 가능한 방법을 제안하고자 한다. Accordingly, the present invention proposes a method capable of media playback without a problem of synchronization between video and audio.

본 발명이 해결하고자 하는 과제는, 비디오가 컨테이너 단위로 디코딩되는 경우에 비디오와 오디오의 동기화가 문제되지 않는 미디어 재생 방법을 제안하는 것이다.SUMMARY OF THE INVENTION It is an object of the present invention to provide a media playback method in which synchronization of video and audio is not a problem when video is decoded in a container unit.

본 발명의 과제들은 이상에서 언급한 과제로 제한되지 않으며, 언급되지 않은 또 다른 과제들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The problems of the present invention are not limited to the above-mentioned problems, and other problems not mentioned can be clearly understood by those skilled in the art from the following description.

상기 과제를 해결하기 위한 본 발명의 실시예에 따른 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치는, 미디어 서비스 장치에서 생성된 미디어 데이터를 웹 서비스를 지원하는 통신 프로토콜을 이용하여 수신하는 수신부; 상기 수신된 미디어 데이터를 비디오 데이터와 오디오 데이터로 분리하는 데이터 분리부; 상기 비디오 데이터를 구성하는 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환하는 컨테이너 부; 웹 브라우저에 임베드 된(embedded) 디코더에 의해 상기 변환된 청크 데이터를 디코드하여 비디오를 복원하고, 상기 복원된 비디오를 출력할 때 상기 복원된 비디오가 출력되는 시점에 관한 타임 정보를 상기 청크 데이터 단위로 제공하는 미디어 복원부; 및 상기 청크 데이터 단위로 제공되는 타임 정보에 기초하여 상기 오디오 데이터를 상기 복원된 비디오와 동기화하여 출력하는 오디오 싱크부를 포함할 수 있다.According to an aspect of the present invention, there is provided a media playback apparatus for synchronously reproducing video and audio on a web browser, the media playback apparatus comprising: A receiving unit; A data separator for separating the received media data into video data and audio data; A container unit for packaging the frames constituting the video data into units and converting the frames into chunk data; A decoder for decoding the converted chunk data by a decoder embedded in a web browser to reconstruct the video and outputting the reconstructed video, A media restoring unit for providing the media; And an audio sync unit for outputting the audio data in synchronization with the restored video based on time information provided in the chunk data unit.

상기 과제를 해결하기 위한 본 발명의 실시예에 따른 미디어 서비스 장치는, 미디어 데이터를 상기 미디어 재생 장치에 전송하는 미디어 서비스 장치로서, 상기 미디어 데이터를 상기 미디어 재생 장치의 웹 브라우저 상에서 재생하기 위해 필요한 스크립트 모듈을 저장하는 모듈 저장부; 상기 미디어 재생 장치의 접속에 응답하여 상기 스크립트 모듈을 상기 미디어 재생 장치에 전송하는 모듈 전송부; 상기 미디어 데이터를 패킷화하여 전송 패킷을 생성하는 패킷화부; 및 상기 재생 장치와의 통신 세션을 형성하며, 상기 미디어 재생 장치로부터의 요청에 따라 상기 전송 패킷을 상기 미디어 재생 장치에 전송하는 웹 서버를 포함하되, 상기 스크립트 모듈은, 상기 통신 패킷을 상기 통신 세션을 통해 수신하는 프로세스와, 상기 통신 패킷에 포함되는 비디오 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환하는 프로세스와, 상기 변환된 청크 데이터가 상기 미디어 재생 장치에 설치된 미디어 복원부에 의해 디코드 되어 출력되는 시점에 관한 타임 정보에 기초하여, 상기 통신 패킷에 포함된 오디오 데이터를 상기 청크 데이터와 동기화하여 출력하는 프로세스를 포함할 수 있다.According to an aspect of the present invention, there is provided a media service apparatus for transmitting media data to a media playback apparatus, the media service apparatus comprising: a script for playing the media data on a web browser of the media playback apparatus; A module storage unit for storing a module; A module transfer unit for transferring the script module to the media player in response to connection of the media player; A packetizing unit for packetizing the media data to generate a transmission packet; And a web server that forms a communication session with the playback apparatus and transmits the transport packet to the media playback apparatus in response to a request from the media playback apparatus, A process of packaging the video frames included in the communication packet into chunks by packaging the chunks of video frames in units of a unit number; and a process of converting the chunks of the video packets into chunks by decoding the converted chunks by a media restoring unit And outputting the audio data included in the communication packet in synchronization with the chunk data based on the time information on the time point.

또한 상기 과제를 해결하기 위한 본 발명의 실시예에 따른 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치는, 미디어 서비스 장치에서 생성된 미디어 데이터를 웹 서비스를 지원하는 통신 프로토콜을 이용하여 수신하는 수신부; 상기 수신된 미디어 데이터로부터 제1 미디어 타입 데이터와 제2 미디어 타입 데이터로 분리하는 데이터 분리부; 상기 제1 미디어 데이터를 구성하는 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환하는 컨테이너 부; 웹 브라우저에 임베드 된(embedded) 디코더에 의해 상기 변환된 청크 데이터를 디코드하여 제1 미디어를 복원하고, 상기 복원된 제1 미디어를 출력할 때 상기 복원된 제1 미디어가 출력되는 시점에 관한 타임 정보를 상기 청크 데이터 단위로 제공하는 미디어 복원부; 및 상기 청크 데이터 단위로 제공되는 타임 정보에 기초하여 상기 제2 미디어 데이터를 상기 복원된 제1 미디어와 동기화하여 출력하는 싱크부를 포함할 수 있다.According to another aspect of the present invention, there is provided a media playback apparatus for synchronizing video and audio on a web browser, the media playback apparatus comprising: ; A data separator for separating the received media data into first media type data and second media type data; A container unit for packaging the frames constituting the first media data into unit numbers and converting the frames into chunk data; The method comprising: decoding the converted chunk data by a decoder embedded in a web browser to restore a first medium; and outputting the restored first media, To the chunk data unit; And a sync unit for outputting the second media data in synchronization with the restored first media based on time information provided in units of the chunk data.

본 발명의 기타 구체적인 사항들은 설명 및 도면들에 포함되어 있다. Other specific details of the invention are included in the description and drawings.

본 발명의 실시예들에 의하면 적어도 다음과 같은 효과가 있다.The embodiments of the present invention have at least the following effects.

상기 과제의 해결 수단에 의해 컨테이너 사양에 맞게 비디오와 오디오를 복원함으로써 동기화 된 미디어를 재생하는 것이 가능하다.According to the solution of the above problem, it is possible to reproduce the synchronized media by restoring video and audio in accordance with the container specification.

또한 상기 과제의 해결 수단에 의해 비디오와 오디오가 서로 다른 디코더에 의해 디코딩 되더라도 동기화가 문제가 되지 않으므로, 비디오와 오디오를 분리하여 처리할 수 있는 환경을 제공한다. In addition, even if video and audio are decoded by different decoders by the solution of the above-mentioned problems, since synchronization is not a problem, an environment in which video and audio are separated can be provided.

또한 비디오 태그에서 지원하지 않는 코덱 형식의 오디오를 동기화 문제 없이 사용 가능하므로 코덱 형식에 대한 종속성이 감소한다.Also, the dependency on the codec format is reduced because the codec format audio that is not supported by the video tag can be used without synchronization problems.

본 발명에 따른 효과는 이상에서 예시된 내용에 의해 제한되지 않으며, 더욱 다양한 효과들이 본 명세서 내에 포함되어 있다.The effects according to the present invention are not limited by the contents exemplified above, and more various effects are included in the specification.

도 1은 미디어 재생을 위한 전체 시스템의 실시예를 나타낸다.
도 2는 기기들 간의 통신을 위해 계층적으로 정의되는 TCP/IP 4계층 모델을 보여주는 도면이다.
도 3은 미디어 서비스 장치(110)와 미디어 재생 장치(120)간의 웹소켓 연결이 이루어지는 과정을 나타낸다.
도 4는 웹소켓 연결을 통한 데이터의 송수신 과정의 일 예를 보여준다.
도 5는 네트워크 인터페이스(21)를 통해 전송되는 통신 패킷의 구조를 도시한 도면이다.
도 6은 미디어 서비스 장치(110)의 일 실시예를 나타낸다.
도 7은 미디어 서비스 장치(110)의 다른 실시예를 나타낸다.
도 8은 스크립트 모듈은 일 실시예를 나타낸다.
도 9는 스크립트 모듈의 다른 실시예를 나타낸다.
도 10은 스크립트 모듈의 또 다른 실시예를 나타낸다.
도 11은 스크립트 모듈의 또 다른 실시예를 나타낸다.
도 12는 미디어 재생 장치(120)의 일 실시예를 나타낸다.
도 13은 미디어 재생 장치(120)의 다른 실시예를 나타낸다.
도 14는 미디어 재생 장치(120)의 또 다른 실시예를 나타낸다.
도 15는 청크 데이터 생성과정을 나타낸다.
도 16은 오디오 청크 생성과정을 나타낸다.
도 17은 본 발명의 일 실시예에 따른 자바스크립트로 구현된 스크립트 모듈을 생성하는 과정을 설명하기 위한 예시도이다.
도 18은 미디어 재생 장치(120)를 구현하기 위한 컴퓨팅 장치(400)의 예시도이다.
Figure 1 shows an embodiment of an overall system for media playback.
FIG. 2 is a diagram illustrating a TCP / IP 4-layer model that is hierarchically defined for communication between devices.
FIG. 3 shows a process of connecting a web socket between the media service apparatus 110 and the media playback apparatus 120.
FIG. 4 shows an example of a process of transmitting and receiving data through a web socket connection.
5 is a diagram showing a structure of a communication packet transmitted through the network interface 21. As shown in FIG.
6 shows an embodiment of a media service apparatus 110. [
FIG. 7 shows another embodiment of the media service apparatus 110. FIG.
Figure 8 illustrates one embodiment of the script module.
Figure 9 shows another embodiment of a script module.
Figure 10 shows another embodiment of a script module.
11 shows another embodiment of the script module.
12 shows an embodiment of the media playback apparatus 120. In Fig.
Fig. 13 shows another embodiment of the media playback apparatus 120. Fig.
Fig. 14 shows another embodiment of the media playback apparatus 120. Fig.
15 shows a process of generating chunk data.
16 shows an audio chunk generation process.
17 is an exemplary diagram for explaining a process of generating a script module implemented with JavaScript in accordance with an embodiment of the present invention.
18 is an exemplary diagram of a computing device 400 for implementing the media playback device 120. As shown in FIG.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.BRIEF DESCRIPTION OF THE DRAWINGS The advantages and features of the present invention and the manner of achieving them will become apparent with reference to the embodiments described in detail below with reference to the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. To fully disclose the scope of the invention to those skilled in the art, and the invention is only defined by the scope of the claims. Like reference numerals refer to like elements throughout the specification.

다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다.Unless defined otherwise, all terms (including technical and scientific terms) used herein may be used in a sense commonly understood by one of ordinary skill in the art to which this invention belongs. Also, commonly used predefined terms are not ideally or excessively interpreted unless explicitly defined otherwise.

본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 및/또는 "포함하는(comprising)"은 언급된 구성요소 외에 하나 이상의 다른 구성요소의 존재 또는 추가를 배제하지 않는다.The terminology used herein is for the purpose of illustrating embodiments and is not intended to be limiting of the present invention. In the present specification, the singular form includes plural forms unless otherwise specified in the specification. The terms " comprises " and / or " comprising " used in the specification do not exclude the presence or addition of one or more other elements in addition to the stated element.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 미디어 재생을 위한 전체 시스템의 실시예를 나타낸다. 도 1의 전체 시스템은 미디어 서비스 장치(110)와 미디어 재생 장치(120) 및 두 장치를 연결하는 네트워크(430)로 이루어진다. Figure 1 shows an embodiment of an overall system for media playback. 1 comprises a media service apparatus 110, a media playback apparatus 120, and a network 430 for connecting the two apparatuses.

미디어 서비스 장치(110)는 하나 이상의 영상 재생 장치들에 대해 컴퓨팅 서비스를 제공할 수 있도록 적합한 컴퓨팅 또는 프로세싱 장치를 포함한다. 예를 들면, 미디어 서비스 장치(110)는 네트워크 카메라, 네트워크 비디오 레코더(NVR), 디지털 비디오 레코더(DVR) 등과 같이 영상 스트림을 생성하거나 저장하며 사용자 기기들에 전송할 수 있는 장치를 포함한다. The media service device 110 includes a computing or processing device suitable for providing computing services for one or more video playback devices. For example, the media service apparatus 110 includes a device capable of generating or storing a video stream, such as a network camera, a network video recorder (NVR), a digital video recorder (DVR)

미디어 재생 장치(120)는 네트워크를 통해 미디어 서비스 장치(110)나 다른 컴퓨팅 사용자 기기들과 상호작용할 수 있도록 적합한 컴퓨팅 또는 프로세싱 장치를 포함한다. 예를 들면, 미디어 재생 장치(120)는 데스크톱 컴퓨터, 모바일 전화 또는 스마트폰, PDA(personal digital assistant), 랩톱 컴퓨터 및 타블릿 컴퓨터를 포함할 수 있다. Media playback apparatus 120 includes a computing or processing device suitable for interacting with media service device 110 or other computing user devices over a network. For example, media playback device 120 may include a desktop computer, a mobile phone or smart phone, a personal digital assistant (PDA), a laptop computer, and a tablet computer.

미디어 서비스 장치(110)에 의해 실시간 촬영 또는 저장된 미디어는 미디어 재생 장치(120)의 요청에 의해 네트워크(430)를 통해 전송된다. 사용자는 미디어 재생 장치(120)의 웹 브라우저(210)상에 구현된 사용자 인터페이스를 통해 전송된 미디어를 재생하는 것이 가능하다. 이때, 웹 브라우저(210)는 구글 크롬, 마이크로소프트 익스플로러, 모질라의 파이어폭스, 애플의 사파리 등, 데스크톱 컴퓨터나 모바일 전화에 탑재되는 일반적으로 알려진 브라우저를 포함할 뿐만 아니라, 웹 브라우저의 리소스나 API를 이용하여 별도로 제작된 소프트웨어 어플리케이션까지 포괄한다.The media shot or stored in real time by the media service apparatus 110 is transmitted via the network 430 at the request of the media playback apparatus 120. [ The user is able to reproduce the media transmitted through the user interface implemented on the web browser 210 of the media player 120. [ At this time, the web browser 210 not only includes a commonly known browser installed on a desktop computer or a mobile phone such as Google Chrome, Microsoft Explorer, Mozilla Firefox, Apple Safari, And software applications that are created separately.

이하 도 2 내지 도 5를 통해 미디어 서비스 장치(110)와 미디어 재생 장치(120)사이의 네트워크 통신 방식인 웹소켓 상에서 전송되는 RTSP/RTP 프로토콜을 설명한다.An RTSP / RTP protocol transmitted over a web socket, which is a network communication method between the media service apparatus 110 and the media playback apparatus 120, will be described with reference to FIGS.

도 2는 기기들 간의 통신을 위해 계층적으로 정의되는 TCP/IP 4계층 모델을 보여주는 도면이다. FIG. 2 is a diagram illustrating a TCP / IP 4-layer model that is hierarchically defined for communication between devices.

4계층은 네트워크 인터페이스 계층(21), 인터넷 계층(22), 전송 계층(23) 및 어플리케이션 계층(24)으로 이루어져 있다. 웹소켓 상에서 전송되는 RTSP/RTP 프로토콜에서 웹소켓 연결은 전송 계층(23) 연결의 상부에 위치하므로, 웹소켓 연결을 사용하기 위해서는, TCP 전송 연결이 미디어 서비스 장치(110)와 미디어 재생 장치(120) 사이에서 먼저 수립되어야 한다. 일단 웹소켓 연결이 예를 들어, 3-way 핸드쉐이크(hand-shake) 과정을 통해 미디어 서비스 장치(110)와 미디어 재생 장치(120)간에 수립되면, 웹소켓 통신은 웹소켓 패킷들을 전송함에 의해 수행된다. 웹소켓 연결 및 웹소켓 패킷은 이하 도 3 내지 도 5를 통해 자세히 설명한다.The fourth layer comprises a network interface layer 21, an Internet layer 22, a transport layer 23 and an application layer 24. In order to use a web socket connection, a TCP transmission connection is established between the media service apparatus 110 and the media playback apparatus 120 (RTSP / RTP protocol) in order to use the web socket connection in the RTSP / ) Should be established first. Once the web socket connection is established between the media service device 110 and the media playback device 120, for example, via a three-way handshake process, the web socket communication is initiated by sending web socket packets . The web socket connection and the web socket packet will be described in detail with reference to FIGS. 3 to 5 below.

도 3은 미디어 서비스 장치(110)와 미디어 재생 장치(120)간의 웹소켓 연결이 이루어지는 과정을 나타낸다. FIG. 3 shows a process of connecting a web socket between the media service apparatus 110 and the media playback apparatus 120.

미디어 재생 장치(120)는 미디어 서비스 장치(110)에 웹소켓 URI를 사용하여 웹소켓 연결을 개시하는 요청을 한다. 웹소켓 URI는 GetServiceCapabilities 명령을 사용하면 획득이 가능하다. 웹소켓 URI는 예를 들어 "ws://192.168.0.5/webSocketServer"와 같은 방식으로 표현된다(S1000). The media playback apparatus 120 requests the media service apparatus 110 to initiate a web socket connection using the web socket URI. Web socket URIs can be obtained using the GetServiceCapabilities command. The web socket URI is expressed in the same manner as, for example, " ws: //192.168.0.5/webSocketServer " (S1000).

미디어 재생 장치(120)는 미디어 서비스 장치(110)에 웹소켓 업그레이드 요청을 한다. 미디어 서비스 장치(110)는 프로토콜 전환 요청에 대해 승인한다는 상태코드인 101 코드로 응답한다(S1100). The media playback apparatus 120 requests the media service apparatus 110 to upgrade the web socket. The media service apparatus 110 responds with a 101 code which is a status code to approve the protocol change request (S1100).

미디어 서비스 장치(110)와 미디어 재생 장치(120)간에 웹소켓 연결이 이루어진 후부터는 HTTP/1.1 프로토콜이 아닌 웹소켓 상에서 전송되는 RTSP/RTP 프로토콜로 데이터를 주고받는다. 도 3의 DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN 은 RTSP의 명령어이다. DESCRIBE 요청에는 URL이 포함된다. DESCRIBE에 대한 응답 메시지에는 요청한 것에 대한 설명도 포함된다. SETUP 요청은 단일 미디어 스트림이 전송되어야 하는지 규정한다. PLAY 요청은 하나 또는 모든 미디어 스트림을 재생시키는 요청으로 다중 요청이 가능하다. PAUSE 요청은 하나 또는 모든 미디어 스트림에 대해서 일시 중지를 명령한다. PLAY 요청으로 다시 재시작 할 수 있다. TEARDOWN 요청은 세션을 종료하기 위한 명령어이다. TEARDOWN 요청에 의해 모든 미디어 스트림의 재생을 중단하고 관련 데이터에 걸린 모든 세션도 해제한다(S1200).After the web socket connection is established between the media service apparatus 110 and the media playback apparatus 120, data is exchanged through the RTSP / RTP protocol transmitted over the web socket instead of the HTTP / 1.1 protocol. 3, DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN are RTSP commands. A DESCRIBE request contains a URL. The response message to DESCRIBE also includes a description of the request. A SETUP request specifies that a single media stream should be transmitted. A PLAY request is a request to play one or all media streams and multiple requests are possible. A PAUSE request commands a pause for one or all media streams. The PLAY request can be restarted again. A TEARDOWN request is a command to terminate a session. The reproduction of all the media streams is stopped by the TEARDOWN request and all sessions related to the related data are also released (S1200).

도 3에 도시된 웹소켓 연결 과정에서 미디어 재생 장치(120)에서 보내는 요청 메세지와 미디어 서비스 장치(110)의 응답 메세지의 예는 다음의 표 1에 기재된 바와 같다.Examples of a request message sent from the media playback apparatus 120 and a response message sent from the media service apparatus 110 in the Web socket connection process shown in FIG. 3 are shown in Table 1 below.

미디어 재생 장치(120) -> 미디어 서비스 장치(110)
GET /webSocketServer HTTP/1.1
Host: 192.168.0.1
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Origin: http://example.com
Sec-WebSocket-Protocol: rtsp.onvif.org
Sec-WebSocket-Version: 13.

미디어 서비스 장치(110) -> 미디어 재생 장치(120)
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
Sec-WebSocket-Protocol: rtsp.onvif.org
The media playback apparatus 120 -> the media service apparatus 110 -
GET / webSocketServer HTTP / 1.1
Host: 192.168.0.1
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ ==
Origin: http://example.com
Sec-WebSocket-Protocol: rtsp.onvif.org
Sec-WebSocket-Version: 13.

The media service apparatus 110, the media playback apparatus 120,
HTTP / 1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK + xOo =
Sec-WebSocket-Protocol: rtsp.onvif.org

이러한 웹소켓 연결은 HTML5 표준인 웹소켓 프로토콜에 따라 이루어진다. 특히, 웹소켓 연결은 양방향 통신을 지속적으로 지원하기 때문에, 미디어 서비스 장치(110)와 미디어 재생 장치(120)간에 연결이 끊기지 않고 계속적으로 데이터를 송수신할 수 있도록 할 수 있다.These Web socket connections are made according to the Web Socket protocol, the HTML5 standard. In particular, since the web socket connection continuously supports bidirectional communication, it is possible to continuously transmit and receive data without disconnecting the connection between the media service apparatus 110 and the media playback apparatus 120.

도 4는 웹소켓 연결을 통한 데이터의 송수신 과정의 일 예를 보여준다. FIG. 4 shows an example of a process of transmitting and receiving data through a web socket connection.

도 4를 참조하면 먼저, 미디어 재생 장치(120)는 미디어 서비스 장치(110)에 TCP/IP 연결 요청 메시지(TCP/IP connection request)를 전송하고, 미디어 서비스 장치(110)가 이를 수락하여 TCP 응답 메시지(SYN-ACK)를 미디어 재생 장치(120)에 전송하면 TCP/IP 연결이 수립된다. TCP 전송 연결은 로컬 TCP 소켓 및 원격 TCP 소켓의 페어(pair)에 의해 형성될 수 있는데, 각각의 TCP 소켓은 적어도 포트 번호와 IP 주소와 같은 식별자에 의하여 정의된다. 물론, 이러한 TCP/IP 기반의 연결 대신에 양자간에 UDP/IP 기반의 연결을 수립할 수도 있다.Referring to FIG. 4, the media player 120 transmits a TCP / IP connection request message to the media service apparatus 110, and the media service apparatus 110 accepts the TCP / When the message (SYN-ACK) is transmitted to the media playback apparatus 120, a TCP / IP connection is established. A TCP transport connection can be formed by a pair of local TCP sockets and remote TCP sockets, each of which is defined by an identifier, such as at least a port number and an IP address. Of course, instead of these TCP / IP-based connections, you can also establish a UDP / IP-based connection between them.

이 후, 미디어 재생 장치(120)와 미디어 서비스 장치(110) 간에 핸드쉐이크 과정을 통해 양자간에 웹소켓 연결이 수립되면, 그 이후에는 양자간의 지속적인 데이터의 송수신이 가능해진다. 즉, 미디어 재생 장치(120)는 미디어 서비스 장치(110)에 미디어 스트리밍 요청을 전송 웹소켓 패킷(socket.send)의 형태로 전송하고, 미디어 서비스 장치(110)는 미디어 재생 장치(120)에 미디어 스트림을 응답 웹소켓 패킷(socket.onMessage)의 형태로 전송한다. 이러한 과정은 미디어 스트림 전송이 중지되거나 완료될 때까지 지속적으로 양자간에 이루어질 수 있다.Thereafter, when a web socket connection is established between the media playback apparatus 120 and the media service apparatus 110 through a handshake process, continuous data transmission / reception between the media playback apparatus 120 and the media playback apparatus 120 can be performed thereafter. That is, the media playback apparatus 120 transmits a media streaming request in the form of a transmission web socket packet (socket.send) to the media service apparatus 110, and the media service apparatus 110 transmits the media streaming request to the media playback apparatus 120 Sends the stream in the form of a response web socket packet (socket.onMessage). This process can be done continuously between media streams until transmission is stopped or completed.

도 5는 네트워크 인터페이스(21)를 통해 전송되는 통신 패킷의 구조를 도시한 도면이다. 5 is a diagram showing a structure of a communication packet transmitted through the network interface 21. As shown in FIG.

데이터(45)에 해당하는 RTP 페이로드에 RTP 헤더(44)가 부가 되면 RTP 패킷이 된다. RTP 패킷은 웹소켓 페이로드와 같으며 여기에 웹소켓 헤더(43)가 부가되어 웹소켓 패킷이 된다. 웹소켓 패킷은 TCP 페이로드와 같고 여기에 TCP 헤더(42)가 부가되어 TCP 패킷이 된다. 마지막으로 TCP 패킷은 IP 페이로드와 같고 여기에 IP 헤더(41)가 부가되면 최종적으로 통신 패킷, 즉 IP 패킷이 완성된다. 이와 같이 IP 패킷을 완성하는 과정 및 각각의 헤더를 제거하는 과정은 미디어 서비스 장치(110)와 미디어 재생 장치(120)에서 수행된다.When the RTP header 44 is added to the RTP payload corresponding to the data 45, it becomes an RTP packet. The RTP packet is the same as the Web socket payload, and a Web socket header (43) is added to it to become a Web socket packet. The Web socket packet is the same as the TCP payload, and the TCP header 42 is added to the packet to become a TCP packet. Finally, the TCP packet is the same as the IP payload, and when the IP header 41 is added thereto, a communication packet, that is, an IP packet is finally completed. The processes of completing the IP packet and removing the respective headers are performed in the media service apparatus 110 and the media playback apparatus 120.

미디어 서비스 장치(110)와 미디어 재생 장치(120)간의 통신은 이상 도 2 내지 도 5를 통해 설명한 HTML5 기반의 웹소켓 프로토콜을 통해 이루어지기 때문에, RTSP/RTP 송수신 제어를 담당하는 모듈은 HTML5에서 파싱이 가능한 스크립트 코드에 의해 구현될 수 있다. 일 예로 HTML5에서 파싱이 가능한 스크립트인 자바스크립트로 구현될 수 있다. 따라서, 종래와 같이 플러그인을 별도로 설치하지 않고도 RTSP/RTP 프로토콜을 이용한 미디어 재생이 HTML5 환경의 웹 브라우저 내에서 구현될 수 있다.Since the communication between the media service apparatus 110 and the media playback apparatus 120 is performed through the HTML5-based web socket protocol described above with reference to FIGS. 2 to 5, the module responsible for RTSP / RTP transmission / This can be implemented by any possible script code. For example, JavaScript can be implemented as a script that can be parsed in HTML5. Therefore, media playback using the RTSP / RTP protocol can be implemented in the web browser of the HTML5 environment without installing the plug-in separately as in the prior art.

지금까지 미디어 서비스 장치(110)와 미디어 재생 장치(120)간의 네트워크 통신 방식을 살펴보았다. 이하 도 6 내지 도 18을 통해 미디어 서비스 장치(110)와 미디어 재생 장치(120)의 구성 및 작동 방식을 설명한다.The network communication method between the media service apparatus 110 and the media playback apparatus 120 has been described. Hereinafter, the configuration and operation of the media service apparatus 110 and the media playback apparatus 120 will be described with reference to FIGS. 6 to 18. FIG.

도 6은 미디어 서비스 장치(110)의 일 실시예를 나타낸다. 일 실시예에서 미디어 서비스 장치(110)는 실시간 비디오 카메라(111), 인코더(112), 패킷화부(113), 웹 서버(114), 모듈 저장부(115), 모듈 전송부(116), 및 제어부(117)를 포함한다. 6 shows an embodiment of a media service apparatus 110. [ In one embodiment, the media service apparatus 110 includes a real-time video camera 111, an encoder 112, a packetizer 113, a web server 114, a module storage 115, a module transmitter 116, And a control unit 117.

실시간 비디오 카메라(111)는 미디어를 실시간으로 촬영하는 수단으로 촬영은 비디오 캡쳐 및 오디오 녹음을 모두 진행하는 방식과 비디오 캡쳐만 이루어지는 방식을 포함한다. The real-time video camera 111 is a means for photographing media in real time, and the photographing includes a method of performing both video capturing and audio recording, and a method of performing only video capturing.

인코더(112)는 실시간 비디오 카메라(111)에 의해 촬영된 미디어를 압축하여 부호화하는 기능을 수행한다. 인코더(112)에 의한 인코딩은 반드시 웹 브라우저에 임베드 된 디코더에서 지원하는 특정 코덱 형식으로 이루어져야 하는 것은 아니며 임의의 코덱 형식으로 인코딩 하는 것이 가능하다.The encoder 112 compresses and encodes the media photographed by the real-time video camera 111. The encoding by the encoder 112 is not necessarily made up of a specific codec format supported by the decoder embedded in the web browser, but can be encoded in any codec format.

패킷화부(113)는 인코딩된 미디어 데이터를 패킷화하여 전송 패킷을 생성한다. 패킷화란 미디어 데이터를 네트워크(430)를 통해 전송하는 것이 용이하도록 적당한 길이로 분할하거나 또는 미디어 데이터가 짧은 경우 적당한 길이로 일괄하여 그 각각에 수신되어야 할 주소 등의 제어정보를 부여하는 것을 뜻한다. 이 때 제어정보는 전송 패킷의 헤더에 위치하게 된다. 전송 패킷은 전술한 웹소켓 패킷의 형태로 이루어진다.The packetizing unit 113 packetizes the encoded media data to generate a transmission packet. Packetizing means dividing the media data into suitable lengths for facilitating transmission through the network 430, or giving control information such as an address to be received to each of the media data in an appropriate length when the media data is short. At this time, the control information is located in the header of the transport packet. The transport packet is in the form of the Web socket packet described above.

패킷화부(113)는 미디어 재생 장치(120)에서 요청하는 방식에 따라 미디어 데이터의 패킷화를 수행할 수 있다. 예를 들어 미디어 재생 장치(120)에서 프레임 단위의 비디오를 요청한 경우 패킷화부(113)는 프레임 형식으로 전송 패킷을 생성하고, 미디어 재생 장치(120)에서 웹 브라우저에 임베드 된 디코더에서 지원하는 컨테이너 단위로 비디오를 요청한 경우 패킷화부(113)는 컨테이너 형식으로 전송 패킷을 생성할 수 있다. The packetizing unit 113 may packetize media data according to a method requested by the media playback apparatus 120. [ For example, when the media playback apparatus 120 requests a frame-by-frame video, the packetizer 113 generates a transport packet in a frame format. In the media playback apparatus 120, a container unit The packetizing unit 113 can generate a transport packet in a container format.

웹 서버(114)는 미디어 재생 장치(120)와 통신 세션을 형성하는 기능을 수행한다. 즉, 미디어 서비스 장치(110)의 웹 서버(114)와 미디어 재생 장치(120) 간의 핸드쉐이크 과정을 통해 양자간에 웹소켓 연결이 수립된다. 이후 미디어 재생 장치(120)의 요청에 따라 패킷화부(113)에서 생성된 전송 패킷을 웹 서버(114)를 통해 전송하게 된다. The web server 114 performs a function of establishing a communication session with the media playback apparatus 120. That is, a web socket connection is established between the web server 114 of the media service apparatus 110 and the media playback apparatus 120 through a handshake process. And then transmits the transport packet generated by the packetizing unit 113 through the web server 114 at the request of the media playback apparatus 120. [

모듈 저장부(115)는 미디어 재생 장치(120)에서 미디어를 재생하는데 필요한 스크립트 모듈을 저장하는 모듈이다. 스크립트 모듈은 웹 브라우저에서 파싱 할 수 있는 스크립트로 작성된 코드로 미디어 재생 장치(120)에서 플러그인이나 별도의 응용프로그램 설치 없이 HTML5환경의 웹 브라우저에서 미디어 재생이 가능하도록 해주는 모듈이다. 스크립트 모듈은 일 예로 자바스크립트로 작성된 코드일 수 있다. 스크립트 모듈에 대해서는 도 8 내지 도 11을 참조하여 후술한다.The module storage unit 115 is a module for storing a script module necessary for playing media on the media playback apparatus 120. [ The script module is a module that allows a media player to play media on a web browser in an HTML5 environment without installing a plug-in or a separate application program in the media player 120 with a script written in a script that can be parsed by a web browser. The script module may be, for example, code written in JavaScript. The script module will be described later with reference to FIG. 8 to FIG.

모듈 전송부(116)는 모듈 저장부(115)에 저장된 스크립트 모듈을 미디어 재생 장치(120)로 전송하는 모듈이다. 모듈 전송부(116)는 미디어 재생 장치(120)가 네트워크(430)를 통해 미디어 서비스 장치(110)에 접속한 경우 이에 응답하여 스크립트 모듈을 전송한다. The module transfer unit 116 is a module for transferring a script module stored in the module storage unit 115 to the media playback apparatus 120. The module transfer unit 116 transmits the script module in response to the media playback apparatus 120 accessing the media service apparatus 110 via the network 430. [

제어부(117)는 미디어 서비스 장치(110)의 다른 구성 모듈들을 제어하는 모듈이다. 예를 들어 네트워크(430)를 통해 웹 서버(114)에 미디어 재생 장치(120)의 접속이 이루어진 경우 모듈 저장부(115)에 저장된 스크립트 모듈이 모듈 전송부(116)를 통해 미디어 재생 장치(120)로 전송되는데, 제어부(117)는 각 모듈들로부터 신호를 주고 받아 해당 작업이 원활이 이루어지게끔 통제하는 역할을 수행한다.The control unit 117 is a module for controlling other configuration modules of the media service apparatus 110. For example, when the media playback apparatus 120 is connected to the web server 114 via the network 430, the script module stored in the module storage unit 115 is transmitted to the media playback apparatus 120 The control unit 117 transmits and receives signals from the respective modules and controls the smooth operation of the corresponding operation.

이상의 도 6의 미디어 서비스 장치(110)의 구성 모듈들에 대한 설명을 바탕으로 작동 방식을 살펴본다. 네트워크(430)를 통해 웹 서버(114)에 미디어 재생 장치(120)의 접속이 이루어지면 모듈 전송부(116)는 모듈 저장부(115)에 저장된 스크립트 모듈을 미디어 재생 장치(120)로 전송한다. 미디어 재생 장치(120)에 스크립트 모듈이 설치되면 사용자는 사용자 인터페이스를 통해 미디어 재생을 요청한다. 이에 미디어 서비스 장치(110)는 실시간 비디오 카메라(111)에서 촬영되는 실시간 라이브 미디어를 인코더(112)에서 인코딩하고 패킷화부(113)에서 프레임 또는 컨테이너 형식에 맞춰 미디어 데이터를 전송 패킷으로 패킷화하여 웹 서버(114)를 통해 미디어 재생 장치(120)로 전송한다.The operation method will be described based on the description of the configuration modules of the media service apparatus 110 of FIG. When the media playback apparatus 120 is connected to the web server 114 via the network 430, the module transfer unit 116 transmits the script module stored in the module storage unit 115 to the media playback apparatus 120 . When a script module is installed in the media player 120, the user requests media playback through the user interface. The media service apparatus 110 encodes the real-time live media photographed by the real-time video camera 111 in the encoder 112 and packetizes the media data into transport packets in accordance with the frame or container format in the packetizer 113, And transmits it to the media playback apparatus 120 via the server 114. [

도 7은 미디어 서비스 장치(110)의 다른 실시예를 나타낸다. 도 6의 미디어 서비스 장치(110)는 실시간 비디오 카메라(111)에 의해 실시간 라이브 미디어를 전송하기 위한 실시예이고, 도 7의 미디어 서비스 장치(110)는 미디어 저장부(118)에 저장된 미디어 데이터를 전송하기 위한 실시예를 나타낸다. FIG. 7 shows another embodiment of the media service apparatus 110. FIG. The media service apparatus 110 of FIG. 6 is an embodiment for transmitting real-time live media by the real-time video camera 111, and the media service apparatus 110 of FIG. 7 transmits media data stored in the media storage unit 118 Fig.

미디어 저장부(118)는 네트워크 비디오 레코더(NVR) 또는 개인용 녹화기(PVR)를 포함하나 도 7의 실시예에서는 네트워크 비디오 레코더인 경우를 예로 들어 설명한다. The media storage unit 118 includes a network video recorder (NVR) or a personal video recorder (PVR), but will be described as an example of a network video recorder in the embodiment of FIG.

미디어 저장부(118)는 카메라 또는 서버로부터 미디어 데이터를 전송받아 압축 저장한다. 미디어 재생 장치(120)로부터 미디어 데이터 전송 요청이 있는 경우 미디어 서비스 장치(110)는 미디어 저장부(118)에 저장된 미디어 데이터를 패킷화부(113)에서 패킷화하여 웹 서버(114)를 통해 전송한다. The media storage unit 118 receives media data from a camera or a server and compresses and stores the media data. When there is a media data transmission request from the media playback apparatus 120, the media service apparatus 110 packetizes the media data stored in the media storage unit 118 in the packetizing unit 113 and transmits the packetized data through the web server 114 .

도 7의 미디어 서비스 장치(110) 구성모듈 중 패킷화부(113), 웹 서버(114), 모듈 저장부(115), 모듈 전송부(116), 제어부(117)는 도 6의 실시예에서 설명한 모듈들로 중복되는 설명은 생략한다.The packetizing unit 113, the web server 114, the module storage unit 115, the module transfer unit 116, and the control unit 117 of the media service apparatus 110 configuration module shown in FIG. Duplicate descriptions of modules are omitted.

도 8 내지 도 11은 미디어 서비스 장치(110)로부터 미디어 재생 장치(120)로 전송되는 스크립트 모듈의 실시예들을 나타낸다. 스크립트 모듈은 웹 브라우저에서 파싱할 수 있는 스크립트로 구현될 수 있으며 도 8 내지 도 11의 실시예에서는 자바스크립트로 구현되는 경우에 대해 설명한다. 8 to 11 illustrate embodiments of a script module that is transmitted from the media service apparatus 110 to the media playback apparatus 120. Fig. The script module can be implemented as a script that can be parsed in a web browser, and a case where the script module is implemented as JavaScript in the embodiment of Figs. 8 to 11 will be described.

도 8은 스크립트 모듈은 일 실시예를 나타낸다. 도 8의 스크립트 모듈은 프레임 단위로 비디오를 복원하기 위한 모듈로, RTSP/RTP 클라이언트 모듈(121), 디패킷화 모듈(122), JS 디코더 모듈(124), 및 JS 렌더러 모듈(125)을 포함한다.Figure 8 illustrates one embodiment of the script module. 8 includes a RTSP / RTP client module 121, a depacketization module 122, a JS decoder module 124, and a JS renderer module 125. The RTSP / do.

RTSP/RTP 클라이언트 모듈(121)은 미디어 서비스 장치(110)와 RTSP/RTP 통신을 지원하는 기능을 수행한다. RTSP/RTP 클라이언트 모듈(121)을 통해 미디어 서비스 장치(110)의 웹 서버(114)로부터 전송 패킷을 수신할 수 있다. 현재로서 플러그인 없이 웹 브라우저 상에서 RTSP/RTP에 따라 미디어를 처리하는 것이 가능하지 않은데, RTSP/RTP 클라이언트 모듈(121)을 이용하면 웹 브라우저에서 HTTP 방식을 이용함에도 안정적으로 RTSP/RTP 프로토콜로 전송된 데이터를 수신할 수 있다.The RTSP / RTP client module 121 performs a function of supporting RTSP / RTP communication with the media service apparatus 110. And can receive a transmission packet from the web server 114 of the media service apparatus 110 via the RTSP / RTP client module 121. [ Currently, it is not possible to process media according to RTSP / RTP on a web browser without a plug-in. Using the RTSP / RTP client module 121, the data transmitted in the RTSP / RTP protocol Lt; / RTI >

디패킷화 모듈(122)은 RTSP/RTP 클라이언트 모듈(121)로부터 전달받은 패킷을 디패킷화(depacketization)하는 모듈이다. 디패킷화란 패킷화의 반대되는 개념으로 패킷화가 미디어 데이터를 적당한 길이로 분할하여 패킷을 형성하는 것을 의미한다면 이를 다시 이어 붙여 패킷화 이전의 상태로 미디어 데이터를 복원해주는 것을 뜻한다.The decapsulation module 122 is a module for depacketizing a packet received from the RTSP / RTP client module 121. If the packetization means forming the packet by dividing the media data into an appropriate length, it means to restore the media data to the state prior to the packetization by rejoining it.

JS 디코더 모듈(124)은 인코딩된 비디오의 압축 및 부호화를 해제하는 것, 즉 디코딩을 수행하는 모듈이다. JS 디코더 모듈(124)은 스크립트 모듈의 다른 모듈들과 마찬가지로 자바스크립트로 구현될 수 있다. JS 디코더 모듈(124)을 자바스크립트로 구현하기 때문에 웹 브라우저에 임베드 된 디코더와 달리 코덱 형식에 제한 없이 임의의 코덱 형식에 대하여 디코딩이 가능하다. 또한 프레임 단위로 디코딩이 가능하다.The JS decoder module 124 is a module for releasing compression and encoding of the encoded video, that is, decoding. The JS decoder module 124 may be implemented in JavaScript as in the other modules of the script module. Since the JS decoder module 124 is implemented in JavaScript, unlike a decoder embedded in a web browser, it is possible to decode an arbitrary codec format without limitation to the codec format. It is also possible to decode on a frame-by-frame basis.

도 8의 일 실시예에 따라 JS 디코더 모듈(124)을 자바스크립트로 구현하면 예를 들어 다음의 표 2 및 표 3과 같은 코드로 표현될 수 있다(표 3은 표 2로부터 이어지는 내용이다).For example, the JS decoder module 124 may be represented by a code shown in Table 2 and Table 3, as shown in Table 3, according to an embodiment of FIG.

function HevcDecoder () {

var _name = "HevcDecoder";
var self = this;

this._decoderParameters = null;
this._isRequestActive = false;
this._player = null;
this._requestContext = null;
this._requestContextQueue = [];

this.pushRequestContext = function (requestContext) {
self._requestContextQueue.push(requestContext);
};
this.decode = function () {
if (self._isRequestActive) {
return;
}

if (self._requestContextQueue.length) {
self._isRequestActive = true;
self._requestContext = self._requestContextQueue.pop();
self._playStream(self._requestContext.stream);
}
};
this._createDecodeCanvas = function(parentElement) {
self.canvas = document.createElement("canvas");
self.canvas.style.display = "none";
self.canvas.id = "decode-canvas";
parentElement.appendChild(self.canvas);
self.ctx = self.canvas.getContext("2d");
};
this._playStream = function (buffer) {
this._reset();
this._handleOnLoad(buffer);
}
this._onImageDecoded = function (image) {
var width = image.get_width();
var height = image.get_height();
this.canvas.width = width;
this.canvas.height = height;
this._imageData = this.ctx.createImageData(width, height);

image.display(this._imageData, function (displayImageData) {
var itemId = self._requestContext.itemIds[self._requestContext.currentFrameIndex];
var payload = self._requestContext.payload;
if (height > payload.displayHeight) {
payload.displayHeight = height;
}
function HevcDecoder () {

var _name = "HevcDecoder";
var self = this;

this._decoderParameters = null;
this._isRequestActive = false;
this._player = null;
this._requestContext = null;
this._requestContextQueue = [];

this.pushRequestContext = function (requestContext) {
self._requestContextQueue.push (requestContext);
};
this.decode = function () {
if (self._isRequestActive) {
return;
}

if (self._requestContextQueue.length) {
self._isRequestActive = true;
self._requestContext = self._requestContextQueue.pop ();
self._playStream (self._requestContext.stream);
}
};
this._createDecodeCanvas = function (parentElement) {
self.canvas = document.createElement ("canvas");
self.canvas.style.display = "none";
self.canvas.id = "decode-canvas";
parentElement.appendChild (self.canvas);
self.ctx = self.canvas.getContext ("2d");
};
this._playStream = function (buffer) {
this._reset ();
this._handleOnLoad (buffer);
}
this._onImageDecoded = function (image) {
var width = image.get_width ();
var height = image.get_height ();
this.canvas.width = width;
this.canvas.height = height;
this._imageData = this.ctx.createImageData (width, height);

image.display (this._imageData, function (displayImageData) {
var itemId = self._requestContext.itemIds [self._requestContext.currentFrameIndex];
var payload = self._requestContext.payload;
if (height> payload.displayHeight) {
payload.displayHeight = height;
}

if (!(itemId in self._requestContext.dependencies)) {
if (width > payload.displayWidth) {
payload.displayWidth = width;
}
payload.frames.push({
canvasFrameData: displayImageData.data,
itemId: itemId,
width: width,
height: height
});
}
self._requestContext.currentFrameIndex++;
if (self._requestContext.currentFrameIndex >= self._requestContext.itemIds.length) {
self._requestContext.callback(payload);
self._isRequestActive = false;
self.decode(); // Decode next queued request
}
});
};

...

this._createDecodeCanvas(document.documentElement);
this._reset();
}
if (! (itemId in self._requestContext.dependencies)) {
if (width> payload.displayWidth) {
payload.displayWidth = width;
}
payload.frames.push ({
canvasFrameData: displayImageData.data,
itemId: itemId,
width: width,
height: height
});
}
self._requestContext.currentFrameIndex ++;
if (self._requestContext.currentFrameIndex> = self._requestContext.itemIds.length) {
self._requestContext.callback (payload);
self._isRequestActive = false;
self.decode (); // Decode next queued request
}
});
};

...

this._createDecodeCanvas (document.documentElement);
this._reset ();
}

JS 렌더러 모듈(125)은 JS 디코더 모듈(124)에서 디코딩 된 비디오를 렌더링하여 모니터 등과 같은 출력 기기에 디스플레이 되도록 하는 기능을 수행한다. JS 렌더러 모듈(125)은 WebGL을 이용하며 YUV 형식의 비디오를 RGB 형식으로 변환시킬 수 있다. WebGL이란 자바스크립트를 통해 사용이 가능하고 3D 그래픽 인터페이스를 만들 수 있게 해주는 웹 기반의 그래픽 라이브러리이다.The JS renderer module 125 performs a function of rendering the decoded video in the JS decoder module 124 and displaying it on an output device such as a monitor or the like. The JS Renderer module 125 uses WebGL to convert YUV format video to RGB format. WebGL is a web-based graphical library that allows you to create 3D graphics interfaces that are available through JavaScript.

도 9는 스크립트 모듈의 다른 실시예를 나타낸다. 도 9의 스크립트 모듈은 컨테이너 형식으로 비디오를 복원하기 위해 사용되는 모듈로, RTSP/RTP 클라이언트 모듈(121), 디패킷화 모듈(122), 및 컨테이너 생성 모듈(127)을 포함한다. RTSP/RTP 클라이언트 모듈(121) 및 디패킷화 모듈(122)은 각각 도 8에서 설명한 모듈들로 중복되는 설명은 생략한다. Figure 9 shows another embodiment of a script module. The script module of FIG. 9 is a module used for restoring video in a container format, and includes an RTSP / RTP client module 121, a depacketization module 122, and a container creation module 127. The RTSP / RTP client module 121 and the depacketization module 122 are omitted from the overlapping description of the modules described in FIG. 8, respectively.

도 9의 스크립트 모듈을 자세히 살펴보면 도 8의 경우와 다르게 컨테이너 생성 모듈(127)이 포함된 것을 볼 수 있다. 컨테이너 생성 모듈(127)은 비디오가 컨테이너 단위로 패키징이 이루어져 있지 않은 경우 프레임들을 단위 개수로 패키징하여 컨테이너를 형성하는 기능을 수행할 수 있다. 또한 비디오 프레임들과 오디오를 단위 개수로 패키징할 수 있다. 이때 컨테이너 생성 모듈(127)은 비디오의 fps(frames per second)에 따라 단위 개수를 가변적으로 조절할 수 있다. 컨테이너 생성 모듈(127)에서 비디오 프레임들을 단위 개수로 패키징 하거나 비디오 프레임들과 오디오를 단위 개수로 패키징 한 것을 청크 데이터라 칭하기로 한다.9, it can be seen that the container generation module 127 is included, unlike the case of FIG. The container generation module 127 may perform a function of forming a container by packaging the frames in units of units when video is not packaged in container units. In addition, video frames and audio can be packaged in units. At this time, the container generation module 127 can variably adjust the number of units according to fps (frames per second) of the video. It is assumed that the container generation module 127 packages video frames in a unit number or packages video frames and audio in a unit number as chunk data.

컨테이너는 MPEG-DASH 컨테이너 등 비디오 태그에서 지원하는 컨테이너를 포함하는 개념이다. 컨테이너 생성 모듈(127)은 HTML5 비디오 태그와 호환되는 컨테이너 형식으로 미디어를 구성해줄 수 있기 때문에 영상 촬영 장치에서 컨테이너 형식으로 미디어를 전송하지 않더라도 호환성 문제 없이 미디어 재생 장치(120)에서 비디오 태그의 사용이 가능하도록 해준다. 즉, 기존에 설치된 영상 촬영 장치의 수정 없이도 비디오 태그의 사용이 가능한 환경을 제공한다. A container is a concept that includes a container supported by a video tag, such as an MPEG-DASH container. The container creation module 127 can configure the media in a container format compatible with the HTML5 video tag so that the use of the video tag in the media playback apparatus 120 without compatibility problems even if the media is not transmitted in the container format in the image capturing apparatus . That is, the present invention provides an environment in which video tags can be used without modification of the existing image capturing apparatus.

도 10은 스크립트 모듈의 또 다른 실시예를 나타낸다. 도 10의 스크립트 모듈은 오디오 재생을 위한 모듈로 RTSP/RTP 클라이언트 모듈(121), 디패킷화 모듈(122), 및 오디오 트랜스코더(123)를 포함한다. RTSP/RTP 클라이언트 모듈(121) 및 디패킷화 모듈(122)은 각각 도 8에서 설명한 모듈들로 중복되는 설명은 생략한다. Figure 10 shows another embodiment of a script module. The script module of FIG. 10 includes a RTSP / RTP client module 121, a decapsulation module 122, and an audio transcoder 123 as a module for audio reproduction. The RTSP / RTP client module 121 and the depacketization module 122 are omitted from the overlapping description of the modules described in FIG. 8, respectively.

오디오 트랜스코더(123)는 오디오 데이터가 웹 브라우저에 임베드 된 디코더에서 지원하지 않는 코덱 형식으로 구성된 경우 트랜스코딩을 수행하는 모듈이다. 트랜스코딩이란 코덱 형식을 변환하는 것으로 오디오 트랜스코더(123)에서는 오디오 데이터의 압축을 풀고 이전과 다른 코덱 형식으로 다시 압축을 수행한다. 예를 들어 웹 브라우저에 임베드 된 디코더인 비디오 태그에서 지원하지 않는 G.711 코덱 형식의 오디오 데이터를 비디오 태그에서 지원하는 ACC의 코덱 형식으로 변환하는 경우이다.The audio transcoder 123 is a module for performing transcoding when audio data is configured in a codec format not supported by a decoder embedded in a web browser. The transcoding converts the codec format, and the audio transcoder 123 decompresses the audio data and compresses the audio data again in a different codec format. For example, audio data in the G.711 codec format, which is not supported by the video tag, which is a decoder embedded in a web browser, is converted into the codec format of ACC that is supported by the video tag.

오디오 트랜스코더(123)는 오디오 데이터를 웹 브라우저에서 임베드 된 디코더에서 지원하는 코덱 형식으로 변환하여 주므로, 오디오 데이터를 비디오 데이터와 함께 웹 브라우저에서 임베드 된 디코더를 이용하여 복원하여 동기화 문제 없이 출력할 수 있는 환경을 제공한다. The audio transcoder 123 converts the audio data into a codec format supported by a decoder embedded in a web browser, so that the audio data can be restored using the decoder embedded in the web browser together with the video data, Environment.

도 11은 스크립트 모듈의 또 다른 실시예를 나타낸다. 도 11의 스크립트 모듈은 도 10의 스크립트 모듈과 마찬가지로 오디오 재생을 위한 모듈이나 구성이 다르다. 도 11의 스크립트 모듈은 RTSP/RTP 클라이언트 모듈(121), 디패킷화 모듈(122), 오디오 디코더(126), 오디오 청크부(128) 및 버퍼 컨트롤러(129)를 포함하며 RTSP/RTP 클라이언트 모듈(121) 및 디패킷화 모듈(122)은 도 8에서 설명한 모듈들이다. 11 shows another embodiment of the script module. The script module of FIG. 11 differs from the script module of FIG. 10 in modules and configurations for audio reproduction. The script module of FIG. 11 includes an RTSP / RTP client module 121, a decapsulation module 122, an audio decoder 126, an audio chunk part 128 and a buffer controller 129, 121 and the depacketizing module 122 are the modules described in Fig.

오디오 디코더(126)는 오디오 데이터의 디코딩을 수행하는 모듈로 다른 모듈들과 마찬가지로 웹 브라우저에서 파싱할 수 있는 스크립트인 자바스크립트로 구현될 수 있다.The audio decoder 126 is a module that performs decoding of audio data, and can be implemented by JavaScript, which is a script that can be parsed by a web browser as with other modules.

오디오 디코더(126)에서 디코딩된 오디오 데이터는 오디오 청크부(128)에서 오디오 청크로 패키징된다. 이때, 오디오 청크는 컨테이너 생성 모듈(127)에서 생성되는 청크 데이터를 구성하는 프레임들의 단위 개수로 오디오 데이터를 패키징하여 생성된다. 즉, 청크 데이터에 종속되어 오디오 청크가 생성된다. 도 12에는 컨테이너 생성 모듈(127)과 오디오 청크부(128)가 모두 포함된 미디어 재생 장치(120)가 도시되어 있는데, 도 12에서 오디오 청크를 생성하는 것에 대해 다시 설명한다. The audio data decoded in the audio decoder 126 is packaged as audio chunks in the audio chunk unit 128. [ At this time, the audio chunk is generated by packaging the audio data in units of frames constituting the chunk data generated by the container generation module 127. That is, an audio chunk is generated depending on the chunk data. 12 shows a media playback apparatus 120 including both a container generation module 127 and an audio chunk unit 128. The generation of the audio chunks in FIG. 12 will be described again.

버퍼 컨트롤러(129)는 오디오 청크부(128)로부터 오디오 청크를 전달받아 오디오 버퍼에 버퍼링하고, 버퍼링된 오디오 청크를 오디오 렌더러(136)에 제공한다. 오디오 렌더러(136)는 미디어 재생 장치(120)의 구성 모듈로 도 12 및 도 13에 도시되어 있다. The buffer controller 129 receives the audio chunk from the audio chunk unit 128 and buffers the audio chunk in the audio buffer and provides the audio chunk to the audio renderer 136. The audio renderer 136 is shown in Figs. 12 and 13 as a configuration module of the media playback apparatus 120. Fig.

버퍼 컨트롤러(129)는 비디오를 복원하는 다른 모듈로부터 타임 정보를 받아 오디오를 비디오에 동기화시키는 기능을 수행한다. 상기 타임 정보는 청크 데이터가 미디어 재생 장치(120)에 설치된 미디어 복원부(143)에 의해 디코드 되어 출력되는 시점에 관한 정보로, 청크 데이터 중에서 시작 부분이 미디어 재생 장치 내(120)의 렌더러에 의해 렌더링하는 시점을 나타낸다. 버퍼 컨트롤러(129)는 상기 타임 정보를 통해 비디오가 디스플레이되는 시점에 맞추어 오디오가 출력될 수 있게 오디오 청크를 버퍼링하거나 오디오 렌더러(136)에 전달함으로써 비디오와 오디오를 동기화한다.The buffer controller 129 receives time information from another module for restoring video and performs a function of synchronizing audio to video. The time information is information related to the time at which the chunk data is decoded and output by the media restoration unit 143 installed in the media playback apparatus 120. The start time of the chunk data is set by the renderer in the media playback apparatus 120 Indicates when to render. The buffer controller 129 buffers or transmits the audio chunks to the audio renderer 136 so that audio can be outputted according to the time when the video is displayed through the time information, thereby synchronizing the video and the audio.

도 11의 스크립트 모듈은 그 순서를 달리하여 구성하는 것이 가능한데, 오디오 디코더(126)를 버퍼 컨트롤러(129)의 후단으로 이동시키는 것이다. 이 경우 버퍼 컨트롤러(129)에 의해 청크 데이터와 오디오 데이터의 동기화가 먼저 수행되고 버퍼링된 오디오 데이터를 오디오 디코더(126)가 디코드하게 된다.The script module of FIG. 11 can be configured in a different order, moving the audio decoder 126 to the rear end of the buffer controller 129. In this case, the buffer controller 129 synchronizes the chunk data and the audio data first, and the audio decoder 126 decodes the buffered audio data.

이상 도 8 내지 도 11에서 설명한 스크립트 모듈은 미디어 재생 장치(120)가 미디어 서비스 장치(110)에 접속함에 따라 미디어 서비스 장치(110)에서 미디어 재생 장치(120)로 전송되어, 미디어 재생 장치(120)의 웹 브라우저(210)에서 플러그인 없이 미디어 재생이 가능한 환경을 제공한다. 즉, 스크립트 모듈은 미디어 재생 장치(120)에 설치되어 미디어 재생을 위한 시스템을 구성하게 된다. 스크립트 모듈이 설치된 미디어 재생 장치(120)의 실시예는 이하 도 12 내지 도 14를 통해 살펴본다.8 to 11 are transmitted from the media service apparatus 110 to the media playback apparatus 120 as the media playback apparatus 120 is connected to the media service apparatus 110 so that the media playback apparatus 120 Provides an environment in which the media playback can be performed without a plug-in in the web browser 210 of the mobile terminal. That is, the script module is installed in the media playback apparatus 120 to configure a system for media playback. An embodiment of the media playback apparatus 120 in which the script module is installed will be described with reference to FIG. 12 through FIG.

도 12 내지 도 14는 미디어 재생 장치(120)의 실시예들을 도시한다. 미디어 재생 장치(120)에서 미디어 재생을 위한 주요 모듈들은 스크립트 모듈에 의해 구성된다. 도 8 내지 도 11을 통해 스크립트 모듈의 기능을 살펴보았으므로 도 12 내지 도 14에서는 구조 및 작동방식을 중심으로 미디어 재생 장치(120)를 설명한다.Figs. 12 to 14 show embodiments of the media playback apparatus 120. Fig. The main modules for media playback in the media playback apparatus 120 are configured by a script module. Since the functions of the script module have been described with reference to FIGS. 8 to 11, the media playback apparatus 120 will be described with reference to FIGS. 12 to 14. FIG.

도 12는 미디어 재생 장치(120)의 일 실시예를 나타낸다. 도 12의 미디어 재생 장치(120)는 수신부(141), 데이터 분리부, 컨테이너 부(142), 미디어 복원부(143) 및 오디오 싱크부(144)를 포함한다. 이때, 수신부(141), 데이터 분리부, 컨테이너 부(142) 및 오디오 싱크부(144)는 자바스크립트로 구현될 수 있다. 도 12의 미디어 재생 장치(120)는 도 9 및 도 11의 스크립트 모듈을 수신하여 구성될 수 있다.12 shows an embodiment of the media playback apparatus 120. In Fig. 12 includes a receiving unit 141, a data separating unit, a container unit 142, a media restoring unit 143, and an audio sink unit 144. [ At this time, the receiving unit 141, the data separating unit, the container unit 142, and the audio sink unit 144 may be implemented as JavaScript. The media playback apparatus 120 of FIG. 12 can be configured by receiving the script modules of FIG. 9 and FIG.

수신부(141)는 미디어 서비스 장치(110)에서 생성된 미디어 데이터를 웹 서비스를 지원하는 통신 프로토콜을 이용하여 수신한다. 이때 웹 서비스를 지원하는 통신 프로토콜은 웹소켓 상에서 전송되는 RTSP/RTP 프로토콜일 수 있다. 수신부(141)는 웹소켓 클라이언트(131)와 RTSP/RTP 클라이언트 모듈(121)을 포함한다. The receiving unit 141 receives the media data generated by the media service apparatus 110 using a communication protocol supporting the web service. At this time, the communication protocol supporting the web service may be the RTSP / RTP protocol transmitted over the web socket. The receiving unit 141 includes a Web socket client 131 and an RTSP / RTP client module 121.

웹소켓 클라이언트(131)는 미디어 서비스 장치(110)의 웹 서버(114)와 웹소켓 연결을 수립하는 모듈이다. 미디어 재생 장치(120)와 미디어 서비스 장치(110)는 각각 웹소켓 클라이언트(131)와 웹 서버(114)간의 핸드쉐이크를 거쳐 전송 패킷을 주고 받는다.The Web socket client 131 is a module for establishing a Web socket connection with the web server 114 of the media service apparatus 110. The media playback apparatus 120 and the media service apparatus 110 send and receive a transmission packet through a handshake between the Web socket client 131 and the Web server 114, respectively.

RTSP/RTP 클라이언트 모듈(121)은 도 8의 일 실시예에서 설명한 바와 같이 사용자의 웹 브라우저(210)에 RTSP/RTP 통신이 지원되도록 하는 기능을 수행한다. 따라서 사용자는 별도의 플러그인 설치 없이 RTSP/RTP 프로토콜을 사용하여 HTML5 환경의 웹 브라우저(210)를 통해 미디어를 재생하는 것이 가능하다.The RTSP / RTP client module 121 performs a function of supporting RTSP / RTP communication to the user's web browser 210 as described in the embodiment of FIG. Accordingly, the user can play the media through the web browser 210 of the HTML5 environment using the RTSP / RTP protocol without installing a separate plug-in.

수신부(141)를 거친 미디어 데이터는 데이터 분리부에 의해 비디오 데이터와 오디오 데이터로 분리된다. 비디오 데이터는 RTSP/RTP 클라이언트 모듈(121)로부터 왼쪽 아래 화살표를 따라, 오디오 데이터는 오른쪽 아래 화살표를 따라 각각 디패킷화 모듈(122a, 122b)로 전달된다. 디패킷화 모듈(122a, 122b)은 비디오 데이터와 오디오 데이터의 디패킷화를 수행하며 디패킷화를 거친 비디오 데이터는 컨테이너 부(142)로, 오디오 데이터는 오디오 싱크부(144)로 전달된다. The media data that has passed through the receiving unit 141 is separated into video data and audio data by the data separating unit. The video data is transmitted from the RTSP / RTP client module 121 along the lower left arrow, and the audio data is transmitted to the depacketizing module 122a, 122b along the lower right arrow respectively. The decapsulation modules 122a and 122b decapsulate the video data and the audio data. The decoded video data and the audio data are transmitted to the container unit 142 and the audio sync unit 144, respectively.

컨테이너 부(142)는 컨테이너 생성 모듈(127)을 포함하며, 컨테이너 생성 모듈(127)에 의해 비디오 데이터가 컨테이너 형식으로 되어 있지 않은 경우 비디오 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환한다. The container unit 142 includes a container generation module 127. When the video data is not in a container format by the container generation module 127, the container unit 142 packages the video frames into unit numbers and converts them into chunk data.

컨테이너 생성 모듈(127)에서 청크 데이터를 생성하는 과정을 설명하기 위해 도 15를 참조한다. 도 15의 비디오 프레임들(311)은 디패킷화 모듈(122a)에서 디패킷화 되어 얻어지는, 프레임 단위로 구성된 비디오 데이터를 나타낸다. 이때, 비디오 프레임들(311)은 MPEG-2, H.264, H.265 등 다양한 비디오 코덱으로 압축된 상태의 데이터이다. Reference is made to Fig. 15 to describe a process of generating chunk data in the container creation module 127. Fig. Video frames 311 in FIG. 15 represent video data configured in units of frames, obtained by depacketing in the depacketizing module 122a. At this time, the video frames 311 are data compressed by various video codecs such as MPEG-2, H.264, and H.265.

디패킷화 모듈(122a)이 비디오 프레임들(311)을 컨테이너 생성 모듈(127)로 전달하면, 컨테이너 생성 모듈(127)은 헤더 정보를 이용하여 전달받은 데이터가 컨테이너 형식인지 여부를 판단한다. 비디오 프레임들(311)은 프레임 형식의 데이터이므로, MSE(134) 및 비디오 태그(135)에서 처리되도록 하기 위해서 컨테이너 생성 모듈(127)은 비디오 프레임들(311)을 컨테이너 형식으로 변환하게 된다.When the depacketization module 122a transfers the video frames 311 to the container creation module 127, the container creation module 127 determines whether the received data is in the container format using the header information. Since the video frames 311 are data in frame format, the container generation module 127 converts the video frames 311 into a container format in order to be processed in the MSE 134 and the video tag 135.

프레임 형식에서 컨테이너 형식으로의 변환은 복수의 프레임들을 단위 개수로 패키징하여 이루어진다. 이때, 단위 개수는 비디오 데이터의 fps(frames per second)에 따라 가변적으로 선택될 수 있다. 도 15는 단위 개수가 3인 경우의 청크 데이터 생성과정을 도시한다. 컨테이너 생성 모듈(127)은 비디오 프레임들(311)의 각각의 프레임 헤더 정보(프레임의 크기, 예측 방식(intra or inter), 인터 프레임 종류(I, B or P) 등)를 파싱(parsing)하여 컨테이너 헤더를 생성하고, 비디오 프레임들(311)의 데이터들과 컨테이너 헤더를 패키징하여 컨테이너 형식의 청크 데이터(312)로 변환한다. 이렇게 컨테이너 형식으로 변환된 청크 데이터(312)는 MSE(134) 및 비디오 태그(135)를 포함하는 미디어 복원부(143)에서 호환성 문제 없이 처리될 수 있다.The conversion from the frame format to the container format is performed by packaging a plurality of frames in a unit number. At this time, the number of units can be variably selected according to fps (frames per second) of the video data. FIG. 15 shows a process of generating chunk data when the number of units is three. The container generation module 127 parses each frame header information (frame size, intra or inter frame type, inter frame type (I, B or P), etc.) of the video frames 311 Container header, and encapsulates the data of the video frames 311 and the container header into the container format chunk data 312. The chunk data 312 thus converted into the container format can be processed in the media restoration section 143 including the MSE 134 and the video tag 135 without any compatibility problem.

다시 도 12로 돌아오면, 컨테이너 생성 모듈(127)에서 오디오 청크부(128)로 점선으로 된 화살표가 그려져 있는데, 이는 오디오 데이터의 패키징을 위한 정보가 전달되는 것을 의미한다. 전달되는 정보에 관해서는 이하 오디오 청크부(128)를 통해 자세히 설명한다.Referring again to FIG. 12, an arrow with a dotted line is drawn from the container creation module 127 to the audio chunk unit 128, which means that information for packaging audio data is delivered. Information to be transmitted will be described in detail through the audio chunk unit 128 below.

미디어 복원부(143)는 웹 브라우저에 임베드 된 디코더에 의해 상기 청크 데이터를 디코드하여 비디오를 복원하고, 복원된 비디오를 출력한다. 이때, 웹 브라우저에 임베드 된 디코더는 비디오 태그일 수 있다. 도 12의 실시예에서 미디어 복원부(143)는 MSE(134)와 비디오 태그(135)를 포함한다. The media restoring unit 143 decodes the chunk data by the decoder embedded in the web browser, restores the video, and outputs the restored video. At this time, the decoder embedded in the web browser may be a video tag. In the embodiment of FIG. 12, the media recovery unit 143 includes the MSE 134 and the video tag 135.

MSE(134)는 HTTP 다운로드를 이용해 동영상 스트리밍 재생을 위해 만들어진 HTML5용 자바스크립트 API이다. W3C에 의해 표준화 된 이 기술은 엑스박스(Xbox)와 플레이스테이션4(PS4) 같은 콘솔 게임기나 크롬 캐스트 브라우저 등에서 스트리밍 재생을 가능하게 해준다.MSE 134 is a JavaScript API for HTML5 created for video streaming playback using HTTP download. Standardized by the W3C, this technology enables streaming playback on console gaming devices such as Xbox and Playstation 4 (PS4), as well as on chrome cast browsers.

비디오 태그(135)에서는 디코딩 및 렌더링을 수행하여 비디오가 웹 브라우저에 디스플레이 되도록 한다. 비디오 태그(135)의 디코더를 사용하면 자바스크립트의 동적 언어 특성으로 인해 한계를 지닌 JS 디코더 모듈(124)보다 우수한 성능으로 디코딩이 가능하다. 즉, 고해상도 영상과 높은 fps의 디코딩이 가능하다.The video tag 135 performs decoding and rendering so that video is displayed on a web browser. Using the decoder of the video tag 135, decoding can be performed with better performance than the JS decoder module 124 having the limitation due to the dynamic language characteristic of JavaScript. That is, high resolution images and high fps decoding are possible.

이상 설명한 모듈들에 의한 비디오의 출력과정을 정리하자면, 비디오 데이터는 데이터 분리부에서 분리되어 컨테이너 부(142)로 전달되고, 컨테이너 부(142)는 비디오 데이터가 컨테이너 단위로 되어있지 않은 경우 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환한다. 청크 데이터로 구성된 비디오 데이터는 미디어 복원부(143)에서 디코딩과 렌더링 과정을 거쳐 출력된다. 다음으로 오디오 데이터의 출력과정을 살펴본다.The video data is separated from the data separating unit and transferred to the container unit 142. When the video data is not contained in a container unit, Packaged into unit numbers and converted into chunk data. The video data composed of chunk data is output through a decoding and rendering process in the media restoring unit 143. Next, the process of outputting the audio data will be described.

데이터 분리부에서 분리된 오디오 데이터는 디패킷화 모듈(122b)에서 디패킷화된 뒤 오디오 싱크부(144)를 통해 비디오 데이터와 동기화되어 출력된다. 오디오 싱크부(144)는 오디오 디코더(126), 오디오 청크부(128), 버퍼 컨트롤러(129), 및 오디오 렌더러(136)를 포함할 수 있다.The audio data demultiplexed by the data demultiplexing unit is demultiplexed by the demultiplexing module 122b and is output in synchronization with the video data through the audio sync unit 144. [ The audio sync section 144 may include an audio decoder 126, an audio chunk section 128, a buffer controller 129, and an audio renderer 136.

오디오 디코더(126)는 분리된 오디오 데이터를 웹 브라우저에서 파싱할 수 있는 스크립트에 의해 디코드한다. 이때 웹 브라우저에서 파싱할 수 있는 스크립트는 자바스크립트일 수 있다. The audio decoder 126 decodes the separated audio data by a script that can be parsed by a web browser. At this time, the script that can be parsed by the web browser may be JavaScript.

오디오 청크부(128)는 오디오 디코더(126)에서 디코드 된 오디오 데이터를 패키징하여 오디오 청크를 생성한다. 오디오 청크부(128)에서는 컨테이너 생성 모듈(127)에서 생성되는 청크 데이터와 대응되는 범위로 오디오 데이터를 패키징하여야 하므로, 오디오 청크부(128)는 컨테이너 생성 모듈(127)로부터 청크 데이터에 관한 정보를 제공 받는다. 컨테이너 생성 모듈(127)에서 오디오 청크부(128)로 연결된 점선으로 된 화살표는 상기 정보가 전달되는 것을 의미한다.The audio chunk unit 128 packages the decoded audio data in the audio decoder 126 to generate audio chunks. The audio chunk unit 128 must package the audio data in a range corresponding to the chunk data generated by the container generation module 127 so that the audio chunk unit 128 transmits information about the chunk data from the container generation module 127 Receive. An arrow with a dotted line connected to the audio chunk unit 128 in the container generation module 127 means that the information is transmitted.

오디오 청크를 생성하는 과정을 설명하기 위해 도 16을 참조한다. 도 16의 오디오 데이터(321)는 오디오 디코더(126)에서 디코딩 되어 압축이 해제된 이후, 오디오 렌더러(136)에서 렌더링 되기 이전의 오디오 데이터를 도시한 것으로 디지털 값으로 표시된 오디오 신호로서 예를 들면 통상의 웨이브(wav) 파일일 수 있다. 이러한 오디오 신호는 그 속성상 시간에 따른 진폭의 형태로 정의되므로 임의의 구간을 잘라냄으로써 그에 대응되는 범위에서의 오디오 신호를 추출할 수 있다. 예를 들어 비디오 데이터의 프레임 레이트(frame rate)가 30fps, 컨테이너 생성 모듈(127)에서 청크 데이터를 구성하는 프레임들의 단위 개수가 3인 경우 컨테이너 생성 모듈(127)은 30fps와 단위 개수 3의 정보를 오디오 청크부(128)로 전달한다. 비디오 프레임 하나에 해당하는 시간이 1/30초이고 단위 개수가 3인 경우이므로, 오디오 청크부(128)는 세 개의 비디오 프레임에 해당하는 시간인 1/10초로 오디오 데이터(321)를 패키징하여 오디오 청크(322)를 생성한다. Please refer to FIG. 16 to describe the process of generating audio chunks. The audio data 321 shown in FIG. 16 shows audio data before being rendered in the audio renderer 136 after being decoded by the audio decoder 126 and decompressed. The audio data 321 shown in FIG. And may be a. Wav file. Since the audio signal is defined in the form of an amplitude according to time in terms of its attribute, an arbitrary section is cut out, and an audio signal in a range corresponding thereto can be extracted. For example, if the frame rate of the video data is 30 fps and the unit number of the frames constituting the chunk data in the container generation module 127 is 3, the container generation module 127 generates information of 30 fps and unit number 3 And transmits it to the audio chunk unit 128. The time corresponding to one video frame is 1/30 second and the number of units is 3, the audio chunk unit 128 packages the audio data 321 in 1/10 second corresponding to three video frames, Chunk 322 is generated.

이상과 같이 청크 데이터와 동기화되는 오디오 데이터인 오디오 청크와 컨테이너 생성 모듈(127)에서 생성되는 청크 데이터를 비교하면, 청크 데이터는 비디오 프레임을 단위 개수로 패키징하거나 비디오 프레임과 오디오를 단위 개수로 패키징한 것이고 오디오 청크는 오디오 데이터를 상기 단위 개수에 맞게 패키징한 것이다. 그리고 청크 데이터는 디코더(135a)에서 디코드 되기 전의 압축된 데이터이고 오디오 청크는 오디오 디코더(126)에 의해 디코드 되어 압축 해제된 데이터이다. As described above, when the audio chunks, which are audio data synchronized with the chunk data, are compared with the chunk data generated by the container generation module 127, the chunk data is packaged in units of video frames or packaged in units of video frames and audio And the audio chunk is the audio data packaged in accordance with the unit number. The chunk data is compressed data before being decoded by the decoder 135a and the audio chunk is decoded by the audio decoder 126 and decompressed.

다시 도 12로 돌아오면, 버퍼 컨트롤러(129)는 오디오 청크부(128)로부터 오디오 청크를 전달받아 오디오 버퍼에 버퍼링하고, 버퍼링된 오디오 청크를 오디오 렌더러(136)에 제공한다. 12, the buffer controller 129 receives an audio chunk from the audio chunk unit 128, buffers the audio chunk in the audio buffer, and provides the buffered audio chunk to the audio renderer 136. [

버퍼 컨트롤러(129)는 버퍼링을 통해 오디오 데이터를 비디오 데이터와 동기화시켜 출력하는 것을 가능하게 해주는 모듈이다. 자세히 설명하자면, 미디어 복원부(143)가 렌더러(135b)에 비디오가 출력되는 시점에 관한 타임 정보를 청크 데이터 단위로 버퍼 컨트롤러(129)로 전달하면, 버퍼 컨트롤러(129)는 오디오 청크를 버퍼링하다가 상기 타임 정보를 통해 비디오가 출력되는 시점에 맞추어 오디오 청크를 오디오 렌더러(136)에 제공한다. 도 12의 렌더러(135b)에서 버퍼 컨트롤러(129)로의 점선으로 된 화살표는 상기 타임 정보가 미디어 복원부(143)로부터 버퍼 컨트롤러(129)로 전달되는 것을 의미한다. 이때, 타임 정보는 상기 타임 정보에 대응되는 청크 데이터가 렌더러(135b)에서 렌더링되는 시점을 나타내며, 청크 데이터가 렌더링 되는 시점의 기준은 상기 타임 정보에 대응되는 청크 데이터 중에서 시작 부분이 상기 렌더러에 의해 렌더링되는 시점일 수 있다.The buffer controller 129 is a module that enables audio data to be output in synchronization with video data through buffering. To be more specific, when the media restoring unit 143 transmits the time information about the time when the video is output to the renderer 135b to the buffer controller 129 in units of chunk data, the buffer controller 129 buffers the audio chunk And provides audio chunks to the audio renderer 136 according to the timing at which video is output through the time information. An arrow with a dotted line from the renderer 135b to the buffer controller 129 in FIG. 12 indicates that the time information is transferred from the media restoring unit 143 to the buffer controller 129. FIG. In this case, the time information indicates the time at which the chunk data corresponding to the time information is rendered in the renderer 135b, and the reference at the time when the chunk data is rendered is the chunk data corresponding to the time information, It may be the time when it is rendered.

오디오 렌더러(136)는 버퍼 컨트롤러(129)로부터 전달 받은 오디오 청크를 출력하기 위해 렌더링을 수행한다. 오디오 렌더러(136)는 웹 브라우저에 의해 지원되는 Web Audio API로 구현될 수 있다.The audio renderer 136 performs rendering to output audio chunks received from the buffer controller 129. The audio renderer 136 may be implemented with a Web Audio API supported by a web browser.

상기 설명한 모듈들을 통한 오디오의 출력과정을 정리하자면, 오디오 데이터는 데이터 분리부에서 분리되어 오디오 디코더(126)로 전달된다. 오디오 디코더(126)에서 오디오 데이터는 디코딩되어 복원되고, 복원된 오디오는 오디오 청크부(128)에서 오디오 청크로 패키징되는데, 패키징은 청크 데이터를 구성하는 프레임들의 단위 개수에 맞추어 이루어진다. 오디오 청크로 패키징된 오디오 데이터는 버퍼 컨트롤러(129)에서 버퍼링되다가 비디오가 출력되는 시점에 맞추어 오디오 렌더러(136)를 통해 출력된다. 이때, 비디오가 출력되는 시점은 미디어 복원부(143)에서 버퍼 컨트롤러(129)로 전달되는 타임 정보에 담겨있다.To summarize the process of outputting audio through the above-described modules, the audio data is separated from the data separator and transferred to the audio decoder 126. The audio data is decoded and restored in the audio decoder 126, and the restored audio is packaged into an audio chunk in the audio chunk unit 128. The packaging is performed according to the number of frames constituting the chunk data. The audio data packaged in the audio chunks is buffered in the buffer controller 129 and outputted through the audio renderer 136 according to the time when the video is output. At this time, the time point at which the video is outputted is contained in the time information transmitted from the media restoring unit 143 to the buffer controller 129.

도 12의 미디어 재생 장치(120)는 오디오 데이터의 트랜스코딩 없이 비디오 데이터와 오디오 데이터를 동기화하므로 트랜스코딩으로 인한 오디오 데이터의 손상 염려가 없다. 또한 도 12의 미디어 재생 장치(120)에 의하면 비디오 데이터와 오디오 데이터가 서로 다른 디코더에 의해 디코딩 되더라도 동기화가 문제가 되지 않으므로, 비디오 데이터와 오디오 데이터를 분리하여 처리할 수 있는 환경을 제공한다. 즉, 비디오 태그에서 지원하지 않는 코덱 형식의 오디오 데이터를 별도의 디코더로 복원하더라도 동기화가 문제되지 않으므로 비디오 태그에서 지원하는 코덱 형식에 대한 종속성이 감소한다.Since the media playback apparatus 120 of FIG. 12 synchronizes the video data with the audio data without transcoding audio data, there is no fear of damaging the audio data due to the transcoding. In addition, according to the media playback apparatus 120 of FIG. 12, even if the video data and the audio data are decoded by different decoders, synchronization is not a problem, so that an environment is provided in which video data and audio data can be separately processed. That is, even if the audio data of the codec format not supported by the video tag is restored by a separate decoder, there is no problem in synchronization, so the dependency on the codec format supported by the video tag is reduced.

도 13은 미디어 재생 장치(120)의 다른 실시예를 나타낸다. 도 12의 실시예에서 오디오 데이터가 복원된 뒤 비디오 데이터와 동기화 과정을 거쳤다면, 도 13의 실시예에서는 오디오 데이터가 비디오 데이터와 동기화 과정을 거친 뒤 디코드 되어 복원된다. 도 12의 실시예와 비교하였을 때, 도 13의 실시예에서 오디오 디코더(126)의 위치가 버퍼 컨트롤러(129)의 후단으로 변경되어 있다. 그 외의 구성은 도 12의 실시예와 동일하므로 중복되는 설명은 생략하고 이하 변경된 오디오 싱크부(144)에 대하여 설명한다.Fig. 13 shows another embodiment of the media playback apparatus 120. Fig. In the embodiment of FIG. 12, if the audio data is restored and then synchronized with the video data, the audio data is decoded after being synchronized with the video data in the embodiment of FIG. Compared with the embodiment of FIG. 12, the position of the audio decoder 126 in the embodiment of FIG. 13 is changed to the rear end of the buffer controller 129. The other configurations are the same as those of the embodiment of FIG. 12, so duplicate descriptions will be omitted and the following modified audio sync section 144 will be described.

도 13의 실시예에 따르면 오디오 청크부(128)에서는 디코드하여 복원되기 전의 오디오 데이터를 패키징하여 오디오 청크를 생성한다. 오디오 청크부(128)에서는 컨테이너 생성 모듈(127)에서 생성되는 청크 데이터와 대응되는 범위로 오디오 데이터를 패키징하기 위해 컨테이너 생성 모듈(127)로부터 청크 데이터에 관한 정보를 제공 받는다.According to the embodiment of FIG. 13, the audio chunk unit 128 packages the audio data before being decoded and restored to generate audio chunks. The audio chunk unit 128 receives information on chunk data from the container creation module 127 to package the audio data in a range corresponding to the chunk data generated by the container generation module 127.

버퍼 컨트롤러(129)는 렌더러(135b)로부터 수신한 타임 정보를 통해 오디오 청크를 비디오 데이터와 동기화시켜 오디오 디코더(126)로 전달한다. 도 13의 실시예에서는 청크 데이터와 동기화되는 오디오 데이터가 오디오 디코더(126)에 의해 디코드 되기 전의 데이터로, 이는 도 12의 실시예와 구별점에 해당한다. The buffer controller 129 synchronizes the audio chunks with the video data through the time information received from the renderer 135b and transfers the audio chunks to the audio decoder 126. [ In the embodiment of FIG. 13, the audio data synchronized with the chunk data is data before it is decoded by the audio decoder 126, which corresponds to a distinction point from the embodiment of FIG.

오디오 디코더(126)는 동기화 된 오디오 데이터를 복원하여 오디오 렌더러(136)로 전달하고 오디오 렌더러(136)는 복원된 오디오 데이터를 출력하기 위해 렌더링을 수행한다.The audio decoder 126 restores the synchronized audio data to the audio renderer 136, and the audio renderer 136 performs rendering to output the restored audio data.

도 12 및 도 13의 실시예에서는 비디오 데이터를 기준으로 오디오 데이터를 동기화 시키는 경우를 예로 들었으나, 이와 반대로 오디오 데이터를 기준으로 비디오 데이터를 동기화 시키는 것도 가능하다. In the embodiments of FIGS. 12 and 13, the audio data is synchronized based on the video data. Alternatively, the audio data may be synchronized based on the audio data.

미디어 데이터를 제1 미디어 타입 데이터(오디오)와 제2 미디어 타입 데이터(비디오)라 하고, 도 12 및 도 13의 실시예에 적용해 본다. The media data is referred to as first media type data (audio) and second media type data (video), and is applied to the embodiments of FIGS. 12 and 13.

수신부(141)는 미디어 데이터를 수신하여 데이터 분리부로 전달한다. 데이터 분리부는 제1 미디어 타입 데이터(오디오)와 제2 미디어 타입 데이터(비디오)로 미디어 데이터를 분리한다. The receiving unit 141 receives the media data and transmits the received media data to the data separating unit. The data separation unit separates the media data into the first media type data (audio) and the second media type data (video).

컨테이너 부(142)에서는 제1 미디어 타입 데이터(오디오)가 컨테이너 단위로 되어있지 않은 경우, 제1 미디어 타입 데이터(오디오)를 구성하는 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환한다. If the first media type data (audio) is not a container unit, the container unit 142 packages the frames constituting the first media type data (audio) into unit numbers and converts them into chunk data.

미디어 복원부(143)는 웹 브라우저에 임베드 된 디코더에 의해 상기 청크 데이터를 디코드하여 제1 미디어 타입 데이터(오디오)를 복원하고, 제1 미디어 타입 데이터(오디오)를 출력할 때 해당 시점에 관한 타임 정보를 청크 데이터 단위로 싱크부(도12 및 도 13에서 오디오 싱크부에 대응)에 전달한다. 이때, 웹 브라우저에 임베드 된 디코더는 비디오 태그일 수 있으며, 비디오 태그로 오디오 데이터의 디코딩과 렌더링이 가능하므로 미디어 복원부(143)에서 제1 미디어 타입 데이터(오디오)를 출력하는데 문제되지 않는다. The media restoring unit 143 restores the first media type data (audio) by decoding the chunk data by the decoder embedded in the web browser, and when outputting the first media type data (audio) And transfers the information to the sync unit (corresponding to the audio sync unit in Figs. 12 and 13) in units of chunk data. At this time, the decoder embedded in the web browser may be a video tag, and audio data can be decoded and rendered by a video tag, so that it is not a problem that the media restoration unit 143 outputs the first media type data (audio).

싱크부는 전달받은 타임 정보에 기초하여 제2 미디어 타입 데이터(비디오)를 상기 복원된 제1 미디어 타입 데이터(오디오)와 동기화하여 출력한다.The sync unit synchronizes the second media type data (video) with the restored first media type data (audio) based on the received time information.

이상과 같이, 제1 미디어 타입 데이터가 오디오이고 제2 미디어 타입 데이터가 비디오인 경우에도 도 12 및 도 13의 실시예에 따라 동기화된 미디어의 재생이 가능한 것을 살펴보았다. As described above, the synchronized media can be reproduced according to the embodiment of FIGS. 12 and 13 even when the first media type data is audio and the second media type data is video.

이때, 제1 미디어 타입 데이터가 오디오이고 제2 미디어 타입 데이터가 비디오인 것은 다양한 실시예를 보여주기 위한 설정일 뿐, 제1 미디어 타입 데이터와 제2 미디어 타입 데이터의 유형을 한정하는 것은 아니다. At this time, the first media type data is audio and the second media type data is video, which is a setting for showing various embodiments, and does not limit the types of the first media type data and the second media type data.

다음으로 미디어 재생 장치(120)의 다른 구조의 실시예를 살펴본다. 도 14는 미디어 재생 장치(120)의 또 다른 실시예를 나타낸다. 도 14의 미디어 재생 장치(120)는 수신부, 데이터 분리부, 컨테이너 부, 미디어 복원부 및 오디오 복원부를 포함한다. 이때, 수신부, 데이터 분리부, 컨테이너 부 및 오디오 복원부는 자바스크립트로 구현될 수 있다. 도 14의 미디어 재생 장치(120)는 도 9 및 도 10의 스크립트 모듈을 수신하여 구성될 수 있다.Next, an embodiment of another structure of the media player 120 will be described. Fig. 14 shows another embodiment of the media playback apparatus 120. Fig. The media playback apparatus 120 of FIG. 14 includes a receiver, a data separator, a container unit, a media restoration unit, and an audio restoration unit. At this time, the receiving unit, the data separating unit, the container unit, and the audio restoring unit may be implemented by JavaScript. The media playback apparatus 120 of FIG. 14 can be configured by receiving the script modules of FIGS. 9 and 10. FIG.

수신부와 데이터 분리부는 도 12와 동일하게 구성된다. 미디어 서비스 장치(110)에서 생성된 미디어 데이터를 수신부를 통해 수신하고, 데이터 분리부에서 비디오 데이터와 오디오 데이터로 미디어 데이터를 분리한다. 분리된 비디오 데이터는 디패킷화 모듈(122a)에서 디패킷화를 거쳐 컨테이너 부로 전달된다.The receiving unit and the data separating unit are configured in the same manner as in Fig. Receives the media data generated by the media service apparatus 110 through the receiver, and separates the media data from the video data and the audio data in the data separator. The separated video data is passed from the depacketizing module 122a to the container section via decatization.

컨테이너 부는 컨테이너 생성 모듈(127)을 포함하며, 컨테이너 생성 모듈(127)은 비디오 데이터를 구성하는 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환한다. 이때 프레임들의 단위 개수는 비디오 데이터의 fps(frames per second)에 따라 가변적으로 조절이 가능하다. The container unit includes a container creation module 127. The container creation module 127 packages the frames constituting the video data into unit numbers and converts them into chunk data. At this time, the unit number of frames can be variably controlled according to fps (frames per second) of the video data.

미디어 복원부는 MSE(134)와 비디오 태그(135)를 포함하며, 컨테이너 부로부터 전달받은 청크 데이터를 디코드하여 비디오를 복원하고 복원된 비디오를 출력하는 기능을 수행한다. The media restoration unit includes the MSE 134 and the video tag 135, and decodes the chunk data transmitted from the container unit to restore the video and output the restored video.

미디어 복원부가 비디오 데이터를 복원하여 출력한다면, 오디오 복원부는 데이터 분리부에 의해 분리된 오디오 데이터를 디코드하여 복원하고, 미디어 복원부에서 출력되는 비디오 데이터와 동기화하여 상기 복원된 오디오 데이터를 출력한다. If the media restoration unit restores and outputs the video data, the audio restoration unit decodes and restores the audio data separated by the data separation unit, and outputs the restored audio data in synchronization with the video data output from the media restoration unit.

오디오 복원부는 트랜스코드부를 포함할 수 있다. 트랜스코드부는 오디오 데이터를 다른 코덱 형식으로 트랜스코드하는 모듈로 오디오 트랜스코더(123)를 포함한다. 오디오 트랜스코더(123)는 입력된 오디오 데이터가 미디어 복원부에서 지원하지 않는 포맷, 즉 비디오 태그에서 지원되지 않는 코덱 형식으로 된 경우 비디오 태그에서 지원하는 코덱 형식으로 오디오 데이터를 트랜스코딩하여 출력할 수 있다. The audio restoration section may include a transcode section. The transcode section includes an audio transcoder 123 as a module for transcoding the audio data into another codec format. The audio transcoder 123 transcodes and outputs audio data in a codec format supported by the video tag when the input audio data is in a format not supported by the media restoration unit, that is, in a codec format not supported by the video tag have.

오디오 복원부에서 트랜스코딩 된 오디오는 컨테이너 생성 모듈(127)로 전달된다. 컨테이너 생성 모듈(127)은 디패킷화 모듈(122a)로부터 전달받은 비디오 데이터가 컨테이너 단위로 되어있지 않은 경우 비디오 데이터를 구성하는 프레임들을 단위 개수로 패키징하면서 오디오 복원부로부터 전달받은 오디오 데이터를 상기 단위 개수로 패키징하여 청크 데이터를 생성할 수 있다. 이렇게 생성된 청크 데이터는 호환성 문제 없이 MSE(134)로 전달될 수 있다.The audio transcoded in the audio decompression unit is delivered to the container creation module 127. When the video data received from the depacketization module 122a is not in units of containers, the container generation module 127 packages audio data received from the audio decompression unit into the unit Chunk data can be generated by packaging them in the number. The generated chunk data can be passed to the MSE 134 without incompatibility problems.

오디오 복원부에서 오디오 데이터를 디코딩하고 렌더링하여 출력하는 프로세스는 미디어 복원부에 포함되어 구성될 수 있는데, 이는 컨테이너 부에서 비디오 데이터와 오디오 데이터로 청크 데이터를 생성하기 때문이다. 따라서 미디어 복원부의 MSE(134)와 비디오 태그(135)를 통해 청크 데이터를 디코딩 및 렌더링함으로써 비디오 데이터와 오디오 데이터를 출력할 수 있다.The process of decoding, rendering, and outputting the audio data in the audio decompression unit may be included in the media decompression unit because the container unit generates the chunk data with the video data and the audio data. Accordingly, video data and audio data can be output by decoding and rendering the chunk data through the MSE 134 and the video tag 135 of the media restoring unit.

도 14의 미디어 재생 장치(120)를 이용하면 오디오 데이터의 트랜스코딩과 청크 데이터로 변환을 통해, 비디오 태그에서 지원하지 않는 코덱 형식의 오디오 데이터를 비디오 태그로 디코딩 및 렌더링하는 것이 가능하다. 따라서 비디오 데이터와 함께 오디오 데이터의 복원이 이루어지므로 동기화 문제 없이 미디어 데이터의 재생이 가능하다. 14, it is possible to decode and render audio data in a codec format not supported by the video tag to a video tag through transcoding of audio data and conversion into chunk data. Therefore, since the audio data is restored together with the video data, it is possible to reproduce the media data without a synchronization problem.

도 17은 본 발명의 일 실시예에 따른 자바스크립트로 구현된 스크립트 모듈을 생성하는 과정을 설명하기 위한 예시도이다. 17 is an exemplary diagram for explaining a process of generating a script module implemented with JavaScript in accordance with an embodiment of the present invention.

도 17을 참고하면 자바스크립트로 구현된 스크립트 모듈은 종래의 C와 C++의 네이티브 코드로 작성된 소스를 Emscripten과 같은 컨버터(converter)로 변환하여 브라우저에서 사용할 수 있는 자바스크립트 코드를 얻을 수 있다.Referring to FIG. 17, a script module implemented as a JavaScript can convert a source written in native C and C ++ native code into a converter such as Emscripten to obtain a JavaScript code that can be used in a browser.

Emscripten과 같은 컨버터(converter)를 이용하면, 종래의 네이티브 코드로부터 자바스크립트로 구현된 디코더나 컨테이너를 얻을 수 있으므로 코덱 종속성을 낮출 수 있는 장점이 있다.When a converter such as Emscripten is used, a decoder or a container implemented with JavaScript can be obtained from a conventional native code, so that there is an advantage that codec dependency can be lowered.

플러그인 대신에 자바스크립트 코드를 사용하므로 웹 브라우저 제작 업체의 지원 중단을 염려할 필요도 없다. 또한, 웹 브라우저에 따라 ActiveX 인터페이스를 사용할지 NPAPI 인터페이스를 사용할지 고민할 필요가 없다. 즉, 웹 브라우저 종속성을 낮출 수 있는 장점이 있다.You do not have to worry about abandoning support from web browser makers because you use JavaScript code instead of plug-ins. Also, depending on the web browser, there is no need to worry about whether to use ActiveX interface or NPAPI interface. That is, there is an advantage that the dependency of the web browser can be lowered.

도 1에 도시된 미디어 재생 장치(120)는 예를 들어, 다음의 도 18에 도시된 컴퓨팅 장치(400)로 구현될 수 있다. 컴퓨팅 장치(400)는 모바일 핸드헬드 기기들(스마트 폰, 태블릿 컴퓨터 등), 랩톱 또는 노트북 컴퓨터, 분산된 컴퓨터 시스템, 컴퓨팅 그리드 또는 서버일 수 있으나 이에 한하지는 않는다. 컴퓨팅 장치(400)는 버스(440)를 통해 서로 간에 또는 다른 요소들과 통신하는 프로세서(401) 및 메모리(403) 및 스토리지(408)를 포함할 수 있다. 버스(440)는 디스플레이(432), 하나 이상의 입력 장치들(433), 하나 이상의 출력 장치들(434)과 연결될 수 있다. The media playback apparatus 120 shown in FIG. 1 may be implemented, for example, in the computing device 400 shown in FIG. 18 below. The computing device 400 may be, but is not limited to, mobile handheld devices (smartphones, tablet computers, etc.), laptop or notebook computers, distributed computer systems, computing grids or servers. The computing device 400 may include a processor 401 and memory 403 and storage 408 that communicate with each other or other elements via a bus 440. [ The bus 440 may be coupled to a display 432, one or more input devices 433, and one or more output devices 434.

이러한 모든 요소들은 버스에(400) 직접 또는 하나 이상의 인터페이스들 또는 어댑터들을 통하여 접속될 수 있다. 버스(440)는 광범위한 서브 시스템들과 연결된다. 버스(440)는 메모리 버스, 메모리 컨트롤러, 주변 버스(peripheral bus), 로컬 버스 및 이들의 조합을 포함할 수 있다.All of these elements may be connected to the bus 400 directly or through one or more interfaces or adapters. The bus 440 is coupled to a wide variety of subsystems. Bus 440 may include a memory bus, a memory controller, a peripheral bus, a local bus, and combinations thereof.

메모리(403)는 RAM(404, random access memory), ROM(405, read-only component) 및 이들의 조합으로 구성될 수 있다. 또한, 컴퓨팅 장치(400) 내에서 부팅(booting)을 위해 필요한 기본 루틴들을 구비하는 바이오스(내지 펌웨어)가 메모리(403) 내에 포함될 수 있다.The memory 403 may comprise a random access memory (RAM) 404, a read-only component (ROM) 405, and combinations thereof. Also, a BIOS (or firmware) having the basic routines necessary for booting in the computing device 400 may be included in the memory 403.

스토리지(408)는 오퍼레이팅 시스템(409), 실행 가능한 파일들(EXEC, 410), 데이터(411), API 어플리케이션(412) 등을 저장하기 위해 사용된다. 스토리지(408)는 하드 디스크 드라이브, 광디스크 드라이브, SSD(solid-state memory device) 등을 포함할 수 있다.The storage 408 is used to store an operating system 409, executable files (EXEC) 410, data 411, API applications 412, and the like. The storage 408 may include a hard disk drive, an optical disk drive, a solid-state memory device (SSD), and the like.

컴퓨팅 장치(400)는 입력 장치(433)을 포함할 수 있다. 사용자는 입력 장치(433)를 통하여 컴퓨터 장치(400)에 명령 및/또는 정보를 입력할 수 있다. 입력 장치(433)의 예로는, 키보드, 마우스, 터치패드, 조이스틱, 게임패드, 마이크로폰, 광학 스캐너, 카메라 등이 있다. 입력 장치(433)는 직렬 포트, 병렬 포트, 게임 포트, USB 등을 포함하는 입력 인터페이스(423)를 통해 버스(440)에 접속될 수 있다.The computing device 400 may include an input device 433. A user may enter commands and / or information into the computer device 400 via the input device 433. [ Examples of the input device 433 include a keyboard, a mouse, a touch pad, a joystick, a game pad, a microphone, an optical scanner, and a camera. The input device 433 may be connected to the bus 440 via an input interface 423 including a serial port, a parallel port, a game port, a USB, and the like.

특정 실시예에서, 컴퓨팅 장치(400)는 네트워크(430)에 연결된다. 컴퓨팅 장치(400)는 다른 장치들과 네트워크(430)를 통하여 연결된다. 이 때, 네트워크 인터페이스(420)는 네트워크(430)로부터 하나 이상의 패킷의 형태로 된 통신 데이터를 수신하고, 컴퓨팅 장치(400)는 프로세서(401)의 처리를 위해 상기 수신된 통신 데이터를 저장한다. 마찬가지로, 컴퓨팅 장치(400)는 전송한 통신 데이터를 하나 이상의 패킷 형태로 메모리(403) 상에 저장하고, 네트워크 인터페이스(420)는 상기 통신 데이터를 네트워크(430)로 전송한다.In a particular embodiment, the computing device 400 is connected to a network 430. The computing device 400 is connected to other devices through a network 430. [ At this time, the network interface 420 receives communication data in the form of one or more packets from the network 430, and the computing device 400 stores the received communication data for processing by the processor 401. Similarly, the computing device 400 stores the transmitted communication data in the form of one or more packets on the memory 403, and the network interface 420 transmits the communication data to the network 430. [

네트워크 인터페이스(420)는 네트워크 인터페이스 카드, 모뎀 등을 포함할 수 있다. 네트워크(430)의 예로는, 인터넷, WAN(wide area network), LAN(local area network), 전화 네트워크, 직접 연결 통신 등이 있으며, 유선 및/또는 유선 통신 방식을 채용할 수 있다.The network interface 420 may include a network interface card, a modem, and the like. Examples of the network 430 include the Internet, a wide area network (WAN), a local area network (LAN), a telephone network, a direct connection communication, and the like.

프로세서(401)에 의한 소프트웨어 모듈의 실행 결과는 디스플레이(432)를 통해 표시될 수 있다. 디스플레이(432)의 예로는, LCD(liquid crystal display), OLED(organic liquid crystal display), CRT(cathode ray tube), PDP(plasma display panel) 등이 있다. 디스플레이(432)는 비디오 인터페이스(422)를 통하여 버스(440)에 연결되고, 디스플레이(432)와 버스(440) 간의 데이터 전송은 그래픽 컨트롤러(421)에 의해 제어될 수 있다.The execution result of the software module by the processor 401 may be displayed via the display 432. [ Examples of the display 432 include a liquid crystal display (LCD), an organic liquid crystal display (OLED), a cathode ray tube (CRT), and a plasma display panel (PDP). The display 432 is connected to the bus 440 via the video interface 422 and the data transfer between the display 432 and the bus 440 can be controlled by the graphics controller 421.

디스플레이(432)와 더불어, 컴퓨팅 장치(400)는 오디오 스피커, 프린터 등과 같은 하나 이상의 출력 장치(434)를 포함할 수 있다. 출력 장치(434)는 출력 인터페이스(424)를 통해 버스(440)와 연결된다. 출력 인터페이스(424)는 예를 들어, 직렬 포트, 병렬 포트, 게임 포트, USB 등이 있다.In addition to the display 432, the computing device 400 may include one or more output devices 434, such as audio speakers, printers, and the like. Output device 434 is coupled to bus 440 via output interface 424. The output interface 424 may be, for example, a serial port, a parallel port, a game port, a USB, or the like.

본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.It will be understood by those skilled in the art that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. The scope of the present invention is defined by the appended claims rather than the detailed description and all changes or modifications derived from the meaning and scope of the claims and their equivalents are to be construed as being included within the scope of the present invention do.

110: 미디어 서비스 장치 111: 카메라
112: 인코더 113: 패킷화부
114: 웹 서버 115: 모듈 저장부
116: 모듈 전송부 117: 제어부
120: 미디어 재생 장치 121: RTSP/RTP 클라이언트 모듈
122: 디패킷화 모듈 123: 오디오 트랜스코더
124: JS 디코더 모듈 125: JS 렌더러 모듈
126: 오디오 디코더 127: 컨테이너 생성 모듈
128: 오디오 청크부 129: 버퍼 컨트롤러
141: 수신부 142: 컨테이너 부
143: 미디어 복원부 144: 오디오 싱크부
210: 웹 브라우저
110: Media service device 111: Camera
112: Encoder 113: Packetizer
114: Web server 115: module storage unit
116: module transfer unit 117: control unit
120: Media playback device 121: RTSP / RTP client module
122: depacketization module 123: audio transcoder
124: JS decoder module 125: JS renderer module
126: Audio decoder 127: Container creation module
128: audio chunk unit 129: buffer controller
141: Receiver 142: Container
143: Media restoration unit 144: Audio sink unit
210: Web browser

Claims (20)

미디어 서비스 장치에서 생성된 미디어 데이터를 웹 서비스를 지원하는 통신 프로토콜을 이용하여 수신하는 수신부;
상기 수신된 미디어 데이터를 비디오 데이터와 오디오 데이터로 분리하는 데이터 분리부;
상기 비디오 데이터를 구성하는 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환하는 컨테이너 부;
웹 브라우저에 임베드 된(embedded) 디코더에 의해 상기 변환된 청크 데이터를 디코드하여 비디오를 복원하고, 상기 복원된 비디오를 출력할 때 상기 복원된 비디오가 출력되는 시점에 관한 타임 정보를 상기 청크 데이터 단위로 제공하는 미디어 복원부; 및
상기 청크 데이터 단위로 제공되는 타임 정보에 기초하여 상기 오디오 데이터를 상기 복원된 비디오와 동기화하여 출력하는 오디오 싱크부를 포함하는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
A receiving unit for receiving the media data generated by the media service apparatus using a communication protocol supporting the web service;
A data separator for separating the received media data into video data and audio data;
A container unit for packaging the frames constituting the video data into units and converting the frames into chunk data;
A decoder for decoding the converted chunk data by a decoder embedded in a web browser to reconstruct the video and outputting the reconstructed video, A media restoring unit for providing the media; And
And an audio sync unit for outputting the audio data in synchronization with the restored video based on time information provided in units of the chunk data, wherein the audio sync unit reproduces video and audio synchronously on a web browser.
제1항에 있어서, 컨테이너 부는
상기 비디오 데이터의 FPS(frame per second)에 따라 상기 단위 개수를 가변적으로 조절하는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
The container according to claim 1, wherein the container portion
Wherein the number of units is variably controlled according to an FPS (frame per second) of the video data.
제1항에 있어서,
상기 미디어 복원부는 상기 복원된 비디오를 출력하기 전에 렌더링 하는 렌더러를 포함하고, 상기 타임 정보는 상기 타임 정보에 대응되는 청크 데이터가 상기 렌더러에서 렌더링되는 시점을 나타내는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
The method according to claim 1,
Wherein the media restoration unit includes a renderer that renders the restored video before outputting the time information, wherein the time information indicates a time at which the chunk data corresponding to the time information is rendered in the renderer, And reproducing the media.
제3항에 있어서,
상기 타임 정보는 상기 타임 정보에 대응되는 청크 데이터 중에서 시작 부분이 상기 렌더러에 의해 렌더링되는 시점을 나타내는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
The method of claim 3,
Wherein the time information indicates a time at which a start portion of the chunk data corresponding to the time information is rendered by the renderer, in synchronization with video and audio on a web browser.
제1항에 있어서, 상기 오디오 싱크부는
상기 분리된 오디오 데이터를 디코드 하여 오디오를 복원한 후, 상기 복원된 오디오를 상기 청크 데이터 단위로 제공된 타임 정보와 동기화하여 출력하는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
The audio signal processing apparatus according to claim 1,
The audio data is decoded to decode the separated audio data, and then the restored audio data is synchronized with the time information provided in units of the chunk data, and the synchronized video and audio data are synchronized and reproduced on a web browser.
제5항에 있어서, 상기 오디오 싱크부는
상기 분리된 오디오 데이터를 상기 웹 브라우저에서 파싱(parsing) 가능한 스크립트에 의해 디코드 하는 오디오 디코더;
상기 디코드 된 오디오 데이터를 상기 타임 정보에 대응되는 청크 데이터와 동기화하여 오디오 렌더러에 제공하는 버퍼 컨트롤러; 및
상기 디코드된 오디오 데이터를 렌더링하는 상기 오디오 렌더러를 포함하는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
6. The apparatus of claim 5, wherein the audio sink
An audio decoder for decoding the separated audio data by a script that can be parsed by the web browser;
A buffer controller for synchronizing the decoded audio data with chunk data corresponding to the time information and providing the decoded audio data to an audio renderer; And
And the audio renderer that renders the decoded audio data, in synchronization with video and audio on a web browser.
제6항에 있어서,
상기 청크 데이터는 디코드 되기 전 압축된 데이터이고, 상기 청크 데이터와 동기화되는 오디오 데이터는 디코드 되어 압축 해제된 데이터인, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
The method according to claim 6,
Wherein the chunk data is compressed data before being decoded and the audio data synchronized with the chunk data is decoded and decompressed data to reproduce video and audio synchronously on a web browser.
제6항에 있어서, 상기 오디오 렌더러는
상기 웹 브라우저에 의해 지원되는 오디오 API(Application Program Interface)에 의해 구현되는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
7. The apparatus of claim 6, wherein the audio renderer
And reproducing the video and audio synchronously on a web browser, which is implemented by an audio application program interface (API) supported by the web browser.
제1항에 있어서, 상기 오디오 싱크부는
상기 분리된 오디오 데이터를 상기 청크 데이터 단위로 제공된 타임 정보와 동기화하여 버퍼링하고, 상기 버퍼링된 오디오 데이터를 디코드 하여 오디오를 복원하여 출력하는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
The audio signal processing apparatus according to claim 1,
Wherein the audio data is synchronized with the time information provided in units of the chunk data, and the audio data is decoded by decoding the buffered audio data to output the audio data.
제9항에 있어서, 상기 오디오 싱크부는
상기 분리된 오디오 데이터를 상기 타임 정보에 대응되는 청크 데이터와 동기화하여 버퍼링하는 버퍼 컨트롤러;
상기 버퍼링된 오디오 데이터를 상기 웹 브라우저에서 파싱(parsing) 가능한 스크립트에 의해 디코드 하는 오디오 디코더; 및
상기 디코드된 오디오 데이터를 렌더링하는 상기 오디오 렌더러를 포함하는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
10. The apparatus of claim 9, wherein the audio sink
A buffer controller for buffering the separated audio data by synchronizing with the chunk data corresponding to the time information;
An audio decoder for decoding the buffered audio data by a script that can be parsed by the web browser; And
And the audio renderer that renders the decoded audio data, in synchronization with video and audio on a web browser.
제10항에 있어서,
상기 청크 데이터는 디코드 되기 전 압축된 데이터이고, 상기 청크 데이터와 동기화되는 오디오 데이터는 상기 오디오 디코더에 의해 디코드 되기 전 데이터인, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
11. The method of claim 10,
Wherein the chunk data is compressed data before being decoded and the audio data synchronized with the chunk data is data before being decoded by the audio decoder.
제1항에 있어서,
상기 웹 브라우저에 임베드 된 디코더는 HTML5에서 지원하는 비디오 태그이고, 상기 수신부, 컨테이너 부 및 오디오 싱크부는 자바스크립트로 구현되는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
The method according to claim 1,
Wherein the decoder embedded in the web browser is a video tag supported by HTML5, and the receiver, the container unit, and the audio sync unit are implemented as JavaScript, and reproduce the video and audio synchronously on the web browser.
제12항에 있어서,
상기 자바스크립트는 상기 미디어 서비스 장치로부터 상기 미디어 재생장치로 다운로드 되는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
13. The method of claim 12,
Wherein the JavaScript is downloaded from the media service apparatus to the media playback apparatus, and reproduces the video and audio in synchronization with the web browser.
미디어 데이터를 상기 미디어 재생 장치에 전송하는 미디어 서비스 장치로서,
상기 미디어 데이터를 상기 미디어 재생 장치의 웹 브라우저 상에서 재생하기 위해 필요한 스크립트 모듈을 저장하는 모듈 저장부;
상기 미디어 재생 장치의 접속에 응답하여 상기 스크립트 모듈을 상기 미디어 재생 장치에 전송하는 모듈 전송부;
상기 미디어 데이터를 패킷화하여 전송 패킷을 생성하는 패킷화부; 및
상기 재생 장치와의 통신 세션을 형성하며, 상기 미디어 재생 장치로부터의 요청에 따라 상기 전송 패킷을 상기 미디어 재생 장치에 전송하는 웹 서버를 포함하되,
상기 스크립트 모듈은, 상기 통신 패킷을 상기 통신 세션을 통해 수신하는 프로세스와, 상기 통신 패킷에 포함되는 비디오 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환하는 프로세스와, 상기 변환된 청크 데이터가 상기 미디어 재생 장치에 설치된 미디어 복원부에 의해 디코드 되어 출력되는 시점에 관한 타임 정보에 기초하여, 상기 통신 패킷에 포함된 오디오 데이터를 상기 청크 데이터와 동기화하여 출력하는 프로세스를 포함하는, 미디어 서비스 장치.
A media service apparatus for transmitting media data to the media playback apparatus,
A module storage unit for storing a script module necessary for reproducing the media data on a web browser of the media player;
A module transfer unit for transferring the script module to the media player in response to connection of the media player;
A packetizing unit for packetizing the media data to generate a transmission packet; And
And a web server that forms a communication session with the playback apparatus and transmits the transport packet to the media playback apparatus in response to a request from the media playback apparatus,
Wherein the script module comprises: a process of receiving the communication packet through the communication session; a process of packaging the video frames included in the communication packet into a unit number and converting the packet into chunk data; And outputting the audio data included in the communication packet in synchronization with the chunk data based on the time information about the time when the audio data is decoded and outputted by the media restoring unit installed in the apparatus.
제14항에 있어서, 상기 스크립트 모듈은 상기 웹 브라우저에서 파싱(parsing) 가능한 자바스크립트로 작성된 코드인 미디어 서비스 장치.15. The media service apparatus according to claim 14, wherein the script module is a code written in Javascript that can be parsed in the web browser. 제14항에 있어서,
상기 타임 정보는 상기 타임 정보에 대응되는 청크 데이터 중에서 시작 부분이 상기 미디어 재생 장치 내의 렌더러에 의해 렌더링되는 시점을 나타내는, 미디어 서비스 장치.
15. The method of claim 14,
Wherein the time information indicates a time at which a start portion of the chunk data corresponding to the time information is rendered by the renderer in the media playback apparatus.
제14항에 있어서, 상기 오디오 데이터를 동기화하여 출력하는 프로세스는
상기 통신 패킷에 포함된 오디오 데이터를 디코드 하여 오디오를 복원한 후, 상기 복원된 오디오를 상기 청크 데이터 단위로 제공된 타임 정보와 동기화하여 출력하는 프로세스를 포함하는, 미디어 서비스 장치.
15. The method of claim 14, wherein the process of synchronizing and outputting the audio data comprises:
And decoding the audio data included in the communication packet to restore audio, and outputting the restored audio in synchronization with the time information provided in units of the chunk data.
제14항에 있어서, 상기 오디오를 동기화하여 출력하는 프로세스는
상기 오디오 데이터를 상기 타임 정보에 대응되는 청크 데이터와 동기화하여 버퍼링하는 프로세스;
상기 버퍼링된 오디오 데이터를 상기 웹 브라우저에서 파싱(parsing) 가능한 스크립트에 의해 디코드 하는 프로세스; 및
상기 디코드된 오디오 데이터를 렌더링하는 프로세스를 포함하는, 미디어 서비스 장치.
15. The method of claim 14, wherein the process of synchronizing and outputting audio comprises:
Buffering the audio data by synchronizing with the chunk data corresponding to the time information;
Decoding the buffered audio data by a script that can be parsed by the web browser; And
And rendering the decoded audio data.
제14항에 있어서,
상기 청크 데이터는 디코드 되기 전 압축된 데이터이고, 상기 청크 데이터와 동기화되는 오디오 데이터는 상기 미디어 재생 장치에서 디코드 되어 압축 해제된 데이터인, 미디어 서비스 장치.
15. The method of claim 14,
Wherein the chunk data is compressed data before being decoded and the audio data synchronized with the chunk data is decoded by the media reproduction apparatus and decompressed.
미디어 서비스 장치에서 생성된 미디어 데이터를 웹 서비스를 지원하는 통신 프로토콜을 이용하여 수신하는 수신부;
상기 수신된 미디어 데이터로부터 제1 미디어 타입 데이터와 제2 미디어 타입 데이터로 분리하는 데이터 분리부;
상기 제1 미디어 데이터를 구성하는 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환하는 컨테이너 부;
웹 브라우저에 임베드 된(embedded) 디코더에 의해 상기 변환된 청크 데이터를 디코드하여 제1 미디어를 복원하고, 상기 복원된 제1 미디어를 출력할 때 상기 복원된 제1 미디어가 출력되는 시점에 관한 타임 정보를 상기 청크 데이터 단위로 제공하는 미디어 복원부; 및
상기 청크 데이터 단위로 제공되는 타임 정보에 기초하여 상기 제2 미디어 데이터를 상기 복원된 제1 미디어와 동기화하여 출력하는 싱크부를 포함하는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.
A receiving unit for receiving the media data generated by the media service apparatus using a communication protocol supporting the web service;
A data separator for separating the received media data into first media type data and second media type data;
A container unit for packaging the frames constituting the first media data into unit numbers and converting the frames into chunk data;
The method comprising: decoding the converted chunk data by a decoder embedded in a web browser to restore a first medium; and outputting the restored first media, To the chunk data unit; And
And a sync unit for outputting the second media data in synchronization with the restored first media based on time information provided in the chunk data unit, in synchronization with video and audio on a web browser.
KR1020170087661A 2017-01-20 2017-07-11 Media playback apparatus and method for synchronously reproducing video and audio on a web browser KR101986995B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US15/833,235 US10979785B2 (en) 2017-01-20 2017-12-06 Media playback apparatus and method for synchronously reproducing video and audio on a web browser
CN201810049239.6A CN108337545B (en) 2017-01-20 2018-01-18 Media playback apparatus and media service apparatus for synchronously reproducing video and audio

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20170009963 2017-01-20
KR1020170009963 2017-01-20
US201762457203P 2017-02-10 2017-02-10
US62/457,203 2017-02-10

Publications (2)

Publication Number Publication Date
KR20180086113A true KR20180086113A (en) 2018-07-30
KR101986995B1 KR101986995B1 (en) 2019-09-30

Family

ID=63048402

Family Applications (4)

Application Number Title Priority Date Filing Date
KR1020170087661A KR101986995B1 (en) 2017-01-20 2017-07-11 Media playback apparatus and method for synchronously reproducing video and audio on a web browser
KR1020170087651A KR101942269B1 (en) 2017-01-20 2017-07-11 Apparatus and method for playing back and seeking media in web browser
KR1020170087666A KR101942270B1 (en) 2017-01-20 2017-07-11 Media playback apparatus and method including delay prevention system
KR1020170087672A KR101931514B1 (en) 2017-01-20 2017-07-11 Apparatus and method for simultaneous playback and backup of media in a web browser

Family Applications After (3)

Application Number Title Priority Date Filing Date
KR1020170087651A KR101942269B1 (en) 2017-01-20 2017-07-11 Apparatus and method for playing back and seeking media in web browser
KR1020170087666A KR101942270B1 (en) 2017-01-20 2017-07-11 Media playback apparatus and method including delay prevention system
KR1020170087672A KR101931514B1 (en) 2017-01-20 2017-07-11 Apparatus and method for simultaneous playback and backup of media in a web browser

Country Status (1)

Country Link
KR (4) KR101986995B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125550A (en) * 2021-11-24 2022-03-01 天翼数字生活科技有限公司 Video processing method, device and equipment and readable storage medium
WO2022065952A3 (en) * 2020-09-28 2022-05-19 삼성전자 주식회사 Electronic device for performing synchronization of video data and audio data, and control method therefor

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200050774A (en) 2018-11-02 2020-05-12 김현일 HTML5-based web-responsive content interactive social learning system
KR20220104548A (en) * 2021-01-18 2022-07-26 삼성전자주식회사 Method and apparatus for synchronizing audio and video signals of multimedia content
CN114040251A (en) * 2021-09-17 2022-02-11 北京旷视科技有限公司 Audio and video playing method, system, storage medium and computer program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040096718A (en) * 2003-05-10 2004-11-17 삼성전자주식회사 Multimedia data decoding apparatus, audio data receiving method and audio data structure therein
KR20050098461A (en) * 2004-04-07 2005-10-12 최경우 Multimedia room operating system and its method by 2-way data providing mechanism
JP2015528961A (en) * 2012-08-01 2015-10-01 成都理想境界科技有限公司 Video playback method, video playback system and portable terminal based on augmented reality technology

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020071346A (en) 2001-03-06 2002-09-12 주식회사 폴리네트 정보기술 Poly net streamer system
US20030110234A1 (en) * 2001-11-08 2003-06-12 Lightsurf Technologies, Inc. System and methodology for delivering media to multiple disparate client devices based on their capabilities
EP2026535A1 (en) * 2003-10-31 2009-02-18 Sony Corporation System, method, and computer program product for remotely determining the configuration of a multi-media content user
US8738826B2 (en) * 2012-06-08 2014-05-27 Apple Inc. System and method for display mirroring
KR101416175B1 (en) 2012-06-26 2014-07-09 한정훈 Led lighting control system and control method using the same
US9247317B2 (en) 2013-05-30 2016-01-26 Sonic Ip, Inc. Content streaming with client device trick play index

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040096718A (en) * 2003-05-10 2004-11-17 삼성전자주식회사 Multimedia data decoding apparatus, audio data receiving method and audio data structure therein
KR20050098461A (en) * 2004-04-07 2005-10-12 최경우 Multimedia room operating system and its method by 2-way data providing mechanism
JP2015528961A (en) * 2012-08-01 2015-10-01 成都理想境界科技有限公司 Video playback method, video playback system and portable terminal based on augmented reality technology

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022065952A3 (en) * 2020-09-28 2022-05-19 삼성전자 주식회사 Electronic device for performing synchronization of video data and audio data, and control method therefor
CN114125550A (en) * 2021-11-24 2022-03-01 天翼数字生活科技有限公司 Video processing method, device and equipment and readable storage medium

Also Published As

Publication number Publication date
KR20180086114A (en) 2018-07-30
KR20180086115A (en) 2018-07-30
KR20180086112A (en) 2018-07-30
KR101931514B1 (en) 2018-12-21
KR101942270B1 (en) 2019-04-11
KR101942269B1 (en) 2019-01-25
KR101986995B1 (en) 2019-09-30

Similar Documents

Publication Publication Date Title
US10979785B2 (en) Media playback apparatus and method for synchronously reproducing video and audio on a web browser
US20220263885A1 (en) Adaptive media streaming method and apparatus according to decoding performance
US10567809B2 (en) Selective media playing method and apparatus according to live streaming and recorded streaming
KR101986995B1 (en) Media playback apparatus and method for synchronously reproducing video and audio on a web browser
US11089349B2 (en) Apparatus and method for playing back and seeking media in web browser
US8554938B2 (en) Web browser proxy-client video system and method
US9276997B2 (en) Web browser proxy—client video system and method
US11909799B2 (en) Media playback apparatus and method including delay prevention system
US20200128282A1 (en) Systems and Methods of Orchestrated Networked Application Services
KR101821123B1 (en) Method and apparatus for playing media stream on web-browser
US20140344469A1 (en) Method of in-application encoding for decreased latency application streaming
KR101821124B1 (en) Method and apparatus for playing media stream on web-browser
US11089381B2 (en) Apparatus and method for simultaneous playback and backup of media in a web browser
US10547878B2 (en) Hybrid transmission protocol
EP4256791A1 (en) Systems and methods of alternative networked application services
WO2022125401A1 (en) Systems and methods of alternative networked application services

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
N231 Notification of change of applicant
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant