A method, comprising: receiving a sequence of digital images of a scene; performing, by a processor, object classification in at least one of the received digital images to determine the presence, location, and class of an object in the scene; performing, by a processor, motion detection in the received sequence of digital images to determine the presence and salience of motion in the scene; automatically selecting , by a processor, a media file type on the basis of: the determined presence and class of an object in the scene, and presence and salience of motion in the scene; and creating a media file of the selected media file type from the received sequence of digital images; wherein the media file type is selected from a still image and a cinemagraph, and wherein the cinemagraph comprises a still image and moving images, combining static scenes with repeating motion associated with an object, and characterized in that : cinemagraph is selected as the media file type if an object of at least one predetermined class is present in the scene and the salient motion in the location of the object repeats and is below a predetermined intensity level; and still image is selected as the media file type if no objects can be classified in the scene, or no motion is determined to be present in the scene, or if motion is detected in a majority of the scene and exceeds the predetermined intensity level. receiving a sequence of digital images of a scene; performing, by a processor, object classification in at least one of the received digital images to determine the presence, location, and class of an object in the scene; performing, by a processor, motion detection in the received sequence of digital images to determine the presence and salience of motion in the scene; automatically selecting , by a processor, a media file type on the basis of: the determined presence and class of an object in the scene, and presence and salience of motion in the scene; and creating a media file of the selected media file type from the received sequence of digital images; wherein the media file type is selected from a still image and a cinemagraph, and wherein the cinemagraph comprises a still image and moving images, combining static scenes with repeating motion associated with an object, and characterized in that : cinemagraph is selected as the media file type if an object of at least one predetermined class is present in the scene and the salient motion in the location of the object repeats and is below a predetermined intensity level; and still image is selected as the media file type if no objects can be classified in the scene, or no motion is determined to be present in the scene, or if motion is detected in a majority of the scene and exceeds the predetermined intensity level. cinemagraph is selected as the media file type if an object of at least one predetermined class is present in the scene and the salient motion in the location of the object repeats and is below a predetermined intensity level; and still image is selected as the media file type if no objects can be classified in the scene, or no motion is determined to be present in the scene, or if motion is detected in a majority of the scene and exceeds the predetermined intensity level. <EOS>