make output filename more informative; use slightly different method to find # of frames