So, i have two 12V 4A devices and only one transformer of 12V 5A.
Can i connect both to the same transformer together, or if i connect both, the transformer will have to deliver 8A?
Note that if you add a rectifier/capacitor to get DC from the transformer (as implied by the thread's title) than you need to derate it to 50-60% of its AC rating to avoid overheating.
A rectifier/capacitor draws high peak currents from the transformer which causes higher I^2*R heating in the transformer than the rated AC sinewave current.