Fedora and Red Hat do not ship codecs in the main distribution due to legal issues. You need to install them separately from external repository: http://download1.rpmfusion.org/free/...w/G.group.html
After installation you may verify presence of codecs with something like this:
$ gst-inspect | grep 264
typefindfunctions: video/x-h264: 264, x264, h264
rtp: rtph264pay: RTP H264 payloader
rtp: rtph264depay: RTP H264 depayloader
h264parse: h264parse: H264Parse
x264: x264enc: x264enc