-
Notifications
You must be signed in to change notification settings - Fork 8.2k
video: add video compression support to tcpserversink sample #95862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cfriedt
merged 7 commits into
zephyrproject-rtos:main
from
hfruchet-st:pr-tcpserversink-h264-n6
Oct 8, 2025
+562
−10
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
439af97
doc: build: dts: api: document the zephyr,videoenc chosen node
hfruchet-st 96ef856
snippets: stm32: addition of video-stm32-venc
5b80b48
samples: video: tcpserversink: change printk to LOG_
hfruchet-st b16c13a
samples: video: tcpserversink: sync with capture sample
hfruchet-st 17df352
samples: video: tcpserversink: N-buffering configuration
hfruchet-st 1102764
samples: video: tcpserversink: video compression support
hfruchet-st ddd242f
samples: video: tcpserversink: add stm32n6570_dk support
hfruchet-st File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
| # Copyright (c) 2025 STMicroelectronics. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| mainmenu "TCP camera streaming sample application" | ||
|
|
||
| menu "Video capture configuration" | ||
|
|
||
| config VIDEO_SOURCE_CROP_LEFT | ||
| int "Crop area left value" | ||
| default 0 | ||
| help | ||
| Left value of the crop area within the video source. | ||
|
|
||
| config VIDEO_SOURCE_CROP_TOP | ||
| int "Crop area top value" | ||
| default 0 | ||
| help | ||
| Top value of the crop area within the video source. | ||
|
|
||
| config VIDEO_SOURCE_CROP_WIDTH | ||
| int "Crop area width value" | ||
| default 0 | ||
| help | ||
| Width value of the crop area within the video source. | ||
| If set to 0, the crop is not applied. | ||
|
|
||
| config VIDEO_SOURCE_CROP_HEIGHT | ||
| int "Crop area height value" | ||
| default 0 | ||
| help | ||
| Height value of the crop area within the video source. | ||
| If set to 0, the crop is not applied. | ||
|
|
||
| config VIDEO_FRAME_HEIGHT | ||
| int "Height of the video frame" | ||
| default 0 | ||
| help | ||
| Height of the video frame. If set to 0, the default height is used. | ||
|
|
||
| config VIDEO_FRAME_WIDTH | ||
| int "Width of the video frame" | ||
| default 0 | ||
| help | ||
| Width of the video frame. If set to 0, the default width is used. | ||
|
|
||
| config VIDEO_PIXEL_FORMAT | ||
| string "Pixel format of the video frame" | ||
| help | ||
| Pixel format of the video frame. If not set, the default pixel format is used. | ||
|
|
||
| config VIDEO_CAPTURE_N_BUFFERING | ||
| int "Capture N-buffering" | ||
| default 2 | ||
| help | ||
| Framerate versus memory usage tradeoff. | ||
| "2" allows to capture while sending data (optimal framerate). | ||
| "1" allows to reduce memory usage but capture framerate is lower. | ||
| If not set defaults to "2". | ||
josuah marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| config VIDEO_CTRL_HFLIP | ||
| bool "Mirror the video frame horizontally" | ||
| help | ||
| If set, mirror the video frame horizontally | ||
|
|
||
| config VIDEO_CTRL_VFLIP | ||
| bool "Mirror the video frame vertically" | ||
| help | ||
| If set, mirror the video frame vertically | ||
|
|
||
| config VIDEO_ENCODED_PIXEL_FORMAT | ||
| string "Pixel format of the encoded frame" | ||
| default VIDEO_PIX_FMT_H264 | ||
| help | ||
| Compression format used by the video encoder if enabled. | ||
| If not set defaults to H264 video bitstream with startcodes. | ||
|
|
||
| endmenu | ||
|
|
||
| source "Kconfig.zephyr" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
samples/drivers/video/tcpserversink/boards/stm32n6570_dk.conf
JarmouniA marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Video buffer pool | ||
| CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=10000000 | ||
| CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=10 | ||
|
|
||
| CONFIG_FPU=y | ||
|
|
||
| # Capture | ||
| CONFIG_VIDEO_CAPTURE_N_BUFFERING=2 | ||
|
|
||
| # Video encoder | ||
| CONFIG_MAIN_STACK_SIZE=4096 | ||
|
|
||
| # Network buffers | ||
| CONFIG_NET_BUF_RX_COUNT=4 | ||
| CONFIG_NET_BUF_TX_COUNT=8 |
15 changes: 15 additions & 0 deletions
15
samples/drivers/video/tcpserversink/boards/stm32n6570_dk_stm32n657xx_fsbl.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Video buffer pool | ||
| CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=10000000 | ||
| CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=10 | ||
|
|
||
| CONFIG_FPU=y | ||
|
|
||
| # Capture | ||
| CONFIG_VIDEO_CAPTURE_N_BUFFERING=2 | ||
|
|
||
| # Video encoder | ||
| CONFIG_MAIN_STACK_SIZE=4096 | ||
|
|
||
| # Network buffers | ||
| CONFIG_NET_BUF_RX_COUNT=4 | ||
| CONFIG_NET_BUF_TX_COUNT=8 |
15 changes: 15 additions & 0 deletions
15
samples/drivers/video/tcpserversink/boards/stm32n6570_dk_stm32n657xx_sb.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Video buffer pool | ||
| CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=10000000 | ||
| CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=10 | ||
|
|
||
| CONFIG_FPU=y | ||
|
|
||
| # Capture | ||
| CONFIG_VIDEO_CAPTURE_N_BUFFERING=2 | ||
|
|
||
| # Video encoder | ||
| CONFIG_MAIN_STACK_SIZE=4096 | ||
|
|
||
| # Network buffers | ||
| CONFIG_NET_BUF_RX_COUNT=4 | ||
| CONFIG_NET_BUF_TX_COUNT=8 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.