Recording length not honored, time lost between files



  • Nope, it's a Shinobi issue, and this is what I did to prove it...

    I have a StarTech USB 3.0 to Gigabit adapter off the Mini feeding into a POE switch with the cams. Figured it was the StarTech, so I pulled the POE switch cable and plugged it into the built-in ethernet on the Mini, but no change.

    So I opened the raw RTSP camera feeds with VLC and watched the timestamps - no stopping or interruption whatsoever over 6-7 minutes, and at the same time I had Firefox open with Shinobi monitor feeds, and they went black for a couple seconds roughly every 2 minutes while I could still see the VLC feeds ticking away. So it's a Shinobi issue, not a network issue. What's going on, I have no idea, but it's something with Shinobi.


  • administrators

    what stream type are you using? can you upload the config for it please?



  • RTSP H.264 from a Hikvision DS-2CD2035-I (firmware V5.4.0 build 160401), using url of /video.h264 set to 2048x1536, 10fps.

    Here's the config file for one of the cameras - hmm it says I "do not have enough privileges for this action" (uploading json or zip file)... weird.

    Here's a copy/paste of the contents of that file. I don't see anything odd except the height and width at 640x480, not the 2048x1536 like I have in the GUI of Shinobi.
    {"mode":"record","mid":"GlVpgDnAg1","name”:”Cam”,”type":"h264","protocol":"rtsp","host":"192.168.254.3","port":"80","path":"/video.h264","ext":"mp4","fps":"1","width":"640","height":"480","details":"{\"fatal_max\":\"\",\"notes\":\"\",\"dir\":\"\",\"auto_host_enable\":\"0\",\"auto_host\":\"\",\"rtsp_transport\":\"tcp\",\"muser\":\"admin\",\"mpass\”:\”password\”,\”port_force\":null,\"aduration\":\"\",\"probesize\":\"\",\"stream_loop\":null,\"sfps\":\"1\",\"accelerator\":null,\"hwaccel\":null,\"hwaccel_vcodec\":\"\",\"hwaccel_device\":\"\",\"stream_type\":\"b64\",\"stream_mjpeg_clients\":\"\",\"stream_vcodec\":\"libx264\",\"stream_acodec\":\"no\",\"hls_time\":\"2\",\"preset_stream\":\"ultrafast\",\"hls_list_size\":\"3\",\"signal_check\":\"10\",\"signal_check_log\":\"0\",\"stream_quality\":\"15\",\"stream_fps\":\"1\",\"stream_scale_x\":\"2048\",\"stream_scale_y\":\"1536\",\"rotate_stream\":null,\"svf\":\"\",\"stream_timestamp\":null,\"stream_timestamp_font\":\"\",\"stream_timestamp_font_size\":\"\",\"stream_timestamp_color\":\"\",\"stream_timestamp_box_color\":\"\",\"stream_timestamp_x\":\"\",\"stream_timestamp_y\":\"\",\"stream_watermark\":null,\"stream_watermark_location\":\"\",\"stream_watermark_position\":null,\"snap\":\"1\",\"snap_fps\":\"\",\"snap_scale_x\":\"\",\"snap_scale_y\":\"\",\"snap_vf\":\"\",\"rawh264\":null,\"rawh264_vcodec\":null,\"rawh264_acodec\":\"\",\"rawh264_fps\":\"\",\"rawh264_scale_x\":\"\",\"rawh264_scale_y\":\"\",\"rawh264_crf\":\"\",\"rawh264_vf\":\"\",\"vcodec\":\"copy\",\"crf\":\"1\",\"preset_record\":\"\",\"acodec\":\"no\",\"dqf\":\"0\",\"cutoff\":\"15\",\"rotate_record\":null,\"vf\":\"\",\"timestamp\":\"0\",\"timestamp_font\":\"\",\"timestamp_font_size\":\"10\",\"timestamp_color\":\"white\",\"timestamp_box_color\":\"[email protected]\",\"timestamp_x\":\"(w-tw)/2\",\"timestamp_y\":\"0\",\"watermark\":null,\"watermark_location\":\"\",\"watermark_position\":null,\"cust_input\":\"\",\"cust_snap\":\"\",\"cust_rawh264\":\"\",\"cust_detect\":\"\",\"cust_stream\":\"\",\"cust_stream_server\":\"\",\"cust_record\":\"\",\"custom_output\":\"\",\"detector\":\"0\",\"detector_webhook\":null,\"detector_webhook_url\":\"\",\"detector_command_enable\":null,\"detector_command\":\"\",\"detector_command_timeout\":\"\",\"detector_lock_timeout\":\"\",\"detector_save\":null,\"detector_frame_save\":null,\"detector_mail\":\"0\",\"detector_mail_timeout\":\"\",\"detector_record_method\":\"del\",\"detector_trigger\":null,\"detector_trigger_record_fps\":\"\",\"detector_timeout\":\"\",\"watchdog_reset\":null,\"detector_delete_motionless_videos\":null,\"detector_send_frames\":\"1\",\"detector_region_of_interest\":null,\"detector_fps\":\"\",\"detector_scale_x\":\"640\",\"detector_scale_y\":\"480\",\"detector_use_motion\":null,\"detector_use_detect_object\":null,\"detector_frame\":\"1\",\"detector_sensitivity\":\"\",\"cords\":\"\",\"detector_lisence_plate\":null,\"detector_lisence_plate_country\":null,\"detector_notrigger\":null,\"detector_notrigger_mail\":null,\"detector_notrigger_timeout\":\"\",\"control\":\"0\",\"control_base_url\":\"\",\"control_stop\":\"0\",\"control_url_stop_timeout\":\"\",\"control_url_center\":\"\",\"control_url_left\":\"\",\"control_url_left_stop\":\"\",\"control_url_right\":\"\",\"control_url_right_stop\":\"\",\"control_url_up\":\"\",\"control_url_up_stop\":\"\",\"control_url_down\":\"\",\"control_url_down_stop\":\"\",\"control_url_enable_nv\":\"\",\"control_url_disable_nv\":\"\",\"control_url_zoom_out\":\"\",\"control_url_zoom_out_stop\":\"\",\"control_url_zoom_in\":\"\",\"control_url_zoom_in_stop\":\"\",\"groups\":\"[]\",\"loglevel\":\"warning\",\"sqllog\":\"0\",\"detector_cascades\":\"\"}","shto":"[]","shfr":"[]"}

    Also, what does "Raw H.264 Stream" do (under the GUI) - I can set it to Enabled as Yes and then select video and audio codec, or No. What's that do?


  • administrators

    thanks 😄 I am sadly unable to import that string.. not sure what it is but luckily i can read the string the way it is 😄 I'll have to look into why you couldn't upload it to begin with 😕 (this forum engine is still new to me)

    yah this was reported yesterday with base64 (which i notice you are using). Try setting to HLS or FLV then setting Video Codec to copy and setting audio to AAC or No Audio.

    Raw H264 is like simulated RTSP stream. It is H264 data streamed over HTTP. You can open http://xxx.xxx.xxx.xxx/[API KEY]/h264/[GROUP KEY]/[MONITOR ID] in VLC or other apps for lower latency, RTSP-like data with shinobi as a pass through.

    Please note that this API method will change in the future. So if it stops working one day you can reconfigure it in the, Upcoming, "Channels" section.



  • You can copy that code and paste in a text file with the name of "Shinobi_GlVpgDnAg1_config.json" if you need to import it for testing, but I'm sure you know that. Since I couldn't upload (maybe it just allows images, not files) I just copied the contents of the file.

    So you are saying that base64 is a problem so I should set the Stream Type to HLS? I read in your setup docs that base64 was best so that's why I chose it. What do I enter for Segment Length? Is this minutes? And why is shorter better (less space used per description)? And what about Present Template (default is "ultrafast") and List Size?



  • So I switched to HLS, copy, no Audio, left rest at default (seg length 2, list size 3) and changed Record to 10 minutes (vs. 15 in previous config). I have been watching, and I'm still getting a drop in connect/black screen for a second or two, and new file about two minutes in.

    However, every time I change a setting or hit "Save" on a camera in Shinobi, the first video recorded is about (not exact, again) the length I entered. Then it goes back to the default 2min for every file after that. And this happened before I switched to HLS stream vs. Base64.

    Here's the HLS config for the same camera.

    {"mode":"record","mid":"GlVpgDnAg1","name":"Cam","type":"h264","protocol":"rtsp","host":"192.168.254.3","port":"80","path":"/video.h264","ext":"mp4","fps":"1","width":"640","height":"480","details":"{\"fatal_max\":\"\",\"notes\":\"\",\"dir\":\"\",\"auto_host_enable\":\"0\",\"auto_host\":\"\",\"rtsp_transport\":\"tcp\",\"muser\":\"admin\",\"mpass\":\"password\",\"port_force\":null,\"aduration\":\"\",\"probesize\":\"\",\"stream_loop\":null,\"sfps\":\"1\",\"accelerator\":null,\"hwaccel\":null,\"hwaccel_vcodec\":\"\",\"hwaccel_device\":\"\",\"stream_type\":\"hls\",\"stream_mjpeg_clients\":\"\",\"stream_vcodec\":\"copy\",\"stream_acodec\":\"no\",\"hls_time\":\"2\",\"preset_stream\":\"ultrafast\",\"hls_list_size\":\"3\",\"signal_check\":\"10\",\"signal_check_log\":\"0\",\"stream_quality\":\"15\",\"stream_fps\":\"1\",\"stream_scale_x\":\"2048\",\"stream_scale_y\":\"1536\",\"rotate_stream\":null,\"svf\":\"\",\"stream_timestamp\":null,\"stream_timestamp_font\":\"\",\"stream_timestamp_font_size\":\"\",\"stream_timestamp_color\":\"\",\"stream_timestamp_box_color\":\"\",\"stream_timestamp_x\":\"\",\"stream_timestamp_y\":\"\",\"stream_watermark\":null,\"stream_watermark_location\":\"\",\"stream_watermark_position\":null,\"snap\":\"1\",\"snap_fps\":\"\",\"snap_scale_x\":\"\",\"snap_scale_y\":\"\",\"snap_vf\":\"\",\"rawh264\":null,\"rawh264_vcodec\":null,\"rawh264_acodec\":\"\",\"rawh264_fps\":\"\",\"rawh264_scale_x\":\"\",\"rawh264_scale_y\":\"\",\"rawh264_crf\":\"\",\"rawh264_vf\":\"\",\"vcodec\":\"copy\",\"crf\":\"1\",\"preset_record\":\"\",\"acodec\":\"no\",\"dqf\":\"0\",\"cutoff\":\"10\",\"rotate_record\":null,\"vf\":\"\",\"timestamp\":\"0\",\"timestamp_font\":\"\",\"timestamp_font_size\":\"10\",\"timestamp_color\":\"white\",\"timestamp_box_color\":\"[email protected]\",\"timestamp_x\":\"(w-tw)/2\",\"timestamp_y\":\"0\",\"watermark\":null,\"watermark_location\":\"\",\"watermark_position\":null,\"cust_input\":\"\",\"cust_snap\":\"\",\"cust_rawh264\":\"\",\"cust_detect\":\"\",\"cust_stream\":\"\",\"cust_stream_server\":\"\",\"cust_record\":\"\",\"custom_output\":\"\",\"detector\":\"0\",\"detector_webhook\":null,\"detector_webhook_url\":\"\",\"detector_command_enable\":null,\"detector_command\":\"\",\"detector_command_timeout\":\"\",\"detector_lock_timeout\":\"\",\"detector_save\":null,\"detector_frame_save\":null,\"detector_mail\":\"0\",\"detector_mail_timeout\":\"\",\"detector_record_method\":\"del\",\"detector_trigger\":null,\"detector_trigger_record_fps\":\"\",\"detector_timeout\":\"\",\"watchdog_reset\":null,\"detector_delete_motionless_videos\":null,\"detector_send_frames\":\"1\",\"detector_region_of_interest\":null,\"detector_fps\":\"\",\"detector_scale_x\":\"640\",\"detector_scale_y\":\"480\",\"detector_use_motion\":null,\"detector_use_detect_object\":null,\"detector_frame\":\"1\",\"detector_sensitivity\":\"\",\"cords\":\"\",\"detector_lisence_plate\":null,\"detector_lisence_plate_country\":null,\"detector_notrigger\":null,\"detector_notrigger_mail\":null,\"detector_notrigger_timeout\":\"\",\"control\":\"0\",\"control_base_url\":\"\",\"control_stop\":\"0\",\"control_url_stop_timeout\":\"\",\"control_url_center\":\"\",\"control_url_left\":\"\",\"control_url_left_stop\":\"\",\"control_url_right\":\"\",\"control_url_right_stop\":\"\",\"control_url_up\":\"\",\"control_url_up_stop\":\"\",\"control_url_down\":\"\",\"control_url_down_stop\":\"\",\"control_url_enable_nv\":\"\",\"control_url_disable_nv\":\"\",\"control_url_zoom_out\":\"\",\"control_url_zoom_out_stop\":\"\",\"control_url_zoom_in\":\"\",\"control_url_zoom_in_stop\":\"\",\"groups\":\"[]\",\"loglevel\":\"warning\",\"sqllog\":\"0\",\"detector_cascades\":\"\"}","shto":"[]","shfr":"[]"}

    Also, "license" is spelled wrong, as in detector_lisence_plate, shouldn't it be 'detector_license_plate'?


  • administrators

    @super_kev i don't recall saying Base64 is the best 😕 I actually avoid using it unless i really need it and use JPEG, HLS, or FLV instead. I also rarely ever suggest anyone use it.

    Yes segment length is in minutes. The length is up to you. I choose 15 because it's easier for me to manage. 4 segments per hour is how i look at it. The preset ultrafast just sets bitrate and stuff when it can.

    However, every time I change a setting or hit "Save" on a camera in Shinobi, the first video recorded is about (not exact, again) the length I entered. Then it goes back to the default 2min for every file after that. And this happened before I switched to HLS stream vs. Base64.

    Can you create a video showing this behavior? What version of FFmpeg? Exact only (sometimes) happens when network and hardware conditions are ideal. Otherwise it will be incorrect like how you are describing.

    Also, "license" is spelled wrong, as in detector_lisence_plate, shouldn't it be 'detector_license_plate'?

    yah that's a typo.



  • How can I find the version of FFmpeg that Brew pulled for installation? And I've got a video, but it's 94MB. I can dump it on my server and email you a link?



  • Weekend bump. How can I find version of ffmpegX?

    I've uploaded the video here: http://superkevstudios.com/shinobi.mp4



  • Any ideas?



  • Found the version of ffmpeg; pulled up Terminal, typed in brew info ffmpeg. Appears my ffmpeg version is Stable 3.4.1.



  • This post is deleted!


  • This post is deleted!


  • This post is deleted!


  • weekend bump - Moe?


 

Looks like your connection to Shinobi Forum was lost, please wait while we try to reconnect.