Yes, we can. I realize that this was a difficult question because the solution was not well documented, or atleast not easy for me to find. Much digging, testing, and building from source led me to
https://github.com/ZoneMinder/ZoneMinde ... 229cfb7926 line 435. You can pass a value such as "flv/libx264" in MPEG_LIVE_FORMAT. The code in zm_mpeg.cpp will split the MPEG_LIVE_FORMAT value at the "/" and use "flv" as the format and "libx264" as the codec. This also applies to webm and any other format that may benefit from specifying a codec. I tested "webm/libvpx" for vp8 and "webm/libvpx-vp9" for vp9, although I would not use webm because it seems to cause an extremely high cpu load on my server.
Comparing the different streams by opening them with VLC and monitoring the server cpu usage with htop -u www-data, I have found that for the one particular stream I am testing the cpu load, in order from best to worst when it comes to hogging server resources: mjpeg = 0.8%, flv or flv/flv = 1.1%, swf = 1.1%, flv/libx264 = 3.8%, ogg= 4.2%, webm or webm/libvpx = 10%, webm/libvpx-vp = 75% . Still unable to get any type of mp4 stream to work at this point.