a gif util for player gif and encode gif