The flux flow properties of epitaxial niobium films with different pinning strengths are investigated by dc electrical resistance measurements and mapped to results derived within the framework of a theoretical model. Investigated are the cases of weak random pinning in as-grown films, strong random pinning in Ga ion-irradiated films, and strong periodic pinning induced by a nanogroove array milled by focused ion beam. The generic feature of the current-voltage curves of the films consists in instability jumps to the normal state at some instability current density $j^ast$ as the vortex lattice reaches its critical velocity $v^ast$. While $v^ast(B)$ monotonically decreases for as-grown films, the irradiated films exhibit a non-monotonic dependence $v^ast(B)$ attaining a maximum in the low-field range. In the case of nanopatterned films, this broad maximum is accompanied by a much sharper maximum in both, $v^ast(B)$ and $j^ast(B)$, which we attribute to the commensurability effect when the spacing between the vortex rows coincides with the location of the grooves. We argue that the observed behavior of $v^ast(B)$ can be explained by the pinning effect on the vortex flow instability and support our claims by fitting the experimental data to theoretical expressions derived within a model accounting for the field dependence of the depinning current density.