How to limit file size with ffmpeg?
The fs parameter will stop the encode once it hits its value. So, if the output hits the 10MB mark while encoding the 15th second, then that's the duration of your output file.

If you want to make sure that the entire file is encoded but it doesn't cross the set target size, then use the bitrate method. To accommodate the muxing overhead and other data within the target size, set your video bitrate slightly lower by, say, 1-2%