1

I'm trying to run a .264 video recorded from MDVR, in a C# application, VLC player is not able to play it, it also has GPS, and data from other sensors embedded in it. I want to decode the stream from file and be able to play the video. Is there any SDK to help me out with this?

ffmpeg fails to play it, vlc fails to play it, MPC-HC fails to play it, AVC can't convert it. and I've never worked on videos before. Thank you.

MQaiser
  • 111
  • 1
  • 3
  • 8

1 Answers1

1

"FFmpeg fails to play it, VLC fails to play it, MPC-HC fails to play it, AVC can't convert it...

"I've never worked on videos before"

Your actual video data begins at byte position: 4198424.

See the section "H.264 video frame bytes in AVI" of this Answer to know what your video bytes mean. For example... in your file at byte position 4198424:

Starting bytes 00 00 00 01 67 (is the SPS), and 00 00 00 01 68 (is PPS), and 00 00 00 01 06 (is SEI). All these bytes provide data to setup the decoder (eg: notify of the video's frame rate and its width/height etc). Then following bytes 00 00 00 01 65 means "beginning of keyframe data".

Solution:
Get to byte position 4198424 and extract everything from those bytes onwards (up to ending of file). This data is in MPEG's H.264 video format so you could save to disk as testfile.h264 and then test in a media player (I used the MPC-HC player to display).

VC.One
  • 14,790
  • 4
  • 25
  • 57