Yesterday I decided to put the new laptop through its paces with some complicated video work – just to see how well it performed.
I have a couple of collector’s item DVDs in my collection, and I’ve been wanting to do some fancy video processing on them like cleaning up the NTSC noise, doing some timing work, and upscaling them to 1080p. The M1 Max CPU in my laptop is, in theory, just the right tool for the job.
I started off the evening with a simple transcode of a ‘standard definition’ DVD to H264 using my external USB DVD reader/writer just to see if it was possible… See, even though DVD is basically a dead format at this point, I still need to contend with things like DRM and most of the really good utilities for this aren’t exactly ARM-native code.
It turns out that my old standby, HandBrake, has a beta for an ARM-native version, so I gave that a whirl.
The first pass was a simple read of the stream from the DVD, upscaling it to 1080p with a selection of deblocking and NTSC filters, and writing it out to the laptop’s drive as an H264 file in an MKV container.
It did this at about 116 frames per second, which is about four times the regular playback speed.
Impressive, but I didn’t manage to push the CPU past 30% while doing this; something was being a bottleneck… And that something was the USB2 DVD rom.
So for my next test I ripped the movie from the DVD to a single MPEG2 A/V stream on the local SSD using VLC, then ran HandBrake against that with the above upscaling and filter configuration…
It transcoded a 1 hour and 29 minute movie in 4 minutes 14 seconds.
This actually managed to push the processor in the laptop; it did in fact get warm and the fans came on… Not that I could hear the fans mind you, I just got an indication of their RPM changing from zero in Sensei.
Okay, so Apple wasn’t kidding – this thing is fast. So – what else can it do?
I’d recently spotted some development code someone was working on that did machine-learning interpolation of video to upscale the frames per second by adding ‘tweening’ between frames. What this does is dramatically smooth out the motion of the video using “AI”, but it would require getting under the hood a bit in MacOS.
So, I spent an hour or so carefully massaging things to get the interpolation code to run and, it worked! Until it didn’t and my laptop kernel panicked…
The resultant force-reboot and subsequent attempt by MacOS to ‘fix’ what I’d done cratered the OS. Luckily, TimeMachine was available to save the day.
At about 11pm I had the Laptop back up and running from the 5pm snapshot and everything seems okay.
I think I’ll wait a bit before trying the frame interpolation code again. 🙂
Listening to "Hysteria" by Def Leppard