Media: reimplement active_loop, reseparate code into movie and imagefolder.