You can encode a DNxHR video with MWriter and MFWriter objects. For this, you should use a configuration like this:
format='mov_dnxhd' video::codec='dnxhd' video::profile='dnxhr_lb' play_while_rec='false'
As you see, this is a similar configuration to a DNxHD video.
Note, you should disable play_while_rec mode (play_while_rec='false') - during encoding of DNxHR video you can't playback the growing file. Let us know if this feature is necessary for you.
Make sure that you use a 4K source for encoding and that you follow the DNxHR Bandwidth Specifications.
Possible values for "profile" attribute:
- dnxhr_lb - DNxHR LB - Low Bandwidth (8-bit 4:2:2)
- dnxhr_sq - DNxHR SQ - Standard Quality (8-bit 4:2:2)
- dnxhr_hq - DNxHR HQ - High Quality (8-bit 4:2:2)