Video playing method, player and playing device based on naked eye VR

文档序号:73109 发布日期:2021-10-01 浏览:28次 中文

阅读说明:本技术 一种基于裸眼vr的视频播放方法、播放器和播放设备 (Video playing method, player and playing device based on naked eye VR ) 是由 许玲 于 2021-07-12 设计创作,主要内容包括:本发明提供一种基于裸眼VR的视频播放方法、播放器和播放设备,所述方法包括:解析视频地址,并基于所述视频地址从服务器中获取视频的二进制数据;调用解封装模块对所述二进制数据解封装以得到视频流数据;调用视频流解码器解码所述视频流数据,得到逐帧的原始画面;基于底层OpenGL对每一帧所述原始画面进行畸变变形和3D渲染,并将渲染后的画面在大屏端进行显示播放。本发明的用户可以实现裸眼观看VR视频,而无需佩戴专门的VR设备,提高用户体验。(The invention provides a video playing method, a player and playing equipment based on naked eye VR, wherein the method comprises the steps of analyzing a video address and acquiring binary data of a video from a server based on the video address; a decapsulation module is called to decapsulate the binary data to obtain video stream data; calling a video stream decoder to decode the video stream data to obtain an original frame by frame; and performing distortion and 3D rendering on each frame of the original picture based on the bottom layer OpenGL, and displaying and playing the rendered picture at a large screen end. According to the invention, the user can watch the VR video with naked eyes without wearing special VR equipment, so that the user experience is improved.)

1. A video playing method based on naked eye VR is characterized by comprising the following steps:

analyzing the video address, and acquiring binary data of the video from the server based on the video address;

a decapsulation module is called to decapsulate the binary data to obtain video stream data;

calling a video stream decoder to decode the video stream data to obtain an original frame by frame;

and performing distortion and 3D rendering on each frame of the original picture based on the bottom layer OpenGL, and displaying and playing the rendered picture at a large screen end.

2. The naked eye VR-based video playing method of claim 1, further comprising:

and receiving and responding to an external instruction, and rendering the current displayed picture in the large screen end into a slice based on fov.

3. The naked eye VR-based video playing method of claim 1 or 2, wherein the parsing the video address and obtaining binary data of the video from the server based on the video address comprises:

analyzing a video address, and acquiring an IP address and a port number of a server based on the video address;

establishing a connection with a server based on the IP address and the port number;

binary data of the video is acquired from the server.

4. The naked eye VR-based video playing method of claim 1 or 2, wherein before the step of using the decapsulation module to decapsulate the binary data to obtain video stream data, the method further comprises:

and analyzing the binary data and judging the packaging format of the binary data.

5. The naked eye VR based video playing method of claim 1 or 2, wherein after invoking a video stream decoder to decode the video stream data to obtain an original frame-by-frame picture, the method further comprises:

and storing the original pictures of each frame in a video frame queue.

6. The naked-eye VR-based video playing method of claim 5, wherein before distortion and 3D rendering of each frame of the original picture based on a bottom layer OpenGL, the method further comprises:

and taking out the original pictures from the video frame queue frame by frame.

7. The naked eye VR-based video playing method of claim 1, wherein distortion and 3D rendering are performed on each frame of the original picture based on a bottom layer OpenGL, and the method comprises the following steps:

and according to different types of the video stream data, performing different types of distortion deformation on the original picture of each frame based on the bottom layer OpenGL, and performing 3D rendering.

8. An naked eye VR player for implementing the naked eye VR-based video playing method according to any one of claims 1-7, the naked eye VR player comprising:

the protocol integration module is used for integrating and adapting various codecs and network protocols;

the first rendering module is used for performing distortion deformation and 3D rendering on each frame of original picture of the video stream based on OpenGL;

the second rendering module is used for rendering the current picture displayed by the large screen end in a slicing mode based on Fov;

the set-top box adapting module is used for adapting set-top boxes of various models based on the bottom layer interface;

and the external equipment response module is used for receiving and responding to the operation instruction of the external equipment.

9. An naked eye VR player device comprising the naked eye VR player of claim 8, and further comprising a memory, a processor and a transceiver, wherein the memory is used for storing a computer program, the transceiver is used for transmitting and receiving messages, and the processor is used for reading the computer program and executing the naked eye VR-based video playing method of any one of claims 1-7.

Technical Field

The invention belongs to the technical field of virtual reality, and particularly relates to a video playing method, a player and playing equipment based on naked eye VR.

Background

Virtual Reality (VR), has three basic elements of 'immersion-interaction-conception', emphasizes the dominant role of people in a Virtual system, is a system simulation of multi-source information fusion, interactive, three-dimensional dynamic vision and entity behaviors, and enables users to be immersed in the environment. The technology integrates Computer Graphics (CG) technology, computer simulation technology, artificial intelligence, display technology, network parallel processing and other technologies, and is a high-technology simulation system generated by the aid of the computer technology.

A head-mounted VR-like display device is a primary form of virtual reality, where the user can be directly placed in the virtual world through the experience of, for example, a VR immersive helmet. The helmet-type display seals the vision and the hearing of people to the outside, and guides a user to generate a feeling of the user in a virtual environment. The display principle is that the left and right eye screens respectively display images of the left and right eyes, and the human eyes generate stereoscopic impression in the brain after acquiring the information with the difference.

However, when the user wears the VR helmet and enjoys unprecedented immersive experience brought by VR content, the VR helmet has some inherent disadvantages, such as being heavy and not light, being incapable of normally watching the actual environment when worn, and bringing discomfort to the user after long-time wearing.

Disclosure of Invention

The invention aims to provide a video playing method, a player and playing equipment based on naked eye VR, which are used for solving at least one problem in the prior art.

In order to achieve the purpose, the invention adopts the following technical scheme:

in a first aspect, the present invention provides a video playing method based on naked eye VR, including:

analyzing the video address, and acquiring binary data of the video from the server based on the video address;

a decapsulation module is called to decapsulate the binary data to obtain video stream data;

calling a video stream decoder to decode the video stream data to obtain an original frame by frame;

and performing distortion and 3D rendering on each frame of the original picture based on the bottom layer OpenGL, and displaying and playing the rendered picture at a large screen end.

In one possible design, further comprising:

and receiving and responding to an external instruction, and rendering the current displayed picture in the large screen end into a slice based on fov.

In one possible design, parsing the video address and obtaining binary data of the video from the server based on the video address includes:

analyzing a video address, and acquiring an IP address and a port number of a server based on the video address;

establishing a connection with a server based on the IP address and the port number;

binary data of the video is acquired from the server.

In one possible design, before the invoking the decapsulating module decapsulates the binary data to obtain video stream data, the method further includes:

and analyzing the binary data and judging the packaging format of the binary data.

In one possible design, after invoking a video stream decoder to decode the video stream data to obtain an original frame-by-frame picture, the method further includes:

and storing the original pictures of each frame in a video frame queue.

In one possible design, before performing distortion deformation and 3D rendering on each frame of the original picture based on the bottom OpenGL, the method further includes:

and taking out the original pictures from the video frame queue frame by frame.

In one possible design, performing distortion and 3D rendering on each frame of the original picture based on the bottom layer OpenGL includes:

and according to different types of the video stream data, performing different types of distortion deformation on the original picture of each frame based on the bottom layer OpenGL, and performing 3D rendering.

In a second aspect, the present invention provides a naked eye VR player for implementing a naked eye VR-based video playing method in any one of the possible designs of the first aspect, where the naked eye VR player includes:

the protocol integration module is used for integrating and adapting various codecs and network protocols;

the first rendering module is used for performing distortion deformation and 3D rendering on each frame of original picture of the video stream based on OpenGL;

the second rendering module is used for rendering the current picture displayed by the large screen end in a slicing mode based on Fov;

the set-top box adapting module is used for adapting set-top boxes of various models based on the bottom layer interface;

and the external equipment response module is used for receiving and responding to the operation instruction of the external equipment.

In a third aspect, the present invention provides an naked eye VR playing device, including the naked eye VR player according to the second aspect, further including a memory, a processor, and a transceiver, which are sequentially connected in a communication manner, where the memory is used to store a computer program, the transceiver is used to transmit and receive a message, and the processor is used to read the computer program and execute the naked eye VR-based video playing method as described in any one of the possible designs of the first aspect.

In a fourth aspect, the present invention provides a computer-readable storage medium, which stores instructions for executing the naked eye VR-based video playing method as set forth in any one of the possible designs of the first aspect when the instructions are executed on a computer.

In a fifth aspect, the present invention provides a computer program product containing instructions for causing a computer to perform the naked eye VR based video playback method as set forth in any one of the possible designs of the first aspect.

Has the advantages that:

according to the naked eye VR-based video playing method, each frame of original picture of a video stream is obtained, distortion deformation and 3D rendering are carried out on each frame of original picture based on bottom layer OpenGL, and the rendered picture is displayed and played at a large screen end, wherein the large screen end can be a smart television, so that a user can play a VR video by using the smart television, the user can watch the VR video with naked eyes without wearing special VR equipment, and user experience is improved; in addition, the user can send the instruction through external equipment, including visual angle rotation and visual angle zoom-in and zoom-out instructions, the system can adjust the current picture that shows of large screen end based on fov according to the instruction, provides real-time dynamic three-dimensional lifelike image for the user, makes the user obtain experience of being personally on the scene, reaches and wears VR equipment equal display effect.

Drawings

Fig. 1 is a flowchart of a video playing method based on naked eye VR according to the present invention;

fig. 2 is a structural block diagram of the naked eye VR player provided by the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure.

Examples

In a first aspect, as shown in fig. 1, this embodiment provides a video playing method based on naked eye VR, including but not limited to steps S101 to S104:

s101, analyzing a video address, and acquiring binary data of a video from a server based on the video address;

in step S101, the video address resolution includes local SDK (Software Development Kit) resolution and WebAPI (Web application programming interface) resolution; the address analyzed by the SDK is the address of the server node closest to the user, so that the method is relatively quicker and smoother; the address obtained by WebAPI analysis is the address closest to the server node, but is not necessarily the address closest to the user, and at this time, the server is used as an intermediary, and the phenomenon that the address obtained by the user may be stuck due to a distance problem may occur.

As an optional implementation manner of step S101, the parsing the video address and obtaining binary data of the video from the server based on the video address includes:

s101a, analyzing a video address, and acquiring an IP address and a port number of a server based on the video address;

step S101b, connection is established with a server based on the IP address and the port number;

optionally, a TCP long connection may be established with the server based on a TCP protocol, or an IP long connection may be established with the server based on an IP protocol, which is not limited herein.

And S101c, acquiring the binary data of the video from the server.

Of course, it is understood that when an original video file is obtained, the video file usually includes audio stream data, subtitle data, and other auxiliary data besides video stream data; therefore, when the original video file is acquired, data such as an audio stream can be acquired at the same time.

S102, a decapsulation module is called to decapsulate the binary data to obtain video stream data;

before the binary data is unpackaged by the unpacking module to obtain the video stream data, the method further comprises the following steps: analyzing the binary data and judging the packaging format of the binary data; the package format includes formats such as mp4, avi, rmvb, flv, mkv, and the like, and is not particularly limited.

The decapsulation module is called to decapsulate the binary data to obtain video stream data, and meanwhile, audio stream data, subtitle data, and other auxiliary data can also be obtained, which is not described herein again.

S103, calling a video stream decoder to decode the video stream data to obtain an original frame by frame;

when decoding the video stream data, it is necessary to first determine the encoding formats of the video stream data, including but not limited to h264, h265, and the like, and then invoke the video stream decoder to decode the video stream data with different encoding formats, so as to obtain frame-by-frame original pictures.

It should be noted that, while decoding the video stream data, the audio stream data included in the video stream data may also be decoded, and similarly, it is necessary to first determine the encoding format of the audio stream data, including but not limited to aac and other encoding formats, and then call a corresponding audio stream encoder to decode the audio stream data.

In an optional implementation manner of step S103, after invoking a video stream decoder to decode the video stream data to obtain frame-by-frame original pictures, the method further includes storing each frame of the original pictures in a video frame queue.

Similarly, after decoding the audio stream data, the audio data may be stored in the audio queue according to the time node.

And S104, performing distortion deformation and 3D rendering on each frame of the original picture based on a bottom layer OpenGL (Open Graphics Library), and displaying and playing the rendered picture on a large screen.

In an optional implementation manner of step S104, before performing distortion and 3D rendering on each frame of the original picture based on the bottom OpenGL, the method further includes:

and taking out the original pictures from the video frame queue frame by frame.

It should be noted that OpenGL defines a cross-programming language and a cross-platform programming interface standard, and performs distortion deformation and 3D rendering on each frame of the original image by rewriting OpenGL, specifically, performs distortion deformation on the entire original image frame first, and then renders the original image frame to a screen, and renders the original image frame not in the screen at the current viewing angle. Thus, according to different types of the video stream data, including: the 2D-180, 2D-360, 3D-180, 3D-230 and 3D-360 data are subjected to different types of distortion deformation on the original picture of each frame based on the bottom layer OpenGL, for example: barrel distortion is made for 2D-360 type video stream data, and the picture is split into two pictures for 3D-180 type video stream data to achieve a binocular effect.

It should be noted that the large screen end includes, but is not limited to, a playing screen of a smart television, a display screen of a projection device, and the like, and is not particularly limited.

As an optional implementation, the method further comprises:

and S105, receiving and responding to an external instruction, and rendering the current displayed picture in the large screen terminal into a slice based on fov.

It should be noted that the external instruction refers to an instruction sent by a user through an external device, where the external device includes, but is not limited to, a remote controller, a tablet computer, a smart phone, a voice tool, and the like; the external equipment can send a key value specified by an operating system through the operation of the built-in driver, and the system can respond after receiving the key value. For illustration, one of the key value tables is shown below:

based on the above disclosure, each frame of original picture of a video stream is obtained, then distortion deformation and 3D rendering are performed on each frame of original picture based on bottom OpenGL, and the rendered picture is displayed and played at a large screen end, wherein the large screen end can be a smart television, so that a VR video can be played by using the smart television, and a user can watch the VR video with naked eyes without wearing special VR equipment, thereby improving user experience; in addition, the user can send the instruction through external equipment, including visual angle rotation and visual angle zoom-in and zoom-out instructions, the system can adjust the current picture that shows of large screen end based on fov according to the instruction, provides real-time dynamic three-dimensional lifelike image for the user, makes the user obtain experience of being personally on the scene, reaches and wears VR equipment equal display effect.

In a second aspect, as shown in fig. 2, this embodiment provides an naked eye VR player, configured to implement the naked eye VR-based video playing method in any one of the possible designs of the first aspect, where the naked eye VR player includes:

the protocol integration module is used for integrating and adapting various codecs and network protocols;

it should be noted that the codec includes, but is not limited to, FLV codec, MPEG-1 codec, MPEG-4 codec, AVS codec, Divx, XviD, and 3ivx codec, WMV codec, RealVideo codec, Cinepal codec, and the like. The network protocol includes, but is not limited to, TCP/IP protocol, NetBEUI protocol, IPX/SPX protocol, and the like.

The first rendering module is used for performing distortion deformation and 3D rendering on each frame of original picture of the video stream based on OpenGL;

the second rendering module is used for rendering the current picture displayed by the large screen end in a slicing mode based on Fov;

the set-top box adapting module is used for adapting set-top boxes of various models based on the bottom layer interface;

the set-top box adaptation module acquires the model of the set-top box through a bottom layer interface, and then performs corresponding function adjustment according to set-top box list parameters carried by the player; for example, a model set-top box does not support 3D-180 itself, and the underlying video for that type is automatically converted to 2D-180 rendering.

And the external equipment response module is used for receiving and responding to the operation instruction of the external equipment.

It should be noted that the operation instruction refers to an instruction sent by a user through an external device, where the external device includes, but is not limited to, a remote controller, a tablet computer, a smart phone, a voice tool, and the like; the external equipment can send a key value specified by an operating system through the operation of the built-in driver, and the system can respond after receiving the key value.

For the working process, the working details and the technical effects of the apparatus provided in the second aspect of this embodiment, reference may be made to the first aspect of this embodiment, which is not described herein again

In a third aspect, the present invention provides an naked eye VR playing device, including the naked eye VR player according to the second aspect, further including a memory, a processor, and a transceiver, which are sequentially connected in a communication manner, where the memory is used to store a computer program, the transceiver is used to transmit and receive a message, and the processor is used to read the computer program and execute the naked eye VR-based video playing method as described in any one of the possible designs of the first aspect.

For example, the Memory may include, but is not limited to, a Random-Access Memory (RAM), a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a First-in First-out (FIFO), and/or a First-in Last-out (FILO), and the like; the transceiver may be, but is not limited to, a WiFi (wireless fidelity) wireless transceiver, a bluetooth wireless transceiver, a GPRS (General Packet Radio Service) wireless transceiver, and/or a ZigBee (ZigBee protocol, low power consumption local area network protocol based on ieee802.15.4 standard) wireless transceiver, etc.; the processor may not be limited to the use of a microprocessor of the model number STM32F105 family.

For the working process, the working details, and the technical effects of the apparatus provided in the third aspect of this embodiment, reference may be made to the first aspect of the embodiment, which is not described herein again.

In a fourth aspect, the present invention provides a computer-readable storage medium, which stores instructions for executing the naked eye VR-based video playing method as set forth in any one of the possible designs of the first aspect when the instructions are executed on a computer. The readable storage medium refers to a carrier for storing data, and may include, but is not limited to, a floppy disk, an optical disk, a hard disk, a flash Memory, a flash disk and/or a Memory Stick (Memory Stick), etc., and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

For the working process, the working details, and the technical effects of the apparatus provided in the fourth aspect of this embodiment, reference may be made to the first aspect of the embodiment, which is not described herein again.

In a fifth aspect, the present invention provides a computer program product containing instructions for causing a computer to perform the naked eye VR based video playback method as set forth in any one of the possible designs of the first aspect. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable devices.

For the working process, the working details and the technical effects of the apparatus provided in the fifth aspect of this embodiment, reference may be made to the first aspect of this embodiment, which is not described herein again

Finally, it should be noted that: the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:图像同步方法、图像显示及处理设备、及图像同步系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类