chman / moments Goto Github PK
View Code? Open in Web Editor NEWA quick GIF replay recorder for Unity
License: zlib License
A quick GIF replay recorder for Unity
License: zlib License
Hi,
first thank you for the nice featured encoder.
I encountered a strange timing problem on Nexus5x/Android O machine.
On it, the frame rate is recorded much faster. I looked into it and found the inaccurate use of unscaledDeltaTime. It was meant to use in Update/FixedUpdate/LateUpdate, not in OnRenderImage. Sometimes it matches roughly the actual time, but sometimes not.
I recorded Time.time and manually calculated the offset. This way, the problem is solved.
I have added the script on the camera but there is no gif recorded in Play mode, how can I record gif and where It will be saved.
How can I record Game view instead of Camera view,thank you
Hi, does it work on mobile platforms? iOS and Android?
Hi,
Thanks for this it's really nice, I'd like to know if you know a way to output mp4 instead of a gif?
At this moment I've sound as a wav file.
Regards,
Do you require a credit call out or anything like that? I noticed the License is BSD so anything goes but just wondering.
Is it possible to get the save status callback from the main thread (for updating UI, enabling game objects etc)
I tried from demo scene on Unity 5.5. This message came up in warning console after scene is played for 1 sec.
Tiled GPU perf. warning: RenderTexture color surface (320x198) was not cleared/discarded, doing <run with profiler for info>
Will this effect to performance during runtime?
It seems that the UI is not recorded in the gif? Is there a way to record the UI?
how to do ? in android
Assets\Moments Recorder\Scripts\Editor\MinDrawer.cs(30,31): error CS0104: 'MinAttribute' is an ambiguous reference between 'Moments.MinAttribute' and 'UnityEngine.MinAttribute'
I'm new to coding and got this issue while trying to open the Demo.
The gif's color seems like in 16-bit format. Is there any way to improve color's quality?
Is there any chance you could add a method to assign a transparent color? I'm having a hard time figuring out how to do it.
thank you so much sir for providing this kind of source code.
no one provide this kind of feature on internet for free
thank you so much agian but i have a question and that is ,
All things perfecly worked but i want to show a preview of recorded GIF after recording is done and GIF file created(like some game do that).
so how can i do that?
can you please tell me.
Hi!
I want to change the Record Time at runtime so i use Setup to set the buffersize, but it always gives me this error:
ArgumentException: Object type System.Single cannot be converted to target type: System.Int32
Parameter name: val
System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoField.cs:148)
System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/FieldInfo.cs:150)
Moments.ReflectionUtils`1[Moments.Recorder].ConstrainRange[Int32] (System.Linq.Expressions.Expression`1 fieldAccess, Single value) (at Assets/Moments Recorder/Scripts/ReflectionUtils.cs:78)
Moments.Recorder.Setup (Boolean autoAspect, Int32 width, Int32 height, Single fps, Single bufferSize, Int32 repeat, Int32 quality) (at Assets/Moments Recorder/Scripts/Recorder.cs:174)
RecordChromaController.SetRecorder () (at Assets/01_Scripts/App/RecordChromaController.cs:75)
RecordChromaController.Start () (at Assets/01_Scripts/App/RecordChromaController.cs:37)
This is what im doing:
m_Recorder.Setup(true, 720, 405, 15f, 4f, -1, 15);
Thanks!
It seems that, due to the usage of RenderTexture.active and having the resultant ReadPixel be "blit'd" from that, it's not possible to record just part of the screen?
I've tried using multiple cameras and changing the pixelRect to be cropped to the right part of the screen.. Is using RenderTexture necessary or is there a work around to this?
Changing the y coordinate of the ReadPixel after the RenderTexture.active source - instead of read pixel from that y coordinate, here is an example of what I mean - https://gyazo.com/5393dd53594368d117370377466cf102
This is possibly a feature request - or just, generally, whether you have any insights on saving the resultant gif locally in a directory that can be accessed on-device
Hello! It seems that there are some threading complications where bilinear scaling seems to only work on the first frame (by resizing each texture2d right before itβs added to the gif structure)
Do you have suggestions on resizing the gif?
This error and another error that says " Cannot convert method group OnProcessingDone' to non-delegate type
Action'." appear upon importing, preventing me from fully implementing the code.
I have been using Moments and it's great- thanks. But it's not creating a gif when running on my phone, only on pc.
I really don't understand what's wrong and there are no errors being created.
I guess this is the bit that has the issue:
private void startGifEncoding() {
InstructionsText.enabled = false;
WaitText.enabled = true;
FBButton.enabled = false;
GalleryButton.enabled = false;
_progressBarHolder.SetActive(true);
ProgressBar.fillAmount = 0;
_gifRecorder.OnPreProcessingDone += gifDone;
_gifRecorder.OnFileSaved += gifSaved;
_gifRecorder.OnFileSaveProgress += progressUpdated;
_gifRecorder.Save("GamePlayCapture");
}
Any help is gratefully received!
Assets\Editor\MinDrawer.cs(30,31): error CS0104: 'MinAttribute' is an ambiguous reference between 'Moments.MinAttribute' and 'UnityEngine.MinAttribute'
I dropped Moments Recorder folder is Assets folder, But i got all these errors, how can I fix these errors?
I have mentioned all the errors I am getting.
Assets\Moments Recorder\Scripts\MinAttribute.cs(28,22): error CS0101: The namespace 'Moments' already contains a definition for 'MinAttribute'
Assets\Moments Recorder\Scripts\ReflectionUtils.cs(31,15): error CS0101: The namespace 'Moments' already contains a definition for 'ReflectionUtils'
Assets\Moments Recorder\Scripts\Worker.cs(33,24): error CS0101: The namespace 'Moments' already contains a definition for 'Worker'
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(15,15): error CS0101: The namespace 'Moments.Encoder' already contains a definition for 'GifEncoder'
Assets\Moments Recorder\Scripts\Gif\GifFrame.cs(28,15): error CS0101: The namespace 'Moments.Encoder' already contains a definition for 'GifFrame'
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(21,15): error CS0101: The namespace 'Moments.Encoder' already contains a definition for 'LzwEncoder'
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(24,15): error CS0101: The namespace 'Moments.Encoder' already contains a definition for 'NeuQuant'
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(40,10): error CS0111: Type 'GifEncoder' already defines a member called '.ctor' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(52,10): error CS0111: Type 'GifEncoder' already defines a member called '.ctor' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(65,15): error CS0111: Type 'GifEncoder' already defines a member called 'SetDelay' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(74,15): error CS0111: Type 'GifEncoder' already defines a member called 'SetFrameRate' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(86,15): error CS0111: Type 'GifEncoder' already defines a member called 'AddFrame' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(125,15): error CS0111: Type 'GifEncoder' already defines a member called 'Start' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(149,15): error CS0111: Type 'GifEncoder' already defines a member called 'Start' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(167,15): error CS0111: Type 'GifEncoder' already defines a member called 'Finish' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(198,18): error CS0111: Type 'GifEncoder' already defines a member called 'SetSize' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(206,18): error CS0111: Type 'GifEncoder' already defines a member called 'GetImagePixels' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(226,18): error CS0111: Type 'GifEncoder' already defines a member called 'AnalyzePixels' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(249,18): error CS0111: Type 'GifEncoder' already defines a member called 'WriteGraphicCtrlExt' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(267,18): error CS0111: Type 'GifEncoder' already defines a member called 'WriteImageDesc' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(292,18): error CS0111: Type 'GifEncoder' already defines a member called 'WriteLSD' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(309,18): error CS0111: Type 'GifEncoder' already defines a member called 'WriteNetscapeExt' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(322,18): error CS0111: Type 'GifEncoder' already defines a member called 'WritePalette' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(332,18): error CS0111: Type 'GifEncoder' already defines a member called 'WritePixels' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(339,18): error CS0111: Type 'GifEncoder' already defines a member called 'WriteShort' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\GifEncoder.cs(346,18): error CS0111: Type 'GifEncoder' already defines a member called 'WriteString' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(129,10): error CS0111: Type 'LzwEncoder' already defines a member called '.ctor' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(137,8): error CS0111: Type 'LzwEncoder' already defines a member called 'Add' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(147,8): error CS0111: Type 'LzwEncoder' already defines a member called 'ClearTable' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(157,8): error CS0111: Type 'LzwEncoder' already defines a member called 'ResetCodeTable' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(163,8): error CS0111: Type 'LzwEncoder' already defines a member called 'Compress' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(242,15): error CS0111: Type 'LzwEncoder' already defines a member called 'Encode' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(251,8): error CS0111: Type 'LzwEncoder' already defines a member called 'Flush' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(261,7): error CS0111: Type 'LzwEncoder' already defines a member called 'MaxCode' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(269,15): error CS0111: Type 'LzwEncoder' already defines a member called 'NextPixel' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\LzwEncoder.cs(278,8): error CS0111: Type 'LzwEncoder' already defines a member called 'Output' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(80,10): error CS0111: Type 'NeuQuant' already defines a member called '.ctor' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(100,17): error CS0111: Type 'NeuQuant' already defines a member called 'ColorMap' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(121,15): error CS0111: Type 'NeuQuant' already defines a member called 'Inxbuild' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(187,15): error CS0111: Type 'NeuQuant' already defines a member called 'Learn' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(276,14): error CS0111: Type 'NeuQuant' already defines a member called 'Map' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(375,17): error CS0111: Type 'NeuQuant' already defines a member called 'Process' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(384,15): error CS0111: Type 'NeuQuant' already defines a member called 'Unbiasnet' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(398,18): error CS0111: Type 'NeuQuant' already defines a member called 'Alterneigh' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(440,18): error CS0111: Type 'NeuQuant' already defines a member called 'Altersingle' with the same parameter types
Assets\Moments Recorder\Scripts\Gif\NeuQuant.cs(450,17): error CS0111: Type 'NeuQuant' already defines a member called 'Contest' with the same parameter types
Assets\Moments Recorder\Scripts\MinAttribute.cs(32,10): error CS0111: Type 'MinAttribute' already defines a member called '.ctor' with the same parameter types
Assets\Moments Recorder\Scripts\ReflectionUtils.cs(35,10): error CS0111: Type 'ReflectionUtils<T>' already defines a member called '.ctor' with the same parameter types
Assets\Moments Recorder\Scripts\ReflectionUtils.cs(40,17): error CS0111: Type 'ReflectionUtils<T>' already defines a member called 'GetFieldName' with the same parameter types
Assets\Moments Recorder\Scripts\ReflectionUtils.cs(50,20): error CS0111: Type 'ReflectionUtils<T>' already defines a member called 'GetField' with the same parameter types
Assets\Moments Recorder\Scripts\ReflectionUtils.cs(55,12): error CS0111: Type 'ReflectionUtils<T>' already defines a member called 'GetAttribute' with the same parameter types
Assets\Moments Recorder\Scripts\ReflectionUtils.cs(61,15): error CS0111: Type 'ReflectionUtils<T>' already defines a member called 'ConstrainMin' with the same parameter types
Assets\Moments Recorder\Scripts\ReflectionUtils.cs(67,15): error CS0111: Type 'ReflectionUtils<T>' already defines a member called 'ConstrainMin' with the same parameter types
Assets\Moments Recorder\Scripts\ReflectionUtils.cs(74,15): error CS0111: Type 'ReflectionUtils<T>' already defines a member called 'ConstrainRange' with the same parameter types
Assets\Moments Recorder\Scripts\ReflectionUtils.cs(81,15): error CS0111: Type 'ReflectionUtils<T>' already defines a member called 'ConstrainRange' with the same parameter types
Assets\Moments Recorder\Scripts\Worker.cs(53,17): error CS0111: Type 'Worker' already defines a member called 'Start' with the same parameter types
Assets\Moments Recorder\Scripts\Worker.cs(58,8): error CS0111: Type 'Worker' already defines a member called 'Run' with the same parameter types
Assets\Moments Recorder\Scripts\Recorder.cs(51,20): error CS0121: The call is ambiguous between the following methods or properties: 'MinAttribute.MinAttribute(float)' and 'MinAttribute.MinAttribute(float)'
Assets\Moments Recorder\Scripts\Recorder.cs(54,20): error CS0121: The call is ambiguous between the following methods or properties: 'MinAttribute.MinAttribute(float)' and 'MinAttribute.MinAttribute(float)'
Assets\EasyMobile\Scripts\Modules\GIF\Recorder.cs(79,26): error CS0121: The call is ambiguous between the following methods or properties: 'MinAttribute.MinAttribute(float)' and 'MinAttribute.MinAttribute(float)'
Assets\EasyMobile\Scripts\Modules\GIF\Recorder.cs(83,26): error CS0121: The call is ambiguous between the following methods or properties: 'MinAttribute.MinAttribute(float)' and 'MinAttribute.MinAttribute(float)'
Assets\Moments Recorder\Scripts\Recorder.cs(63,20): error CS0121: The call is ambiguous between the following methods or properties: 'MinAttribute.MinAttribute(float)' and 'MinAttribute.MinAttribute(float)'
Assets\Moments Recorder\Scripts\Recorder.cs(69,20): error CS0121: The call is ambiguous between the following methods or properties: 'MinAttribute.MinAttribute(float)' and 'MinAttribute.MinAttribute(float)'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.