I've been trying to get a c++ wrapper around libx264 (version 142) to work. I am able to produce a video with x264 with no errors during encoding. Most standard video players (QuickTime, VLC...) are NOT able to read it but don't display any errors. However, mplayer is able to read it.
I am not able to determine what is wrong with it (Corrupt header ? Corrupt data ?).
The video is available here : https://www.dropbox.com/s/godnip85pezdi89/test_h264.mp4?dl=0
The class wrapped around libx264 I use to encode the video is here : https://gist.github.com/anonymous/4eb46b838fcf84ed02aa
Any help to identify what I'm doing wrong would be greatly appreciated.
Thank you !
Your video file is raw elementary H.264 stream (Annex B) and not MP4 as your file name suggest. Most players can't play raw H.264 streams without muxing to one of containers like MP4/MKV. You can use MKVToolnix (MKV), L-SMASH (MP4) or GPAC/MP4Box (MP4) to mux your stream.