We propose a joint source-channel modeling approach for adaptively determining the quality-optimal FEC code rate. Our objective is to obtain the optimal video quality in the receiver, while taking time-varying packet loss into consideration. First, we define the loss threshold set as the set of packet loss probabilities in which the code rate have to be adjusted to maintain the maximum video quality. Proposed model can estimate the loss threshold set efficiently. Then, whenever there is a change of the packet loss status in the channel, video sender can always find the optimal code rate on-the-fly by using the estimated loss threshold set. Simulation results show that the proposed method can determine the near-optimal code rate in joint source-channel coding.