A method of encoding a sequence of frames in a video stream, wherein, upon determining 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 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 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 an encoded reference frame among the plurality of encoded reference frames; - encoding 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 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 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 an encoded reference frame among the plurality of encoded reference frames; - encoding 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 an encoded reference frame among the plurality of encoded reference frames; - encoding 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.