If you are willing to get a non-sharp constant, here's another proof found in many differential geometry texts. Without loss of generality assume $f \geq 0$. (Replacing $f$ by $|f|$ doesn't change the integrals on either side, if $f$ is assumed to be $C^1$.)
Let $2M = \sup f$, and let $t_0 \in (0,\pi)$ attain this maximum.
Let $X(t) = f(t) - M$ and $Y(t) = \sqrt{M^2 - X(t)^2}$ if $t \leq t_0$ and $-\sqrt{M^2 - X(t)^2}$ if $t \geq t_0$.
We have that $(X(t),Y(t))$ lies on the circle of radius $M$, and goes around the circle exactly once as $t$ goes from $0$ to $\pi$. We thus can use a well-known formula to conclude that
$ -\int_0^\pi Y(t) X'(t) \mathrm{d}t = \text{Area of disk} = \pi M^2 $
By Schwarz inequality, however, we have
$ \int_0^\pi Y(t) X'(t) \mathrm{d}t \leq \sqrt{ \int_0^\pi Y^2\mathrm{d}t \int_0^\pi X'^2\mathrm{d}t} = \sqrt{ \left(\pi M^2 - \int_0^\pi X^2\mathrm{d}t \right) \int_0^\pi X'(t)^2\mathrm{d}t }$
Squaring we get
$ \pi^2 M^4 \leq \left(\pi M^2 - \int_0^\pi X^2 \mathrm{d}t\right) \int_0^\pi f'^2\mathrm{d}t $
Now, notice that $ \int_0^\pi f^2 ~\mathrm{d}t = \int_0^\pi (X + M)^2 ~\mathrm{d}t = \pi M^2 + \int_0^\pi X^2 ~\mathrm{d}t + 2M \int_0^{\pi} X ~\mathrm{d}t \leq \pi M^2 (1+A)^2 $ where $ A: = \left[ \frac{1}{\pi M^2} \int_0^\pi X^2 ~\mathrm{d}t \right] < 1. $ This implies $ \int_0^\pi f^2 ~\mathrm{d}t \leq (1 + A)^2(1-A^2) \int_0^\pi |f'|^2 ~\mathrm{d}t$ The coefficient has a maximum when $A = 1/2$ or that $ \int_0^\pi f^2 ~\mathrm{d}t \leq \frac{27}{16} \int_0^\pi |f'|^2~\mathrm{d}t $
If $\int_0^\pi X ~\mathrm{d}t = 0$, we can sharpen the coefficient to $(1 + A^2)(1-A^2) = 1 - A^4 \leq 1$. This can be achieved by extending $f$ to a function $g$ on $(-\pi,\pi)$ with an odd extension, exactly as you have described for the Fourier proof.