-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Draft
hfruchet-st
wants to merge
6
commits into
zephyrproject-rtos:main
Choose a base branch
from
hfruchet-st:pr-tcpserversink-h264-n6
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a4d5efc
doc: build: dts: api: document the zephyr,videoenc chosen node
hfruchet-st c508165
samples: video: tcpserversink: sync with capture sample
hfruchet-st 135cc7f
samples: video: tcpserversink: video compression support
hfruchet-st 4d9f17b
samples: video: tcpserversink: nv12 support
hfruchet-st b50695e
samples: video: tcpserversink: N-buffering configuration
hfruchet-st 0fa7a7e
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,73 @@ | ||
# 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". | ||
|
||
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 | ||
|
||
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
23 changes: 23 additions & 0 deletions
23
samples/drivers/video/tcpserversink/boards/stm32n6570_dk.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,23 @@ | ||
# Video buffer pool | ||
CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=10000000 | ||
CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=10 | ||
|
||
# Camera interface | ||
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_PIXEL_FORMAT="pRAA" | ||
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH=2592 | ||
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT=1944 | ||
CONFIG_FPU=y | ||
|
||
# Capture | ||
CONFIG_VIDEO_FRAME_WIDTH=1920 | ||
CONFIG_VIDEO_FRAME_HEIGHT=1080 | ||
CONFIG_VIDEO_PIXEL_FORMAT="NV12" | ||
CONFIG_VIDEO_CAPTURE_N_BUFFERING=2 | ||
|
||
# Video encoder | ||
CONFIG_VIDEO_STM32_VENC=y | ||
CONFIG_MAIN_STACK_SIZE=4096 | ||
|
||
# Network buffers | ||
CONFIG_NET_BUF_RX_COUNT=4 | ||
CONFIG_NET_BUF_TX_COUNT=8 |
23 changes: 23 additions & 0 deletions
23
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,23 @@ | ||
# Video buffer pool | ||
CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=10000000 | ||
CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=10 | ||
|
||
# Camera interface | ||
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_PIXEL_FORMAT="pRAA" | ||
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH=2592 | ||
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT=1944 | ||
CONFIG_FPU=y | ||
|
||
# Capture | ||
CONFIG_VIDEO_FRAME_WIDTH=1920 | ||
CONFIG_VIDEO_FRAME_HEIGHT=1080 | ||
CONFIG_VIDEO_PIXEL_FORMAT="NV12" | ||
CONFIG_VIDEO_CAPTURE_N_BUFFERING=2 | ||
|
||
# Video encoder | ||
CONFIG_VIDEO_STM32_VENC=y | ||
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.overlay
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 @@ | ||
/* | ||
* Copyright (c) 2025 STMicroelectronics. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
chosen { | ||
zephyr,videoenc = &venc; | ||
}; | ||
}; | ||
|
||
&venc { | ||
status = "okay"; | ||
}; |
23 changes: 23 additions & 0 deletions
23
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,23 @@ | ||
# Video buffer pool | ||
CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=10000000 | ||
CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=10 | ||
|
||
# Camera interface | ||
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_PIXEL_FORMAT="pRAA" | ||
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH=2592 | ||
CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT=1944 | ||
CONFIG_FPU=y | ||
|
||
# Capture | ||
CONFIG_VIDEO_FRAME_WIDTH=1920 | ||
CONFIG_VIDEO_FRAME_HEIGHT=1080 | ||
CONFIG_VIDEO_PIXEL_FORMAT="NV12" | ||
CONFIG_VIDEO_CAPTURE_N_BUFFERING=2 | ||
|
||
# Video encoder | ||
CONFIG_VIDEO_STM32_VENC=y | ||
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.overlay
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 @@ | ||
/* | ||
* Copyright (c) 2025 STMicroelectronics. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
chosen { | ||
zephyr,videoenc = &venc; | ||
}; | ||
}; | ||
|
||
&venc { | ||
status = "okay"; | ||
}; |
Oops, something went wrong.
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.