I am trying to mux H.264 data into a MP4 file. There appear to be no errors in saving this H.264 Annex B data out to an MP4 file, but the file fails to playback.
I\
Please let me sum it up: the problem with your (original) code was that the input to av_interleaved_write_frame()
should not start with the packet length. The file may still be playable if you don't strip the 00 00 00 01
start codes, but that IMHO is a resilience behavior of the player, and I would not count on this.