How is mass flow rate computed?
The short answer is: No. One cannot calculate the inlet mass-flow based on the velocity alone. However in order to "know" the velocity ( $v$ ) you most likely would have measured everything you need (see below).

Your confusion with regards to the in- and outlet mass-flow might be based on the fact that the intake does not "collect" all air upstream depending of the flight-velocity.

The key is not to think of the geometric area of the intake but the area of stream tube around the air entering the intake.

The velocity upstream of the intake is not equal to the air-speed (subsonic flight) because the potential field of the intake decelerates (or accelerates) the flow upstream of the intake and expands (or contracts) the stream tube (from Wikipedia): 


In order to calculate the mass-flow we need to determine the speed and the properties of the air.(please observe that the air-speed ( $u$ ) at the intake is not equal the free-stream-spped ( $v$ ) )

Usually the measured properties are:


Total Pressure, $p_\mathrm{t}$ (Pitot Tube)
Static Pressure, $p_\mathrm{s}$ (Static Pressure Port)
Total Temperauter, $T_\mathrm{t}$ (info, examples)
Relative Humidity, $\varphi$ (for simplicity not used below. Humidity changes the heat capacity)


The following equations are used to calculate the mass-flow ( $\dot{m}$ ). Simplifications are commonly made for slow speeds unnecessarily excepting a 5% error. The following approach does not use these simplifications.

The equation which needs to be solved in the end is:

$\dot{m} = A \cdot \rho \cdot u$

Neglecting blockage effects and non-uniformities, the density ( $\rho$ ) and the velocity at the inlet ( $u$ ) are unknown and need to be derived from the measured values.

First the Mach-Number is calculated by solving the following equation (see Nasa) for the Mach-Number, $M$:

$\frac{p_\mathrm{s}}{p_\mathrm{t}} = \left( 1 + \frac{\gamma - 1}{2} M^2\right)^{\frac{\gamma}{\gamma-1}}$

Here $\gamma$ is the isentropic coefficient which is around $1.4$ for air depending on the humidity.

Second, with the Mach-Number, $M$, we can use another isentropic relation to calculate the static temperature, $T_\mathrm{s}$:

$\frac{T_\mathrm{s}}{T_\mathrm{t}} = \left( 1 + \frac{\gamma - 1}{2} M^2\right)^{-1}$

Third, using the ideal gas law the density ( $\rho$ ) can be calculated:

$\rho = \frac{p_\mathrm{s}}{RT_\mathrm{s}}$

Here $R$ is the Specific Gas Constant.

Forth, using the equation for speed of sound, $a$

$a = \sqrt{\gamma R T_\mathrm{s}}$

Finally Fifth, utilising the definition of the Mach-Number, $M$, the air-speed ( $u$ ) can be calculated:

$M = \frac{u}{a}$

Now all missing values are available to compute the mass-flow.
This approach can easily expanded to cover humid air by adjusting $R$ and $\gamma$ with respect to the relative humidity.

As mentioned in other answers: The inlfuence of non-uniformity of the flow caused by boundary layers or inlet distortions (e.g. inlet-ducting) need to be corrected using a calibration.