Wash the whole peppers and eggplants, dry them, and roast them in the oven or any other way preferred. Rotate them often and make sure they don't burn. Put the roasted vegetables in a container, cover them with a plastic bag, and let them steam for about 15-20 minutes, or longer. Remove cores, seeds, and skin from the peppers. Also, remove the top of the eggplants and peel the skins.
Leave the vegetables on a colander or in a hanging cheesecloth, preferably overnight, to drain really well. The next day, grind the peppers and eggplants in a meat grinder. That way, you'll get the best texture of veggies.
To start cooking ajvar, add some oil to cover the bottom of the pot, and then the ground vegetables. Stir constantly on medium-high heat, and add 2-3 dcl of oil every 20 minutes.
After about an hour, add minced garlic. You don't have to add everything at once, add it gradually and taste it in the meantime. Adjust to your taste.
In the last 30-45 minutes of cooking, start adding salt little by little. Add vinegar and hot peppers in the last 15 minutes or so. You can also add sugar towards the end if you feel that the ajvar lacks a little sweetness.
Ajvar is done after 2 to a maximum of 3 hours of cooking, i.e. when you can see the bottom of the pot when you run it through the wooden spoon. When it's cooked, put it in hot sterilized jars, and close them immediately. The rims of the jars can't be dirty; if they are, clean them with a kitchen towel. Let the ajvar cool completely.
Store it for up to a year in a cool and dark place.