A method of encoding a sequence of frames in a video stream, wherein, upon determining (S502) that a motion level of image data of an initial frame in the sequence of frames is below a motion level threshold, the method comprising: encoding (S504) a plurality of reference frames , each reference frame of the plurality of encoded reference frames being an intra-frame encoded frame or an inter-frame encoded frame; and encoding (S510) a plurality of empty frames , wherein an empty frame comprises macroblocks encoded as skip blocks and a reference to another frame in the video stream, by, for each frame to be encoded as an empty frame: - selecting (S514) an encoded reference frame among the plurality of encoded reference frames; - encoding (S516) the empty frame having a direct or indirect reference to the selected reference frame, wheren an indirect reference is made via a previously encoded empty frame which refers to the selected reference frame; characterized in that : for at least one pair of consecutive empty frames in the encoded sequence of frames , the selected reference frame for a first empty frame in the pair differs from the selected reference frame for a second empty frame in the pair, and in that the selected reference frame for the first empty frame and the selected reference frame for the second empty frame both are temporally preceding to the first and second empty frames. encoding (S504) a plurality of reference frames , each reference frame of the plurality of encoded reference frames being an intra-frame encoded frame or an inter-frame encoded frame; and encoding (S510) a plurality of empty frames , wherein an empty frame comprises macroblocks encoded as skip blocks and a reference to another frame in the video stream, by, for each frame to be encoded as an empty frame: - selecting (S514) an encoded reference frame among the plurality of encoded reference frames; - encoding (S516) the empty frame having a direct or indirect reference to the selected reference frame, wheren an indirect reference is made via a previously encoded empty frame which refers to the selected reference frame; characterized in that : for at least one pair of consecutive empty frames in the encoded sequence of frames , the selected reference frame for a first empty frame in the pair differs from the selected reference frame for a second empty frame in the pair, and in that the selected reference frame for the first empty frame and the selected reference frame for the second empty frame both are temporally preceding to the first and second empty frames. - selecting (S514) an encoded reference frame among the plurality of encoded reference frames; - encoding (S516) the empty frame having a direct or indirect reference to the selected reference frame, wheren an indirect reference is made via a previously encoded empty frame which refers to the selected reference frame; characterized in that : for at least one pair of consecutive empty frames in the encoded sequence of frames , the selected reference frame for a first empty frame in the pair differs from the selected reference frame for a second empty frame in the pair, and in that the selected reference frame for the first empty frame and the selected reference frame for the second empty frame both are temporally preceding to the first and second empty frames. <EOS>