How to convince ffmpeg that input is raw H264?
Oh, that's right - all input-related arguments need to go before the input argument with ffmpeg.
The documentation states:
As a general rule, options are applied to the next specified file. Therefore, order is important, and you can have the same option on the command line multiple times. Each occurrence is then applied to the next input or output file. Exceptions from this rule are the global options (e.g. verbosity level), which should be specified first.
This works:
ffmpeg -f h264 -i avcfile.h264 -c copy out.mp4
somenetworkstreamer | ffmpeg -f h264 -i pipe: -c copy out.mp4