Home › Forums › Programming › 3D window screen recording
Tagged: video recording
- This topic has 7 replies, 3 voices, and was last updated 3 months, 1 week ago by
domjasper.
-
AuthorPosts
-
2024-11-15 at 4:18 am #78767
deconstruction
CustomerHello everyone. I have a question regarding recording video inside a 3D window.
I have connected a script to the project that creates a window recording with my 3D model, and after its ends saves the recording to the computer. However, the final file format is “webm”. When I change the output format inside the script to “mp4”, the file crushes.
This is my current screen record script.
function runCode(app, puzzles) {
const type = v3d.Detector.checkIOS() ? ‘video/mp4’ : ‘video/webm;codecs=avc1’
const stream = app.renderer.domElement.captureStream()
const recorder = new MediaRecorder(stream, { mimeType: type })recorder.addEventListener(‘dataavailable’, function (e) {
const link = document.createElement(‘a’)
link.href = URL.createObjectURL(e.data)
link.download = ‘video.webm’
document.body.appendChild(link)
link.click()
URL.revokeObjectURL(link.href)
link.remove()
})const recordBtn = parent.document.getElementById(‘recordBtn’)
recordBtn.addEventListener(‘click’, function () {
if (recorder.state == ‘inactive’) {
setScreenScale(1)
setTimeout(function () {
recorder.start()
}, 100)
recordBtn.classList.add(‘stopped’)
} else if (recorder.state != ‘inactive’) {
recorder.stop()
recordBtn.classList.remove(‘stopped’)
}
})function setScreenScale(factor) {
app.renderer.setPixelRatio(factor)
if (app.postprocessing) app.postprocessing.composer.setPixelRatio(factor)
app.onResize()
}
}What can I change here?
Thanks in advance for your answer
2024-11-15 at 4:23 am #78768deconstruction
CustomerMaybe i need to change the second line to this? But i tried this and nothing changes
const type = v3d.Detector.checkIOS() ? ‘video/mp4’ : ‘video/mp4;codecs=MPEG-4’
-
This reply was modified 3 months, 1 week ago by
deconstruction.
2024-11-15 at 5:28 am #78770domjasper
CustomerI have gone down a deep rabbit whole on this. Tried hiring two different developers, one freelancer and another agency. Both of whom were not able to get a good quality screen recording downloaded as an MP4.
As far as I know it is impossible to record and download an MP4 with good quality client side.
There are a few alternative solutions, such as using a server, or an API, but it will cost you.
I wish there was a solution as it is critical to my application. If there are any developers here who have already built this functionality I will pay you to install in on my file.
2024-11-15 at 6:08 am #78787deconstruction
CustomerHm. This is interesting. I thought it might be difficult, but not that much.
Thank you
2024-11-15 at 10:00 am #78794kdv
Participantwere not able to get a good quality screen recording downloaded as an MP4.
Why not? It’s quite possible…
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-11-15 at 10:07 am #78796domjasper
CustomerHi kdv,
That’s pretty damn impressive. I don’t have the technical know how to explain why not, but the team I hired were not able to. Would you be open to working with me to implement your screen recording system into my project? I have a budget set aside for this.
Thank you!
2024-11-15 at 10:12 am #78797kdv
ParticipantWould you be open to working with me to implement your screen recording system into my project?
Yes
kdv [at] izh [dot] comPuzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-11-15 at 10:22 am #78801domjasper
CustomerEmailed :)
-
This reply was modified 3 months, 1 week ago by
-
AuthorPosts
- You must be logged in to reply to this topic.