-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process Video Locally Infragram.org #421
Conversation
Thanks for opening this pull request! This space is protected by our Code of Conduct - and we're here to help. |
Hi! I hope to have a chance to give this a thorough read through in the next day, but I wonder if the camera start bug has to do with having to wait until it's initialized; there may be a need to listen for the right event? |
processor: 'webgl' | ||
}); | ||
|
||
openInPl = function openInPl() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should move this into a shareable .js file or into the library itself... Just an idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please help me with more details on this file. I can't seem to find a file named sharable.js in the infragram directory , I am somehow confused on the mentioned library. Please for some detail on this idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I'm typing from phone, I just meant a separate js file we can include into the different html files... A shareable file. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Noted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you
index3.html
Outdated
<br style="clear:both;" /> | ||
|
||
</div> | ||
<div id="localVideoControls" style="display:none;"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So let's clearly label and explain these to @stephaniequintana who may be soon integrating this code into the new UI!
dist/infragram3.js
Outdated
@@ -0,0 +1,2213 @@ | |||
isVideo = false,isCamera=false; // Turns off camera feed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok! Did you make changes to a copy of dist/infragram.js? So what may be better is to look where in /src/ you want to make the changes, and do them there... Then they'll generate a new dist/infragram.js when we run grunt build
. Does that make sense? It compiles the code into /dist/. @cesswairimu or @TildaDares both have experience with this too! No worries we'll help if it doesn't make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes the grunt build
command makes sense, thank you.
Hi @Forchapeatl - i wanted to try to help you pull apart the new code you've added to the What I'm going to try to do is comment on each section and point to where those changes could be made in the /src/ directory. Let's try to make the changes there! |
OK - it's not too complex - there are about 6 or so sections which need to be copied into corresponding code in If you make those changes in the |
okay @jywarren ,thank you |
Set "Id" on Webrtc video ELement
- Included logic to process video locally - Included logic for video controls (loop/mute/pause/play and seek)
Hello @jywarren , @cesswairimu , @TildaDares the code base has been structured as requested on https://github.com/publiclab/infragram/pull/422/files?diff=unified&w=1 |
This looks excellent @Forchapeatl -- can you run |
No rush as it's very late here so I won't get to it until tomorrow. Congrats on the changes, they were complex! |
Thank you, @jywarren |
Hi @Forchapeatl I didn't see the dist files added again, just wanted to check if you needed any help? |
Hello @jywarren , all is well with grunt. This PR functionality is a bit limited / buggy . Please I will include the dist file once I am done with these limitations / bugs.
Please permit me redirect you to another PR #427 |
No problem, but I think the 10MB might be a tough one - i'm not sure how you're storing it but if it's in localStorage, there is a hard JS limit on how much can be stored. If you think it's a big issue, we could push people into the workflow of recording on their device, then uploading the recording and converting it, rather than recording live within the website. What do you think? So people would upload a video file in the same way as they would have uploaded a still image. @stephaniequintana also curious what you think about that workflow as an alternative. It could be simpler and could sidestep some of these issues? |
Oh darn i'm being silly - this is a prerecorded video, and you're just saying that there was a 10mb limit to the processing of that "upload" - but was my idea correct that it was due to a localStorage file size limitation? |
I want to say that we have processed larger images in https://github.com/publiclab/image-sequencer/ or https://github.com/jywarren/webgl-distort/ - I could be wrong, but I think we were just keeping such larger amounts of data in memory, or in the HTML DOM itself. Where is the 10mb limit happening? |
src/ui/interface.js
Outdated
localVideo.style.display = "none" | ||
localVideo.style.width = "100px"; | ||
localVideo.style.height = "50px"; | ||
document.getElementById("video-container").appendChild(localVideo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like everything is happening in the DOM here. Did you get a particular error you can share?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/publiclab/infragram/blob/Forchapeatl-patch-1/src/Infragram.js#L38-L39
Sorry about the mix up @jywarren . I meant that HD videos have a slower frame rate transition on the Infragram canvas.
For example, HD video makes better frame transitions with the below settings
if (options.processor.type == "webgl") interval = 1;
else interval = 15;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, ok! What did you think about making this driven by frame conversion completion instead of interval?
Video Processing works now works without clicking the webcam button. ad91639c-8660-4214-9962-ce3025b8bad1.mp4 |
Wow excellent! @Forchapeatl how are you thinking in terms of what should be ready to merge next? Thank you! |
You 're welcome @jywarren |
Ok no worries and great to see the other pr! My internet isn't great here
so I hope to review tomorrow. If you can get some feedback from another
mentor or a fellow intern before then that's great too!
…On Sat, Jun 25, 2022, 7:54 PM FORCHA ***@***.***> wrote:
Hello @jywarren <https://github.com/jywarren> , all is well with grunt.
The functionality is a bit buggy . Please I will include the dist file once
I am done with these bugs.
Video processing works only after camera has been on.
Accommodate large video files > 10MB.
Permit me redirect you to another PR #427
<#427>
—
Reply to this email directly, view it on GitHub
<#421 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J6TKV4D7DQGFPYLAPTVQ4FRXANCNFSM5ZG7WCCA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Process Video Locally
Fixes #418
found at https://forchapeatl.github.io/infragram/index2.html
a2a4f5d9-4f0d-4496-af2b-11858bdb12a8.mp4
TEST RESULTS
Passed Test cases
Failed Test cases
Hello @jywarren @TildaDares @stephaniequintana
The demo video is processed locally , but it might take a while for the video to load up the github page
It seems to work only after camera has been turned on.This bug is taking a while.
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
@publiclab/reviewers
for help, in a comment below