I've got one camera that's 4MP and 16/9, which would normally mean a 2560x1440 video. However, the raw video stream out of the camera introduces itself as [SAR 4:3 DAR 64:27], as per the ffprobe output:
Code: Select all
Stream #0:0: Video: h264 (High), yuvj420p(pc, progressive), 2560x1440 [SAR 4:3 DAR 64:27], 10 fps, 10 tbr, 90k tbn
The decoded (live) view in ZoneMinder is okay, since I have set the correct AR (Capture Resolution [pixels] to 2560x1440) in the camera's settings, but the mp4 files from passthrough recording on the disk are embedded with the bad SAR/DAR (naturally), which means the video is also distorted on playback within ZM and within any video player if opened directly from the disk as well.
Now, the *.mp4 file can be fixed without re-encoding simply by altering the DAR with ffmpeg like this:
Code: Select all
ffmpeg -i in.mp4 -aspect 16:9 -c copy out.mp4
Code: Select all
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, progressive), 2560x1440 [SAR 4:3 DAR 64:27], 2890 kb/s, 9.96 fps, 10 tbr, 90k tbn (default)
Code: Select all
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, progressive), 2560x1440 [SAR 4:3 DAR 64:27], 2916 kb/s, SAR 1:1 DAR 16:9, 10 fps, 10 tbr, 90k tbn (default)
Now my curious question is – is there somewhere within Zoneminder a way to do this while saving/after saving automatically?
Idea #2: Could Filters and Execute command on all matches be used for this somehow?
Thank you

So far I tried the OPTIONS_FFMPEG but while it didn't broke the recording, it is still saving the videos as before (i.e. with unaltered AR). edit: ok, according to this post this setting is for exporting jpgs to video, so probably not useful here?