You will know 
The flies start decreasing in size, everything gets dry inside of the container, the population boom starts to dwindle, etc.
Certain mixes prolong all of this better than others, but in my experience, the shorter the life period the faster they produce. On my long living cultures (2 months sometimes), it takes about 1 month for the flies to even start hatching from cocoons. But the flies are large and fertile for over twice the normal time period.
For these reasons always make sure you have "too many" cultures going at a time. It is ALWAYS better to have too much than too little in any situation. If you feel like a culture has too many flies in it then just let half of the flies go outside or flush them 
In my final words, dont let the cultures fool you. Just because they seem to be producing at a gigantic rate doesn't mean there will still be flies in there 2 weeks or even 1 week later.
May have been too much info, but good luck and have fun anyway 
-----
Thanks and Gig Em,
Cliff
0.2.1 Sipiwlini Tinc's