Testcamera event thumbnail shows wrong scene
AnsweredHello.
I make a plugin which is get events from external server and shows them.
It works perfectly with live camera and rtsp source but when i use testcamera it works, shows wrong time thumbnail.
I pushed current time to event packets, but using testcamera, playing scene and thumbnail image are not matched.
I try with another codec, gop 1, 5, 30... but it is same.
Below is detail information.
- OS: Ubuntu 20.04
- NX, SDK: 5.0.0.35748
- video info
General
Complete name : eventgen(1)_1080_4000kbps.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 40.2 MiB
Duration : 1 min 18 s
Overall bit rate mode : Variable
Overall bit rate : 4 316 kb/s
Writing application : Lavf57.56.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 3 frames
Format settings, GOP : M=1, N=30
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1 min 17 s
Bit rate : 4 000 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.064
Stream size : 38.4 MiB (95%)
Writing library : x264 core 148 r2744 b97ae06
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=2 / keyint=30 / keyint_min=3 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=abr / mbtree=1 / bitrate=4000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Tagged date : UTC 2022-07-27 09:01:52
Codec configuration box : avcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 min 18 s
Bit rate mode : Variable
Bit rate : 50.3 kb/s
Maximum bit rate : 128 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 479 KiB (1%)
Default : Yes
Alternate group : 1
Tagged date : UTC 2022-07-27 09:01:52
Other #1
ID : 65536
Type : Hint
Format : RTP
Codec ID : rtp
Duration : 1 min 17 s
Encoded date : UTC 2022-07-27 09:01:52
Tagged date : UTC 2022-07-27 09:01:52
Other #2
ID : 65537
Type : Hint
Format : RTP
Codec ID : rtp
Duration : 1 min 18 s
Bit rate mode : Variable
Encoded date : UTC 2022-07-27 09:01:52
Tagged date : UTC 2022-07-27 09:01:52
-
Hello SangHyeukYoon,
I make a plugin which is get events from external server and shows them.
Could you please elaborate on your scenario? What kind of events does the external server send to your plugin? Who/What triggers events? How do the events correlate to the video stream of the camera your plugin is activated on?
-
External server analyzes video from NX camera using RTSP. If a event occurred, like person detection, external server sends message to my plugin. Then plugin make event packet with current time and finally at NX client event alarmed with thumbnail.
But, my problem is, the event thumbnail is not matched with current scene when i use testcamera. It works perfectly with live camera and external rtsp source.
-
Hello,
Thanks for the explanation.
Then plugin make event packet with current time and finally at NX client event alarmed with thumbnail.
But, my problem is, the event thumbnail is not matched with current scene when i use testcamera. It works perfectly with live camera and external rtsp source.
I guess, the answer is in here.
In the plugin, you should not put the timestamps of the current time to the event packet, rather you should put the timestamp of the frame your external server has extracted from the RTSP stream for the analysis.
-
Hi,
Looks like you have track id duplication.
Please, read this article for details https://support.networkoptix.com/hc/en-us/articles/1500006332441-Troubleshooting-Analytics-Issues-for-Cameras-and-Plugins
The "Object Preview Image Is Wrong" section.
The most common root cause of an incorrect object preview image is track id duplication. The fastest way to prove it is to search through the analytics database for duplicated records containing the same track id.
The analytics DB is stored in the object_detection.sqlite file in the video archive folder.
Use this command to get a table with duplicated track ids:
sqlite3 -readonly object_detection.sqlite "select quote(guid), count(1)
from track
group by guid
having count(1) > 1" -
Hi,
We had wrong object preview image problem earlier, and solved thanks to the above article.
So we have solved wrong object preview image problem.
Our final problem is wrong event preview image with testcamera.
We want to solve this problem, because yours testcamera is better than any other rtsp streaming servers.
-
Hi,
In the client application, the thumbnail for an event is requested via the /ec2/cameraThumbnail function. The function has two parameters, being misused, could cause the issue in question:
- time
- objectTrackId
So make sure you have set the correct timestamp in your plugin.
I pushed current time to event packets
You should not do that. You should set the timestamp of the frame received.
Please sign in to leave a comment.
Comments
8 comments