Before I did this fresh install I did try with omxplayer and I had flickering.
This doesn't seem to be specifically related with xbmc, probably with omxplayer or something, but while I was trying to figure out what was going on, I discovered that if I was navigating the tv menus I could see the tv hdmi saying 'connecting..' when the flickering appears, so I what I thought was that I was having bad signal.
Then I tested with tvservice and I had the confirmation:
$this->bbcode_second_pass_code('', '
guilherme:~$ /opt/vc/bin/tvservice -M
Starting to monitor for HDMI events
[I] HDMI in standby mode
[I] HDMI in standby mode
')
When I started playing big buck bunny the first '[I] HDMI in standby mode'. Then I waited a few seconds to see if I could get more output, but nothing..and so I stopped the movie and started it again and got the second '[I] HDMI in standby mode'.
Basically I don't know why but everytime I start an x264 movie my hdmi enters in standby.
This does not happen in openelec so it's not an hardware problem with the raspberry pi, or the tv..
If any one has any suggestions I would appreciate it:)
I've tried 'config_hdmi_boost=7' and 'hdmi_force_hotplug=1' in config.txt without any success.
EDIT:
SOME PROGRESS!!!
I'm sorry if I'm spamming the topic but I think this might be helpfull for somebody else.
I can get rid of the problem whit this:
$this->bbcode_second_pass_code('', '
/opt/vc/bin/tvservice -o //this turns of the hdmi
/opt/vc/bin/tvservice -p // this turns it on back again
')
Does anybody know if xbmc has any kind of configuration that enables me to run this commands before when starting playback of something?
FINAL SOLUTION:
Well.. it seems that if i do this hack of turning off and on before xbmc starts everything works as expected; so if anyone experiences the same thing as me just do a simple script to turn off and on and then run xbmc and it will work just fine.
$this->bbcode_second_pass_code('', '
/opt/vc/bin/tvservice -o
/opt/vc/bin/tvservice -p
xbmc
')