Disclosure of Invention
The invention provides a method and a system for playing virtual roles, aiming at realizing the simultaneous live broadcast of virtual role videos by a plurality of playing platforms on a common computer; the other purpose is to realize that the live streaming data obtained by the virtual character and other audio and video processing is distributed to at least one target address to be played smoothly.
The technical scheme provided by the invention is as follows:
the invention provides a virtual character playing method, which comprises the following steps: s100, acquiring virtual character video data; s200, processing the virtual character video data to obtain live streaming data; s300, the live streaming data is sent to a target address in a preset transmission mode and played.
In the invention, the virtual roles and other audios and videos can be processed to obtain live streaming data, and the live streaming data can be distributed to at least one target address to be smoothly played. Meanwhile, the invention also directly obtains the virtual character video data, so that the virtual character and the program which are made by the producer can be played simultaneously on a common computer by multiple platforms.
Further, step S200 includes the steps of: s210, judging whether related video data are acquired from a local end or a network end; if yes, go to step S230; otherwise, go to step S220; s220, processing the virtual character video data to obtain first direct-current data; s230, processing the virtual character video data and the related video data to obtain second live broadcast stream data; the related video data comprises any one or more of audio data, video data, screen recording data and character data.
In the invention, the related video data is stored or cached locally, downloaded from a network end and acquired, and the like, and is fused with the virtual character animation of the live performer, thereby increasing the interest and the entertainment.
Further, the step S220 includes the steps of: s221, shunting the virtual character video data according to the transmission capability of the transmission link to obtain shunted data; s222, adding a serial number mark to the shunted data to obtain first direct-current data; the step S230 includes the steps of: s231, distributing the virtual character video data and the related video data according to the transmission capability of the transmission link to obtain distributed data; s232, adding sequence number marks to the shunted data to obtain the second live streaming data.
In the invention, the data after being distributed are dispersed in different transmission links, and the serial numbers are added for marking according to various factors such as size, time, type and the like, so that the fault site can be directly and quickly positioned and found out conveniently when the live broadcast fails or bad live broadcast content occurs in the later period, and the network management can conveniently manage the live broadcast environment of the network.
Further, the step S300 includes the steps of: s310, the first direct-current streaming data are dispersed in different transmission links and are sent to a target address to be played in a parallel transmission mode; or S320, the second live streaming data are dispersed in different transmission links and are sent to a target address for playing in a parallel transmission mode; wherein the target address comprises a client address and a server address.
In the invention, the direct broadcast is sent to the target address in a multilink parallel transmission mode, and the multilink parallel transmission can maximize the utilization of network bandwidth, so that the transmission efficiency can be improved, and the fluency of the direct broadcast is ensured.
Further, the step S100 includes, before the step, the steps of: s010 creates a virtual role corresponding to the performer in advance; s020 obtaining facial expression image information of the performer; s030 converts the facial expression image information into character expression data; s040 controls the virtual character to demonstrate according to the character expression data to obtain virtual character video data; s050 judging whether the virtual character receives a control instruction in the demonstration process; if yes, go to step S060; s060 controlling the virtual character to demonstrate according to the control parameter information corresponding to the control instruction and the character expression data to obtain the virtual character video data; the control parameter information comprises any one or more of action parameter information, prop parameter information, hair parameter information and background parameter information.
In the invention, the virtual role of the performer can be created according to the preference of the user, and compared with the preset cartoon role, the virtual role creation method has the technical characteristics that a large number of actions, props, hairs, backgrounds and other control parameters can be used by the user, thereby increasing the interestingness.
The invention also provides a playing system of the virtual role, which comprises the following components: the acquisition module acquires virtual character video data; the processing module is in communication connection with the acquisition module; processing the virtual character video data acquired by the acquisition module to obtain live streaming data; sending the live streaming data to a target address in a preset transmission mode; the playing module is in communication connection with the processing module; and receiving and playing the live streaming data sent by the processing module.
Further, the processing module comprises: the collection submodule acquires related video data from a local end or a network end; the judgment submodule is in communication connection with the collection submodule; judging whether the collection submodule acquires related video data from a local end or a network end; the first processing submodule is in communication connection with the judging submodule and the obtaining module; when the judgment sub-module judges that the collection sub-module does not acquire the related video data, the first processing sub-module processes the virtual character video data acquired by the acquisition module to obtain first direct-current data; the second processing submodule is in communication connection with the judging submodule, the collecting submodule and the obtaining module; when the judgment sub-module judges that the collection sub-module obtains the related video data, the second processing sub-module processes the virtual character video data obtained by the obtaining module and the related video data obtained by the collection sub-module to obtain second live broadcast stream data; the related video data comprises any one or more of audio data, video data, screen recording data and character data.
Further, the first processing sub-module includes: the first shunting unit shunts the virtual character video data acquired by the acquisition module according to the transmission capability of the transmission link to acquire shunted data when the judgment submodule judges that the collection submodule does not acquire the related video data; a first tagging unit communicatively coupled to the first branching unit; adding a serial number mark to the shunted data obtained by the first shunting unit to obtain the first direct-current data; the second processing sub-module comprises: the second shunting unit shunts the virtual character video data acquired by the acquisition module and the related video data acquired by the collection submodule according to the transmission capability of a transmission link to acquire shunted data when the judgment submodule judges that the collection submodule acquires the related video data; a second tagging unit communicatively coupled to the second offloading unit; and adding a serial number mark to the shunted data obtained by the second shunting unit to obtain the second live broadcast stream data.
Further, the processing module further includes: the first transmission sub-module is in communication connection with the first processing sub-module; the first transmission submodule disperses the first direct-current streaming data obtained by the first processing submodule in different transmission links and sends the first direct-current streaming data to a target address for playing in a parallel transmission mode; the second transmission sub-module is in communication connection with the second processing sub-module; the second transmission submodule disperses the second live streaming data obtained by the second processing submodule in different transmission links and sends the second live streaming data to a target address for playing in a parallel transmission mode; wherein the target address comprises a client address and a server address.
Further, the system for playing the virtual character further includes: the device comprises a creating module, an acquisition module, a conversion module, a first generation module, a transceiver module, a storage module, a judgment module and a second generation module; the receiving and sending module is used for receiving a control instruction and sending the virtual role video data; the storage module is used for storing control parameter information corresponding to the control instruction; the creation module is used for creating virtual roles corresponding to the performers in advance; the acquisition module acquires facial expression image information of the performer; the conversion module is in communication connection with the acquisition module; converting the facial expression image information acquired by the acquisition module into character expression data; the first generation module is in communication connection with the conversion module and the creation module respectively; controlling the virtual character created by the creation module to demonstrate according to the character expression data obtained by the conversion of the conversion module to obtain the virtual character video data; the judging module is in communication connection with the transceiving module; judging whether the transceiver module receives the control instruction in the process of demonstrating the virtual role; the second generation module is in communication connection with the storage module, the conversion module and the creation module respectively; when the judging module judges that the transceiving module receives the control instruction in the process of demonstrating the virtual character, the virtual character created by the creating module is controlled to demonstrate according to the character expression data obtained by conversion of the converting module and the control parameter information corresponding to the control instruction and stored by the storage module, and the virtual character video data are obtained; the transceiver module is in communication connection with the first generation module, the second generation module and the acquisition module respectively; sending the virtual character video data obtained by the demonstration of the first generation module and the virtual character video data obtained by the demonstration of the second generation module to the acquisition module; the control parameter information comprises any one or more of action parameter information, prop parameter information, hair parameter information and background parameter information.
Compared with the prior art, the invention provides a method and a system for playing virtual roles, which at least bring the following technical effects:
1. the invention has lower requirement on hardware, does not need to be completed on a computer at a server level compared with other virtual technologies, and can generate virtual character animation on a common computer.
2. The live streaming data obtained by processing the virtual character and other audios and videos can be distributed to at least one target address to be played smoothly.
3. The invention adopts a multilink parallel transmission mode for transmission, can improve the transmission efficiency and ensure the real-time performance of live broadcast.
4. The invention can carry out virtual live broadcast without needing complex equipment worn by a user, complex matched hardware facilities and complex operation.
5. The invention edits the played virtual character video data and the related video data, and can improve the interactivity between the live broadcaster and the audience.
6. The live broadcast method and the live broadcast system have the advantages that the live broadcast is carried out by adopting the virtual roles, so that the interestingness is higher, the personal privacy of a live broadcast person can be guaranteed, and the use experience of a user is improved.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
Referring to fig. 1, an embodiment of a method for playing a virtual character according to the present invention includes: including camera, analysis ware and controller, the analysis ware respectively with camera with the controller communication connection includes the step:
s100, acquiring virtual character video data;
s200, processing the virtual character video data to obtain live streaming data;
s300, the live streaming data is sent to a target address in a preset transmission mode and played.
Specifically, in this embodiment, the virtual character and other audio/video can be processed to obtain live streaming data, and the live streaming data can be distributed to at least one target address for smooth playing. Meanwhile, the invention also directly obtains the virtual character video data, so that the virtual character and the program which are made by the producer can be played simultaneously on a common computer by multiple platforms. A user does not need to wear a large amount of equipment, and the operation is simple and convenient.
Referring to fig. 2, another embodiment of a method for playing a virtual character according to the present invention includes:
s100, acquiring virtual character video data;
s210, judging whether related video data are acquired from a local end or a network end; if yes, go to step S230; otherwise, go to step S220;
s220, processing the virtual character video data to obtain first direct-current data;
s310, the first direct-current streaming data are dispersed in different transmission links and are sent to a target address to be played in a parallel transmission mode;
s230, processing the virtual character video data and the related video data to obtain second live broadcast stream data;
s320, the second live streaming data are dispersed in different transmission links and are sent to a target address for playing in a parallel transmission mode;
the related video data comprises any one or more of audio data, video data, screen recording data and character data.
Specifically, in this embodiment, the related video data includes related video data and text information data obtained from chat software such as QQ, wechat, and the like, and game software such as bots, heros, and the like, and locally stored or cached related video data, and the like, and even the user may pre-enter the stored related video data and text data, and the like, according to the user's own needs. The screen recording data comprises but is not limited to recording image recording screens of operation processes, network teaching, software operation, courseware making and the like on screens of computers and mobile phones, recording screens of various game images of hero alliances, fire crossing wires, stove stone legends, magic animal worlds, tank worlds and the like, recording screens of online videos of love art, Yoku and the like, and recording screens of live videos, videos played by players, chatting videos of QQ videos, YY videos and the like. The video data includes, but is not limited to, a video downloaded directly from a network side or a video recorded by a user through a camera. The related video data are stored or cached from local, the acquired related video data are downloaded from a network terminal, and the like, and are fused with the virtual character animation of the live performer, so that the interest and the entertainment are increased. The live streaming data can be distributed in different transmission links through the server according to factors such as size, type, time, network transmission speed and the like, and directly sent to a plurality of live broadcast platforms such as a goby and a tiger in a multi-link parallel transmission mode for live broadcast. By integrating a plurality of various network links, the transmission of the live broadcast stream is carried out, the network bandwidth is utilized to the maximum extent, the transmission rate is improved, the timeliness and the fluency of the live broadcast stream are ensured, and the live broadcast guide flow is simplified. The data after being distributed are dispersed in different transmission links, and serial numbers are added for marking according to various factors such as size, time, type and network transmission speed, so that the fault location can be directly and quickly located and found out when the live broadcast fails or bad live broadcast content appears in the later period, the network management can conveniently manage the network live broadcast environment, and the network transmission information safety is improved.
Referring to fig. 3, another embodiment of a method for playing a virtual character according to the present invention includes:
s010 creates a virtual role corresponding to the performer in advance;
s020 obtaining facial expression image information of the performer;
s030 converts the facial expression image information into character expression data;
s040 controls the virtual character to demonstrate according to the character expression data to obtain virtual character video data;
s050 judging whether the virtual character receives a control instruction in the demonstration process; if yes, go to step S060;
s060 controlling the virtual character to demonstrate according to the control parameter information corresponding to the control instruction and the character expression data to obtain the virtual character video data;
s100, acquiring virtual character video data;
s210, judging whether related video data are acquired from a local end or a network end; if yes, go to step S231; otherwise, go to step S221;
s221, shunting the virtual character video data according to the transmission capability of the transmission link to obtain shunted data;
s222, adding a serial number mark to the shunted data to obtain first direct-current data;
s310, the first direct-current streaming data are dispersed in different transmission links and are sent to a target address to be played in a parallel transmission mode;
s231, distributing the virtual character video data and the related video data according to the transmission capability of the transmission link to obtain distributed data;
s232, adding sequence number marks to the shunted data to obtain the second live streaming data.
S320, the second live streaming data are dispersed in different transmission links and are sent to a target address for playing in a parallel transmission mode;
the related video data comprises any one or more of audio data, video data, screen recording data and character data. The target address includes a client address and a server address. The control parameter information comprises any one or more of action parameter information, prop parameter information, hair parameter information and background parameter information.
Specifically, in this embodiment, the virtual character of the performer can be created according to the preference of the user, and compared with the preset cartoon character, the virtual character of the performer has a great amount of control parameters such as actions, props, hairs, backgrounds and the like, which can be used by the user, thereby increasing the interest. The invention has lower requirement on hardware, does not need to be completed on a computer at a server level compared with other virtual technologies, can generate virtual character animation on a common computer, does not need a user to wear complex equipment, does not need complex supporting hardware facilities, and does not need to do complex operation, and can carry out virtual live broadcasting. The live broadcast stream data obtained by processing the virtual character and other audios and videos can be distributed to at least one target address to be played smoothly, and the live broadcast stream data is transmitted in a multi-link parallel transmission mode, so that the transmission efficiency can be improved, and the real-time performance of live broadcast is guaranteed. The invention edits the played virtual character video data and the related video data, can improve the interactivity between the live broadcast person and the audience, and has higher interestingness due to the adoption of the virtual character for live broadcast, and can ensure the personal privacy of the live broadcast person and improve the use experience of the user.
Referring to fig. 4, an embodiment of a system for playing a virtual character according to the present invention includes: the acquisition module acquires virtual character video data; the processing module is in communication connection with the acquisition module; processing the virtual character video data acquired by the acquisition module to obtain live streaming data; sending the live streaming data to a target address in a preset transmission mode; the playing module is in communication connection with the processing module; and receiving and playing the live streaming data sent by the processing module.
Specifically, in this embodiment, the virtual character and other audio/video can be processed to obtain live streaming data, and the live streaming data can be distributed to at least one target address for smooth playing. Meanwhile, the invention also directly obtains the virtual character video data, so that the virtual character and the program which are made by the producer can be played simultaneously on a common computer by multiple platforms. In addition, a user does not need to wear complex equipment, and the matching requirement of hardware facilities is not high, so that the hardware configuration cost is reduced, complex operation is not needed, and the operation is simple and convenient.
Referring to fig. 5, another embodiment of the present invention provides a system for playing a virtual character, including:
the device comprises a creating module, an acquisition module, a conversion module, a first generation module, a transceiver module, a storage module, a judgment module and a second generation module;
the receiving and sending module is used for receiving a control instruction and sending the virtual role video data;
the storage module is used for storing control parameter information corresponding to the control instruction;
the creation module is used for creating virtual roles corresponding to the performers in advance;
the acquisition module acquires facial expression image information of the performer; the conversion module is in communication connection with the acquisition module; converting the facial expression image information acquired by the acquisition module into character expression data;
the first generation module is in communication connection with the conversion module and the creation module respectively; controlling the virtual character created by the creation module to demonstrate according to the character expression data obtained by the conversion of the conversion module to obtain the virtual character video data;
the judging module is in communication connection with the transceiving module; judging whether the transceiver module receives the control instruction in the process of demonstrating the virtual role;
the second generation module is in communication connection with the storage module, the conversion module and the creation module respectively; when the judging module judges that the transceiving module receives the control instruction in the process of demonstrating the virtual character, the virtual character created by the creating module is controlled to demonstrate according to the character expression data obtained by conversion of the converting module and the control parameter information corresponding to the control instruction and stored by the storage module, and the virtual character video data are obtained;
the transceiver module is in communication connection with the first generation module, the second generation module and the acquisition module respectively; sending the virtual character video data obtained by the demonstration of the first generation module and the virtual character video data obtained by the demonstration of the second generation module to the acquisition module; the control parameter information comprises any one or more of action parameter information, prop parameter information, hair parameter information and background parameter information.
The processing module comprises: the device comprises a collecting submodule, a judging submodule, a first processing submodule, a second processing submodule, a first transmission submodule and a second transmission submodule;
the collection submodule acquires related video data from a local end or a network end;
the judgment submodule is in communication connection with the collection submodule; judging whether the collection submodule acquires related video data from a local end or a network end;
the first processing submodule is in communication connection with the judging submodule and the obtaining module; when the judgment sub-module judges that the collection sub-module does not acquire the related video data, the first processing sub-module processes the virtual character video data acquired by the acquisition module to obtain first direct-current data;
the first transmission sub-module is in communication connection with the first processing sub-module; the first transmission submodule disperses the first direct-current streaming data obtained by the first processing submodule in different transmission links and sends the first direct-current streaming data to a target address for playing in a parallel transmission mode;
the second processing submodule is in communication connection with the judging submodule, the collecting submodule and the obtaining module; when the judgment sub-module judges that the collection sub-module obtains the related video data, the second processing sub-module processes the virtual character video data obtained by the obtaining module and the related video data obtained by the collection sub-module to obtain second live broadcast stream data;
the second transmission sub-module is in communication connection with the second processing sub-module; the second transmission submodule disperses the second live streaming data obtained by the second processing submodule in different transmission links and sends the second live streaming data to a target address for playing in a parallel transmission mode; wherein the target address comprises a client address and a server address;
preferably, the first processing sub-module includes: the first shunting unit shunts the virtual character video data acquired by the acquisition module according to the transmission capability of the transmission link to acquire shunted data when the judgment submodule judges that the collection submodule does not acquire the related video data; a first tagging unit communicatively coupled to the first branching unit; adding a serial number mark to the shunted data obtained by the first shunting unit to obtain the first direct-current data;
the second processing sub-module comprises: the second shunting unit shunts the virtual character video data acquired by the acquisition module and the related video data acquired by the collection submodule according to the transmission capability of a transmission link to acquire shunted data when the judgment submodule judges that the collection submodule acquires the related video data; a second tagging unit communicatively coupled to the second offloading unit; adding a serial number mark to the shunted data obtained by the second shunting unit to obtain second live broadcast stream data;
the related video data comprises any one or more of audio data, video data, screen recording data and character data.
Specifically, in this embodiment, the creating module is used to create virtual roles corresponding to the performer in advance, determine whether a control instruction is input, and generate different virtual role video data according to the presence or absence of the control instruction. When the video is played, a user can watch the substantial audio and video data content contained in the video and can also watch virtual character images representing the emotion of people in the video when watching the video, so that the interactive form of the video is enhanced, and the watching experience of the user is improved. In the embodiment, the live streaming data can be obtained by processing the virtual character and other audio and video, and can be distributed to at least one target address to be smoothly played. Meanwhile, the invention also directly obtains the virtual character video data, so that the virtual character and the program which are made by the producer can be played simultaneously on a common computer by multiple platforms. A user does not need to wear a large amount of equipment, and the operation is simple and convenient. By integrating a plurality of various network links, the transmission of the live broadcast stream is carried out, the network bandwidth is utilized to the maximum extent, the transmission rate is improved, the timeliness and the fluency of the live broadcast stream are ensured, and the live broadcast guide flow is simplified. The data after being distributed are dispersed in different transmission links, and serial numbers are added for marking according to various factors such as size, time, type and network transmission speed, so that the fault location can be directly and quickly located and found out when the live broadcast fails or bad live broadcast content appears in the later period, the network management can conveniently manage the network live broadcast environment, and the network transmission information safety is improved. As shown in fig. 6, the present invention is an exemplary diagram of an OBS (open broadcast software) for video streaming, where the OBS is free and open source software aiming at live content of internet streaming media, and the OBS is very strong in live game and very good in video quality, and a generated file can be directly received by each large video website without special transcoding. The OBS occupies less resources, can only record the content of the browser, and can not record other things, and the similar game source effect is the same.
Referring to fig. 7, an example of a method for playing a virtual character according to the present invention includes: the system comprises a faceShift collector, a Unity controller, a Unity renderer, a video streaming setting transmitter OBS, an RTMP server and a live broadcast platform; the FaceShift collector, the Unity controller and the Unity renderer are all arranged on the same computer.
Unity drives the virtual character after acquiring data from the local address (127.0.0.1).
And the OBS transmits the data from the local screen recording to the RTMP server.
And the RTMP server broadcasts the data to each live broadcast platform.
Specifically, the example has lower hardware requirements, and compared with other virtual technologies, the method does not need to be completed on a server-level computer, and can generate virtual character animation on a common computer. Live streaming data obtained by processing the virtual character and other audios and videos can be distributed to at least one target address to be played smoothly, and a user does not need to wear complex equipment. After the user opens the virtual live broadcast software, the virtual live broadcast can be carried out without complex matched hardware facilities and complex operation.
Referring to fig. 8, another example of a method for playing a virtual character according to the present invention includes: the system comprises a faceShift collector, a Unity controller, a Unity renderer, a video streaming setting transmitter OBS, an RTMP server and a live broadcast platform; the Unity controller and the Unity renderer are arranged on the same computer, the FaceShift collector is arranged outside the computer and possibly arranged on another computer, and transmission is carried out through a network transmission mode and the like.
Unity and Faceshift are changed into LAN communication, thereby reducing the processing load of a single computer.
The Unity acquires data and drives the virtual character.
And the OBS transmits the data from the local screen recording to the RTMP server.
And the RTMP server broadcasts the data to each live broadcast platform.
Specifically, the embodiment can reduce the processing load of a single computer, accelerate the analysis and processing efficiency, save time, and enable live streaming data obtained by processing the virtual character and other audios and videos to be rapidly distributed to at least one target address for smooth playing.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.