Is screen recording unavailable at macOS arm architecture?

I tried to activate screen recording at my M1 (arm architecture) Mac but no video files were saved. I followed the OpenRNDR guide at ScreenRecorder.

Then I found this code snippet at build.gradle.kts:

val openrndrFeatures = setOfNotNull(
    if (DefaultNativePlatform("current").architecture.name != "arm-v8") "video" else null
)

Does it mean that exporting videos at macOS arm architectures is unavailable?
If yes what is the reason (in short :wink: and is there a way to enable it?

Thanks

Hi :wave: Welcome to the forum :slight_smile:

Video should work with M1 processors. Is there no video folder showing up in your project? You could also try with the next-version branch of the openrndr-template, it’s more up-to-date.

Is there any information in the IDE output window when you run your program? Is there an ffmpegOutput.txt file at the root of your project?

:four_leaf_clover:

Thank you for welcoming me in the forum :smiley:

Sounds great that video should work with M1 processors.

The video folder did not appear so I created it manually but it stays empty. Also there is no ffmpegOutput.txt anywhere.

My recording code looks like this:

val recorder = ScreenRecorder().apply {
    outputToVideo = false
}

extend { recorder }

and

keyboard.keyDown.listen {
    when {
        it.key == KEY_ESCAPE -> program.application.exit()
        it.name == "v" -> {
            recorder.outputToVideo = !recorder.outputToVideo
            println(if (recorder.outputToVideo) "Recording" else "Paused")
        }
    }
}

ffmpeg is installed locally:

$ which ffmpeg
/opt/homebrew/bin/ffmpeg

Information at the IDE output window:

/Library/Java/JavaVirtualMachines/zulu-21.jdk/Contents/Home/bin/java ...
 INFO [main] o.o.i.g.ApplicationGLFWGL3      β†˜ 3.4.0 Cocoa NSGL Null EGL OSMesa monotonic dynamic
 INFO [main] o.o.Application                 β†˜ no preload class found 'org.openrndr.Preload'
2024-09-25 12:05:47.639 java[22276:1022321] +[IMKClient subclass]: chose IMKClient_Legacy
 INFO [main] o.o.i.g.ApplicationGLFWGL3      β†˜ OpenGL vendor: Apple
 INFO [main] o.o.i.g.ApplicationGLFWGL3      β†˜ OpenGL renderer: Apple M1 Pro
 INFO [main] o.o.i.g.ApplicationGLFWGL3      β†˜ OpenGL version: 4.1 Metal - 89.3
Recording
Paused

Process finished with exit code 0

Any suggestions?

I think the issue is a simple evil typo :smiling_imp:
Evil because there is no error.

// does nothing
extend { recorder }

// does something
extend(recorder)

The first option is equivalent to extend( { recorder } ), so you are accidentally passing as an argument a function that returns recorder instead of recorder itself.

I hope changing those brackets fixes the issue :slight_smile:

Wow, using the right brackets helped :crazy_face:

Now I get a video file.

Thank you very much, @abe !

1 Like