Giter Site home page Giter Site logo

moments's People

Contributors

chman avatar foobraco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moments's Issues

Demo does not work on 2020.2

Unity_2021-10-01_12-58-39
Unity_2021-10-01_12-58-31
After i play the demo, it seems like the recorder is functioning, but when i press save, it just gives me this warning.

OnRenderImage's unscaledDeltaTime usage is inaccurate

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.

How to record and save gif

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.

Output mp4 instead of Gif

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,

Credits?

Do you require a credit call out or anything like that? I noticed the License is BSD so anything goes but just wondering.

MinDrawer script issue

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.

low color quality

The gif's color seems like in 16-bit format. Is there any way to improve color's quality?

Transparency

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.

Preview of Recorded GIF

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.

Error doing Setup()

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!

Recording just part of the screen

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

Resizing gif

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?

not working on a phone

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!

MinAttribute is an ambiguous reference

Assets\Editor\MinDrawer.cs(30,31): error CS0104: 'MinAttribute' is an ambiguous reference between 'Moments.MinAttribute' and 'UnityEngine.MinAttribute'

Console Errors

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)'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.