Hi @benny_1,
If I understand correctly, you want to compile your own version of ffmpeg to utilise GPU acceleration? as described here:
https://trac.ffmpeg.org/wiki/HWAccelIntro
?
If so, note that I cannot assure you this will work correctly as we only officially support the FFMPEG RPM/deb shipped with CE. However, you are of course more than welcome to try.
It is important however that you use the RPM/deb spec files as a base, you can see them here:
It will also help you understand which dev packages you need in order to do so.
As far as compiling it on a G2 instance, what exactly is the HW spec for this Xen image? I think any machine can do it, it will just take a lot longer on weaker machines.
There is also this guide:
https://trac.ffmpeg.org/wiki/CompilationGuide
Hope this helps,