ffmpeg fails to transcode and give output to stream for -f mp4
===

I have been using ffmpeg for transcoding for quite some time. 
Recently i have got a requirement where the ffmpeg output needs not be to a file but to stdout , which will be later captured and then sent back to callingurl. 
I have got some prelimenary success with flv and avi , but got failure at mp4 when using -f flag.
here are my codes and need some serious look at the same

this works well with player : 
ffmpeg -loglevel quiet -i cat_dog.mp4 -vbsf h264_mp4toannexb -vcodec copy -acodec copy -f mpegts -movflags frag_keyframe+empty_moov -re - 2>&1

this cannot be played by  player : 
ffmpeg -loglevel quiet -i cat_dog.mp4 -vbsf h264_mp4toannexb -vcodec copy -acodec copy -f MP4 -movflags frag_keyframe+empty_moov -re - 2>&1

thanks