You can certainly cut out the sections and flip them, but AviDemux won’t allow you to apply filters if you are simply copying the video. You would have to reencode them using the same video and audio codecs, or go to a lossless codec like HuffUV video and PCM audio.
This doesn’t sound like a simple project, no matter which tools you use.
The first thing I would try would be to convert the existing flv video to Huffuv + PCM audio in an avi container. You can do this in AviDemux. The resulting file will be much, much larger, but you will have virtually no picture quality loss. Then start cutting out sections, good ones and bad ones…process the bad ones again, this time using the 180 degree filter to flip them over. You are still using Huffuv and pcm. At this point you should have the five bad sections and the good ones all in correct orientation, so all you have to do is use the Append function to glue them back together in the correct order.
The major flaw in this scheme is the possibility to lose audio/video synchronization.
It should be possible to simply mark the sections that need to be flipped, then apply the filters to those sections only, and do all of this in one shot as you convert to Huffuv and pcm audio. But I’m not confident of the accuracy of AviDemux in marking and applying the inversion filter. You can certainly try this if you would prefer.
Once you have everything corrected, and playing properly in Huffuv avi format, it is simple to use AVStoDVD to convert to dvd video.