The first two articles generally introduce AVI and its simple use. Here to add two functions this is the most video player will use the function, but AVI to the two parameters hidden very deep, in order to facilitate the use of this place I directly on the code, what you can go to see the gaze. Note that the two functions are placed inside the MoviePlayer class, such as the following code:
<summary>///Get Video Total duration///</summary>// <returns></returns> Public Float Getlastvideotime () { if (movie = = null) return 0.0f; return movie.demux.videoStreamInfo.lengthSeconds; } <summary>/// Get Total video frames///</summary>// <returns></returns> public int Getlastvideoframe () { if (movie = = null) return 1; return movie.demux.videoStreamInfo.frameCount; }
Okay, let's go on. avi Video Conversion mode, AVI player with playmaker actions this plugin we are able to roughly understand from the name, this is a plugin specifically for playing AVI format, But suppose you think it's easy to use a format factory or other format conversion tool so you're wrong.
Because I have already used such a method. Using the format factory to convert video from MP4 format to AVI format after the name changed to bytes format is not feasible. So let go of your teasing idea!
Avi Plugin has two self-formatted conversion mode, then where to put it? At the beginning I also looked for a long time later or read the code to know where, no nonsense direct film. For example, as seen in:
Can be seen here, AVI provides two ways to convert the format. Here I am temporary I will only be the first way. Another way of conversion will appear error, I also went to check the foreign information temporarily has not found a way to solve, assuming someone used the words of trouble to teach me how to use it ~
Next we'll talk about the first conversion format. We see what this means when the parentheses are written (Uses FFMPEG). In fact, the author gave us a hint, you go to Baidu and Google will find FFmpeg is a video into streaming audio and video , we first point to see what this interface, what we see:
Note If the FFmpeg red box position is not configured correctly, it will prompt red and prompt you for missing ffmpeg. So we are going to configure the FFMPEG environment, we first download its compression package. Website address: Click to open the link
Then unzip to the disk you want to place, here I put in the D disk Begonia folder, see:
Then I went down and set the path of the ffmpeg in the environment variable inside the path. Note here that the path moves to refer to the bin file. Broadly for example with what is seen:
Then we execute CMD with administrative identity. Enter the command "Ffmpeg–version". Assume that the indication that you see appears successfully installed:
Then we go back to Unity3d and continue with the video conversion, assuming that the FFmpeg configuration form will look like the previous one, assuming the actual red error. Then you have to launch Unity3d again open the project error will disappear, the way is quite simple here is not detailed, I simply say the general use of the method can be. Let's go ahead and see what we have, what we see:
InFile is the location of your video. The outfile is the video position after the output conversion. Video is the beginning of the setting of the screen properties, to note that the video resize this is set to the screen size, the default is according to the original video screen size output, audio Beginning is the sound property settings, the following two properties to see the picture, see:
This is the CMD control statement, which means that you will be able to write the video output properties yourself ffmpeg.
The next two properties look at English in general will be clear what meaning. So we don't say, the last button just runs the button. To here AVI video conversion basically finished.
Next we talk about FFmpeg chicken, assuming it is not this chicken is expected I would like to use this plugin.
This ffmpeg conversion video is basically no way to use it. Why? Due to the size of the video conversion is amazing, I a 2 minutes MP4 format video conversion turned out to be 1G more than the original video 6M about, my heart suddenly all kinds of grass mud horse, and then I slowly debug compression in the case of not affecting the quality of the situation also to 132M, mainly video The resize affects the size of the video, and the rest of it doesn't have much impact, assuming I can soar to 4G with 1920x1080 's video quality. There is no way to use the phone!
Anyway, our company's broken computer can not run, and is only a 2-minute video, I really do not know how the AVI author, maybe the second way of conversion will not exaggerate it. These are not very clear, I will tell you the first time when I find the second conversion mode.
Suppose that the great God has ffmpeg specific uses and compression methods. My little brother here knelt for advice ~ ( Suppose or doubt can private messages me .) Suppose I would have helped you to solve the problem.)
Said before to release all the playback plug-in. I almost forgot. Link: http://pan.baidu.com/s/1qYFxwZy password:kfav
Read the full text of the copyright notice: This article for Bo Master original article, without Bo Master agreed not to reprint.
Report
- This article has been included in the following column:
4Article comments
-
-
-
Related articles recommended
-
The initialization process using the FFmpeg library is preceded by a code fragment (but fragment): int main (int argc, char **argv) {.... avcodec_register_all (); Av_regis ...
- Relar
- 2014-03-21 09:53
- 1132
-
UNITYVR Video reprint: http://blog.csdn.net/yechen2320374/article/details/52121036 demand: The project needs in VR equipment (HTC Vive, Pico, small pi ...)
- qq_15807167
- 2016-08-20 19:06
- 1340
-
Data Structure Learning notes (a) dual list management applications in the game inevitably need to create a dynamic monster, the death of the time to destroy it, this is a monster's life process cycle. Assuming that in accordance with the general game design, to a certain time on the monster refresh, assuming that each time a dynamic new monster out, death ...
- Begonia__z
- 2016-08-31 20:40
- 209
-
C # Garbage collection a few days ago there was a very interesting question in the technology group. I want to write out to help my thoughts. Help newcomers to C # for a simple explanation of memory management. What is the garbage collection mechanism, for students who have not learned C + + may not know, because C # and there is no so-called resource release ...
- Begonia__z
- 2017-04-15 11:32
- 294
-
AVI player with playmaker actions playback plug-in (a) the recent company is ready to take a project is to use the player. And this player also needs to be used on the mobile side. The unity3d inside is capable of playing video, but there is no fast forward and backward function.
So Unity3d player plug-in is really a lot of people have used the big ...
- Begonia__z
- 2016-04-15 17:56
- 2325
-
Avi player with playmaker actions use Ugui to display video and control play video (ii) previous we introduced the AVI MoviePlayer Properties panel. I don't think I can see anything. You may think that these are not God horse eggs, just can say that everyone has their own way of looking at the code and hobbies, like I generally like to study from the properties panel, not to mention the far ...
- Begonia__z
- 2016-04-18 14:05
- 2530
-
AVI player with playmaker (Unity Video Player plugin) 1 unity itself also has a set of video-broadcast APIs, using Movietexture. Today I share with you the unity of a better video player plug-in, since it is a plugin. Then there will definitely be some calling interfaces left. So this article is mainly to tell ...
- qq_15267341
- 2016-08-27 09:14
- 629
-
AVI Player with playmaker actions video conversion format Duplicate frame remover (iv) just started to use this plugin has been unable to find duplicate frame remover video Conversion Mode error problem, Yesterday I carefully looked at this plug-in duplicate frame remover conversion form found a place ...
- Begonia__z
- 2016-04-22 11:56
- 614
-
Learning Notes (i) MySQL + kbengine-0.8.2+u3d_demo specific build process personal records recently inadvertently learned that Kbengine is an open source and a service that supports U3D. Meng Xin my fart to run to kbengine.org official site to see how to build a server out, because I did not learn MySQL, so spent a lot of time to correct ...
- Begonia__z
- 2016-04-14 18:40
- 2144
-
Unity3d Learning Diary (iii) Bezier curve there are so many little partners here who may not know what the Bezier curve is. Suppose you used the PS pen function to know what this is, assuming still do not know what it is then say a game you know the "Angry Birds" this game with the slingshot effect can be achieved with this Bezier curve. I don't know ...
- Begonia__z
- 2016-04-20 11:44
- 1549
-
-
Bě9oniǎ 's Blog + attention
-
Original
-
-
Fans
-
7
-
Like
-
0
- Go Learning Diary (ii) Visual Studio Code Go plugin configuration
- Go Language learning Diary (i) configuring the Go language in a Windows environment
- C # garbage collection mechanism
- Unity3d Vuforia problem when you get off the card
many other articles
Online Courses
-
-
"Live" machine learning & Data Mining 7 weeks training--Wei Chi
-
-
"Package" System integration projects management project Manager smooth clearance--Xu Bong
- folder
-
- like to cancel like
- Collection
- share Weibo QQ
Collection Assistant Bad news report