We propose a simplified model of real-time joint source-channel coding, which can be used to adaptively determine the quality-optimal code rate of forward error correction (FEC) coding. The objective is to obtain the maximum video quality in the receiver, while taking time-varying packet loss into consideration. To this end, we propose a simplified model of the threshold set of the residual video packet loss rate (RVPLR). The RVPLR is the rate of residual loss of video packets after channel decoding. The threshold set is defined as a set of discrete RVPLRs in which the FEC code rate must be changed in order to maintain minimum distortion during increases or decreases of channel packet loss. Because the closed form of the proposed model is very simple and has one scene-dependent model parameter, a video sender can be easily implemented with the model. To train the scene-dependent model parameters in real-time, we propose a test-run method. This method accelerates the test-run while remaining sufficiently accurate for training the scene-dependent model parameters. By using the proposed model and test-run, the video sender can always find the optimal code rate on the fly whenever there is a change in the packet loss status in the channel. An experiment shows that the proposed model and test-run can efficiently determine the near-optimal code rate in joint source-channel coding.