We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

3D window screen recording

Home Forums Programming 3D window screen recording

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #78767
    deconstruction
    Customer

    Hello 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

    #78768
    deconstruction
    Customer

    Maybe 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’

    #78770
    domjasper
    Customer

    I 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.

    #78787
    deconstruction
    Customer

    Hm. This is interesting. I thought it might be difficult, but not that much.

    Thank you

    #78794
    kdv
    Participant

    were 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.

    #78796
    domjasper
    Customer

    Hi 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!

    #78797
    kdv
    Participant

    Would you be open to working with me to implement your screen recording system into my project?

    Yes :yes:
    kdv [at] izh [dot] com

    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.

    #78801
    domjasper
    Customer

    Emailed :)

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.