In this paper we first show that the necessary condition introduced in our previous paper is also a sufficient condition for a path to be a geodesic in the group $Ham^c(M)$ of compactly supported Hamiltonian symplectomorphisms. This applies with no restriction on $M$. We then discuss conditions which guarantee that such a path minimizes the Hofer length. Our argument relies on a general geometric construction (the gluing of monodromies) and on an extension of Gromov's non-squeezing theorem both to more general manifolds and to more general capacities. The manifolds we consider are quasi-cylinders, that is spaces homeomorphic to $M \times D^2$ which are symplectically ruled over $D^2$. When we work with the usual capacity (derived from embedded balls), we can prove the existence of paths which minimize the length among all homotopic paths, provided that $M$ is semi-monotone. (This restriction occurs because of the well-known difficulty with the theory of $J$-holomorphic curves in arbitrary $M$.) However, we can only prove the existence of length-minimizing paths (i.e. paths which minimize length amongst {\it all} paths, not only the homotopic ones) under even more restrictive conditions on $M$, for example when $M$ is exact and convex or of dimension $2$. The new difficulty is caused by the possibility that there are non-trivial and very short loops in $Ham^c(M)$. When such length-minimizing paths do exist, we can extend the Bialy--Polterovich calculation of the Hofer norm on a neighbourhood of the identity ($C^1$-flatness).
Although it applies to a more restricted class of manifolds, the Hofer-Zehnder capacity seems to be better adapted to the problem at hand, giving sharper estimates in many situations. Also the capacity-area inequality for split cylinders extends more easily to quasi-cylinders in this case. As applications, we generalise Hofer's estimate of the time for which an autonomous flow is length-minimizing to some manifolds other than $\textbf{R}^{2n}$, and derive new results such as the unboundedness of Hofer's metric on some closed manifolds, and a linear rigidity result.