To view a file with only Y frames, following command can be used on Linux to view the frames:
mplayer -demuxer rawvideo -rawvideo w=[LINESIZE]:h=[HEIGHT]:format=y8 in.raw -loop 0
To view all the formats available for rawvideo:
mplayer -rawvideo format=help
Reference:
mplayer man page