title: Is there any easy way to extract h.264 raw stream in annexb format?
body: <p>When I extract video stream with ffmpeg using command-line:</p>
  
  <p>ffmpeg -i {some file} -vcodec copy -an -f {rawvideo|h264|whatever} out.h264</p>
  
  <p>with some media files produced by Adobe Media Encoder, only .m4v (encoded as h.264 blu-ray) files can produce some usable results.</p>
  
  <p>Some other format(like .f4v) can produce h.264 stream, but without PPS/SPS, and each slice starts with size instead of 00 00 00 01 sequence.</p>
  
  <p>I wish I can extract annexb format raw streams from as many as possible files that contains valid h.264 stream. I know I can add PPS/SPS and change size into 00 00 00 01 myself. But is there any existing software can do this?</p>
  
  <hr>
  
  <p>Or can it be guaranteed that ffmpeg can always extract streams in annexb format from .m4v file, no matter with what software the file is encoded?</p>