The invention belongs to the technical field of video coding, and particularly relates to a method for layering time domain rate-distortion optimization in random access video coding. A cyclic group of picture (GOP) structure is adopted, every eight frames form one GOP and are distributed to different layers, frames on the same layer abide by similar reference frame and QP distribution rules, as shown in figure 1, the coding sequence of frames is represented by EOC, and the playing sequence/time sequence of frames is represented by POC. Time domain dependency on the same layer and different layers among coding units in random access coding is analyzed, nested layering time domain propagation chains are established according to time domain dependency in random access coding, as shown in figure 3, and then layering time domain dependency rate-distortion optimal modeling is conducted and propagation factor kv and global lagrangian multiplier lambda g are obtained. Finally, according to the propagation factor kv, time domain rate-distortion optimization is achieved by adjusting the global lagrangian multiplier lambda g.