HEVC passthrough unplayable files

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
Durandle
Posts: 3
Joined: Wed Oct 20, 2021 9:33 am

HEVC passthrough unplayable files

Post by Durandle »

I've been poking this for a while but ultimately can't work out the issue, so going to ask here.

My cameras output HEVC (Main) video 1920x1080 @ 15 FPS.

I can view the stream live in ZM just fine.

I have them configured to constant record, using passthrough rather than encode. This generates files with the expected file size, but they are unplayable in VLC or anything else, they open, you can click play, but there is no video, even though VLC reports the codec correctly.

I can confirm that recording the stream manually using ffmpeg result in the same issue, with the exception that if I set the file format to AVI, then the file plays just fine, the issue is specifically with MP4 file container.

DOES NOT WORK

Code: Select all

ffmpeg -i rtsp://someuser:1111@192.168.0.123:10554/udp/av0_0 -c:v copy -c:a aac output.mp4
WORKS

Code: Select all

ffmpeg -i rtsp://someuser:1111@192.168.0.123:10554/udp/av0_0 -c:v copy -c:a aac output.avi
Any help getting this working would be much appreciated, ffmpeg is usually pretty good with this stuff.
Durandle
Posts: 3
Joined: Wed Oct 20, 2021 9:33 am

Re: HEVC passthrough unplayable files

Post by Durandle »

Ah interesting, looks like maybe the passthrough is losing important codec information.

Note:

* Different codec tag (hevc vs hev1)
* The lack of frame-rate
* Changed buffer dimensions
* Lack of decoded format lines

In the file created by ZoneMinder passthrough (though perhaps all or some of that is due to the file being unplayable?).

STREAM
stream.JPG
stream.JPG (31.61 KiB) Viewed 3502 times
FILE
file.JPG
file.JPG (27.9 KiB) Viewed 3502 times
Durandle
Posts: 3
Joined: Wed Oct 20, 2021 9:33 am

Re: HEVC passthrough unplayable files

Post by Durandle »

Huh and if I try and force the video codec tag:

Code: Select all

Tag hevc incompatible with output codec id '173' (hev1)
aerzil
Posts: 1
Joined: Fri Oct 22, 2021 8:02 pm

Re: HEVC passthrough unplayable files

Post by aerzil »

Hello - This is interesting and rings a bell. I began using new Advidia M-46-F cameras with the h265 advanced codec a while ago. I noticed the same thing, and got to the point of confirming that ffmpeg and vlc wouldn't play the files. I did not try the .avi, good call.

I think I also mentioned the behavior to support at Pana, now iPro... I haven't had the time to dig further, and probably won't for a week or 2. The earlier Advidia A-27/28 series spit out h265 Advanced that did play properly in ffmpeg/vlc/zm while wrapped as mp4. For now I am using the 2nd stream configured as h264 advanced 720p.

Sorry I can't be of more help right now, but noticed this and figured it might be useful knowing that the behavior is not isolated.

Best
Mark
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: HEVC passthrough unplayable files

Post by raydude »

I'm trying to get this to work with my Amcrest 4K cameras set to h.265.

Code: Select all

ffmpeg -i "rtsp://admin:pasword@10.1.10.93:554/cam/realmonitor?channel=1&subtype=0" -c:v copy video.mp4
works and the downloaded stream plays okay with mpv. Although the one time I tried gave me some garbage for a few seconds in the beginning.

But the stream in zoneminder plays periodically working with some long blank pauses with what appears to be text that I can't make out in the middle of the image most of the time.

The recorded alarms are not playable in browser.

h.265 cuts my bit rate in half from 8192 to 4096 and I'd really like to get it to work.

Has anyone gotten this to work?
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: HEVC passthrough unplayable files

Post by Magic919 »

IConnor is working on playing H265 in browser. Watch Slack for updates. Might be pushed soon.
-
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: HEVC passthrough unplayable files

Post by raydude »

Thanks!
User avatar
iconnor
Posts: 2880
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: HEVC passthrough unplayable files

Post by iconnor »

I have also seen streams that need extra header fields filled in.

In master there is an experimental option that works. Put
new_extradata=true in options and it will actually open the codec to get them filled in.
Post Reply