

- Ffmpeg library video frame rate how to#
- Ffmpeg library video frame rate software#
- Ffmpeg library video frame rate license#
It includes libavcodec, an audio/video codec library.
Ffmpeg library video frame rate software#
In conclusion, I actually quit implementing this because I was running out of time till our product releasing date.FFmpeg is a free software project that creates libraries and programs to handle multimedia data. Sorry, this may not help you much, but I wish you can complete this and teach me how.Īsk me any question, I will try my best to answer. To me the audio frame was a nightmare and I gave up here. Then you have to deal with tons of issues like frame rate, audio frame, buffer, synchronization between video and audio. For video frame, you can continuously paste the frame texture to a Image component to play movie.
Ffmpeg library video frame rate how to#
For how to use ffmpeg library, this site gives a good tutorial: įirst, I have struggled with Unity's limitation of updating GUI in main thread, so what I ended up to solve this was to have FrameCallback(.) to receive frames from native code (ffmpeg implementation) and GetFrame(.) as the trigger. Unfortunately I can't share ffunity.cpp at this point, but it uses lots of ffplay's implementation. It's too complicated to explain every step I have done, but I can give a simple idea I tried.īasically you need to develop a c++ native dll which uses ffmpeg library to implement your player's back-end (I call ffunity lol), and Unity side as the front-end. And pay particular attention if you intend to static-link FFmpeg (as opposed to dynamic linking with DLLs)Ĭlick to expand.In conclusion, I actually quit implementing this because I was running out of time till our product releasing date.
Ffmpeg library video frame rate license#
If you get FFmpeg sources, you can recompile it using LGPL license (this process will exclude some codecs, of course) which is not as viral as GPL, but you still have some requirements to fullfill, in order to be 100% compliant with the license. "Billboarding" of the plane and some aspect-ratio fixing are easily done on the c#/Unity side as well.ītw, did anyone notice that, if you don't recompile it with the right flags, FFmpeg is GPL? That means that if you use it, your whole projects must be GPL'ed and that might not be a viable solution for many project, particularly commercial ones. Then I wrote a c# wrapper for this player framework, and I use it in Unity passing as a parameter the Unity plane and texture I wanna use as a projection screen. It can deal with dx11, dx9 and openGL texture, since Unity can use one of these three libraries and each one has a different way of giving you access to texture data. What I did is: I created my video player framework in c++, it uses ffmpeg and is able to decode video/audio, manage timing, and blit frame data to texture memory. I think directly using a c# wrapper around ffmpeg's api it's not the best way, it is way too complicated and involves a LOT of marshalling, dealing with structs and so on. I have a working prototype of Unity/FFmpeg integration for a video player but unfortunately I cannot share details and/or source right now. I would love to view some opinions and suggestions. I am not sure if anyone else has tried something like this. This doesn't make sense because ffmpeg.exe loads properly and doesn't throw a tantrum. Is there a problem with dlls loading other dlls?Īre there dependencies that are not being loaded? Checked this out in dependencywalker it shows ieshims.dll as not loading. Here are some issues I am not sure about: The function exported from the dll is invoked without any hiccups. I wrote my own little dll for experimentation and compiled it with the cc -shared compiler directive.

This leads me to believe that the problem is not with the dll opening but when the dll loads there might be something going wrong. However with avcodec I get DllNotFoundException.

If I try to load a dll that doesn't exist in the plugins directory (example: mydll.dll), I get a DllNotFoundException mydll. In fact there are two different logs I see. However this is where I face the probelms.

I then use the DllImport("avcodec") to import the functions. Here are the steps I am using for this.ġ) Downloaded the latest version of ffmpegĢ) configured using -enable-shared and -enable-staticģ) copied all the dlls from ffmpeg to Assets/Plugins I am trying to integrate ffmpeg into unity using the platform invoke on C#.
