Set GOP (I-frame interval) on Lorex cams that don't have this exposed in the web UI.

pozzello

Known around here
Oct 7, 2015
2,271
1,117
One of the reasons I've been installing Dahua firmware on various Lorex-branded IP cameras is to be able to set the i-frame interval in the Video config page. the Lorex GUI hides this and defaults to 2x the frame rate (FPS), which isn't a horrible setting, but some of us want/need to adjust that for whatever reason.

turns out that that tho the UI is dumbed down, the underlying (Dahua) API still mostly works, so one can use commands to set things the GUI may not present, like I-frame interval (called GOP in the API):

for example, this gets you the current configuration:


and on my Lorex E891ab, this returns the following:

table.Encode[0].ExtraFormat[0].Audio.Bitrate=64
table.Encode[0].ExtraFormat[0].Audio.Channels[0]=0
table.Encode[0].ExtraFormat[0].Audio.Compression=AAC
table.Encode[0].ExtraFormat[0].Audio.Depth=16
table.Encode[0].ExtraFormat[0].Audio.Frequency=8000
table.Encode[0].ExtraFormat[0].Audio.Pack=DHAV
table.Encode[0].ExtraFormat[0].AudioEnable=false
table.Encode[0].ExtraFormat[0].Video.resolution=704x480
table.Encode[0].ExtraFormat[0].Video.BitRate=256
table.Encode[0].ExtraFormat[0].Video.BitRateControl=CBR
table.Encode[0].ExtraFormat[0].Video.Compression=H.264
table.Encode[0].ExtraFormat[0].Video.CustomResolutionName=D1
table.Encode[0].ExtraFormat[0].Video.FPS=15
table.Encode[0].ExtraFormat[0].Video.GOP=15
table.Encode[0].ExtraFormat[0].Video.Height=480
table.Encode[0].ExtraFormat[0].Video.Pack=DHAV
table.Encode[0].ExtraFormat[0].Video.Priority=0
table.Encode[0].ExtraFormat[0].Video.Profile=High
table.Encode[0].ExtraFormat[0].Video.Quality=4
table.Encode[0].ExtraFormat[0].Video.QualityRange=6
table.Encode[0].ExtraFormat[0].Video.SVCTLayer=1
table.Encode[0].ExtraFormat[0].Video.Width=704
table.Encode[0].ExtraFormat[0].VideoEnable=true
table.Encode[0].ExtraFormat[1].Audio.Bitrate=64
table.Encode[0].ExtraFormat[1].Audio.Channels[0]=0
table.Encode[0].ExtraFormat[1].Audio.Compression=AAC
table.Encode[0].ExtraFormat[1].Audio.Depth=16
table.Encode[0].ExtraFormat[1].Audio.Frequency=8000
table.Encode[0].ExtraFormat[1].Audio.Pack=DHAV
table.Encode[0].ExtraFormat[1].AudioEnable=false
table.Encode[0].ExtraFormat[1].Video.resolution=704x480
table.Encode[0].ExtraFormat[1].Video.BitRate=1024
table.Encode[0].ExtraFormat[1].Video.BitRateControl=CBR
table.Encode[0].ExtraFormat[1].Video.Compression=H.264
table.Encode[0].ExtraFormat[1].Video.CustomResolutionName=D1
table.Encode[0].ExtraFormat[1].Video.FPS=30
table.Encode[0].ExtraFormat[1].Video.GOP=60
table.Encode[0].ExtraFormat[1].Video.Height=480
table.Encode[0].ExtraFormat[1].Video.Pack=DHAV
table.Encode[0].ExtraFormat[1].Video.Priority=0
table.Encode[0].ExtraFormat[1].Video.Profile=High
table.Encode[0].ExtraFormat[1].Video.Quality=4
table.Encode[0].ExtraFormat[1].Video.QualityRange=6
table.Encode[0].ExtraFormat[1].Video.SVCTLayer=1
table.Encode[0].ExtraFormat[1].Video.Width=704
table.Encode[0].ExtraFormat[1].VideoEnable=false
table.Encode[0].ExtraFormat[2].Audio.Bitrate=64
table.Encode[0].ExtraFormat[2].Audio.Channels[0]=0
table.Encode[0].ExtraFormat[2].Audio.Compression=AAC
table.Encode[0].ExtraFormat[2].Audio.Depth=16
table.Encode[0].ExtraFormat[2].Audio.Frequency=8000
table.Encode[0].ExtraFormat[2].Audio.Pack=DHAV
table.Encode[0].ExtraFormat[2].AudioEnable=false
table.Encode[0].ExtraFormat[2].Video.resolution=704x480
table.Encode[0].ExtraFormat[2].Video.BitRate=1024
table.Encode[0].ExtraFormat[2].Video.BitRateControl=CBR
table.Encode[0].ExtraFormat[2].Video.Compression=H.264
table.Encode[0].ExtraFormat[2].Video.CustomResolutionName=D1
table.Encode[0].ExtraFormat[2].Video.FPS=30
table.Encode[0].ExtraFormat[2].Video.GOP=60
table.Encode[0].ExtraFormat[2].Video.Height=480
table.Encode[0].ExtraFormat[2].Video.Pack=DHAV
table.Encode[0].ExtraFormat[2].Video.Priority=0
table.Encode[0].ExtraFormat[2].Video.Profile=High
table.Encode[0].ExtraFormat[2].Video.Quality=4
table.Encode[0].ExtraFormat[2].Video.QualityRange=6
table.Encode[0].ExtraFormat[2].Video.SVCTLayer=1
table.Encode[0].ExtraFormat[2].Video.Width=704
table.Encode[0].ExtraFormat[2].VideoEnable=false
table.Encode[0].MainFormat[0].Audio.Bitrate=64
table.Encode[0].MainFormat[0].Audio.Channels[0]=0
table.Encode[0].MainFormat[0].Audio.Compression=AAC
table.Encode[0].MainFormat[0].Audio.Depth=16
table.Encode[0].MainFormat[0].Audio.Frequency=8000
table.Encode[0].MainFormat[0].Audio.Mode=0
table.Encode[0].MainFormat[0].Audio.Pack=DHAV
table.Encode[0].MainFormat[0].AudioEnable=false
table.Encode[0].MainFormat[0].Video.resolution=3840x2160
table.Encode[0].MainFormat[0].Video.BitRate=4096
table.Encode[0].MainFormat[0].Video.BitRateControl=CBR
table.Encode[0].MainFormat[0].Video.Compression=H.264
table.Encode[0].MainFormat[0].Video.CustomResolutionName=3840x2160
table.Encode[0].MainFormat[0].Video.FPS=15
table.Encode[0].MainFormat[0].Video.GOP=30
table.Encode[0].MainFormat[0].Video.Height=2160
table.Encode[0].MainFormat[0].Video.Pack=DHAV
table.Encode[0].MainFormat[0].Video.Priority=0
table.Encode[0].MainFormat[0].Video.Profile=Main
table.Encode[0].MainFormat[0].Video.Quality=4
table.Encode[0].MainFormat[0].Video.QualityRange=6
table.Encode[0].MainFormat[0].Video.SVCTLayer=1
table.Encode[0].MainFormat[0].Video.Width=3840
table.Encode[0].MainFormat[0].VideoEnable=true
table.Encode[0].MainFormat[1].Audio.Bitrate=64
table.Encode[0].MainFormat[1].Audio.Channels[0]=0
table.Encode[0].MainFormat[1].Audio.Compression=AAC
table.Encode[0].MainFormat[1].Audio.Depth=16
table.Encode[0].MainFormat[1].Audio.Frequency=8000
table.Encode[0].MainFormat[1].Audio.Mode=0
table.Encode[0].MainFormat[1].Audio.Pack=DHAV
table.Encode[0].MainFormat[1].AudioEnable=false
table.Encode[0].MainFormat[1].Video.resolution=3840x2160
table.Encode[0].MainFormat[1].Video.BitRate=4096
table.Encode[0].MainFormat[1].Video.BitRateControl=CBR
table.Encode[0].MainFormat[1].Video.Compression=H.264
table.Encode[0].MainFormat[1].Video.CustomResolutionName=3840x2160
table.Encode[0].MainFormat[1].Video.FPS=15
table.Encode[0].MainFormat[1].Video.GOP=30
table.Encode[0].MainFormat[1].Video.Height=2160
table.Encode[0].MainFormat[1].Video.Pack=DHAV
table.Encode[0].MainFormat[1].Video.Priority=0
table.Encode[0].MainFormat[1].Video.Profile=Main
table.Encode[0].MainFormat[1].Video.Quality=4
table.Encode[0].MainFormat[1].Video.QualityRange=6
table.Encode[0].MainFormat[1].Video.SVCTLayer=1
table.Encode[0].MainFormat[1].Video.Width=3840
table.Encode[0].MainFormat[1].VideoEnable=true
table.Encode[0].MainFormat[2].Audio.Bitrate=64
table.Encode[0].MainFormat[2].Audio.Channels[0]=0
table.Encode[0].MainFormat[2].Audio.Compression=AAC
table.Encode[0].MainFormat[2].Audio.Depth=16
table.Encode[0].MainFormat[2].Audio.Frequency=8000
table.Encode[0].MainFormat[2].Audio.Mode=0
table.Encode[0].MainFormat[2].Audio.Pack=DHAV
table.Encode[0].MainFormat[2].AudioEnable=false
table.Encode[0].MainFormat[2].Video.resolution=3840x2160
table.Encode[0].MainFormat[2].Video.BitRate=4096
table.Encode[0].MainFormat[2].Video.BitRateControl=CBR
table.Encode[0].MainFormat[2].Video.Compression=H.264
table.Encode[0].MainFormat[2].Video.CustomResolutionName=3840x2160
table.Encode[0].MainFormat[2].Video.FPS=15
table.Encode[0].MainFormat[2].Video.GOP=30
table.Encode[0].MainFormat[2].Video.Height=2160
table.Encode[0].MainFormat[2].Video.Pack=DHAV
table.Encode[0].MainFormat[2].Video.Priority=0
table.Encode[0].MainFormat[2].Video.Profile=Main
table.Encode[0].MainFormat[2].Video.Quality=4
table.Encode[0].MainFormat[2].Video.QualityRange=6
table.Encode[0].MainFormat[2].Video.SVCTLayer=1
table.Encode[0].MainFormat[2].Video.Width=3840
table.Encode[0].MainFormat[2].VideoEnable=true
table.Encode[0].MainFormat[3].Audio.Bitrate=64
table.Encode[0].MainFormat[3].Audio.Channels[0]=0
table.Encode[0].MainFormat[3].Audio.Compression=AAC
table.Encode[0].MainFormat[3].Audio.Depth=16
table.Encode[0].MainFormat[3].Audio.Frequency=8000
table.Encode[0].MainFormat[3].Audio.Mode=0
table.Encode[0].MainFormat[3].Audio.Pack=DHAV
table.Encode[0].MainFormat[3].AudioEnable=false
table.Encode[0].MainFormat[3].Video.resolution=1280x720
table.Encode[0].MainFormat[3].Video.BitRate=1024
table.Encode[0].MainFormat[3].Video.BitRateControl=CBR
table.Encode[0].MainFormat[3].Video.Compression=H.264
table.Encode[0].MainFormat[3].Video.CustomResolutionName=720P
table.Encode[0].MainFormat[3].Video.FPS=15
table.Encode[0].MainFormat[3].Video.GOP=30
table.Encode[0].MainFormat[3].Video.Height=720
table.Encode[0].MainFormat[3].Video.Pack=DHAV
table.Encode[0].MainFormat[3].Video.Priority=0
table.Encode[0].MainFormat[3].Video.Profile=High
table.Encode[0].MainFormat[3].Video.Quality=4
table.Encode[0].MainFormat[3].Video.QualityRange=6
table.Encode[0].MainFormat[3].Video.SVCTLayer=1
table.Encode[0].MainFormat[3].Video.Width=1280
table.Encode[0].MainFormat[3].VideoEnable=true
table.Encode[0].SnapFormat[0].Audio.Bitrate=64
table.Encode[0].SnapFormat[0].Audio.Compression=G.711A
table.Encode[0].SnapFormat[0].Audio.Depth=16
table.Encode[0].SnapFormat[0].Audio.Frequency=8000
table.Encode[0].SnapFormat[0].Audio.Pack=DHAV
table.Encode[0].SnapFormat[0].AudioEnable=false
table.Encode[0].SnapFormat[0].Video.resolution=3840x2160
table.Encode[0].SnapFormat[0].Video.BitRate=5120
table.Encode[0].SnapFormat[0].Video.BitRateControl=VBR
table.Encode[0].SnapFormat[0].Video.Compression=MJPG
table.Encode[0].SnapFormat[0].Video.CustomResolutionName=3840x2160
table.Encode[0].SnapFormat[0].Video.FPS=0.100000
table.Encode[0].SnapFormat[0].Video.GOP=60
table.Encode[0].SnapFormat[0].Video.Height=2160
table.Encode[0].SnapFormat[0].Video.Pack=DHAV
table.Encode[0].SnapFormat[0].Video.Priority=0
table.Encode[0].SnapFormat[0].Video.Profile=Main
table.Encode[0].SnapFormat[0].Video.Quality=5
table.Encode[0].SnapFormat[0].Video.QualityRange=6
table.Encode[0].SnapFormat[0].Video.SVCTLayer=1
table.Encode[0].SnapFormat[0].Video.Width=3840
table.Encode[0].SnapFormat[0].VideoEnable=true
table.Encode[0].SnapFormat[1].Audio.Bitrate=64
table.Encode[0].SnapFormat[1].Audio.Compression=G.711A
table.Encode[0].SnapFormat[1].Audio.Depth=16
table.Encode[0].SnapFormat[1].Audio.Frequency=8000
table.Encode[0].SnapFormat[1].Audio.Pack=DHAV
table.Encode[0].SnapFormat[1].AudioEnable=false
table.Encode[0].SnapFormat[1].Video.resolution=3840x2160
table.Encode[0].SnapFormat[1].Video.BitRate=5120
table.Encode[0].SnapFormat[1].Video.BitRateControl=VBR
table.Encode[0].SnapFormat[1].Video.Compression=MJPG
table.Encode[0].SnapFormat[1].Video.CustomResolutionName=3840x2160
table.Encode[0].SnapFormat[1].Video.FPS=0.100000
table.Encode[0].SnapFormat[1].Video.GOP=60
table.Encode[0].SnapFormat[1].Video.Height=2160
table.Encode[0].SnapFormat[1].Video.Pack=DHAV
table.Encode[0].SnapFormat[1].Video.Priority=0
table.Encode[0].SnapFormat[1].Video.Profile=Main
table.Encode[0].SnapFormat[1].Video.Quality=5
table.Encode[0].SnapFormat[1].Video.QualityRange=6
table.Encode[0].SnapFormat[1].Video.SVCTLayer=1
table.Encode[0].SnapFormat[1].Video.Width=3840
table.Encode[0].SnapFormat[1].VideoEnable=true
table.Encode[0].SnapFormat[2].Audio.Bitrate=64
table.Encode[0].SnapFormat[2].Audio.Compression=G.711A
table.Encode[0].SnapFormat[2].Audio.Depth=16
table.Encode[0].SnapFormat[2].Audio.Frequency=8000
table.Encode[0].SnapFormat[2].Audio.Pack=DHAV
table.Encode[0].SnapFormat[2].AudioEnable=false
table.Encode[0].SnapFormat[2].Video.resolution=3840x2160
table.Encode[0].SnapFormat[2].Video.BitRate=5120
table.Encode[0].SnapFormat[2].Video.BitRateControl=VBR
table.Encode[0].SnapFormat[2].Video.Compression=MJPG
table.Encode[0].SnapFormat[2].Video.CustomResolutionName=3840x2160
table.Encode[0].SnapFormat[2].Video.FPS=0.100000
table.Encode[0].SnapFormat[2].Video.GOP=60
table.Encode[0].SnapFormat[2].Video.Height=2160
table.Encode[0].SnapFormat[2].Video.Pack=DHAV
table.Encode[0].SnapFormat[2].Video.Priority=0
table.Encode[0].SnapFormat[2].Video.Profile=Main
table.Encode[0].SnapFormat[2].Video.Quality=5
table.Encode[0].SnapFormat[2].Video.QualityRange=6
table.Encode[0].SnapFormat[2].Video.SVCTLayer=1
table.Encode[0].SnapFormat[2].Video.Width=3840
table.Encode[0].SnapFormat[2].VideoEnable=true

then this URL will SET the gop (for the main pulled rtsp stream) to 15 (was 30)


And this persists across camera powercycling! sweet. This may come as obvious to those who've previosuly used the Dahua HTTP API, but nice to know it can (apparently) be applied to the Lorex (and maybe Amcrest?) rebrands as well. Not a panacea for these rebrands limitations, but may be useful in specific cases, like that of the missing 'iframe interval' configurable...

edit: google the API, or poke around here for links to it... "Dahua IPC HTTP API"
 
Really glad I somehow came across your thread here. Thank you for the information. After searching looking to flash over to Dahua firmware for this, I was finally able to change iFrame on my Lorex LNB8105x to match FPS using this method. Thank you!
 
Saw this thread as I was also looking at putting on Dahua fw on the Lorex (in this case it's a LNB8211x which is the same as LNB8105x it seems).
You can use SmartPSS tool on the Lorex, and all these options can be changed via that tool GUI - if you're not comfortable with the API.
I just discovered this the other day!

Cheers