run ffmpeg decode using read-period closure

ffmpeg-env has new num-periods member