It’s one thing for a gardener to provide annuals and perennials that will feed visiting birds all season, whether from the seeds of the plant or the bugs that the plant attracts.

But here’s another idea: Grow plants from which you harvest seeds to feed birds.

Venelin Dimitrov, a buyer/product manager-flower seed at Burpee Seeds and Plants, says the first thing to do is determine which birds are in your area, then identify the plants that will attract them.

To produce a year-round supply, you’ll need a good chunk of land – a quarter-acre, says Dimitrov. But even if you grow a few dozen of these plants, it’s a great way to use them after the growing season.

Those interested in harvesting their own seed may have heard or read that red millet is a common ingredient in commercial birdseed but that it has little nutritional value. That shouldn’t be enough to rule millet out, Dimitrov says.

“Some (millets), because of the hard shell, they’re good for their digestion,” he says. “They don’t have a stomach like ours, based on acids and enzymes. It’s based on muscles. The gizzard is like a mill that grinds seed. ... Sometimes it’s recommended (they) have a good source of grit, like a sand, (that they) use in their little stomachs to grind seed.”

If you decide to go with a millet, he suggests “Purple Majesty” (Pennisetum glaucum “Purple Majesty”), “a really pretty plant, and it produces a nice seed head that can be dried out and used in the winter.”

If there’s a trick to do-it-yourselfing birdseed, it’s knowing when to collect the seed. You need to stay one step ahead of the birds.

“They’re very industrious, and they’ll harvest as the seed matures,” Dimitrov explains. “Most of the native flowers, if you are to harvest the seed, you have to do it right after the flowering is over but before the seed pod explodes.

“So you have to harvest them a little on the raw side and let them dry out in a shady area, (as you) would dry herbs.”

Sally Roth, author of “The Backyard Bird Lover’s Ultimate How-to Guide: More Than 200 Easy Ideas and Projects for Attracting and Feeding Your Favorite Birds” (Rodale), says birds will tell you when seed stalks are ready to pick.

“They know when they’re ripe before most gardeners do,” she said via email. “But basically it’s: Watch for ripening seed heads.

“Test one by smushing and catching seeds in your hand: If the seeds are brown or black, they’re ready; if green, not yet.”

Roth, who offers more information at sallyroth.com, says she often saves whole seed heads and stalks of seeds and bundles them together to hang out for the birds. When saving individual seeds, she clips the seed heads into an open brown grocery sack (a separate bag for each type of seed), then rolls the top loose-ly and sets the bag in a dry place for a week or two. She rolls the top tightly and shakes the bag vigorously a couple of times to separate seeds from other residue. Remove dead flowers and seed heads and you’re left with seed.

It takes about a week or two for seed heads and stems to dry out, and then you can keep them indefinitely, stored upright, Roth says.

Different types of seeds can be stored together, as with any kitchen grain: in a fairly airtight container or canister. They’ll keep for years.