What file format is this video file from the VMS?

1

So I bought h265 security cameras, and NVR which successfully works with those cameras. I am using a Windows VMS software that came with the NVR, to connect to the NVR by the local network and extract video files. My problem is that those video files are played only with the VMS software and a player that also came with the NVR. I do not want to depend on this player, as this player is totally anonymous.

The files have h264 extension, which I am quite sure that is wrong. ffplayer is the only software (other then the player that came with the NVR) that is capable of playing it. I would like to understand what is the real file type, and if there is a robust way to convert to a standard format.

File example - 01_20190405_023100.h264: https://drive.google.com/file/d/1_3g_qStlHGfQDuZQg7F-2aVKgkCUts94/view?usp=sharing

When trying to play with ffplayer it does not play, and it shows the following output - h264.txt: https://drive.google.com/file/d/1zKCM0wBJd9vPBJHtkOLG3C3NiGGOIWws/view?usp=sharing

When changing file extension only - 01_20190405_023100.h265: https://drive.google.com/file/d/17mn8YD0KdEVoM3mvWc5LPyyxy_h6HW6b/view?usp=sharing

It does play with ffplayer, and it shows the following output - h265.txt: https://drive.google.com/file/d/15K0305Ab-L0fTlvDaTX0RWNHzlgcYrLk/view?usp=sharing

Doron Ben-Ari

Posted 2019-04-08T19:26:09.747

Reputation: 19

Answers

1

It's a raw HEVC/H.265 bitstream. You can mux it into a standard container like MP4.

ffmpeg -f hevc -i file.h264 -c copy muxed.mp4

The bitstream does have non-standard or malformed syntax units so playing with a hardware decoder will probably fail.

Gyan

Posted 2019-04-08T19:26:09.747

Reputation: 21 016

Thanks. Few questions. 1.VLC plays the new file, but WMP does not. Do you know why? 2.While executing there were still lots of errors.Does it mean that this might not work correctly on future files of same format? 3. Can you explain what do you mean practically when saying playing with hardware decoder?When for example hardware decoder is used and when software? – Doron Ben-Ari – 2019-04-09T16:51:23.817

>

  • Either WMP doesn't have the decoder, or it doesn't like the codec tag.You can add -vtag hvc1 to check. 2) The file isn't standard-compliant, so ffmpeg's HEVC decoder is complaining. Unless the mfr changes the format further, you should be fine. 3) ffmpeg's hevc decoders uses the CPU. Nvidia/AMD offser their own decoders on their GPU. They may not be able to cope with non-standard streams.
  • < – Gyan – 2019-04-09T17:37:59.970