raph: You mention the lack of a common way to export mpeg2 flags in an exchange format to be used between a decoder and a recoder. One option I've been considering here, would be to add these as a text comment in the pgm header. In mpeg2dec, there is a pgmpipe output that is mainly done to be used in transcoding applications, maybe the textual flags (as you can get with -vvvv option) might be exported there as well.
Other than that... I suppose you could use libmpeg2 as a library... if you're looking for an already integrated solution, have you looked at ffmpeg and/or gstreamer ?