I wouldn't necessarily intersect them with what is already there. I would give it its own section, named Custom Commands or something just like in the image. It would require an extra push of the Up or down button to get there though but I believe it is the simplest solution.
As for creating the menu, I think something similar to the way we create web gizmo views that way we could make some singular commands top level but also group multiple commands using nesting.
For the command 10006 MCC_CONTINUOUS
I could make a root item called Repeat and under that I could make three separate command items using that command for 1: off; 2: playlist; 3: song; 4: stop after each.
I don't think toggle commands would be so useful in this sense unless it can tell you what mode it toggles to.
Another area for concern would be users trying out commands such as 22008 MCC_SET_LIST_STYLE, that has no use while playing a video. I suppose some safeguards would have to be put in place to make sure if a user tries these commands that it would do nothing and the app wouldn't crash. Or if you could only use commands that were approved and would defiantly work while playing a video but that seems like to much extra work especially since you would always have to remember to test and place any new core commands on that list than letting a user use some logic as to what will work or not.