change variable from tmpfile to videofile
recheck queue until its become empty