I have done a lot of research on the subject.
I would ship the bike to Chile (Valparaiso) e ride to and from Brazil.
It is better to avoid the ports in Brazil - unfortunately too much burocracy.
Let me know if you need any help.
Hope you have fun over here.