DVR-Scan icon indicating copy to clipboard operation
DVR-Scan copied to clipboard

report name of mp4 being processed when ffmpeg errors occur.

Open millerthegorilla opened this issue 3 years ago • 2 comments

Description of Problem & Solution when processing many files over a long period of time, I returned and the following error was reported multiple times...

[hevc @ 0x7f40600f0f40] Invalid NAL unit size (0 > 4275).
[hevc @ 0x7f40600f0f40] Error splitting the input into NAL units.

Apparently this is an issue with ffmpeg, but it would be nice to know what mp4 was being processed when the error occurred, if that is possible.

Media Examples: just a terminal error reported to stdout

[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4717).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4650).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4574).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4567).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4582).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4585).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4327).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4317).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4295).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4327).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4250).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4275).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4310).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4347).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4305).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4312).
[hevc @ 0x7f4007b5c080] Error splitting the input into NAL units.
[hevc @ 0x7f4007b5c080] Invalid NAL unit size (0 > 4319).
....

Proposed Implementation: It would be nice if the mp4 that caused the error could be reported in the terminal output of dvr-scan.

Alternative Solutions: none...

** dvr-scan -v ** 1.5.1

millerthegorilla avatar Aug 21 '22 09:08 millerthegorilla

HI @millerthegorilla;

This is a great idea. For brevity I'd like to only include this for debug output (e.g. setting --verbosity debug), but this is certainly possible.

Right now this is only done when writing motion events using ffmpeg, but agreed there should be a debug log somewhere every time a video is opened for analysis. I'll move the log statements where a video is "appended" to when it's actually opened for use (videos are opened twice currently during a scan run when using append mode).

Breakthrough avatar Aug 21 '22 15:08 Breakthrough

Just fyi, I managed to repeatedly get the following error as well, which I think may not be an ffmpeg error(?) but it would be good to know the filename where it happened.

[hevc @ 0x7f406000ab80] Could not find ref with POC 41

millerthegorilla avatar Aug 22 '22 10:08 millerthegorilla

This should now show up properly when v1.6 is released and you use debug logging. Each time a new video is loaded, a log message will be shown before any frames are decoded from that video.

Breakthrough avatar Oct 15 '23 18:10 Breakthrough