CN1997153B - A method and device for computer multi-video playing - Google Patents
A method and device for computer multi-video playing Download PDFInfo
- Publication number
- CN1997153B CN1997153B CN2006100636686A CN200610063668A CN1997153B CN 1997153 B CN1997153 B CN 1997153B CN 2006100636686 A CN2006100636686 A CN 2006100636686A CN 200610063668 A CN200610063668 A CN 200610063668A CN 1997153 B CN1997153 B CN 1997153B
- Authority
- CN
- China
- Prior art keywords
- video
- media
- window
- interface
- parameters
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
技术领域 technical field
本发明涉及视频播放技术领域,具体的讲,涉及一种计算机的多视频播放方法及装置。The present invention relates to the technical field of video playing, in particular, to a computer multi-video playing method and device.
背景技术 Background technique
观看视频,已经成为个人电脑的主要应用。特别是在互联网进入千家万户的今天,网络和网络视频成为多媒体信息传播的全新渠道。各种各样的视频内容,无论是由普通用户制作的个人视频,还是由专业媒体制作的视频节目,都能够让世界各地的互联网用户随时随地通过网络下载或者在线播放。Watching video has become the main application of personal computer. Especially today when the Internet has entered millions of households, the network and network video have become a new channel for multimedia information dissemination. All kinds of video content, whether personal videos produced by ordinary users or video programs produced by professional media, can be downloaded or played online by Internet users around the world anytime and anywhere.
原始的视频信号需要经过压缩、编码,才能保证在最大限度保证音视频质量的前提下,减少视频文件的大小,降低网络传输中的带宽要求。而经过压缩和编码的视频,在用户的电脑上,需要解码还原成可以观看的视频。The original video signal needs to be compressed and encoded in order to reduce the size of the video file and reduce the bandwidth requirements in network transmission under the premise of ensuring the maximum audio and video quality. The compressed and encoded video needs to be decoded and restored to a watchable video on the user's computer.
视频的编码和解码算法较为复杂,特别是对那些压缩比高,音视频质量高的视频,如果采用软件的方式编解码,会消耗大量的系统资源,对CPU的处理能力、内存的大小都有非常高的要求。为此,在需要大量制作、传输视频时,需要编码硬件设备;而在一些嵌入式的设备,如机顶盒、MP4播放器等等,都会采用解码芯片来还原视频。Video encoding and decoding algorithms are relatively complex, especially for those videos with high compression ratio and high audio and video quality, if the video is encoded and decoded by software, it will consume a lot of system resources, and the processing power of the CPU and the size of the memory will be affected. very demanding. For this reason, encoding hardware equipment is required when a large number of videos are produced and transmitted; and in some embedded devices, such as set-top boxes, MP4 players, etc., decoder chips are used to restore videos.
最初的视频,基本上都是以文件的方式进行传播,用户需要完全下载到视频文件的拷贝之后才能开始观看,而由于视频文件较大,因此需要等待很长时间。为此,基于网络的流媒体视频应运而生,用户可以一边下载一边观看流媒体视频。流媒体视频的诞生,让网络电视IPTV在近几年成为电信运营商和视频内容商重点投入的领域。用户能够在宽带网络上在线收看各种视频。此外,随着视频DV设备的普及,普通用户也能够像专业媒体一样制作个人视频。因此也诞生了各种网络视频分享网站。无论用户使用的是哪一种视频服务,得到的哪种格式的视频内容,最终视频都将通过“视频播放器”解码、还原成可观看的视频画面。The original videos are basically distributed in the form of files, and users need to completely download a copy of the video file before they can start watching, and because the video file is relatively large, it takes a long time to wait. For this reason, network-based streaming media video emerges at the historic moment, and users can watch streaming media video while downloading. The birth of streaming video has made IPTV an area of focus for telecom operators and video content providers in recent years. Users can watch various videos online on the broadband network. In addition, with the popularity of video DV equipment, ordinary users can also make personal videos like professional media. Therefore, various online video sharing sites have also been born. No matter which video service the user uses and which format the video content is obtained, the final video will be decoded and restored into a watchable video screen through the "video player".
当前,主流的视频播放器的主要运行方式包括:独立应用程序模式(窗口模式)、嵌入网页浏览器的模式及全屏播放模式。Currently, the main operating modes of mainstream video players include: an independent application program mode (window mode), a mode embedded in a web browser, and a full-screen playback mode.
在窗口模式下,如普通的计算机应用程序一样,用户可以使用播放器的菜单、播放控制按钮、最大最小化窗口等功能。In the windowed mode, the user can use the player's menu, playback control buttons, maximize and minimize windows, and other functions like ordinary computer applications.
嵌入网页浏览器的模式与窗口模式略有不同,一些控制视频播放的按钮和右键菜单被保留,而最大化最小化、菜单等功能都被去除。在绝大多数对于各种提供网络视频内容和服务的网站,都能够看到在网页上嵌入了视频播放器,用户可以在浏览网页信息的同时收看相应的视频内容。The mode of embedding a web browser is slightly different from the window mode. Some buttons and right-click menus for controlling video playback are retained, while functions such as maximization, minimization, and menus are removed. In most of the websites that provide various online video content and services, it can be seen that a video player is embedded on the webpage, and the user can watch the corresponding video content while browsing the webpage information.
无论是窗口模式还是嵌入网页模式,用户都可以将视频全屏化,即让视频画面独占整个显示空间。全屏模式中,视频缩放、控制(暂停、快进等)功能都会叠加在视频画面之上,用户无须退出全屏模式即可实现对视频的控制。全屏模式是用户在长期观看电视、电影等传统视频体验。在全屏的情形下,视频会独占用户的关注,同时全屏对视频质量的要求也非常高。Whether in windowed mode or embedded in webpage mode, users can make the video full-screen, that is, let the video screen occupy the entire display space. In full-screen mode, video scaling and control (pause, fast-forward, etc.) functions will be superimposed on the video screen, and users can control the video without exiting full-screen mode. Full-screen mode is a traditional video experience for users to watch TV and movies for a long time. In the case of full screen, the video will monopolize the user's attention, and full screen also has very high requirements for video quality.
目前市场上所有的视频播放器都采用了如上三种模式。一方面说明网络用户已经逐渐形成了网络视频观看的习惯行为模式,另一方面也说明这种简单的视频收看模式存在着无法克服的关键难一些问题,包括:All video players currently on the market have adopted the above three modes. On the one hand, it shows that Internet users have gradually formed a habitual behavior pattern of watching online videos. On the other hand, it also shows that this simple video watching mode has some key and difficult problems that cannot be overcome, including:
(1)单一视频(1) Single video
这些视频播放器任一时刻,在一个播放器中只能播放一段视频。当用户需要获取多个视频内容时,只能通过多开视频窗口的方式来实现。多个视频窗口会造成诸如声音混杂在一起、占用更多的系统资源等等问题。用户体验只能用混乱来形容。并且,目前在没有安装特定显卡的PC上,不能在全屏播放一个视频时同时在屏幕上播放另一个视频,即很难用纯软件的方式实现全屏下的画中画(PIP)。These video players can only play one video in one player at any time. When the user needs to obtain multiple video contents, it can only be realized by opening more video windows. Multiple video windows can cause problems such as sound mixing together, taking up more system resources, and so on. The user experience can only be described as chaotic. Moreover, at present, on a PC without a specific graphics card installed, it is not possible to play another video on the screen while playing one video in full screen at the same time, that is, it is difficult to realize the picture-in-picture (PIP) under the full screen in a pure software manner.
(2)视频与信息分离(2) Separation of video and information
网络上大量的图片、文本和Flash内容,只有在网页中才能与视频共存。而视频在很大程度上,由于其特殊性,对用户注意力的吸引力是巨大的,因此很难能够再去注意到这些相关的内容。另外在全屏或者窗口的播放模式之下,用户无法在观看视频的时候获取到其他类型的信息。A large number of pictures, texts and Flash content on the Internet can only coexist with videos in web pages. To a large extent, due to its particularity, video attracts users' attention enormously, so it is difficult to pay attention to these related contents. In addition, under the full-screen or windowed playback mode, the user cannot obtain other types of information while watching the video.
传统视频播放器存在的以上问题,极大的限制了创新视频应用和服务的产生,尤其阻碍了网络广告视频市场的发展。The above problems in traditional video players have greatly restricted the creation of innovative video applications and services, especially hindering the development of the online advertising video market.
广告是互联网的成功商业模式之一。传统网络广告以图片、Flash和文本内容为主,而视频广告能够传递的品牌力量,是传统方式所无法比拟的。但是目前的视频广告模式包括如下两种方式:Advertising is one of the successful business models of the Internet. Traditional online advertisements are mainly based on pictures, Flash and text content, but the brand power that video advertisements can convey is unmatched by traditional methods. However, the current video advertising model includes the following two methods:
(1)在节目视频播放过程中插播广告视频(如Yahoo Movie)(1) Insert advertising video during program video playback (such as Yahoo Movie)
与电视广告相同,视频广告在节目播放的过程中插入,完全取代原有视频。对于该方式,一方面用户感受差,用户的正常收看行为被打断,往往在广告视频播放期间,用户会转移其收看点做其他事情。另一方面,插播广告视频只能有两种实现方式:Similar to TV commercials, video ads are inserted during the broadcast of the program and completely replace the original video. For this method, on the one hand, the user experience is poor, and the user's normal viewing behavior is interrupted, and the user will often shift his viewing point to do other things during the playback of the advertising video. In-stream video, on the other hand, can only be implemented in two ways:
1)制作节目视频时就将广告剪切进去1) When making a program video, cut the advertisement into it
这就需要在前期视频编辑上投入大量人力、物力,而一旦视频制作完成后就无法对广告内容进行修改。This requires a lot of manpower and material resources to be invested in video editing in the early stage, and once the video production is completed, the advertising content cannot be modified.
2)往往仅在节目视频播放开始和结束时插播2) It is often only interrupted at the beginning and end of the program video playback
如此浪费了大量的有效广告时机和时间,并且开始和结束时用户的注意力很难能够完全放在视频之上。并且这样的广告投放相对来说与观看节目的过程之间还是割裂的,而且用户是无法选择的,因此用户体验并不好。This wastes a lot of effective advertising opportunities and time, and it is difficult for users to fully focus on the video at the beginning and end. Moreover, such advertisement placement is relatively separated from the process of watching the program, and the user cannot choose, so the user experience is not good.
(2)在页面上出现视频广告(如iCast)(2) Video advertisements appear on the page (such as iCast)
当用户杂浏览网页时,自动升起视频广告。大面积的遮挡住了网页内容,用户没有选择。因此用户体验比较差,并且绝大多数此类的广告都会被浏览器或工具条屏蔽,无法弹出。When the user browses the web, the video advertisement will automatically pop up. A large area blocks the content of the webpage, and users have no choice. Therefore, the user experience is relatively poor, and most of such advertisements will be blocked by the browser or the toolbar and cannot pop up.
另外,网络视频,在理论上是能够有无穷的频道的,这一点和传统电视固定数量的频道不同。但是对于用户个体来说,其注意力是有限的。而这些海量的网络视频频道中播出的各种内容,在单视频的情况下,并没有让用户完全享受到选择的权利。In addition, online video can theoretically have infinite channels, which is different from the fixed number of traditional TV channels. But for individual users, their attention is limited. However, in the case of a single video, users do not fully enjoy the right to choose the various contents broadcast in these massive online video channels.
随着网络带宽的增容、视频存储成本的下降和视频分享观看的流行,“视频”已经成为互联网新的焦点,然而传统视频节目播放与视频广告投放的以上缺陷,极大限制了视频播放的应用和服务的产生,也阻碍了视频服务商业模式的创新和发展。With the expansion of network bandwidth, the reduction of video storage costs and the popularity of video sharing and viewing, "video" has become the new focus of the Internet. The emergence of applications and services also hinders the innovation and development of video service business models.
发明内容 Contents of the invention
有鉴于如上问题,本发明的目的在于提供一种计算机的多视频播放方法及装置,以实现电脑中多视频的画中画显示,提高用户体验。In view of the above problems, the object of the present invention is to provide a computer multi-video playback method and device, so as to realize the picture-in-picture display of multi-video in the computer and improve user experience.
为了实现上述目的,本发明的技术方案为:In order to achieve the above object, the technical solution of the present invention is:
一种计算机的多视频播放方法,包括如下步骤:A method for playing multiple videos of a computer, comprising the steps of:
根据配置文件中的配置设置界面显示参数并生成媒体读取控制参数,所述配置文件中包括对预先定义的模板、播放计划和脚本的配置,所述界面显示参数包括视频的位置和大小,所述媒体读取控制参数是用于控制所述媒体读取时间或频率的参数;According to the configuration setting interface display parameters in the configuration file and generate media reading control parameters, the configuration file includes the configuration of pre-defined templates, play plans and scripts, the interface display parameters include the position and size of the video, so The media read control parameter is a parameter used to control the media read time or frequency;
从远端或本地接收至少两个媒体源信息;receiving at least two media source information from remote or local;
根据所述至少两个媒体源的地址和所述媒体读取控制参数读取对应的媒体,并对媒体进行解码,各自生成一路视频帧数据和一路音频数据;Read the corresponding media according to the addresses of the at least two media sources and the media read control parameters, and decode the media to generate one channel of video frame data and one channel of audio data;
根据所述界面显示参数,利用指示所述位置和大小的两个以上三角形来表示待显示的各路视频帧的位置和大小,并利用纹理对象来描述各路视频帧的位图数据;According to the interface display parameters, using more than two triangles indicating the position and size to represent the position and size of each video frame to be displayed, and using a texture object to describe the bitmap data of each video frame;
利用D3D,基于所述纹理对象和所述两个以上三角形所指示的位置和大小将解码生成的至少两路视频帧显示到同一显示屏幕的不同视窗上,并以其中一个视窗作为主视窗,以所述主视窗以外的窗口作为辅助视窗;Using D3D, based on the texture object and the positions and sizes indicated by the two or more triangles, at least two video frames generated by decoding are displayed on different windows of the same display screen, and one of the windows is used as the main window, so that Windows other than the main window are used as auxiliary windows;
选择与主视窗中的视频帧对应的音频脉冲调制数据进行播放输出。Select the audio pulse modulation data corresponding to the video frame in the main window for playback and output.
设置所述D3D接口的显示刷新频率为25帧/秒。The display refresh rate of the D3D interface is set to 25 frames per second.
该方法还包括:预先设置界面显示参数,以根据所述界面显示参数输出播放视频。The method also includes: setting interface display parameters in advance, so as to output and play video according to the interface display parameters.
所述界面显示参数包括:视频的大小、位置、透明度和/或动画效果信息。The interface display parameters include: size, position, transparency and/or animation effect information of the video.
该方法还包括:预先设置媒体读取控制参数,以根据该控制信息控制各个媒体的读取。The method also includes: setting media reading control parameters in advance, so as to control the reading of each media according to the control information.
所述媒体读取控制参数包括:媒体地址及读取时间或频率控制信息。The media read control parameters include: media address and read time or frequency control information.
所述媒体包括视频流和媒体文件,媒体文件包括视频、音频、FLASH、文字和图片。The media includes video streams and media files, and the media files include video, audio, FLASH, text and pictures.
该方法还包括:在所述视频帧上设置超级链接。The method also includes: setting a hyperlink on the video frame.
该方法还包括:设置鼠标或键盘的快捷键,以切换主视窗和辅视窗。The method also includes: setting a shortcut key of the mouse or the keyboard to switch the main window and the auxiliary window.
所述参数通过XML格式配置文件、命令行、用户指定方式进行配置。The parameters are configured through an XML format configuration file, a command line, or a user-specified manner.
所述主视窗和辅助视窗以叠加或并排的方式进行显示。The main window and the auxiliary window are displayed in a stacked or side-by-side manner.
一种计算机中的多视频播放装置,包括:界面管理单元、至少两个媒体源读取单元、视频展现单元及音频展现单元;A multi-video playback device in a computer, comprising: an interface management unit, at least two media source reading units, a video presentation unit and an audio presentation unit;
所述界面管理单元用于从远端或本地接收至少两个媒体源信息,根据所述的媒体源信息设置媒体源地址、并根据配置文件中的配置设置界面显示参数和媒体读取控制参数,所述配置文件中包括对预先定义的模板、播放计划和脚本的配置,所述界面显示参数包括视频的位置和大小,所述媒体读取控制参数是用于控制所述媒体读取时间或频率的参数;The interface management unit is used to receive at least two media source information from remote or local, set the media source address according to the media source information, and set the interface display parameters and media read control parameters according to the configuration in the configuration file, The configuration file includes the configuration of predefined templates, play plans and scripts, the interface display parameters include the position and size of the video, and the media reading control parameters are used to control the media reading time or frequency parameters;
所述媒体源读取单元,用于接收媒体源地址,根据所述媒体读取控制参数读取所述媒体,并对媒体进行解码,生成视频帧数据和音频数据,并将所述视频帧数据传送至视频展现单元;The media source reading unit is configured to receive a media source address, read the media according to the media reading control parameters, and decode the media to generate video frame data and audio data, and store the video frame data Send to the video display unit;
所述视频展现单元用于根据所述界面显示参数,利用指示所述位置和大小的两个以上三角形来表示待显示的各路视频帧的位置和大小,利用纹理对象来描述各路视频帧的位图数据,并利用D3D,基于所述纹理对象和所述两个以上三角形所指示的位置和大小将所述至少两个媒体源读取单元生成的视频帧显示到同一屏幕的不同视窗上,并以其中一个视窗作为主视窗,以主视窗以外的窗口作为辅助视窗;The video presentation unit is configured to use more than two triangles indicating the positions and sizes to indicate the positions and sizes of the video frames to be displayed according to the interface display parameters, and use texture objects to describe the video frames of the various channels. Bitmap data, and using D3D, based on the position and size indicated by the texture object and the two or more triangles, the video frames generated by the at least two media source reading units are displayed on different windows of the same screen, And use one of the windows as the main window, and use the window other than the main window as the auxiliary window;
所述音频展示单元,用于接收与主视窗中的视频帧对应的音频数据,并进行播放。The audio presentation unit is used to receive and play audio data corresponding to video frames in the main window.
所述界面管理单元还用于预先设置界面显示参数,并将所述的界面显示参数传输至所述视频展现单元,以根据所述界面显示参数输出播放视频。The interface management unit is also used to preset interface display parameters, and transmit the interface display parameters to the video presentation unit, so as to output and play video according to the interface display parameters.
所述界面显示参数包括:视频的大小、位置、透明度和/或动画效果信息。The interface display parameters include: size, position, transparency and/or animation effect information of the video.
所述界面管理单元还用于设置媒体读取控制参数,以根据该控制信息控制各个媒体的读取。The interface management unit is also used to set media reading control parameters, so as to control the reading of various media according to the control information.
所述媒体读取控制参数包括媒体读取时间或频率控制信息。The media reading control parameters include media reading time or frequency control information.
所述D3D接口的显示刷新频率为25帧/秒。The display refresh rate of the D3D interface is 25 frames per second.
所述媒体包括视频流和媒体文件,媒体文件包括视频、音频、FLASH、文字和图片。The media includes video streams and media files, and the media files include video, audio, FLASH, text and pictures.
通过如上所述的本发明,实现了多个视频(视频、图片、文本、FLASH等)在同一屏幕上的相互叠加(或并排)的播放,即实现了计算机上多视频播放的画中画功能,极大地提高了用户体验,并扩展了视频的应用和服务,扩大了商业市场。By the present invention as described above, the mutual overlapping (or side-by-side) playback of multiple videos (video, pictures, text, FLASH, etc.) on the same screen is realized, that is, the picture-in-picture function of multi-video playback on the computer is realized , greatly improving user experience, expanding video applications and services, and expanding the commercial market.
附图说明 Description of drawings
图1为本发明的方法流程图;Fig. 1 is method flowchart of the present invention;
图2为本发明的对视频帧数据进行显示的流程示意图;Fig. 2 is a schematic flow chart of displaying video frame data of the present invention;
图3为本发明的多视频播放装置的结构框图;Fig. 3 is the structural block diagram of multi-video playback device of the present invention;
图4为本发明实施例的显示场景3的示意图;FIG. 4 is a schematic diagram of a display scene 3 according to an embodiment of the present invention;
图5为本发明实施例的显示场景4的示意图;FIG. 5 is a schematic diagram of a display scene 4 according to an embodiment of the present invention;
图6为本发明实施例的显示场景5的示意图;FIG. 6 is a schematic diagram of a display scene 5 according to an embodiment of the present invention;
图7为本发明实施例的显示场景6的示意图;FIG. 7 is a schematic diagram of a display scene 6 according to an embodiment of the present invention;
图8a、图8b为本发明实施例的显示场景7的示意图。8a and 8b are schematic diagrams of a display scene 7 according to an embodiment of the present invention.
具体实施方式 Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面结合附图对本发明的具体实施例进行详细说明。In order to make the object, technical solution and advantages of the present invention clearer, specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.
实施例1Example 1
本实施例是使用微软的Direct3D(简称D3D)技术,利用Direct3D可以同时处理多个图形对象的能力,实现多个视频同时在全屏幕下显示(画中画功能)。This embodiment uses Microsoft's Direct3D (abbreviated as D3D) technology, utilizes the ability of Direct3D to process a plurality of graphic objects simultaneously, and realizes that a plurality of videos are simultaneously displayed on a full screen (picture-in-picture function).
在本实施例中,实现电脑视频画中画显示的基本原理在于:用两个或多个三角形来描述一个视频/图片/文字的位置和大小,然后将这些三角形的数据输入到D3D的功能函数将它们显示出来。In this embodiment, the basic principle of realizing computer video picture-in-picture display is: use two or more triangles to describe the position and size of a video/picture/text, and then input the data of these triangles to the function function of D3D to display them.
电脑的视频一般是4∶3的矩形,可以用两个斜边相连的直角三角形来表示,视频的位图数据使用D3D支持的纹理对象(texture)来描述,将这个纹理与上述两个三角形进行关联,然后把这些数据输入D3D的函数,就能用指定位置和大小显示出一帧视频,连续显示后续的视频帧,就能得到视频播放的画面。Computer video is generally a 4:3 rectangle, which can be represented by a right-angled triangle connected by two hypotenuses. The bitmap data of the video is described by a texture object (texture) supported by D3D. This texture is combined with the above two triangles. Correlation, and then input these data into the D3D function, a frame of video can be displayed with the specified position and size, and subsequent video frames can be continuously displayed to get the video playback screen.
利用同样的工作原理,就可以在一副画面上放入不同的多个视频/图片/文字,用一系列的三角形进行描述,然后一次性输入D3D的函数进行显示。不断循环重复这个动作,就能得到多个视频/图片/文字交织在一起同时显示的效果。Using the same working principle, you can put multiple different videos/pictures/texts on a screen, describe it with a series of triangles, and then input the D3D function for display at one time. By repeating this action continuously, you can get the effect that multiple videos/pictures/texts are intertwined and displayed at the same time.
利用视频每秒25帧的特点,将D3D的显示刷新率也设置成25帧/秒,既能得到流畅的播放画面,也很好地控制了CPU和内存的消耗。这是由于D3D的处理能力在一秒之内可以同时显示很多个三角形并加上纹理,而我们的系统用两个三角形就可以描述一个视频/图片/文字对象,在屏幕上同时出现的对象一般不超过50个(太多的对象会导致画面混乱,实际中很少出现),所以实际上大多数时候每秒需要显示的三角形数量为50*2*25=2500个,只占一台较低配置的机器(如笔记本电脑)D3D三角形处理能力的2500/3000000=0.08%。而一帧视频的位图尺寸一般是640*480,一秒钟需要处理视频的位图点数为640*480*25=7.68M,仅占较低配置的机器(如笔记本电脑)D3D纹理处理能力的7.68M/242.6M=3.17%。由此可见对于处理若干个视频这样的高动态数据流,D3D完全可以胜任。Taking advantage of the video feature of 25 frames per second, the display refresh rate of D3D is also set to 25 frames per second, which can not only obtain smooth playback images, but also well control the consumption of CPU and memory. This is because D3D's processing power can simultaneously display many triangles and add textures within one second, and our system can describe a video/picture/text object with two triangles, and the objects that appear on the screen at the same time are generally No more than 50 (too many objects will cause confusion in the picture, which rarely occurs in practice), so in fact, most of the time, the number of triangles that need to be displayed per second is 50*2*25=2500, which is only a low 2500/3000000=0.08% of the D3D triangle processing capability of the configured machine (such as a laptop). The bitmap size of a frame of video is generally 640*480, and the number of bitmap points that need to be processed in one second is 640*480*25=7.68M, which only accounts for the D3D texture processing capability of machines with lower configurations (such as laptops). 7.68M/242.6M = 3.17%. It can be seen that D3D is fully capable of processing high dynamic data streams such as several videos.
D3D支持窗口和全屏两种显示模式,并能够随时在两种模式间切换,两种显示模式支持的功能是一致的。由于我们实现的方式是直接利用D3D来实现多视频和图文叠加的功能,这些功能在窗口和全屏下的表现都是一样的。D3D supports two display modes of window and full screen, and can switch between the two modes at any time. The functions supported by the two display modes are the same. Since the way we implement it is to directly use D3D to realize the functions of multi-video and image-text superimposition, these functions have the same performance under the window and full screen.
D3D在窗口和全屏模式下都支持鼠标功能,在视频播放过程中,当电脑收到鼠标点击的事件时,根据鼠标的坐标位置,在画面对象列表中查找,画面对象都包含有位置大小等信息,可以据此判断鼠标是点击了哪个对象,如果该对象定义有关联的动作,播放系统会执行该动作,这个动作可以是范围很广的功能,比如将某个对象显示/隐藏,生成/毁灭其他对象等。这样就可以为用户提供进一步的信息,给用户提供交互的功能。D3D supports the mouse function in both window and full-screen modes. During video playback, when the computer receives a mouse click event, it will search in the screen object list according to the coordinate position of the mouse. The screen objects contain information such as position and size. , you can judge which object the mouse clicked. If the object defines an associated action, the playback system will execute the action. This action can be a wide range of functions, such as showing/hiding an object, generating/destroying it other objects etc. In this way, further information can be provided for the user, and an interactive function can be provided for the user.
我们的系统每秒显示25次,在每次显示之前,三角形的位置大小和纹理等属性都可以改变,所以系统能够提供实时更新显示的图片/文字信息,改变位置大小,做出动画效果等功能。Our system displays 25 times per second. Before each display, the properties such as the position, size and texture of the triangle can be changed, so the system can provide real-time update of the displayed picture/text information, change the position and size, and make animation effects, etc. .
虽然本实施例中是采用D3D函数实现多视频的画中画显示,但本发明并不限于此。采用OpenGL、DirectShow等与D3D类似的计算机图形和视频处理接口同样可以对多个可视对象进行处理,并在同一画面中显示出来,只是达到的效果难以同D3D相比拟。Although in this embodiment, the D3D function is used to realize the picture-in-picture display of multiple videos, the present invention is not limited thereto. Using OpenGL, DirectShow and other computer graphics and video processing interfaces similar to D3D can also process multiple visual objects and display them on the same screen, but the effect achieved is difficult to compare with D3D.
如采用其他的3D技术,如OpenGL,也同样可以达到D3D所实现我们系统的全部功能,但OpenGL面向的是专业用户,对硬件有较高要求。除此之外,微软在DirectShow SDK中提供的控件VMR9(Video Mixing Render 9),也能实现将两路解码后的视频流在屏幕上进行叠加显示,但是VMR9应用上有较多问题,比如难以平滑地对小视频窗口进行移动或者改变大小、显示较多对象时存在较大的效率问题等。If we adopt other 3D technologies, such as OpenGL, we can also achieve all the functions of our system realized by D3D, but OpenGL is aimed at professional users and has high requirements for hardware. In addition, the control VMR9 (Video Mixing Render 9) provided by Microsoft in the DirectShow SDK can also superimpose and display two decoded video streams on the screen, but there are many problems in the application of VMR9, such as difficulty Smoothly move or change the size of a small video window, and there are large efficiency problems when displaying more objects.
图1是本发明的在同一屏幕中实现多视频播放的流程示意图。如图1所示,可包括如下步骤:Fig. 1 is a schematic flow diagram of realizing multi-video playback in the same screen according to the present invention. As shown in Figure 1, the following steps may be included:
(1)读取XML(eXtensible Markup Language,可扩展标记语言)配置文件(1) Read XML (eXtensible Markup Language, Extensible Markup Language) configuration file
本实施例中可用XML配置文件来对多视频播放进行配置。各种多媒体内容在一个集中的交互界面中同时显示时,不但需要协调各种内容的同步、分步显示,并且还需要处理用户交互、响应用户动作等等。因此需要预先定义模板、播放计划和脚本,以对视频内容和其他多媒体信息进行控制,并且负责与服务端通信,随时处理用户的控制信号。可以通过XML配置文件来对预先定义的模板、播放计划和脚本等进行配置。所述配置文件中还包括需要播放的多个(包括两个)媒体源信息。In this embodiment, an XML configuration file can be used to configure multi-video playback. When various multimedia contents are simultaneously displayed in a centralized interactive interface, it is not only necessary to coordinate the synchronization and step-by-step display of various contents, but also to handle user interaction, respond to user actions, and so on. Therefore, it is necessary to pre-define templates, play plans and scripts to control video content and other multimedia information, and be responsible for communicating with the server to process user control signals at any time. Pre-defined templates, play plans and scripts can be configured through XML configuration files. The configuration file also includes multiple (including two) media source information to be played.
所述配置也可以通过手动配置或通过输入命令行来实现。Said configuration can also be realized by manual configuration or by entering a command line.
(2)根据配置文件生成界面元素,并设置界面元素的各种属性。(2) Generate interface elements according to the configuration file, and set various attributes of the interface elements.
对应于要播放的媒体的个数,生成相同个数的界面元素。在此,所述界面元素包括视频的大小位置、透明度、动画效果(如淡入淡出、旋转)等界面显示参数,设置界面元素的属性也即对所述界面显示参数进行设置。设置的界面元素可以以队列形式传送给要进行视频展示的单元。根据设置的界面元素就可以在对应的媒体播放时对媒体的显示效果进行控制。Corresponding to the number of media to be played, the same number of interface elements is generated. Here, the interface elements include interface display parameters such as video size, position, transparency, animation effects (such as fade in and fade out, rotation), and setting the properties of the interface elements means setting the interface display parameters. The set interface elements can be sent to the unit for video display in the form of a queue. According to the set interface elements, the display effect of the media can be controlled when the corresponding media is played.
(3)根据配置文件中的配置生成媒体读取控制参数、设置媒体源地址(如URL,统一资源定位符,即网址),并根据设置读取相应的媒体(包括媒体文件及媒体流等,该媒体既可以位于本地电脑,也可以位于远端服务器),并各自将媒体包解码成视频帧数据和音频脉冲调制数据。对应于多个媒体,共解码成对应的多路视频帧数据和音频脉冲调制数据。如在同时显示2个视频的情况下,则将根据2个媒体源对应的地址将2个媒体解码成2路视频数据和2路音频数据。(3) generate media reading control parameters according to the configuration in the configuration file, set the media source address (such as URL, Uniform Resource Locator, i.e. URL), and read the corresponding media (comprising media files and media streams, etc.) according to the settings, The media can be located on a local computer or a remote server), and respectively decode the media packets into video frame data and audio pulse modulation data. Corresponding to multiple media, it is decoded into corresponding multiple channels of video frame data and audio pulse modulation data. For example, in the case of displaying two videos at the same time, the two media sources will be decoded into two channels of video data and two channels of audio data according to the addresses corresponding to the two media sources.
在此,所述的媒体读取控制参数是用于控制媒体读取时间或频率的参数。如,控制生成辅助视窗的媒体每隔5分钟读取播放一次,或者在主视窗媒体在连接、下载和缓冲时读取播放等。该参数可以根据需要方便的进行修改与设置。Here, the media reading control parameter is a parameter used to control the time or frequency of media reading. For example, control the media that generates the auxiliary window to be read and played every 5 minutes, or read and play when the media in the main window is connected, downloaded, and buffered. This parameter can be easily modified and set as required.
(4)按照界面元素的设置,将解码生成的多路视频帧数据在同一屏幕的不同视窗显示出来。具体显示的步骤如图2所示。(4) Display the multi-channel video frame data generated by decoding in different windows on the same screen according to the setting of interface elements. The specific steps are shown in Figure 2.
视频展现单元不间断的检查界面元素队列中是否有需要展现的界面元素,当视频展现单元发现有需要展现的元素后,将根据界面结构单元指定的参数设置显示参数,然后从队列中将要展现的界面元素取出。The video display unit continuously checks whether there are any interface elements that need to be displayed in the interface element queue. When the video display unit finds that there are elements that need to be displayed, it will set the display parameters according to the parameters specified by the interface structure unit, and then display the elements from the queue. Interface elements are removed.
视频展现单元将要显示的界面元素分解成三角形,如果要展现的界面元素是视频的话,视频展现单元将从进行媒体源读取的单元中获取视频帧的位图数据,并将其转换成纹理对象。The video display unit decomposes the interface elements to be displayed into triangles. If the interface elements to be displayed are videos, the video display unit will obtain the bitmap data of the video frame from the unit that reads the media source and convert it into a texture object .
视频展现单元根据所获得的显示参数、纹理数据,设置三角形的纹理、位置、大小。然后调用D3D接口将由许许多多三角形构成的界面元素显示画面输出到画面缓冲区当中。The video presentation unit sets the texture, position, and size of the triangle according to the obtained display parameters and texture data. Then call the D3D interface to output the display screen of interface elements composed of many triangles to the screen buffer.
这时视频展现单元将检查上一帧画面的显示是否已过去1/25秒,如果没有则等待,如果已过去1/25秒,则调用D3D接口将画面缓冲区中的显示画面输出到计算机屏幕上。At this time, the video display unit will check whether the display of the previous frame has passed 1/25 second, if not, then wait, if it has passed 1/25 second, then call the D3D interface to output the display picture in the picture buffer to the computer screen superior.
视频展现器会不断重复图2所示过程,让视频流畅的播放出来。The video displayer will continuously repeat the process shown in Figure 2, so that the video can be played smoothly.
所显示的不同视窗中,以其中一个视窗作为主视窗,其它的视窗作为辅助视窗。如可以以设置的显示尺寸大的视窗作为主视窗。Among the different displayed windows, one of the windows is used as the main window, and the other windows are used as auxiliary windows. For example, the window with the larger display size can be used as the main window.
(5)根据需要选择对某一个媒体源的音频解码数据进行播放。(5) Select to play the audio decoding data of a certain media source as required.
通常,以与主视窗中的视频帧对应的音频解码数据进行播放输出。Usually, the audio decoding data corresponding to the video frame in the main window is used for playback output.
经过如上的步骤,就实现了具有画中画功能的多视频播放效果。不仅可以避免单一视频的单调,又不会引起声音的混杂;而且在播放主视频时,如果要插播广告等媒体内容,无需在制作主视频媒体时将广告剪切进去,且随时都可以进行播放;并且,由于可以控制广告页面的位置大小、透明度等,及时在播放主视频媒体时播放,也不会太影响主视频媒体的观看效果,因此大大提高了用户体验。After the above steps, the multi-video playback effect with the picture-in-picture function is realized. Not only can avoid the monotony of a single video, but also will not cause the sound to be mixed; and when playing the main video, if you want to insert media content such as advertisements, you don’t need to cut the advertisements when making the main video media, and you can play them at any time and, since the position size, transparency, etc. of the advertisement page can be controlled, it can be played when the main video media is played in time, and the viewing effect of the main video media will not be affected too much, thus greatly improving the user experience.
利用3D技术,本发明的多视频播放方法可支持至少两个视频窗口无缝、平滑地相互叠加的体验(画中画功能):如画面分为主视频窗口和辅视频窗口,用户听到的声音是主视频窗口中播放的声音。Using 3D technology, the multi-video playback method of the present invention can support at least two video windows seamlessly and smoothly overlapping experience (picture-in-picture function): if the picture is divided into a main video window and an auxiliary video window, what the user hears The sound is the sound played in the main video window.
本发明还能够在视频播放界面上叠加多个辅助视频、Flash、图片和文本内容,并通过界面元素的设置,可以支持在视频上叠加滚动字幕(包括文字、图片)。字幕的内容和相关参数均可以设置。The present invention can also superimpose a plurality of auxiliary videos, Flash, pictures and text content on the video playback interface, and can support the superimposition of scrolling subtitles (including text and pictures) on the video through the setting of interface elements. The content and related parameters of subtitles can be set.
本发明还可通过设置快捷键来切换主视频窗口和辅视频窗口,即将同时播出的主视频节目和辅视频内容的播出位置进行互换。在辅视频内容播出完成之后,主节目视频都将重新回到主播放窗口进行播放。The present invention can also switch the main video window and the auxiliary video window by setting a shortcut key, that is, to exchange the broadcasting positions of the main video program and the auxiliary video content broadcast simultaneously. After the auxiliary video content is played, the main program video will return to the main playback window for playback.
本发明还支持在P2P连接、下载和缓冲时插播视频广告。当播放客户端首次连接或切换频道时,会因为连接、下载和缓冲而导致主视频窗口无播放内容。此时客户端根据辅助视频投放计划的安排,在主视频窗口播出广告,同时显示连接、下载和缓冲的进度。当主视频节目缓冲完成后,直接在主视频窗口播放,并自动将广告视频切换至辅视频窗口继续播出,直至辅助视频播放完成。The invention also supports the insertion of video advertisements during P2P connection, download and buffering. When the playback client connects or switches channels for the first time, there will be no playback content in the main video window due to connection, download and buffering. At this time, the client broadcasts the advertisement in the main video window according to the arrangement of the auxiliary video delivery plan, and simultaneously displays the progress of connection, download and buffering. When the buffering of the main video program is completed, it will be played directly in the main video window, and the advertising video will be automatically switched to the auxiliary video window to continue playing until the auxiliary video is played.
本发明同样支持超级链接。在广告视频、图片、滚动字幕的内容(文字和图片)上都可以指定超级链接。用户点击辅助视频窗口、图片和文字内容后,弹出新的浏览器窗口打开相应的链接。The present invention also supports hyperlinks. A hyperlink can be specified on the content (text and picture) of the advertisement video, picture and scrolling subtitle. After the user clicks on the auxiliary video window, picture and text content, a new browser window pops up to open the corresponding link.
在切换主辅视频窗口、辅助视频内容出现的过程中,本发明支持各种场景切换效果。如:1.淡入淡出、2.弹入弹出、3.飞入飞出效果的切换。In the process of switching main and auxiliary video windows and the appearance of auxiliary video content, the present invention supports various scene switching effects. Such as: 1. Fade in and fade out, 2. Pop in and pop out, 3. Fly in and fly out effect switching.
本发明还支持全屏和窗口播放。当用户在视频播放位置双击时,自动切换至窗口或全屏播放方式。The present invention also supports full-screen and window playing. When the user double-clicks the video playback position, it will automatically switch to the window or full-screen playback mode.
本发明可为用户提供鼠标操作和键盘的快捷键,做如下动作:1.切换主视频窗口和辅助视频窗口;2.全屏和窗口播放之间的切换;3.切换主节目视频的播出地址(频道切换)。如各个节目视频的频道可以以文字形式叠加在主节目视频窗口上,通过鼠标点击相应频道或操作键盘的快捷键可以进行频道的切换。The present invention can provide users with shortcut keys for mouse operation and keyboard, and perform the following actions: 1. Switch between the main video window and the auxiliary video window; 2. Switch between full screen and window playback; 3. Switch the broadcast address of the main program video (channel switching). For example, the channel of each program video can be superimposed on the main program video window in the form of text, and the channel can be switched by clicking the corresponding channel with the mouse or operating the shortcut key of the keyboard.
本发明还可提供单独的客户端应用程序。用户可以直接运行客户端程序即可观看主视频流和相应的广告投放内容。需要支持的操作系统包括:WindowsXP及Windows 2003。The invention can also provide a separate client application. Users can directly run the client program to watch the main video stream and the corresponding advertisement delivery content. The operating systems that need to be supported include: WindowsXP and Windows 2003.
另外,客户端可嵌入网页中。客户端可Embed到网页中,内嵌的客户端同样可以播放主视频节目和广告投放内容。支持同样的交互操作(鼠标和键盘快捷键等)。此外,用户通过点击页面中的频道链接即可实现频道切换。In addition, the client can be embedded in a web page. The client can be embedded into the webpage, and the embedded client can also play the main video program and advertisement delivery content. The same interaction is supported (mouse and keyboard shortcuts, etc.). In addition, users can switch channels by clicking the channel link on the page.
本实施例的如上画中画的多视频播放方法可以以软件、硬件或软硬件结合的方式来实现。如通过软件根据如上步骤可以制作出进行多视频播放的新的视频播放器,以运行于电脑之上。本发明的视频播放器可包括如下模块(以包含2个视频的画中画显示为例进行说明):The above picture-in-picture multi-video playback method in this embodiment can be realized by software, hardware or a combination of software and hardware. For example, a new video player for multi-video playback can be produced by software according to the above steps, so as to run on the computer. The video player of the present invention may include the following modules (illustrated with the picture-in-picture display comprising 2 videos as an example):
界面管理模块、两个媒体源读取模块、视频展现模块及音频展现模块。Interface management module, two media source reading modules, video display module and audio display module.
所述界面管理模块用于接收两个媒体源信息,并设置媒体源地址、界面显示参数及媒体读取控制参数;其中,所述的界面显示参数(或统称界面元素)主要包括视频的大小位置、透明度、动画效果(如淡入淡出、旋转)等(但并不限定于此,还可包括其它常用的一些画面显示参数),这些参数均可以修改与设置。所述媒体读取控制参数主要用于控制媒体读取模块对媒体文件的读取,例如,控制生成辅助视窗的媒体文件每隔5分钟读取播放一次,与主视频媒体文件同时读取并播放、或者在主视窗播放文件在连接、下载和缓冲时读取播放等。所述界面管理模块将与两个媒体源对应的两个界面显示信息(或称界面元素)传输到视频展现模块。The interface management module is used to receive two media source information, and set the media source address, interface display parameters and media read control parameters; wherein, the interface display parameters (or interface elements in general) mainly include the size and position of the video , transparency, animation effects (such as fade in and fade out, rotation) etc. (but not limited to this, may also include some other commonly used screen display parameters), these parameters can be modified and set. The media reading control parameter is mainly used to control the reading of the media file by the media reading module, for example, the media file that controls the generation of the auxiliary window is read and played once every 5 minutes, and is read and played simultaneously with the main video media file , or play files in the main window to read and play when connecting, downloading and buffering. The interface management module transmits two interface display information (or interface elements) corresponding to two media sources to the video display module.
所述两个媒体源读取模块,用于分别根据各个媒体源地址,读取媒体(如媒体文件和/或媒体流),并对媒体进行解码,生成对应的视频帧数据和音频数据,并将所述视频帧数据传送至视频展现单元。The two media source reading modules are used to read media (such as media files and/or media streams) according to respective media source addresses, and decode the media to generate corresponding video frame data and audio data, and and transmitting the video frame data to a video presentation unit.
所述视频展现模块,用于将所述两个媒体源读取单元生成的视频帧显示到同一屏幕的不同视窗上,并以其中一个视窗作为主视窗,以所述主视窗以外的窗口作为辅助视窗;The video presentation module is configured to display the video frames generated by the two media source reading units on different windows of the same screen, and use one of the windows as the main window, and use windows other than the main window as auxiliary windows Windows;
所述音频展示模块,用于接收两路音频脉冲调制数据中的一路进行播放。例如,可以选择与主视窗播放的视频对应的音频脉冲调制数据进行播放。The audio display module is used to receive and play one of the two channels of audio pulse modulation data. For example, the audio pulse modulation data corresponding to the video played in the main window can be selected for playback.
本发明的视频播放器可支持播放主流的视频格式文件或流,如WMV、H.264、mpeg-2/4、Flash等。The video player of the present invention can support playing mainstream video format files or streams, such as WMV, H.264, mpeg-2/4, Flash, etc.
利用XML配置文件可以预先配置显示模板、播放计划等,而界面管理模块可以根据Xml配置文件的配置进行客户端参数的设置,因此通过XML配置文件及界面管理模块,可实现如下的播放管理功能:The XML configuration file can be used to pre-configure the display template, play plan, etc., and the interface management module can set the client parameters according to the configuration of the Xml configuration file. Therefore, the following playback management functions can be realized through the XML configuration file and the interface management module:
(1)可控制广告视频的播出。如:1.指定广告视频的位置(文件或视频流地址);2.广告投放的时间和频率;3.广告所在辅视频窗口的初始大小、出现位置和切换效果。(1) Can control the broadcasting of advertising videos. For example: 1. Specify the location of the advertisement video (file or video stream address); 2. The time and frequency of advertisement delivery; 3. The initial size, appearance position and switching effect of the auxiliary video window where the advertisement is located.
(2)可控制滚动字幕的广告播出。1.可控制滚动字幕的内容(文字和图片);2.可控制字幕的出现时间和频率;3.可控制滚动的速度;4.可控制字幕出现的位置;5.可设置字幕的外观,包括大小、字体、颜色和半透明。(2) It can control the broadcasting of advertisements with scrolling subtitles. 1. Can control the content of scrolling subtitles (text and pictures); 2. Can control the time and frequency of subtitles; 3. Can control the speed of scrolling; 4. Can control the position of subtitles; 5. Can set the appearance of subtitles, Including size, font, color and translucency.
(3)可控制图片广告的投放。如可设置广告图片(如Logo)的图片文件地址、出现时间和频率、图片位置和大小。(3) Can control the placement of image advertisements. For example, the image file address, appearance time and frequency, image position and size of the advertisement image (such as Logo) can be set.
(4)支持实时插播广告。如客户端可通过远程接口接收服务端指令,实时插播视频广告。(4) Support real-time interstitial advertisements. For example, the client can receive instructions from the server through the remote interface, and insert video advertisements in real time.
(5)可按预发布的广告投放计划播出。以远程接口或文件的形式,支持广告投放的Schedule。这些Schedule在广告播出前预先发布到客户端。客户端将按照Schedule的形式播出广告。Schedule中可以包括广告内容、播出形式、播出计划(播出时间/定时播出频率)。(5) It can be broadcast according to the pre-release advertising plan. In the form of a remote interface or a file, it supports the Schedule for advertising delivery. These Schedules are pre-published to the client before the advertisement is broadcast. The client will broadcast advertisements in the form of Schedule. The Schedule can include advertisement content, broadcast form, and broadcast plan (broadcast time/scheduled broadcast frequency).
(6)记录广告播放日志。可记录用户在观看视频过程中,广告播出的实际情况,需要记录的数据包括:1.用户ID或客户端ID;2.时间;3.主视频节目ID;4.广告ID,开始播出时间和时长;5.广告播出采用的广告位。(6) Record the advertisement playing log. It can record the actual situation of the advertisement broadcast when the user is watching the video. The data to be recorded includes: 1. User ID or client ID; 2. Time; 3. Main video program ID; 4. Advertisement ID, start broadcasting Time and duration; 5. The advertising space used for advertising.
(7)支持异步下载广告视频。可通过异步的方式提前将要投放的广告视频下载到客户端。(7) Support asynchronous download of advertising videos. The advertisement video to be delivered can be downloaded to the client in advance in an asynchronous manner.
(8)提供远程管理接口。可提供远程调用接口,支持如下控制:1.广告视频的投放和播放控制;2.文字及图片广告的投放和控制;3.广告播放日志数据的采集。(8) Provide remote management interface. It can provide a remote call interface and support the following controls: 1. Advertisement video placement and playback control; 2. Text and image advertisement placement and control; 3. Advertisement playback log data collection.
(9)灵活的安装与升级。用户可以下载或在线安装客户端。用户可在线升级客户端。(9) Flexible installation and upgrade. Users can download or install the client online. Users can upgrade the client online.
(10)异步的广告播出日志采集。可以以异步的形式定期采集客户端记录下来的广告播出日志。(10) Asynchronous advertisement broadcast log collection. Ad broadcast logs recorded by the client can be collected periodically in an asynchronous manner.
(11)提供广告投放统计报表。以各种维度对实际播出日志进行数据挖掘,并生成报表:1.按广告商;2.按广告内容;3.按广告位;4.按广告时段;5.其他。并且,统计结果可以以Xml或Excel文件的方式输出。(11) Provide advertising statistics reports. Perform data mining on actual broadcast logs in various dimensions, and generate reports: 1. by advertiser; 2. by advertisement content; 3. by advertisement position; 4. by advertisement period; 5. others. Moreover, statistical results can be output in the form of Xml or Excel files.
下面列举几个场景来说明本发明的视频播放器带来的用户体验。Several scenarios are listed below to illustrate the user experience brought by the video player of the present invention.
场景1:scene 1:
A小姐最近喜欢看台湾的综艺节目《康熙来了》,但是由于内地电视台没有播出,因此A小姐只能通过网络视频的方式收看。Ms. A likes to watch Taiwan's variety show "Kangxi Is Coming" recently, but because the mainland TV station does not broadcast it, Ms. A can only watch it through online video.
和往常一样,A小姐照例到常去的在线视频网站去看最新一期的《康熙来了》,本期的嘉宾是台湾歌手-任贤齐。As usual, Ms. A went to her favorite online video site to watch the latest issue of "Kangxi Is Coming". The guest of this issue is Taiwanese singer - Ren Xianqi.
A小姐点击网页链接,网页调用本发明的视频播放器,开始播放。Miss A clicks the webpage link, and the webpage invokes the video player of the present invention to start playing.
1)开始播放时,由于网络连接和缓冲需要时间,在这段时间里A小姐在播放器里看到的是视频网站其他精彩视频节目的预告片;1) When starting to play, due to the time required for network connection and buffering, what Ms. A sees in the player during this time is the trailer of other exciting video programs on the video website;
2)连接成功并且缓冲完成后,A小姐开始观看《康熙来了》,开始观看1分钟后,视频画面自动出现一个旋转的视频网站Logo图片,提示用户这端视频是有版权的;2) After the connection is successful and the buffering is completed, Ms. A starts to watch "Kangxi Is Coming". One minute after starting to watch, a rotating video website Logo picture will automatically appear on the video screen, reminding the user that this video is copyrighted;
3)开始观看5分钟后,视频画面的下方出现了滚动字幕,提示用户“任贤齐的歌友会将与X月X日在X处举办。。。”;3) After 5 minutes of watching, a scrolling subtitle appeared at the bottom of the video screen, prompting the user "Ren Xianqi's fan club will be held at X on X, X...";
4)开始观看10分钟后,视频画面下方缓缓升起一个视频小窗口,视频内容是一段广告视频,视频内容是“任贤齐最新专辑发售及MV片段”,当A小姐点击该视频窗口时,《康熙来了》被切换至小窗口播出,而广告视频被切换至主视频窗口播出。4) After 10 minutes of watching, a small video window slowly popped up at the bottom of the video screen. The content of the video was an advertisement video. The content of the video was "Ren Xianqi's latest album release and MV clip". "Kangxi Is Coming" was switched to the small window for broadcast, while the advertising video was switched to the main video window for broadcast.
A小姐对广告内容非常感兴趣,点击主视频窗口后弹出了在线图书音像网站的页面,开始购买。同时《康熙来了》又切换回了主视频窗口开始播放。Ms. A was very interested in the content of the advertisement. After clicking the main video window, the page of the online book audio-visual website popped up, and she started to buy. At the same time, "Kangxi Is Coming" switched back to the main video window and started playing.
场景2:Scenario 2:
2010世界杯开踢了,Mr.Cool听说天空电视台在英国的数字信号通过多个频道,对一场比赛的多个不同机位的摄像机拍摄的画面同时直播,电视观众可以自由的选择、切换想从哪个角度收看比赛。Mr.Cool在网上也找到了提供类似服务的一家网络视频直播网站。The 2010 World Cup kicked off. Mr. Cool heard that the digital signal of Sky TV in the UK passes through multiple channels, and the pictures taken by multiple cameras in different positions of a game are broadcast live at the same time. TV viewers can freely choose and switch their desired From which angle to watch the game. Mr. Cool also found an online video live broadcast website that provides similar services on the Internet.
Mr.Cool打开视频直播网站,选择了一场正在直播的比赛(荷兰vs.德国),网页调用本发明的视频播放器,开始播放。Mr.Cool opens the live video website, selects a live match (Netherlands vs. Germany), and the web page invokes the video player of the present invention to start playing.
1)主视频窗口一开始播放的是由公共电视信号转过来的视频内容1) The main video window initially plays the video content transferred from the public TV signal
2)在主视频窗口下方有四个小的视频窗口,分别同步播放着从两队球门后方的摄像机、跟踪明星球员的摄像机传过来的三个直播视频流,还有一个是网站编辑刚刚剪辑的本场比赛精彩镜头反复播放的视频流。2) There are four small video windows below the main video window, which are synchronously playing three live video streams transmitted from the cameras behind the goals of the two teams and the camera tracking star players, and one is just edited by the website editor A video stream of the game highlights played repeatedly.
3)荷兰队进攻,Mr.Cool赶紧切换到德国队球门后的视频流。球进了!半场休息时,Mr.Cool切换到精彩剪辑视频窗口,收看上半场的精彩镜头重放。3) The Dutch team attacked, Mr. Cool quickly switched to the video stream behind the German team's goal. The ball went in! During the half-time break, Mr.Cool switched to the highlights video window to watch the replay of highlights from the first half.
场景3scene 3
P2P连接时或视频下载时,全屏显示广告,并同时小窗口显示连接进度(如图4所示)。连接完毕后,主窗口显示原视频。During P2P connection or video download, the advertisement is displayed in full screen, and the connection progress is displayed in a small window at the same time (as shown in Figure 4). After the connection is complete, the main window displays the original video.
场景4scene 4
转播节目的广告时间,小窗口升起,播送运营商的节目预告广告(如图5所示)。运营商的节目预告广告自动切换到大窗口(此时是广告),小窗口继续显示原节目(此时是广告),或者由用户来切换,因为预告节目似乎应比原广告更吸引人。During the advertising time of the rebroadcast program, the small window rises to broadcast the operator's program preview advertisement (as shown in Figure 5). The operator's program preview advertisement is automatically switched to the large window (advertisement at this time), and the small window continues to display the original program (advertisement at this time), or it is switched by the user, because the preview program seems to be more attractive than the original advertisement.
场景5scene 5
节目播放中,根据预先制定的广告政策显示小窗口,播放广告(如图6所示),用户可进行节目间的切换。其中广告小窗口可设定每固定时间(每半个小时)播放一次,持续时间5分钟。During the broadcasting of the program, a small window is displayed according to the pre-established advertising policy, and the advertisement is played (as shown in FIG. 6 ), and the user can switch between the programs. Wherein the advertisement small window can be set to play once every fixed time (every half an hour), and the duration is 5 minutes.
场景6scene 6
在屏幕的左上方(或任意位置)显示图片(如图7所示),可控制显示时间、次数,所述图片可以是广告或台标。A picture (as shown in FIG. 7 ) is displayed on the upper left of the screen (or at any position), and the display time and times can be controlled. The picture can be an advertisement or a station logo.
场景7scene 7
在视频上叠加显示时钟,离整点或半点差一分钟时开始显示,持续显示一分到一分半钟,在显示时间的同时可以显示钟表广告,可设置模拟时钟在表盘(如图8a),数字时钟在上方(如图8b)。Superimpose and display the clock on the video, start displaying one minute before the hour or the half hour, and continue to display for one minute to one and a half minutes. While displaying the time, it can display clock advertisements, and an analog clock can be set on the dial (as shown in Figure 8a) , the digital clock is at the top (as shown in Figure 8b).
实施例2Example 2
本实施例中对实现多视频播放的装置进行描述。In this embodiment, a device for realizing multi-video playback is described.
图3为本发明的多视频播放装置的结构框图,在此仅以包括两个视频的画中画播放装置为例进行说明,由此可以很容易的延伸到多个视频的画中画显示。如图2所示,所述装置主要包括:界面管理单元、两个媒体源读取单元、视频展现单元及音频展现单元。FIG. 3 is a structural block diagram of the multi-video playback device of the present invention. Here, only a picture-in-picture playback device including two videos is used as an example for illustration, so that it can be easily extended to the picture-in-picture display of multiple videos. As shown in FIG. 2 , the device mainly includes: an interface management unit, two media source reading units, a video presentation unit and an audio presentation unit.
所述界面管理单元用于接收两个媒体源信息,并根据各个媒体源信息设置媒体源地址、界面显示参数及播放控制参数;其中,所述的界面显示参数(或统称界面元素)主要包括视频的大小位置、透明度、动画效果(如淡入淡出、旋转)等(但并不限定于此,还可包括其它常用的一些画面显示参数),这些参数均可以修改与设置。所述播放控制参数主要用于控制媒体读取单元对媒体文件的读取,例如,控制生成辅助视窗的媒体文件每隔5分钟读取播放一次,与主视频媒体文件同时读取并播放、或者在主视窗播放文件在连接、下载和缓冲时读取播放等。所述界面管理单元将与两个媒体源对应的两个界面显示信息(或称界面元素)传输到视频展现单元。The interface management unit is used to receive two media source information, and set media source address, interface display parameters and playback control parameters according to each media source information; wherein, the interface display parameters (or collectively referred to as interface elements) mainly include video The size, position, transparency, animation effects (such as fade in and fade out, rotation) etc. (but not limited to this, may also include some other commonly used screen display parameters), these parameters can be modified and set. The play control parameter is mainly used to control the media reading unit to read the media file, for example, the media file that controls the generation of the auxiliary window is read and played once every 5 minutes, read and played simultaneously with the main video media file, or Play files in the main window, read and play when connecting, downloading and buffering. The interface management unit transmits two interface display information (or interface elements) corresponding to the two media sources to the video presentation unit.
所述两个媒体源读取单元,用于分别根据各个媒体源地址,读取媒体文件(包括媒体流),并对媒体文件进行解码,生成对应的视频帧数据和音频数据,并将所述视频帧数据传送至视频展现单元。The two media source reading units are used to read media files (comprising media streams) according to the respective media source addresses, and decode the media files to generate corresponding video frame data and audio data, and transmit the The video frame data is sent to the video presentation unit.
所述视频展现单元,用于将所述至少两个媒体源读取单元生成的视频帧显示到同一屏幕的不同视窗上,并以其中一个视窗作为主视窗,以所述主视窗以外的窗口作为辅助视窗;The video presentation unit is configured to display the video frames generated by the at least two media source reading units on different windows of the same screen, and use one of the windows as the main window, and use a window other than the main window as the main window. Auxiliary window;
所述音频展示单元,用于选择性地接收两路音频脉冲调制数据中的一路进行播放。例如,可以选择与主视窗播放的视频对应的音频脉冲调制数据进行播放。The audio display unit is used for selectively receiving one of the two channels of audio pulse modulation data for playing. For example, the audio pulse modulation data corresponding to the video played in the main window can be selected for playing.
通过在计算机中设置如上单元,就可以实现视频的画中画播放。By setting the above unit in the computer, the picture-in-picture playback of the video can be realized.
以上具体实施方式仅用于说明本发明,而非用于限定本发明。凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above specific embodiments are only used to illustrate the present invention, but not to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2006100636686A CN1997153B (en) | 2006-12-31 | 2006-12-31 | A method and device for computer multi-video playing |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2006100636686A CN1997153B (en) | 2006-12-31 | 2006-12-31 | A method and device for computer multi-video playing |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1997153A CN1997153A (en) | 2007-07-11 |
| CN1997153B true CN1997153B (en) | 2012-01-25 |
Family
ID=38252049
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2006100636686A Expired - Fee Related CN1997153B (en) | 2006-12-31 | 2006-12-31 | A method and device for computer multi-video playing |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1997153B (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107426627A (en) * | 2017-06-19 | 2017-12-01 | 环球智达科技(北京)有限公司 | Playing device |
| CN109831706A (en) * | 2019-02-13 | 2019-05-31 | 安徽励图信息科技股份有限公司 | A method of it is broadcasted based on Microsoft Excel Software control TV subtitling |
| CN109905767A (en) * | 2017-12-07 | 2019-06-18 | 北京雷石天地电子技术有限公司 | Program relaying method and device |
Families Citing this family (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2009089689A1 (en) * | 2008-01-15 | 2009-07-23 | Mediatek Inc. | Multimedia presenting system, multimedia processing apparatus thereof, and method for presenting video and audio signals |
| CN101615413B (en) * | 2009-07-27 | 2012-10-10 | 华平信息技术股份有限公司 | Multichannel audio/video player system and method |
| CN102223501A (en) * | 2011-06-17 | 2011-10-19 | 四川长虹电器股份有限公司 | Multi-picture service realization method |
| CN102364956B (en) * | 2011-11-29 | 2014-03-12 | 乐视致新电子科技(天津)有限公司 | Method for realizing advertising in starting of Internet protocol television (IPTV) system |
| CN102638644A (en) * | 2012-04-26 | 2012-08-15 | 新奥特(北京)视频技术有限公司 | Method for synchronous display |
| CN103700362B (en) * | 2013-12-20 | 2016-03-30 | 广东威创视讯科技股份有限公司 | Multi signal window display method and device |
| CN104202546B (en) * | 2014-08-22 | 2017-09-12 | 湖南华凯文化创意股份有限公司 | CAVE immersions virtual display system and display methods |
| CN104469528B (en) * | 2014-12-26 | 2018-06-19 | 北京奇虎科技有限公司 | A kind of method, apparatus and browser client for carrying out video data loading |
| CN105376630A (en) * | 2015-10-15 | 2016-03-02 | 青海汉纳国际文化传播有限公司 | Method for displaying commodity in advertisement video |
| CN105872795A (en) * | 2015-11-20 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Video playing method and device |
| CN105959744B (en) * | 2016-05-24 | 2019-07-09 | 武汉斗鱼网络科技有限公司 | A kind of commercial breaks event data statistical method and device |
| CN106792102B (en) * | 2017-01-05 | 2019-11-15 | 深圳市爱立峰科技有限公司 | Method for synchronously playing multiple videos on home page of set-top box and set-top box |
| CN106993212B (en) * | 2017-03-20 | 2020-11-13 | 贵阳朗玛信息技术股份有限公司 | Method and device for playing multiple paths of videos in browser window |
| CN107864122B (en) * | 2017-10-18 | 2021-05-28 | 武汉斗鱼网络科技有限公司 | Display method and device for live stream of main broadcast with wheat |
| CN109918156B (en) * | 2017-12-13 | 2022-05-27 | 飞狐信息技术(天津)有限公司 | Video interface processing method and system |
| CN108172149A (en) * | 2018-01-16 | 2018-06-15 | 武汉道森媒体股份有限公司 | Picture playing method and device |
| CN109819329B (en) * | 2019-01-16 | 2022-03-25 | 海信视像科技股份有限公司 | Window display method and smart television |
| CN113873315B (en) * | 2021-10-27 | 2025-02-11 | 北京达佳互联信息技术有限公司 | Video data playing method, device and equipment |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5642498A (en) * | 1994-04-12 | 1997-06-24 | Sony Corporation | System for simultaneous display of multiple video windows on a display device |
| CN1538745A (en) * | 2003-04-15 | 2004-10-20 | ���ǵ�����ʽ���� | Display device and image processing method thereof |
| CN1826572A (en) * | 2003-06-02 | 2006-08-30 | 迪斯尼实业公司 | System and method for programmatic window control of consumer video players |
-
2006
- 2006-12-31 CN CN2006100636686A patent/CN1997153B/en not_active Expired - Fee Related
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5642498A (en) * | 1994-04-12 | 1997-06-24 | Sony Corporation | System for simultaneous display of multiple video windows on a display device |
| CN1538745A (en) * | 2003-04-15 | 2004-10-20 | ���ǵ�����ʽ���� | Display device and image processing method thereof |
| CN1826572A (en) * | 2003-06-02 | 2006-08-30 | 迪斯尼实业公司 | System and method for programmatic window control of consumer video players |
Non-Patent Citations (4)
| Title |
|---|
| 余胜生 等.基于DirectShow的通用多路视频接口研究和实现.计算机工程与科学27 11.2005,27(11),25-27、65. |
| 余胜生 等.基于DirectShow的通用多路视频接口研究和实现.计算机工程与科学27 11.2005,27(11),25-27、65. * |
| 同上. |
| 附图1-9. |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107426627A (en) * | 2017-06-19 | 2017-12-01 | 环球智达科技(北京)有限公司 | Playing device |
| CN109905767A (en) * | 2017-12-07 | 2019-06-18 | 北京雷石天地电子技术有限公司 | Program relaying method and device |
| CN109831706A (en) * | 2019-02-13 | 2019-05-31 | 安徽励图信息科技股份有限公司 | A method of it is broadcasted based on Microsoft Excel Software control TV subtitling |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1997153A (en) | 2007-07-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN1997153B (en) | A method and device for computer multi-video playing | |
| CN102782609B (en) | Share the method and system of digital media content | |
| CN105765990B (en) | Method, system and computer medium for distributing video content over a distributed network | |
| US8436891B2 (en) | Hyperlinked 3D video inserts for interactive television | |
| CN1127260C (en) | Video/audio in cooperation with video/audio broadcasting and graphic demonstrating system | |
| CN103282962B (en) | Content ordering | |
| US20120233646A1 (en) | Synchronous multi-platform content consumption | |
| US8869199B2 (en) | Media content transmission method and apparatus, and reception method and apparatus for providing augmenting media content using graphic object | |
| CA2668697A1 (en) | Apparatus and method for providing access to associated data related to primary media data | |
| WO2005013618A1 (en) | Live streaming broadcast method, live streaming broadcast device, live streaming broadcast system, program, recording medium, broadcast method, and broadcast device | |
| JP2015092750A (en) | Multi-view video placement system | |
| CN112565847B (en) | Large-screen display control method and device | |
| US20120179968A1 (en) | Digital signage system and method | |
| JP7290260B1 (en) | Servers, terminals and computer programs | |
| CN111601144B (en) | Streaming media file playing method and display equipment | |
| CN103873920A (en) | Program browsing method and system and set top box | |
| WO2021217435A1 (en) | Streaming media synchronization method and display device | |
| CN101076106B (en) | Interdynamic video system of IPTV two-dimensional frame marked information | |
| CN108810580B (en) | Media content pushing method and device | |
| CN106104415B (en) | User interface techniques for television channel change | |
| CN114501087B (en) | Display equipment | |
| US20110167346A1 (en) | Method and system for creating a multi-media output for presentation to and interaction with a live audience | |
| JP5683756B1 (en) | Multi-view video placement system | |
| Marrin et al. | Steerable media: interactive television via video synthesis | |
| CN101221752A (en) | Method, device and system for implementing personalized karaoke service in IPTV system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| C41 | Transfer of patent application or patent right or utility model | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20160629 Address after: 100081 No. 1, building 17, building 2, Wanshou temple, Haidian District, Beijing, No. 35 Patentee after: Xu Shan Address before: 100086 Beijing city Haidian District No. 48 Zhichun Road Yingdu building B-23C Patentee before: BEIJING HENGZHUN TECHNOLOGY Inc. |
|
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120125 |