diff --git a/src/totem-menu.c b/src/totem-menu.c
index 28b8b73..fd2fee5 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -687,10 +687,20 @@ totem_setup_recent (Totem *totem)
 void
 totem_action_add_recent (Totem *totem, const char *uri)
 {
+	totem_action_add_recent_with_time (totem, uri, 0);
+}
+
+void
+totem_action_add_recent_with_time (Totem *totem, const char *uri, gint64 time)
+{
+
 	GtkRecentData data;
 	char *groups[] = { NULL, NULL };
 	GFile *file;
 	GFileInfo *file_info;
+	char *app_exec[] = { NULL, NULL, NULL, NULL, NULL };
+	int i = 0;
+	char *seek = NULL;
 
 	memset (&data, 0, sizeof (data));
 
@@ -714,8 +724,16 @@ totem_action_add_recent (Totem *totem, const char *uri)
 	}
 	g_object_unref (file);
 
+	app_exec[i++] = g_get_prgname ();
+	if (time > 0) {
+		seek = g_strdup_printf ("%" G_GINT64_FORMAT, time);
+		app_exec[i++] = "--seek";
+		app_exec[i++] = seek;
+	}
+	app_exec[i++] = "%u";
+
 	data.app_name = g_strdup (g_get_application_name ());
-	data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL);
+	data.app_exec = g_strjoinv (" ", app_exec);
 	data.groups = groups;
 	if (gtk_recent_manager_add_full (totem->recent_manager,
 				     uri, &data) == FALSE) {
@@ -726,6 +744,7 @@ totem_action_add_recent (Totem *totem, const char *uri)
 	g_free (data.mime_type);
 	g_free (data.app_name);
 	g_free (data.app_exec);
+	g_free (seek);
 }
 
 /* Play Disc menu items */
diff --git a/src/totem-menu.h b/src/totem-menu.h
index 417a220..73768c4 100644
--- a/src/totem-menu.h
+++ b/src/totem-menu.h
@@ -38,6 +38,7 @@ void totem_setup_play_disc (Totem *totem);
 
 void totem_setup_recent (Totem *totem);
 void totem_action_add_recent (Totem *totem, const char *uri);
+void totem_action_add_recent_with_time (Totem *totem, const char *uri, gint64 time);
 
 G_END_DECLS
 
diff --git a/src/totem.c b/src/totem.c
index 2699393..55f934e 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -180,6 +180,103 @@ totem_action_save_size (Totem *totem)
 		- gtk_paned_get_position (item);
 }
 
+static gint64
+extract_seek_time (const gchar *app_exec)
+{
+	GRegex *seek_pattern;
+	GMatchInfo *match_info;
+	gchar *time_string;
+	gint64 time = 0;
+
+	seek_pattern = g_regex_new (" --seek (\\d+) ", 0, 0, NULL);
+	if (seek_pattern == NULL) {
+		return 0;
+	}
+
+	g_regex_match (seek_pattern, app_exec, 0, &match_info);
+	time_string = g_match_info_fetch (match_info, 1);
+
+	if (time_string != NULL) {
+		time = atoi (time_string);
+	}
+
+	g_free (time_string);
+	g_match_info_free (match_info);
+	g_regex_unref (seek_pattern);
+
+	return time;
+}
+
+static void
+totem_try_restore_position (Totem *totem)
+{
+	char *mrl;
+	GtkRecentInfo *recent_info;
+	const gchar *app_name;
+	gchar *app_exec;
+	gint64 time;
+
+	mrl = totem_get_current_mrl (totem);
+	g_debug ("trying to restore position of: %s", mrl);
+
+	recent_info = gtk_recent_manager_lookup_item (totem->recent_manager,
+			mrl, NULL);
+
+	if (recent_info == NULL) {
+		g_debug ("no recent info found");
+		g_free (mrl);
+		return;
+	}
+
+	app_name = g_get_application_name ();
+
+	if (!gtk_recent_info_has_application (recent_info, app_name)) {
+		goto done;
+	}
+
+	gtk_recent_info_get_application_info (recent_info, app_name,
+			&app_exec, NULL, NULL);
+	g_debug ("app_exec: %s", app_exec);
+
+	time = extract_seek_time (app_exec);
+	if (time != 0) {
+		g_debug ("seek time: %"G_GINT64_FORMAT, time);
+		totem->seek_to = time;
+	}
+
+done:
+	gtk_recent_info_unref (recent_info);
+	g_free (mrl);
+}
+
+static void
+totem_save_position (Totem *totem)
+{
+	/* 10 minutes threshold. We don't want to save the position within a 3
+	 * minute song for example. This could be made configurable (for
+	 * example 0 to save all positions, -1 to disable position saving?) */
+	static const gint64 save_position_threshold = 10 * 60 * 1000;
+	gint64 stream_length;
+	char *mrl;
+
+	stream_length = bacon_video_widget_get_stream_length (totem->bvw);
+	mrl = totem_get_current_mrl (totem);
+
+	if (stream_length < save_position_threshold) {
+		g_debug ("not saving position because the video/track is too short");
+		totem_action_add_recent (totem, mrl);
+		return;
+	} else {
+		gint64 time;
+
+		time = bacon_video_widget_get_current_time (totem->bvw);
+		g_debug ("saving position: %"G_GINT64_FORMAT, time);
+		totem_action_add_recent_with_time (totem, mrl, time);
+	}
+
+	g_free (mrl);
+}
+
 static void
 totem_action_save_state (Totem *totem, const char *page_id)
 {
@@ -274,6 +371,7 @@ totem_action_exit (Totem *totem)
 				CLAMP (vol, 0, 100),
 				NULL);
 		totem_action_save_size (totem);
+		totem_save_position (totem);
 	}
 
 	if (totem->conn != NULL)
@@ -1018,6 +1116,7 @@ totem_action_set_mrl_with_warning (Totem *totem,
 
 	if (totem->mrl != NULL)
 	{
+		totem_save_position (totem);
 		g_free (totem->mrl);
 		totem->mrl = NULL;
 		bacon_video_widget_close (totem->bvw);
@@ -2051,7 +2150,9 @@ totem_action_open_files_list (Totem *totem, GSList *list)
 				totem_action_load_media (totem, MEDIA_TYPE_DVB, "0");
 				changed = TRUE;
 			} else if (totem_playlist_add_mrl (totem->playlist, filename, NULL) != FALSE) {
+				/* Don't add recent directly at startup for now
 				totem_action_add_recent (totem, filename);
+				*/
 				changed = TRUE;
 			}
 		}
@@ -3633,6 +3734,8 @@ main (int argc, char **argv)
 		totem_action_set_mrl (totem, NULL, NULL);
 	}
 
+	totem_try_restore_position (totem);
+
 	/* Set the logo at the last minute so we won't try to show it before a video */
 	bacon_video_widget_set_logo (totem->bvw, LOGO_PATH);
 
