Can we add an encoder element without changing all this code? It doesn't look like you need all the complicated converter sequence, maybe only a videoconvert (do you even need one?).
Yeah, in general the idea that we'd want the same sequence for decoding and encoding is probably wrong. E.g. for decoding we may want deinterlace, but we certainly don't want that for encoding. It's probably better to handle them separately.