Combine the dill seeds, dried dill, mustard seeds, chili powder, paprika, coriander seeds, peppercorns, celery seeds, red pepper flakes and bay leaves in a small bowl. Transfer to a blender or spice grinder in batches and pulse until coarsely ground.
Fill a large deep pot with 8 quarts water. Add the spice mixture, thyme, parsley, garlic, celery and 1/4 cup salt. Cover and bring to a boil over high heat. Uncover, reduce the heat and simmer, 30 minutes.
Meanwhile, put the crabs in a large colander in the sink. Holding each crab with tongs, run under cold water to wash away sand. Transfer to a large container of ice water and soak 15 minutes. (This relaxes the crabs and helps remove the grit.) Remove the crabs and discard the water. If the crabs are still sandy, repeat.
Bring the spiced broth to a boil over high heat. Wrap the potatoes in cheesecloth and tie closed. Add the crabs to the broth, then the potatoes; cover and cook, stirring once or twice, until the crab shells are bright red, 15 to 20 minutes. Remove the potatoes after 15 minutes.
Transfer the crabs to a platter or newspaper with tongs, letting the excess liquid drain into the pot. Let sit at least 5 minutes before eating.
Meanwhile, add the shrimp to the pot, stir once and cook until the shells are pink, 5 to 6 minutes. Remove with a slotted spoon. Season the crabs, shrimp and potatoes with salt. Serve with melted butter and the broth, for dipping.