# ROI in Orin encoder

**URL:** <https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384>\
**Category:** Jetson AGX Orin\
**Tags:** encoder\
**Created:** [May 26, 2026, 7:39pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384 "2026-05-26T19:39:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [May 26, 2026, 7:39pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/1 "2026-05-26T19:39:01Z")

</div>

@ **DaneLLL**

My input video is 5760x1080 and encoder is HEVC with 1 ROI region which is

```
    "x": "1792",
    "y": "320",
    "width": "1792",
    "height": "248"

```

When I extract QP values of a frame, I saw ROI region (deep blue color)in the QP heatmap has some extra area (3 on left side and 1 on the right side) which is in the specified ROI region. Why is that?

 ![image](https://global.discourse-cdn.com/nvidia/original/4X/6/7/d/67dbcf818cdb789fc27d262706aa5cc4d2d3bf34.png)

Thanks

---

<div class="post-metadata">

**Author:** ![carolyuu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/carolyuu/32/14043_2.png) [@carolyuu](https://forums.developer.nvidia.com/u/carolyuu)\
**Post date:** [May 26, 2026, 7:48pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/2 "2026-05-26T19:48:44Z")

</div>

\*\*\* Please note that this reply is generated by LLM automatically \*\*\*

Based on the provided information, it appears that you are experiencing an issue with the QP heatmap of your encoded video, where the ROI region is not accurately represented.

The ROI (Region of Interest) is a feature in HEVC (High Efficiency Video Coding) that allows for different quality settings to be applied to different regions of the frame. In your case, you have specified a single ROI region, but the QP heatmap is showing an extra area of 3 pixels on the left side and 1 pixel on the right side that is not part of the specified ROI region.

There are a few possible explanations for this issue:

1. **Alignment** : HEVC has a requirement that the ROI region must be aligned to a specific grid, which is typically 16x16 or 32x32 pixels. If your ROI region is not aligned to this grid, the encoder may be extending the region to the nearest grid boundary, resulting in the extra pixels being included.
2. **Padding** : Some encoders may add padding to the ROI region to ensure that it is properly aligned or to simplify the encoding process. This padding can result in extra pixels being included in the ROI region.
3. **Quantization** : The QP (Quantization Parameter) values are used to control the quality of the encoded video. However, the QP values may not always accurately reflect the actual quality of the encoded video, especially in regions with complex content.

To resolve this issue, you can try the following:

1. **Verify ROI region alignment** : Check that your ROI region is aligned to the required grid boundary. If it is not, adjust the region to align with the grid.
2. **Check encoder settings** : Review your encoder settings to see if padding is being added to the ROI region. If padding is enabled, try disabling it to see if it resolves the issue.
3. **Adjust QP values** : Experiment with different QP values to see if it affects the accuracy of the ROI region in the QP heatmap.

It’s also worth noting that the Jetson AGX Orin module has a number of features and settings that can affect the encoding process. You may want to consult the documentation for your specific module to see if there are any settings or features that can help resolve this issue.

In comparison to other Jetson modules, the AGX Orin module has a number of unique features and settings that can affect the encoding process. For example, the Jetson TX2 NX module has a different set of encoder settings and features that may not be directly applicable to the AGX Orin module.

In terms of thermal zones, the AGX Orin module has a number of thermal zones that can affect the encoding process. However, it’s unlikely that thermal zones are directly related to the issue you are experiencing with the QP heatmap.

Overall, the issue you are experiencing with the QP heatmap is likely related to the alignment, padding, or quantization of the ROI region, rather than any specific feature or setting of the Jetson AGX Orin module.

\*\*\* Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. \*\*\*

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [May 26, 2026, 7:58pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/3 "2026-05-26T19:58:53Z")

</div>

> > **Alignment** : HEVC has a requirement that the ROI region must be aligned to a specific grid, \>\>which is typically 16x16 or 32x32 pixels. If your ROI region is not aligned to this grid, the \>\>encoder may be extending the region to the nearest grid boundary, resulting in the extra pixels \>\>being included.

I believe my ROI region is aligned with 64x64 which should be OK with 16x16 or 32x32

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [May 26, 2026, 9:12pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/4 "2026-05-26T21:12:33Z")

</div>

The picture in the first email is frame 1. This is QP heatmap of frame 50 and extra portion is different from frame 1.

 ![image](https://global.discourse-cdn.com/nvidia/original/4X/4/0/a/40aa56085f48744d4027b4e8dbdb5e82c6bd2fa3.png)

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [May 27, 2026, 6:36am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/6 "2026-05-27T06:36:54Z")

</div>

Hi,  
Do you use Jetpack 6.2.2 r36.5? Would like to confirm you use latest Jetpack release for Orin.

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [May 27, 2026, 7:17am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/7 "2026-05-27T07:17:57Z")

</div>

@DaneLLL @carolyuu

My system is  
Package: nvidia-jetpack  
Version: 5.1.2-b104  
Priority: standard  
Section: metapackages  
Maintainer: NVIDIA Corporation  
Installed-Size: 199 kB  
Depends: nvidia-jetpack-runtime (= 5.1.2-b104), nvidia-jetpack-dev (= 5.1.2-b104)  
Homepage: [Jetson - Embedded AI Computing Platform | NVIDIA Developer](http://developer.nvidia.com/jetson)  
Download-Size: 29.3 kB  
APT-Sources: [https://repo.download.nvidia.com/jetson/common](https://repo.download.nvidia.com/jetson/common) r35.4/main arm64 Packages  
Description: NVIDIA Jetpack Meta Package

Is this a known issue in 5.1.2-b104?

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [May 27, 2026, 7:21am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/8 "2026-05-27T07:21:06Z")

</div>

This issue can also be reproduced with this sample application too:  
/usr/src/jetson\_multimedia\_api/samples/01\_video\_encode

FC

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [May 27, 2026, 8:54pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/9 "2026-05-27T20:54:44Z")

</div>

@DaneLLL @carolyuu

Can you try to reproduce this issue on my version of jetson and the latest one?

Thanks,  
FC

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [May 28, 2026, 12:01am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/10 "2026-05-28T00:01:47Z")

</div>

Hi,  
If you would like to stay on 5.1.2, this looks to be fine since the ROI is encoded correctly, although some nearby macroblocks are also encoded with the same q value.

Besides, the latest release for Orin is Jetpack 6.2.2 r36.5. Would suggest upgrade and test on AGX Orin developer kit. Certain issues are fixed in later releases.

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [May 28, 2026, 12:16am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/11 "2026-05-28T00:16:22Z")

</div>

This is not OK for my application.  
I may consider to upgrade to 6,2,2r36,5 (is high effort on my side) if you can make sure there are no neighboring blocks issues.

Thanks,

FC

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [June 9, 2026, 10:17pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/12 "2026-06-09T22:17:42Z")

</div>

@DaneLLL @carolyuu

Any update on this issue? Can I check with your encoder firmware engineer to get definite answers of this issue?

Thanks,

FC

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [June 10, 2026, 1:32am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/13 "2026-06-10T01:32:45Z")

</div>

Hi,  
Have you tried Jetpack 6.2.2 r36.5? Or please try latest Jetpack 7.2 r39.2.

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [June 10, 2026, 3:50am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/14 "2026-06-10T03:50:16Z")

</div>

@DaneLLL

As I explained before, I will not be able update my system because I only have one Orin and is used for demo. I am afraid that updating to new jetpack SW version may break my current demo apps.

If you confirm there is no such issue on new jetpack SW and provide me a ROI encoding example, I can consider to buy a new Orin to try it out

Thanks,

FC

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [June 10, 2026, 1:11pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/15 "2026-06-10T13:11:45Z")

</div>

Hi,  
Please check the attached h265 stream. It is encoded on AGX Orin developer kit/Jetpack 6.2.2 r36.5 by running the commands:

```auto
01_video_encode$ gst-launch-1.0 videotestsrc num-buffers=50 ! video/x-raw,width=5760,height=1080,format=I420 ! filesink location=~/5760_1080.yuv
01_video_encode$ ./video_encode ~/5760_1080.yuv 5760 1080 H265 out.265 --eroi -roi ~/roi.cfg --input-metadata

```

There is a fix in Jetpack 6 for multiple ROIs. But there is only single ROI is your use-case. Not sure if the fix helps your use-case.  
[roi.cfg](https://forums.developer.nvidia.com/secure-uploads/nvidia/original/4X/3/2/7/3271325cba724d8ef3422ca78d53533bf294499b.cfg) (1.4 KB)  
[out.265](https://forums.developer.nvidia.com/secure-uploads/nvidia/original/4X/a/c/c/acc4af8c3de1473823878e2f6b79be84c684d62d.265) (974.2 KB)

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [June 10, 2026, 4:07pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/16 "2026-06-10T16:07:33Z")

</div>

I extract QPs from your out.265 and the first 2 frames looks weird. But there are no roi starting from frame3.

 ![frame_000010_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/b/2/e/b2e3b193630f997b6c5915f039770bba905f253d.png)

 ![frame_000009_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/5/7/7/57778ad560392eb437093925d7a8a892d69169d9.png)

 ![frame_000008_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/d/6/a/d6a97daf08219e2667564f3a10419b301aa1b2e5.png)

 ![frame_000007_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/1/7/5/175e4a8ac045e220c522b872da0c0a93c3c84665.png)

 ![frame_000006_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/e/0/1/e01ca588ec34a171ebe9c7a23e15fc7dbf4fc06b.png)

 ![frame_000005_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/3/4/3/3434a905349b855410dbbda3f9eca4939bd101a4.png)

 ![frame_000004_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/c/6/3/c6383e2c839d4f4285eec8701917ac42215cd4d5.png)

 ![frame_000003_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/0/b/7/0b71f65f2726a7044994b23c8228a4d4e33257eb.png)

 ![frame_000002_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/5/c/7/5c77bf3402fd811c113da600dc22da67bf936500.png)

 ![frame_000001_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/6/c/d/6cd623b0c692660132a4b747d74c4c11fc846dc1.png)

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [June 11, 2026, 6:37am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/17 "2026-06-11T06:37:47Z")

</div>

Hi,  
It seems like default 4Mbps + CBR is too strict for 5760x1080 30fps. Please share your settings(bitrate, VBR or CBR, frame rate) for reference. Would like to simulate the same by running 01 sample.

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [June 11, 2026, 7:05am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/18 "2026-06-11T07:05:02Z")

</div>

I use 6mbps and vbr in my application.  
You can use a higher bitrate for your test because your video source may be more complex as long as the compressed bitstream can show a proper ROI encoding

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [June 12, 2026, 1:48am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/19 "2026-06-12T01:48:05Z")

</div>

Hi,  
Please check the attached h265 streams recorded on AGX Orin developer kit in Jetpack 6.2.2. r36.5.  
[out\_vbr.265](https://forums.developer.nvidia.com/secure-uploads/nvidia/original/4X/b/5/d/b5d0bc992537a93a943853b72eebb49f8f69f4b5.265) (5.3 MB)  
[out\_vbr\_1.265](https://forums.developer.nvidia.com/secure-uploads/nvidia/original/4X/f/9/c/f9c6b1b2aa67e316aa063bca0792a0458e25ce7e.265) (5.3 MB)  
[roi.cfg](https://forums.developer.nvidia.com/secure-uploads/nvidia/original/4X/9/a/2/9a256613d04c58e87a47d17c343cf4d3001421d3.cfg) (1.4 KB)  
[roi\_1.cfg](https://forums.developer.nvidia.com/secure-uploads/nvidia/original/4X/4/3/1/4316571842164c74fe12a231c0b3dacc5cf9a01c.cfg) (1.3 KB)

```auto
01_video_encode$ gst-launch-1.0 videotestsrc num-buffers=50 ! video/x-raw,width=5760,height=1080,format=I420 ! filesink location=~/5760_1080.yuv
01_video_encode$ ./video_encode ~/5760_1080.yuv 5760 1080 H265 out_vbr.265 --eroi -roi ~/roi.cfg --input-metadata -rc vbr -br 30000000
01_video_encode$ ./video_encode ~/5760_1080.yuv 5760 1080 H265 out_vbr_1.265 --eroi -roi ~/roi_1.cfg --input-metadata -rc vbr -br 30000000

```

---

<div class="post-metadata">

**Author:** ![fcj](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@fcj](https://forums.developer.nvidia.com/u/fcj)\
**Post date:** [June 12, 2026, 5:13pm UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/20 "2026-06-12T17:13:12Z")

</div>

These are qp heatmaps of first 15 frames of out\_vbr\_1.265 and they don’t correlate with your roi\_1.cfg. Maybe my QP tool is not correct. Can you check your side too?

 ![frame_000010_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/1/f/2/1f2ab79d4582e825e8c8d1d9078546332a1f4b7b.png)

 ![frame_000009_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/6/3/1/6316ee7189fc434c237c96b79d00ddeee79e5e10.png)

 ![frame_000008_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/a/4/b/a4b3c9cd747ec87ece0ef7a09360d901d724cdbc.png)

 ![frame_000007_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/0/a/b/0ab4659fc800dc93bb96b864c7431c16df120286.png)

 ![frame_000006_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/6/4/0/640fb4bceedc12f31d9d4a5a961b676485ae78bd.png)

 ![frame_000005_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/8/9/1/891033bc5d27d2310ec0e62799622c1629896fda.png)

 ![frame_000004_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/2/a/1/2a134522b303d497e946adad471ece07616d675d.png)

 ![frame_000003_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/8/c/e/8ce5de59ff3414e7785d8926d8b5dd6cd3155199.png)

 ![frame_000002_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/2/9/f/29fa6b84606826540ef805db429963182def6e05.png)

 ![frame_000001_qp_heatmap](https://global.discourse-cdn.com/nvidia/original/4X/a/5/3/a5342bc920c7c7faf65fc8bbe3d4a5afddfca24d.png)

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [July 14, 2026, 6:38am UTC](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384/22 "2026-07-14T06:38:11Z")

</div>

Hi,  
Looks like there is no free tool for parsing H265 stream. Can your tool show coding tree blocks(CTBs)? Per the page:  
[H265 – part I : Technical Overview – Video Encoding & Streaming Technologies](https://sonnati.wordpress.com/2014/06/20/h265-part-i-technical-overview/)  
H265 can have CTBs in different size, so the macroblocks near ROI may be encoded with same qp value. We think this is why you see the frames in comment [#1](https://forums.developer.nvidia.com/t/371384)and [#4](https://forums.developer.nvidia.com/t/371384/4)

[Next page](https://forums.developer.nvidia.com/t/roi-in-orin-encoder/371384.md?page=2)
