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 PDFInfo
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
- H04N21/4431—OS 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/238—Interfacing 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/2381—Adapting the multiplex stream to a specific network, e.g. an Internet Protocol [IP] network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/238—Interfacing 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/2387—Stream processing in response to a playback request from an end-user, e.g. for trick-play
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/242—Synchronization processes, e.g. processing of PCR [Program Clock References]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network 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/63—Control 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/637—Control signals issued by the client directed to the server or network components
- H04N21/6377—Control signals issued by the client directed to the server or network components directed to server
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network 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/63—Control 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/643—Communication protocols
- H04N21/64322—IP
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network 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/63—Control 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/643—Communication protocols
- H04N21/6437—Real-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
Description
본 발명은 웹 브라우저에서 미디어를 재생하는 장치 및 방법에 관한 것으로서, 보다 상세하게는 비디오 또는 오디오를 컨테이너(container) 단위로 디코딩하는 경우 비디오와 오디오를 동기화하여 미디어를 재생하는 장치 및 방법에 관한 것이다.BACKGROUND OF THE
미디어 데이터를 사용자가 인터넷을 통해 웹 브라우저에서 재생하기 위해서, 코덱(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
플러그인 없이 웹 브라우저에서 미디어를 재생하기 위한 방법으로 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
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
6 shows an embodiment of a
FIG. 7 shows another embodiment of the
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
Fig. 13 shows another embodiment of the
Fig. 14 shows another embodiment of the
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
본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.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
미디어 서비스 장치(110)는 하나 이상의 영상 재생 장치들에 대해 컴퓨팅 서비스를 제공할 수 있도록 적합한 컴퓨팅 또는 프로세싱 장치를 포함한다. 예를 들면, 미디어 서비스 장치(110)는 네트워크 카메라, 네트워크 비디오 레코더(NVR), 디지털 비디오 레코더(DVR) 등과 같이 영상 스트림을 생성하거나 저장하며 사용자 기기들에 전송할 수 있는 장치를 포함한다. The
미디어 재생 장치(120)는 네트워크를 통해 미디어 서비스 장치(110)나 다른 컴퓨팅 사용자 기기들과 상호작용할 수 있도록 적합한 컴퓨팅 또는 프로세싱 장치를 포함한다. 예를 들면, 미디어 재생 장치(120)는 데스크톱 컴퓨터, 모바일 전화 또는 스마트폰, PDA(personal digital assistant), 랩톱 컴퓨터 및 타블릿 컴퓨터를 포함할 수 있다.
미디어 서비스 장치(110)에 의해 실시간 촬영 또는 저장된 미디어는 미디어 재생 장치(120)의 요청에 의해 네트워크(430)를 통해 전송된다. 사용자는 미디어 재생 장치(120)의 웹 브라우저(210)상에 구현된 사용자 인터페이스를 통해 전송된 미디어를 재생하는 것이 가능하다. 이때, 웹 브라우저(210)는 구글 크롬, 마이크로소프트 익스플로러, 모질라의 파이어폭스, 애플의 사파리 등, 데스크톱 컴퓨터나 모바일 전화에 탑재되는 일반적으로 알려진 브라우저를 포함할 뿐만 아니라, 웹 브라우저의 리소스나 API를 이용하여 별도로 제작된 소프트웨어 어플리케이션까지 포괄한다.The media shot or stored in real time by the
이하 도 2 내지 도 5를 통해 미디어 서비스 장치(110)와 미디어 재생 장치(120)사이의 네트워크 통신 방식인 웹소켓 상에서 전송되는 RTSP/RTP 프로토콜을 설명한다.An RTSP / RTP protocol transmitted over a web socket, which is a network communication method between the
도 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
도 3은 미디어 서비스 장치(110)와 미디어 재생 장치(120)간의 웹소켓 연결이 이루어지는 과정을 나타낸다. FIG. 3 shows a process of connecting a web socket between the
미디어 재생 장치(120)는 미디어 서비스 장치(110)에 웹소켓 URI를 사용하여 웹소켓 연결을 개시하는 요청을 한다. 웹소켓 URI는 GetServiceCapabilities 명령을 사용하면 획득이 가능하다. 웹소켓 URI는 예를 들어 "ws://192.168.0.5/webSocketServer"와 같은 방식으로 표현된다(S1000). The
미디어 재생 장치(120)는 미디어 서비스 장치(110)에 웹소켓 업그레이드 요청을 한다. 미디어 서비스 장치(110)는 프로토콜 전환 요청에 대해 승인한다는 상태코드인 101 코드로 응답한다(S1100). The
미디어 서비스 장치(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
도 3에 도시된 웹소켓 연결 과정에서 미디어 재생 장치(120)에서 보내는 요청 메세지와 미디어 서비스 장치(110)의 응답 메세지의 예는 다음의 표 1에 기재된 바와 같다.Examples of a request message sent from the
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.orgThe 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
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
도 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
이 후, 미디어 재생 장치(120)와 미디어 서비스 장치(110) 간에 핸드쉐이크 과정을 통해 양자간에 웹소켓 연결이 수립되면, 그 이후에는 양자간의 지속적인 데이터의 송수신이 가능해진다. 즉, 미디어 재생 장치(120)는 미디어 서비스 장치(110)에 미디어 스트리밍 요청을 전송 웹소켓 패킷(socket.send)의 형태로 전송하고, 미디어 서비스 장치(110)는 미디어 재생 장치(120)에 미디어 스트림을 응답 웹소켓 패킷(socket.onMessage)의 형태로 전송한다. 이러한 과정은 미디어 스트림 전송이 중지되거나 완료될 때까지 지속적으로 양자간에 이루어질 수 있다.Thereafter, when a web socket connection is established between the
도 5는 네트워크 인터페이스(21)를 통해 전송되는 통신 패킷의 구조를 도시한 도면이다. 5 is a diagram showing a structure of a communication packet transmitted through the
데이터(45)에 해당하는 RTP 페이로드에 RTP 헤더(44)가 부가 되면 RTP 패킷이 된다. RTP 패킷은 웹소켓 페이로드와 같으며 여기에 웹소켓 헤더(43)가 부가되어 웹소켓 패킷이 된다. 웹소켓 패킷은 TCP 페이로드와 같고 여기에 TCP 헤더(42)가 부가되어 TCP 패킷이 된다. 마지막으로 TCP 패킷은 IP 페이로드와 같고 여기에 IP 헤더(41)가 부가되면 최종적으로 통신 패킷, 즉 IP 패킷이 완성된다. 이와 같이 IP 패킷을 완성하는 과정 및 각각의 헤더를 제거하는 과정은 미디어 서비스 장치(110)와 미디어 재생 장치(120)에서 수행된다.When the
미디어 서비스 장치(110)와 미디어 재생 장치(120)간의 통신은 이상 도 2 내지 도 5를 통해 설명한 HTML5 기반의 웹소켓 프로토콜을 통해 이루어지기 때문에, RTSP/RTP 송수신 제어를 담당하는 모듈은 HTML5에서 파싱이 가능한 스크립트 코드에 의해 구현될 수 있다. 일 예로 HTML5에서 파싱이 가능한 스크립트인 자바스크립트로 구현될 수 있다. 따라서, 종래와 같이 플러그인을 별도로 설치하지 않고도 RTSP/RTP 프로토콜을 이용한 미디어 재생이 HTML5 환경의 웹 브라우저 내에서 구현될 수 있다.Since the communication between the
지금까지 미디어 서비스 장치(110)와 미디어 재생 장치(120)간의 네트워크 통신 방식을 살펴보았다. 이하 도 6 내지 도 18을 통해 미디어 서비스 장치(110)와 미디어 재생 장치(120)의 구성 및 작동 방식을 설명한다.The network communication method between the
도 6은 미디어 서비스 장치(110)의 일 실시예를 나타낸다. 일 실시예에서 미디어 서비스 장치(110)는 실시간 비디오 카메라(111), 인코더(112), 패킷화부(113), 웹 서버(114), 모듈 저장부(115), 모듈 전송부(116), 및 제어부(117)를 포함한다. 6 shows an embodiment of a
실시간 비디오 카메라(111)는 미디어를 실시간으로 촬영하는 수단으로 촬영은 비디오 캡쳐 및 오디오 녹음을 모두 진행하는 방식과 비디오 캡쳐만 이루어지는 방식을 포함한다. The real-
인코더(112)는 실시간 비디오 카메라(111)에 의해 촬영된 미디어를 압축하여 부호화하는 기능을 수행한다. 인코더(112)에 의한 인코딩은 반드시 웹 브라우저에 임베드 된 디코더에서 지원하는 특정 코덱 형식으로 이루어져야 하는 것은 아니며 임의의 코덱 형식으로 인코딩 하는 것이 가능하다.The
패킷화부(113)는 인코딩된 미디어 데이터를 패킷화하여 전송 패킷을 생성한다. 패킷화란 미디어 데이터를 네트워크(430)를 통해 전송하는 것이 용이하도록 적당한 길이로 분할하거나 또는 미디어 데이터가 짧은 경우 적당한 길이로 일괄하여 그 각각에 수신되어야 할 주소 등의 제어정보를 부여하는 것을 뜻한다. 이 때 제어정보는 전송 패킷의 헤더에 위치하게 된다. 전송 패킷은 전술한 웹소켓 패킷의 형태로 이루어진다.The
패킷화부(113)는 미디어 재생 장치(120)에서 요청하는 방식에 따라 미디어 데이터의 패킷화를 수행할 수 있다. 예를 들어 미디어 재생 장치(120)에서 프레임 단위의 비디오를 요청한 경우 패킷화부(113)는 프레임 형식으로 전송 패킷을 생성하고, 미디어 재생 장치(120)에서 웹 브라우저에 임베드 된 디코더에서 지원하는 컨테이너 단위로 비디오를 요청한 경우 패킷화부(113)는 컨테이너 형식으로 전송 패킷을 생성할 수 있다. The
웹 서버(114)는 미디어 재생 장치(120)와 통신 세션을 형성하는 기능을 수행한다. 즉, 미디어 서비스 장치(110)의 웹 서버(114)와 미디어 재생 장치(120) 간의 핸드쉐이크 과정을 통해 양자간에 웹소켓 연결이 수립된다. 이후 미디어 재생 장치(120)의 요청에 따라 패킷화부(113)에서 생성된 전송 패킷을 웹 서버(114)를 통해 전송하게 된다. The
모듈 저장부(115)는 미디어 재생 장치(120)에서 미디어를 재생하는데 필요한 스크립트 모듈을 저장하는 모듈이다. 스크립트 모듈은 웹 브라우저에서 파싱 할 수 있는 스크립트로 작성된 코드로 미디어 재생 장치(120)에서 플러그인이나 별도의 응용프로그램 설치 없이 HTML5환경의 웹 브라우저에서 미디어 재생이 가능하도록 해주는 모듈이다. 스크립트 모듈은 일 예로 자바스크립트로 작성된 코드일 수 있다. 스크립트 모듈에 대해서는 도 8 내지 도 11을 참조하여 후술한다.The
모듈 전송부(116)는 모듈 저장부(115)에 저장된 스크립트 모듈을 미디어 재생 장치(120)로 전송하는 모듈이다. 모듈 전송부(116)는 미디어 재생 장치(120)가 네트워크(430)를 통해 미디어 서비스 장치(110)에 접속한 경우 이에 응답하여 스크립트 모듈을 전송한다. The
제어부(117)는 미디어 서비스 장치(110)의 다른 구성 모듈들을 제어하는 모듈이다. 예를 들어 네트워크(430)를 통해 웹 서버(114)에 미디어 재생 장치(120)의 접속이 이루어진 경우 모듈 저장부(115)에 저장된 스크립트 모듈이 모듈 전송부(116)를 통해 미디어 재생 장치(120)로 전송되는데, 제어부(117)는 각 모듈들로부터 신호를 주고 받아 해당 작업이 원활이 이루어지게끔 통제하는 역할을 수행한다.The
이상의 도 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
도 7은 미디어 서비스 장치(110)의 다른 실시예를 나타낸다. 도 6의 미디어 서비스 장치(110)는 실시간 비디오 카메라(111)에 의해 실시간 라이브 미디어를 전송하기 위한 실시예이고, 도 7의 미디어 서비스 장치(110)는 미디어 저장부(118)에 저장된 미디어 데이터를 전송하기 위한 실시예를 나타낸다. FIG. 7 shows another embodiment of the
미디어 저장부(118)는 네트워크 비디오 레코더(NVR) 또는 개인용 녹화기(PVR)를 포함하나 도 7의 실시예에서는 네트워크 비디오 레코더인 경우를 예로 들어 설명한다. The
미디어 저장부(118)는 카메라 또는 서버로부터 미디어 데이터를 전송받아 압축 저장한다. 미디어 재생 장치(120)로부터 미디어 데이터 전송 요청이 있는 경우 미디어 서비스 장치(110)는 미디어 저장부(118)에 저장된 미디어 데이터를 패킷화부(113)에서 패킷화하여 웹 서버(114)를 통해 전송한다. The
도 7의 미디어 서비스 장치(110) 구성모듈 중 패킷화부(113), 웹 서버(114), 모듈 저장부(115), 모듈 전송부(116), 제어부(117)는 도 6의 실시예에서 설명한 모듈들로 중복되는 설명은 생략한다.The
도 8 내지 도 11은 미디어 서비스 장치(110)로부터 미디어 재생 장치(120)로 전송되는 스크립트 모듈의 실시예들을 나타낸다. 스크립트 모듈은 웹 브라우저에서 파싱할 수 있는 스크립트로 구현될 수 있으며 도 8 내지 도 11의 실시예에서는 자바스크립트로 구현되는 경우에 대해 설명한다. 8 to 11 illustrate embodiments of a script module that is transmitted from the
도 8은 스크립트 모듈은 일 실시예를 나타낸다. 도 8의 스크립트 모듈은 프레임 단위로 비디오를 복원하기 위한 모듈로, RTSP/RTP 클라이언트 모듈(121), 디패킷화 모듈(122), JS 디코더 모듈(124), 및 JS 렌더러 모듈(125)을 포함한다.Figure 8 illustrates one embodiment of the script module. 8 includes a RTSP /
RTSP/RTP 클라이언트 모듈(121)은 미디어 서비스 장치(110)와 RTSP/RTP 통신을 지원하는 기능을 수행한다. RTSP/RTP 클라이언트 모듈(121)을 통해 미디어 서비스 장치(110)의 웹 서버(114)로부터 전송 패킷을 수신할 수 있다. 현재로서 플러그인 없이 웹 브라우저 상에서 RTSP/RTP에 따라 미디어를 처리하는 것이 가능하지 않은데, RTSP/RTP 클라이언트 모듈(121)을 이용하면 웹 브라우저에서 HTTP 방식을 이용함에도 안정적으로 RTSP/RTP 프로토콜로 전송된 데이터를 수신할 수 있다.The RTSP /
디패킷화 모듈(122)은 RTSP/RTP 클라이언트 모듈(121)로부터 전달받은 패킷을 디패킷화(depacketization)하는 모듈이다. 디패킷화란 패킷화의 반대되는 개념으로 패킷화가 미디어 데이터를 적당한 길이로 분할하여 패킷을 형성하는 것을 의미한다면 이를 다시 이어 붙여 패킷화 이전의 상태로 미디어 데이터를 복원해주는 것을 뜻한다.The
JS 디코더 모듈(124)은 인코딩된 비디오의 압축 및 부호화를 해제하는 것, 즉 디코딩을 수행하는 모듈이다. JS 디코더 모듈(124)은 스크립트 모듈의 다른 모듈들과 마찬가지로 자바스크립트로 구현될 수 있다. JS 디코더 모듈(124)을 자바스크립트로 구현하기 때문에 웹 브라우저에 임베드 된 디코더와 달리 코덱 형식에 제한 없이 임의의 코덱 형식에 대하여 디코딩이 가능하다. 또한 프레임 단위로 디코딩이 가능하다.The
도 8의 일 실시예에 따라 JS 디코더 모듈(124)을 자바스크립트로 구현하면 예를 들어 다음의 표 2 및 표 3과 같은 코드로 표현될 수 있다(표 3은 표 2로부터 이어지는 내용이다).For example, the
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 (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
도 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 /
도 9의 스크립트 모듈을 자세히 살펴보면 도 8의 경우와 다르게 컨테이너 생성 모듈(127)이 포함된 것을 볼 수 있다. 컨테이너 생성 모듈(127)은 비디오가 컨테이너 단위로 패키징이 이루어져 있지 않은 경우 프레임들을 단위 개수로 패키징하여 컨테이너를 형성하는 기능을 수행할 수 있다. 또한 비디오 프레임들과 오디오를 단위 개수로 패키징할 수 있다. 이때 컨테이너 생성 모듈(127)은 비디오의 fps(frames per second)에 따라 단위 개수를 가변적으로 조절할 수 있다. 컨테이너 생성 모듈(127)에서 비디오 프레임들을 단위 개수로 패키징 하거나 비디오 프레임들과 오디오를 단위 개수로 패키징 한 것을 청크 데이터라 칭하기로 한다.9, it can be seen that the
컨테이너는 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
도 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 /
오디오 트랜스코더(123)는 오디오 데이터가 웹 브라우저에 임베드 된 디코더에서 지원하지 않는 코덱 형식으로 구성된 경우 트랜스코딩을 수행하는 모듈이다. 트랜스코딩이란 코덱 형식을 변환하는 것으로 오디오 트랜스코더(123)에서는 오디오 데이터의 압축을 풀고 이전과 다른 코덱 형식으로 다시 압축을 수행한다. 예를 들어 웹 브라우저에 임베드 된 디코더인 비디오 태그에서 지원하지 않는 G.711 코덱 형식의 오디오 데이터를 비디오 태그에서 지원하는 ACC의 코덱 형식으로 변환하는 경우이다.The
오디오 트랜스코더(123)는 오디오 데이터를 웹 브라우저에서 임베드 된 디코더에서 지원하는 코덱 형식으로 변환하여 주므로, 오디오 데이터를 비디오 데이터와 함께 웹 브라우저에서 임베드 된 디코더를 이용하여 복원하여 동기화 문제 없이 출력할 수 있는 환경을 제공한다. The
도 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 /
오디오 디코더(126)는 오디오 데이터의 디코딩을 수행하는 모듈로 다른 모듈들과 마찬가지로 웹 브라우저에서 파싱할 수 있는 스크립트인 자바스크립트로 구현될 수 있다.The
오디오 디코더(126)에서 디코딩된 오디오 데이터는 오디오 청크부(128)에서 오디오 청크로 패키징된다. 이때, 오디오 청크는 컨테이너 생성 모듈(127)에서 생성되는 청크 데이터를 구성하는 프레임들의 단위 개수로 오디오 데이터를 패키징하여 생성된다. 즉, 청크 데이터에 종속되어 오디오 청크가 생성된다. 도 12에는 컨테이너 생성 모듈(127)과 오디오 청크부(128)가 모두 포함된 미디어 재생 장치(120)가 도시되어 있는데, 도 12에서 오디오 청크를 생성하는 것에 대해 다시 설명한다. The audio data decoded in the
버퍼 컨트롤러(129)는 오디오 청크부(128)로부터 오디오 청크를 전달받아 오디오 버퍼에 버퍼링하고, 버퍼링된 오디오 청크를 오디오 렌더러(136)에 제공한다. 오디오 렌더러(136)는 미디어 재생 장치(120)의 구성 모듈로 도 12 및 도 13에 도시되어 있다. The
버퍼 컨트롤러(129)는 비디오를 복원하는 다른 모듈로부터 타임 정보를 받아 오디오를 비디오에 동기화시키는 기능을 수행한다. 상기 타임 정보는 청크 데이터가 미디어 재생 장치(120)에 설치된 미디어 복원부(143)에 의해 디코드 되어 출력되는 시점에 관한 정보로, 청크 데이터 중에서 시작 부분이 미디어 재생 장치 내(120)의 렌더러에 의해 렌더링하는 시점을 나타낸다. 버퍼 컨트롤러(129)는 상기 타임 정보를 통해 비디오가 디스플레이되는 시점에 맞추어 오디오가 출력될 수 있게 오디오 청크를 버퍼링하거나 오디오 렌더러(136)에 전달함으로써 비디오와 오디오를 동기화한다.The
도 11의 스크립트 모듈은 그 순서를 달리하여 구성하는 것이 가능한데, 오디오 디코더(126)를 버퍼 컨트롤러(129)의 후단으로 이동시키는 것이다. 이 경우 버퍼 컨트롤러(129)에 의해 청크 데이터와 오디오 데이터의 동기화가 먼저 수행되고 버퍼링된 오디오 데이터를 오디오 디코더(126)가 디코드하게 된다.The script module of FIG. 11 can be configured in a different order, moving the
이상 도 8 내지 도 11에서 설명한 스크립트 모듈은 미디어 재생 장치(120)가 미디어 서비스 장치(110)에 접속함에 따라 미디어 서비스 장치(110)에서 미디어 재생 장치(120)로 전송되어, 미디어 재생 장치(120)의 웹 브라우저(210)에서 플러그인 없이 미디어 재생이 가능한 환경을 제공한다. 즉, 스크립트 모듈은 미디어 재생 장치(120)에 설치되어 미디어 재생을 위한 시스템을 구성하게 된다. 스크립트 모듈이 설치된 미디어 재생 장치(120)의 실시예는 이하 도 12 내지 도 14를 통해 살펴본다.8 to 11 are transmitted from the
도 12 내지 도 14는 미디어 재생 장치(120)의 실시예들을 도시한다. 미디어 재생 장치(120)에서 미디어 재생을 위한 주요 모듈들은 스크립트 모듈에 의해 구성된다. 도 8 내지 도 11을 통해 스크립트 모듈의 기능을 살펴보았으므로 도 12 내지 도 14에서는 구조 및 작동방식을 중심으로 미디어 재생 장치(120)를 설명한다.Figs. 12 to 14 show embodiments of the
도 12는 미디어 재생 장치(120)의 일 실시예를 나타낸다. 도 12의 미디어 재생 장치(120)는 수신부(141), 데이터 분리부, 컨테이너 부(142), 미디어 복원부(143) 및 오디오 싱크부(144)를 포함한다. 이때, 수신부(141), 데이터 분리부, 컨테이너 부(142) 및 오디오 싱크부(144)는 자바스크립트로 구현될 수 있다. 도 12의 미디어 재생 장치(120)는 도 9 및 도 11의 스크립트 모듈을 수신하여 구성될 수 있다.12 shows an embodiment of the
수신부(141)는 미디어 서비스 장치(110)에서 생성된 미디어 데이터를 웹 서비스를 지원하는 통신 프로토콜을 이용하여 수신한다. 이때 웹 서비스를 지원하는 통신 프로토콜은 웹소켓 상에서 전송되는 RTSP/RTP 프로토콜일 수 있다. 수신부(141)는 웹소켓 클라이언트(131)와 RTSP/RTP 클라이언트 모듈(121)을 포함한다. The receiving
웹소켓 클라이언트(131)는 미디어 서비스 장치(110)의 웹 서버(114)와 웹소켓 연결을 수립하는 모듈이다. 미디어 재생 장치(120)와 미디어 서비스 장치(110)는 각각 웹소켓 클라이언트(131)와 웹 서버(114)간의 핸드쉐이크를 거쳐 전송 패킷을 주고 받는다.The
RTSP/RTP 클라이언트 모듈(121)은 도 8의 일 실시예에서 설명한 바와 같이 사용자의 웹 브라우저(210)에 RTSP/RTP 통신이 지원되도록 하는 기능을 수행한다. 따라서 사용자는 별도의 플러그인 설치 없이 RTSP/RTP 프로토콜을 사용하여 HTML5 환경의 웹 브라우저(210)를 통해 미디어를 재생하는 것이 가능하다.The RTSP /
수신부(141)를 거친 미디어 데이터는 데이터 분리부에 의해 비디오 데이터와 오디오 데이터로 분리된다. 비디오 데이터는 RTSP/RTP 클라이언트 모듈(121)로부터 왼쪽 아래 화살표를 따라, 오디오 데이터는 오른쪽 아래 화살표를 따라 각각 디패킷화 모듈(122a, 122b)로 전달된다. 디패킷화 모듈(122a, 122b)은 비디오 데이터와 오디오 데이터의 디패킷화를 수행하며 디패킷화를 거친 비디오 데이터는 컨테이너 부(142)로, 오디오 데이터는 오디오 싱크부(144)로 전달된다. The media data that has passed through the receiving
컨테이너 부(142)는 컨테이너 생성 모듈(127)을 포함하며, 컨테이너 생성 모듈(127)에 의해 비디오 데이터가 컨테이너 형식으로 되어 있지 않은 경우 비디오 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환한다. The
컨테이너 생성 모듈(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
디패킷화 모듈(122a)이 비디오 프레임들(311)을 컨테이너 생성 모듈(127)로 전달하면, 컨테이너 생성 모듈(127)은 헤더 정보를 이용하여 전달받은 데이터가 컨테이너 형식인지 여부를 판단한다. 비디오 프레임들(311)은 프레임 형식의 데이터이므로, MSE(134) 및 비디오 태그(135)에서 처리되도록 하기 위해서 컨테이너 생성 모듈(127)은 비디오 프레임들(311)을 컨테이너 형식으로 변환하게 된다.When the
프레임 형식에서 컨테이너 형식으로의 변환은 복수의 프레임들을 단위 개수로 패키징하여 이루어진다. 이때, 단위 개수는 비디오 데이터의 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
다시 도 12로 돌아오면, 컨테이너 생성 모듈(127)에서 오디오 청크부(128)로 점선으로 된 화살표가 그려져 있는데, 이는 오디오 데이터의 패키징을 위한 정보가 전달되는 것을 의미한다. 전달되는 정보에 관해서는 이하 오디오 청크부(128)를 통해 자세히 설명한다.Referring again to FIG. 12, an arrow with a dotted line is drawn from the
미디어 복원부(143)는 웹 브라우저에 임베드 된 디코더에 의해 상기 청크 데이터를 디코드하여 비디오를 복원하고, 복원된 비디오를 출력한다. 이때, 웹 브라우저에 임베드 된 디코더는 비디오 태그일 수 있다. 도 12의 실시예에서 미디어 복원부(143)는 MSE(134)와 비디오 태그(135)를 포함한다. The
MSE(134)는 HTTP 다운로드를 이용해 동영상 스트리밍 재생을 위해 만들어진 HTML5용 자바스크립트 API이다. W3C에 의해 표준화 된 이 기술은 엑스박스(Xbox)와 플레이스테이션4(PS4) 같은 콘솔 게임기나 크롬 캐스트 브라우저 등에서 스트리밍 재생을 가능하게 해준다.
비디오 태그(135)에서는 디코딩 및 렌더링을 수행하여 비디오가 웹 브라우저에 디스플레이 되도록 한다. 비디오 태그(135)의 디코더를 사용하면 자바스크립트의 동적 언어 특성으로 인해 한계를 지닌 JS 디코더 모듈(124)보다 우수한 성능으로 디코딩이 가능하다. 즉, 고해상도 영상과 높은 fps의 디코딩이 가능하다.The
이상 설명한 모듈들에 의한 비디오의 출력과정을 정리하자면, 비디오 데이터는 데이터 분리부에서 분리되어 컨테이너 부(142)로 전달되고, 컨테이너 부(142)는 비디오 데이터가 컨테이너 단위로 되어있지 않은 경우 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환한다. 청크 데이터로 구성된 비디오 데이터는 미디어 복원부(143)에서 디코딩과 렌더링 과정을 거쳐 출력된다. 다음으로 오디오 데이터의 출력과정을 살펴본다.The video data is separated from the data separating unit and transferred to the
데이터 분리부에서 분리된 오디오 데이터는 디패킷화 모듈(122b)에서 디패킷화된 뒤 오디오 싱크부(144)를 통해 비디오 데이터와 동기화되어 출력된다. 오디오 싱크부(144)는 오디오 디코더(126), 오디오 청크부(128), 버퍼 컨트롤러(129), 및 오디오 렌더러(136)를 포함할 수 있다.The audio data demultiplexed by the data demultiplexing unit is demultiplexed by the
오디오 디코더(126)는 분리된 오디오 데이터를 웹 브라우저에서 파싱할 수 있는 스크립트에 의해 디코드한다. 이때 웹 브라우저에서 파싱할 수 있는 스크립트는 자바스크립트일 수 있다. The
오디오 청크부(128)는 오디오 디코더(126)에서 디코드 된 오디오 데이터를 패키징하여 오디오 청크를 생성한다. 오디오 청크부(128)에서는 컨테이너 생성 모듈(127)에서 생성되는 청크 데이터와 대응되는 범위로 오디오 데이터를 패키징하여야 하므로, 오디오 청크부(128)는 컨테이너 생성 모듈(127)로부터 청크 데이터에 관한 정보를 제공 받는다. 컨테이너 생성 모듈(127)에서 오디오 청크부(128)로 연결된 점선으로 된 화살표는 상기 정보가 전달되는 것을 의미한다.The
오디오 청크를 생성하는 과정을 설명하기 위해 도 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
이상과 같이 청크 데이터와 동기화되는 오디오 데이터인 오디오 청크와 컨테이너 생성 모듈(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
다시 도 12로 돌아오면, 버퍼 컨트롤러(129)는 오디오 청크부(128)로부터 오디오 청크를 전달받아 오디오 버퍼에 버퍼링하고, 버퍼링된 오디오 청크를 오디오 렌더러(136)에 제공한다. 12, the
버퍼 컨트롤러(129)는 버퍼링을 통해 오디오 데이터를 비디오 데이터와 동기화시켜 출력하는 것을 가능하게 해주는 모듈이다. 자세히 설명하자면, 미디어 복원부(143)가 렌더러(135b)에 비디오가 출력되는 시점에 관한 타임 정보를 청크 데이터 단위로 버퍼 컨트롤러(129)로 전달하면, 버퍼 컨트롤러(129)는 오디오 청크를 버퍼링하다가 상기 타임 정보를 통해 비디오가 출력되는 시점에 맞추어 오디오 청크를 오디오 렌더러(136)에 제공한다. 도 12의 렌더러(135b)에서 버퍼 컨트롤러(129)로의 점선으로 된 화살표는 상기 타임 정보가 미디어 복원부(143)로부터 버퍼 컨트롤러(129)로 전달되는 것을 의미한다. 이때, 타임 정보는 상기 타임 정보에 대응되는 청크 데이터가 렌더러(135b)에서 렌더링되는 시점을 나타내며, 청크 데이터가 렌더링 되는 시점의 기준은 상기 타임 정보에 대응되는 청크 데이터 중에서 시작 부분이 상기 렌더러에 의해 렌더링되는 시점일 수 있다.The
오디오 렌더러(136)는 버퍼 컨트롤러(129)로부터 전달 받은 오디오 청크를 출력하기 위해 렌더링을 수행한다. 오디오 렌더러(136)는 웹 브라우저에 의해 지원되는 Web Audio API로 구현될 수 있다.The
상기 설명한 모듈들을 통한 오디오의 출력과정을 정리하자면, 오디오 데이터는 데이터 분리부에서 분리되어 오디오 디코더(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
도 12의 미디어 재생 장치(120)는 오디오 데이터의 트랜스코딩 없이 비디오 데이터와 오디오 데이터를 동기화하므로 트랜스코딩으로 인한 오디오 데이터의 손상 염려가 없다. 또한 도 12의 미디어 재생 장치(120)에 의하면 비디오 데이터와 오디오 데이터가 서로 다른 디코더에 의해 디코딩 되더라도 동기화가 문제가 되지 않으므로, 비디오 데이터와 오디오 데이터를 분리하여 처리할 수 있는 환경을 제공한다. 즉, 비디오 태그에서 지원하지 않는 코덱 형식의 오디오 데이터를 별도의 디코더로 복원하더라도 동기화가 문제되지 않으므로 비디오 태그에서 지원하는 코덱 형식에 대한 종속성이 감소한다.Since the
도 13은 미디어 재생 장치(120)의 다른 실시예를 나타낸다. 도 12의 실시예에서 오디오 데이터가 복원된 뒤 비디오 데이터와 동기화 과정을 거쳤다면, 도 13의 실시예에서는 오디오 데이터가 비디오 데이터와 동기화 과정을 거친 뒤 디코드 되어 복원된다. 도 12의 실시예와 비교하였을 때, 도 13의 실시예에서 오디오 디코더(126)의 위치가 버퍼 컨트롤러(129)의 후단으로 변경되어 있다. 그 외의 구성은 도 12의 실시예와 동일하므로 중복되는 설명은 생략하고 이하 변경된 오디오 싱크부(144)에 대하여 설명한다.Fig. 13 shows another embodiment of the
도 13의 실시예에 따르면 오디오 청크부(128)에서는 디코드하여 복원되기 전의 오디오 데이터를 패키징하여 오디오 청크를 생성한다. 오디오 청크부(128)에서는 컨테이너 생성 모듈(127)에서 생성되는 청크 데이터와 대응되는 범위로 오디오 데이터를 패키징하기 위해 컨테이너 생성 모듈(127)로부터 청크 데이터에 관한 정보를 제공 받는다.According to the embodiment of FIG. 13, the
버퍼 컨트롤러(129)는 렌더러(135b)로부터 수신한 타임 정보를 통해 오디오 청크를 비디오 데이터와 동기화시켜 오디오 디코더(126)로 전달한다. 도 13의 실시예에서는 청크 데이터와 동기화되는 오디오 데이터가 오디오 디코더(126)에 의해 디코드 되기 전의 데이터로, 이는 도 12의 실시예와 구별점에 해당한다. The
오디오 디코더(126)는 동기화 된 오디오 데이터를 복원하여 오디오 렌더러(136)로 전달하고 오디오 렌더러(136)는 복원된 오디오 데이터를 출력하기 위해 렌더링을 수행한다.The
도 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
컨테이너 부(142)에서는 제1 미디어 타입 데이터(오디오)가 컨테이너 단위로 되어있지 않은 경우, 제1 미디어 타입 데이터(오디오)를 구성하는 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환한다. If the first media type data (audio) is not a container unit, the
미디어 복원부(143)는 웹 브라우저에 임베드 된 디코더에 의해 상기 청크 데이터를 디코드하여 제1 미디어 타입 데이터(오디오)를 복원하고, 제1 미디어 타입 데이터(오디오)를 출력할 때 해당 시점에 관한 타임 정보를 청크 데이터 단위로 싱크부(도12 및 도 13에서 오디오 싱크부에 대응)에 전달한다. 이때, 웹 브라우저에 임베드 된 디코더는 비디오 태그일 수 있으며, 비디오 태그로 오디오 데이터의 디코딩과 렌더링이 가능하므로 미디어 복원부(143)에서 제1 미디어 타입 데이터(오디오)를 출력하는데 문제되지 않는다. The
싱크부는 전달받은 타임 정보에 기초하여 제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
수신부와 데이터 분리부는 도 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
컨테이너 부는 컨테이너 생성 모듈(127)을 포함하며, 컨테이너 생성 모듈(127)은 비디오 데이터를 구성하는 프레임들을 단위 개수로 패키징하여 청크 데이터로 변환한다. 이때 프레임들의 단위 개수는 비디오 데이터의 fps(frames per second)에 따라 가변적으로 조절이 가능하다. The container unit includes a
미디어 복원부는 MSE(134)와 비디오 태그(135)를 포함하며, 컨테이너 부로부터 전달받은 청크 데이터를 디코드하여 비디오를 복원하고 복원된 비디오를 출력하는 기능을 수행한다. The media restoration unit includes the
미디어 복원부가 비디오 데이터를 복원하여 출력한다면, 오디오 복원부는 데이터 분리부에 의해 분리된 오디오 데이터를 디코드하여 복원하고, 미디어 복원부에서 출력되는 비디오 데이터와 동기화하여 상기 복원된 오디오 데이터를 출력한다. 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
오디오 복원부에서 트랜스코딩 된 오디오는 컨테이너 생성 모듈(127)로 전달된다. 컨테이너 생성 모듈(127)은 디패킷화 모듈(122a)로부터 전달받은 비디오 데이터가 컨테이너 단위로 되어있지 않은 경우 비디오 데이터를 구성하는 프레임들을 단위 개수로 패키징하면서 오디오 복원부로부터 전달받은 오디오 데이터를 상기 단위 개수로 패키징하여 청크 데이터를 생성할 수 있다. 이렇게 생성된 청크 데이터는 호환성 문제 없이 MSE(134)로 전달될 수 있다.The audio transcoded in the audio decompression unit is delivered to the
오디오 복원부에서 오디오 데이터를 디코딩하고 렌더링하여 출력하는 프로세스는 미디어 복원부에 포함되어 구성될 수 있는데, 이는 컨테이너 부에서 비디오 데이터와 오디오 데이터로 청크 데이터를 생성하기 때문이다. 따라서 미디어 복원부의 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
도 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
이러한 모든 요소들은 버스에(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
메모리(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,
컴퓨팅 장치(400)는 입력 장치(433)을 포함할 수 있다. 사용자는 입력 장치(433)를 통하여 컴퓨터 장치(400)에 명령 및/또는 정보를 입력할 수 있다. 입력 장치(433)의 예로는, 키보드, 마우스, 터치패드, 조이스틱, 게임패드, 마이크로폰, 광학 스캐너, 카메라 등이 있다. 입력 장치(433)는 직렬 포트, 병렬 포트, 게임 포트, USB 등을 포함하는 입력 인터페이스(423)를 통해 버스(440)에 접속될 수 있다.The computing device 400 may include an
특정 실시예에서, 컴퓨팅 장치(400)는 네트워크(430)에 연결된다. 컴퓨팅 장치(400)는 다른 장치들과 네트워크(430)를 통하여 연결된다. 이 때, 네트워크 인터페이스(420)는 네트워크(430)로부터 하나 이상의 패킷의 형태로 된 통신 데이터를 수신하고, 컴퓨팅 장치(400)는 프로세서(401)의 처리를 위해 상기 수신된 통신 데이터를 저장한다. 마찬가지로, 컴퓨팅 장치(400)는 전송한 통신 데이터를 하나 이상의 패킷 형태로 메모리(403) 상에 저장하고, 네트워크 인터페이스(420)는 상기 통신 데이터를 네트워크(430)로 전송한다.In a particular embodiment, the computing device 400 is connected to a
네트워크 인터페이스(420)는 네트워크 인터페이스 카드, 모뎀 등을 포함할 수 있다. 네트워크(430)의 예로는, 인터넷, WAN(wide area network), LAN(local area network), 전화 네트워크, 직접 연결 통신 등이 있으며, 유선 및/또는 유선 통신 방식을 채용할 수 있다.The
프로세서(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
디스플레이(432)와 더불어, 컴퓨팅 장치(400)는 오디오 스피커, 프린터 등과 같은 하나 이상의 출력 장치(434)를 포함할 수 있다. 출력 장치(434)는 출력 인터페이스(424)를 통해 버스(440)와 연결된다. 출력 인터페이스(424)는 예를 들어, 직렬 포트, 병렬 포트, 게임 포트, USB 등이 있다.In addition to the display 432, the computing device 400 may include one or
본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.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.
상기 비디오 데이터의 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.
상기 미디어 복원부는 상기 복원된 비디오를 출력하기 전에 렌더링 하는 렌더러를 포함하고, 상기 타임 정보는 상기 타임 정보에 대응되는 청크 데이터가 상기 렌더러에서 렌더링되는 시점을 나타내는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.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.
상기 타임 정보는 상기 타임 정보에 대응되는 청크 데이터 중에서 시작 부분이 상기 렌더러에 의해 렌더링되는 시점을 나타내는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.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.
상기 분리된 오디오 데이터를 디코드 하여 오디오를 복원한 후, 상기 복원된 오디오를 상기 청크 데이터 단위로 제공된 타임 정보와 동기화하여 출력하는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.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.
상기 분리된 오디오 데이터를 상기 웹 브라우저에서 파싱(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.
상기 청크 데이터는 디코드 되기 전 압축된 데이터이고, 상기 청크 데이터와 동기화되는 오디오 데이터는 디코드 되어 압축 해제된 데이터인, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.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.
상기 웹 브라우저에 의해 지원되는 오디오 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.
상기 분리된 오디오 데이터를 상기 청크 데이터 단위로 제공된 타임 정보와 동기화하여 버퍼링하고, 상기 버퍼링된 오디오 데이터를 디코드 하여 오디오를 복원하여 출력하는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.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.
상기 분리된 오디오 데이터를 상기 타임 정보에 대응되는 청크 데이터와 동기화하여 버퍼링하는 버퍼 컨트롤러;
상기 버퍼링된 오디오 데이터를 상기 웹 브라우저에서 파싱(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.
상기 청크 데이터는 디코드 되기 전 압축된 데이터이고, 상기 청크 데이터와 동기화되는 오디오 데이터는 상기 오디오 디코더에 의해 디코드 되기 전 데이터인, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.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.
상기 웹 브라우저에 임베드 된 디코더는 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.
상기 자바스크립트는 상기 미디어 서비스 장치로부터 상기 미디어 재생장치로 다운로드 되는, 웹 브라우저 상에서 비디오와 오디오를 동기화하여 재생하는 미디어 재생 장치.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.
상기 타임 정보는 상기 타임 정보에 대응되는 청크 데이터 중에서 시작 부분이 상기 미디어 재생 장치 내의 렌더러에 의해 렌더링되는 시점을 나타내는, 미디어 서비스 장치.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.
상기 통신 패킷에 포함된 오디오 데이터를 디코드 하여 오디오를 복원한 후, 상기 복원된 오디오를 상기 청크 데이터 단위로 제공된 타임 정보와 동기화하여 출력하는 프로세스를 포함하는, 미디어 서비스 장치.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.
상기 오디오 데이터를 상기 타임 정보에 대응되는 청크 데이터와 동기화하여 버퍼링하는 프로세스;
상기 버퍼링된 오디오 데이터를 상기 웹 브라우저에서 파싱(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.
상기 청크 데이터는 디코드 되기 전 압축된 데이터이고, 상기 청크 데이터와 동기화되는 오디오 데이터는 상기 미디어 재생 장치에서 디코드 되어 압축 해제된 데이터인, 미디어 서비스 장치.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.
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)
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)
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)
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)
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 |
-
2017
- 2017-07-11 KR KR1020170087661A patent/KR101986995B1/en active IP Right Grant
- 2017-07-11 KR KR1020170087651A patent/KR101942269B1/en active IP Right Grant
- 2017-07-11 KR KR1020170087666A patent/KR101942270B1/en active IP Right Grant
- 2017-07-11 KR KR1020170087672A patent/KR101931514B1/en active IP Right Grant
Patent Citations (3)
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)
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 |