
Surtout n'installez pas la distribution de la fondation Raspberry Pi, car elle contient des choses douteuses venant de chez Microsoft, et qui sont installées à l'insu de votre plein gré.
Pourquoi j'ai pris 8Go de RAM ? Parce que je manipule plein d'images (montées en mémoire, pour des ralentis), et la RAM est utile (1280 x720 @24 images par seconde, avec openCV+ SDL2 + ffmpeg). Si vous ne travaillez pas avec des vidéos, 4 Go fonctionne parfaitement, pas la peine de payer plus cher.
En fait, après un rapide test, on se rend compte que cette machine n'est pas stable thermiquement, et j'ai finalement pris le temps d'acheter un boîtier Argon One m.2 qui permet d'utiliser un disque dur SSD (type B + M key, impératif).
Après ce second passage à la caisse, ça devient sérieux et vraiment correct : on peut faire des maths et pas mal de choses, y compris de la vidéo légère (enregistrement à 24 fps), visualisation en thermographie infrarouge (entre 17 et 25 fps) etc.
Le plus gros défaut : je n'ai pas encore réussi à faire passer la nappe pour la caméra NoIR, et c'est vraiment un énorme défaut, mais je verrai plus tard si je trouve une vraie solution, car j'utilise des vraies caméra thermiques actuellement, et ça passe par le bus USB 3.0 (via la libuvc)
Autre défaut : le son. Simplement merdique, qui passe par le hdmi (qui est un mauvais choix par excellence, puisque fermé, trappe à pognon et j'en passe, mais c'est l'interface vendue avec la machine, alors ...)
Pour le reste, tout fonctionne. En particulier le wifi (rien à faire), et j'ai même compiz qui tourne sur le bureau (bon, ça chauffe un peu, mais c'est correct).
Attention toutefois, si vous voulez que ça fonctionne bien, il faut installer mesa (version upstream avec git + meson + ninja) et la dernière version de DRM (Direct Rendering Manager) sur le gitlab de FreeDesktop. Sinon, ça ne marchera pas bien.
Code : | Sélectionner tout |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | me@ma_machine:~$ glxinfo -B name of display: :0.0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Broadcom (0x14e4) Device: V3D 4.2 (0xffffffff) Version: 20.3.3 Accelerated: yes Video memory: 7630MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 3.0 Max compat profile version: 3.0 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1 OpenGL vendor string: Broadcom OpenGL renderer string: V3D 4.2 OpenGL version string: 3.0 Mesa 20.3.3 (git-124d611014) OpenGL shading language version string: 1.30 OpenGL context flags: (none) OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.3.3 (git-124d611014) OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10 |
Code : | Sélectionner tout |
1 2 3 4 5 | MESA_GLSL_VERSION_OVERRIDE=130 MESA_GL_VERSION_OVERRIDE=3.0 export MESA_GLSL_VERSION_OVERRIDE MESA_GL_VERSION_OVERRIDE |
=> pour en savoir plus sur V3D, et MESA sur Raspberry Pi
Concernant la consommation, je dois être autour de 9W, avec un overclock CPU à 2GHz (stable) et un GPU à 650 MHz. Ce n'est donc pas une machine puissante, mais ce n'est pas mon besoin actuel.
À titre d'information, l'accélération matérielle, le décodage matériel pour la vidéo n'est PAS activée, mais après avoir réussi à compiler Tizonia (sans spotify), et plein d'autres choses, j'arrive à voir des vidéos en 720p @ 30 fps de façon tout à fait honorable.
Pour avoir une idée des performances vidéo, je me suis fait quelques petits scripts, dont les résultats commencent à être encourageants. cf ci-dessous :
Code : | Sélectionner tout |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | me@ma_machine:~$ ./check_ffmpeg_codecs V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264) V..... libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264) V..... h264_omx OpenMAX IL H.264 video encoder (codec h264) V..... h264_v4l2m2m V4L2 mem2mem H.264 encoder wrapper (codec h264) V..... h264_vaapi H.264/AVC (VAAPI) (codec h264) VFS..D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 V..... h264_v4l2m2m V4L2 mem2mem H.264 decoder wrapper (codec h264) V.S... ffv1 FFmpeg video codec #1 VF.... ffvhuff Huffyuv FFmpeg variant V.S... mpeg1video MPEG-1 video V.S... mpeg2video MPEG-2 video V..... mpeg2_vaapi MPEG-2 (VAAPI) (codec mpeg2video) V.S... mpeg4 MPEG-4 part 2 V..... libxvid libxvidcore MPEG-4 part 2 (codec mpeg4) V..... mpeg4_omx OpenMAX IL MPEG-4 video encoder (codec mpeg4) V..... mpeg4_v4l2m2m V4L2 mem2mem MPEG4 encoder wrapper (codec mpeg4) V..... msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2 V..... msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3) VFS..D ffv1 FFmpeg video codec #1 VF..BD ffvhuff Huffyuv FFmpeg variant V.S.BD mpeg1video MPEG-1 video V..... mpeg1_v4l2m2m V4L2 mem2mem MPEG1 decoder wrapper (codec mpeg1video) V.S.BD mpeg2video MPEG-2 video V.S.BD mpegvideo MPEG-1 video (codec mpeg2video) V..... mpeg2_v4l2m2m V4L2 mem2mem MPEG2 decoder wrapper (codec mpeg2video) VF..BD mpeg4 MPEG-4 part 2 V..... mpeg4_v4l2m2m V4L2 mem2mem MPEG4 decoder wrapper (codec mpeg4) V...BD msmpeg4v1 MPEG-4 part 2 Microsoft variant version 1 V...BD msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2 V...BD msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3) V..... libx265 libx265 H.265 / HEVC (codec hevc) V..... hevc_v4l2m2m V4L2 mem2mem HEVC encoder wrapper (codec hevc) V..... hevc_vaapi H.265/HEVC (VAAPI) (codec hevc) VFS..D hevc HEVC (High Efficiency Video Coding) V..... hevc_v4l2m2m V4L2 mem2mem HEVC decoder wrapper (codec hevc) |
[EDIT] Pour ceux qui souhaiteraient comparer, voici deux petits scripts à tester dans un terminal :
Script 1 : test des codecs (décodeurs et encodeurs) compilés avec ffmpeg. Me demander en privé si vous voulez savoir comment le l'ai compilé (il n'y a rien de compliqué en fait).
Code : | Sélectionner tout |
1 2 3 4 5 6 7 8 9 10 | #!/bin/bash for i in h264 mpeg hevc h265 do for j in encoders decoders do ffmpeg -hide_banner -${j} | grep ${i} done done |
Code : | Sélectionner tout |
1 2 | for codec in H264 MPG2 WVC1 MPG4 MJPG WMV9 ; do echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" ; done |
Attention : je n'utilise PAS les obscures bibliothèques libomx* (en 32 bits !) pour obtenir ces résultats. J'ai simplement pris le temps de compiler ce qu'il fallait, et de corriger ce qui devait l'être. Ce n'est pas trivial : débutants s'abstenir, simplement attendre que ce soit intégré dans votre distribution préférée.
J'allais oublier : Vulkan fonctionne aussi.
[CODE]
me@ma_machine:~$ vulkaninfo
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
==========
VULKANINFO
==========
Vulkan Instance Version: 1.2.141
Instance Extensions: count = 18
===============================
VK_EXT_acquire_xlib_display : extension revision 1
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 2
VK_EXT_direct_mode_display : extension revision 1
VK_EXT_display_surface_counter : extension revision 1
VK_KHR_device_group_creation : extension revision 1
VK_KHR_display : extension revision 23
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 1
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_surface_protected_capabilities : extension revision 1
VK_KHR_wayland_surface : extension revision 6
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
Layers: count = 3
=================
VK_LAYER_KHRONOS_validation (Khronos Validation Layer) Vulkan version 1.2.141, layer version 1:
Layer Extensions: count = 3
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 1
VK_EXT_validation_features : extension revision 2
Devices: count = 1
GPU id = 0 (llvmpipe (LLVM 11.0.0, 128 bits))
Layer-Device Extensions: count = 3
VK_EXT_debug_marker : extension revision 4
VK_EXT_tooling_info : extension revision 1
VK_EXT_validation_cache : extension revision 1
VK_LAYER_MESA_device_select (Linux device selection layer) Vulkan version 1.1.73, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id = 0 (llvmpipe (LLVM 11.0.0, 128 bits))
Layer-Device Extensions: count = 0
VK_LAYER_MESA_overlay (Mesa Overlay layer) Vulkan version 1.1.73, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id = 0 (llvmpipe (LLVM 11.0.0, 128 bits))
Layer-Device Extensions: count = 0
Presentable Surfaces:
=====================
GPU id : 0 (llvmpipe (LLVM 11.0.0, 128 bits)):
Surface types: count = 2
VK_KHR_xcb_surface
VK_KHR_xlib_surface
Formats: count = 2
SurfaceFormat[0]:
format = FORMAT_B8G8R8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[1]:
format = FORMAT_B8G8R8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
Present Modes: count = 4
PRESENT_MODE_IMMEDIATE_KHR
PRESENT_MODE_MAILBOX_KHR
PRESENT_MODE_FIFO_KHR
PRESENT_MODE_FIFO_RELAXED_KHR
VkSurfaceCapabilitiesKHR:
-------------------------
minImageCount = 3
maxImageCount = 0
currentExtent:
width = 256
height = 256
minImageExtent:
width = 256
height = 256
maxImageExtent:
width = 256
height = 256
maxImageArrayLayers = 1
supportedTransforms: count = 1
SURFACE_TRANSFORM_IDENTITY_BIT_KHR
currentTransform = SURFACE_TRANSFORM_IDENTITY_BIT_KHR
supportedCompositeAlpha: count = 2
COMPOSITE_ALPHA_OPAQUE_BIT_KHR
COMPOSITE_ALPHA_INHERIT_BIT_KHR
supportedUsageFlags: count = 5
IMAGE_USAGE_TRANSFER_SRC_BIT
IMAGE_USAGE_TRANSFER_DST_BIT
IMAGE_USAGE_SAMPLED_BIT
IMAGE_USAGE_STORAGE_BIT
IMAGE_USAGE_COLOR_ATTACHMENT_BIT
VkSurfaceCapabilities2EXT:
--------------------------
supportedSurfaceCounters: count = 0
None
VkSurfaceProtectedCapabilitiesKHR:
----------------------------------
supportsProtected = false
Device Groups:
==============
Group 0:
Properties:
physicalDevices: count = 1
llvmpipe (LLVM 11.0.0, 128 bits) (ID: 0)
subsetAllocation = 0
Present Capabilities = Group does not support VK_KHR_device_group, skipping printing present capabilities
Device Properties and Extensions:
=================================
GPU0:
VkPhysicalDeviceProperties:
---------------------------
apiVersion = 4194306 (1.0.2)
driverVersion = 1 (0x0001)
vendorID = 0x10005
deviceID = 0x0000
deviceType = PHYSICAL_DEVICE_TYPE_CPU
deviceName = llvmpipe (LLVM 11.0.0, 128 bits)
VkPhysicalDeviceLimits:
-----------------------
maxImageDimension1D = 16384
maxImageDimension2D = 16384
maxImageDimension3D = 4096
maxImageDimensionCube = 32768
maxImageArrayLayers = 2048
maxTexelBufferElements = 134217728
maxUniformBufferRange = 65536
maxStorageBufferRange = 134217728
maxPushConstantsSize = 128
maxMemoryAllocationCount = 4096
maxSamplerAllocationCount = 32768
bufferImageGranularity = 0x00000040
sparseAddressSpaceSize = 0x00000000
maxBoundDescriptorSets = 8
maxPerStageDescriptorSamplers = 32
maxPerStageDescriptorUniformBuffers = 16
maxPerStageDescriptorStorageBuffers = 16
maxPerStageDescriptorSampledImages = 128
maxPerStageDescriptorStorageImages = 128
maxPerStageDescriptorInputAttachments = 8
maxPerStageResources = 128
maxDescriptorSetSamplers = 32768
maxDescriptorSetUniformBuffers = 256
maxDescriptorSetUniformBuffersDynamic = 256
maxDescriptorSetStorageBuffers = 256
maxDescriptorSetStorageBuffersDynamic = 256
maxDescriptorSetSampledImages = 256
maxDescriptorSetStorageImages = 256
maxDescriptorSetInputAttachments = 256
maxVertexInputAttributes = 32
maxVertexInputBindings = 32
maxVertexInputAttributeOffset = 2047
maxVertexInputBindingStride = 2048
maxVertexOutputComponents = 128
maxTessellationGenerationLevel = 64
maxTessellationPatchSize = 32
maxTessellationControlPerVertexInputComponents = 128
maxTessellationControlPerVertexOutputComponents = 128
maxTessellationControlPerPatchOutputComponents = 128
maxTessellationControlTotalOutputComponents = 4096
maxTessellationEvaluationInputComponents = 128
maxTessellationEvaluationOutputComponents = 128
maxGeometryShaderInvocations = 32
maxGeometryInputComponents = 64
maxGeometryOutputComponents = 128
maxGeometryOutputVertices = 1024
maxGeometryTotalOutputComponents = 1024
maxFragmentInputComponents = 128
maxFragmentOutputAttachments = 8
maxFragmentDualSrcAttachments = 2
maxFragmentCombinedOutputResources = 8
maxComputeSharedMemorySize = 32768
maxComputeWorkGroupCount: count = 3
65535
65535
65535
maxComputeWorkGroupInvocations = 1024
maxComputeWorkGroupSize: count = 3
1024
1024
1024
subPixelPrecisionBits = 8
subTexelPrecisionBits = 8
mipmapPrecisionBits = 8
maxDrawIndexedIndexValue = 4294967295
maxDrawIndirectCount = 4294967295
maxSamplerLodBias = 16
maxSamplerAnisotropy = 16
maxViewports = 16
maxViewportDimensions: count = 2
16384
16384
viewportBoundsRange: count = 2
-32768
32768
viewportSubPixelBits = 0
minMemoryMapAlignment = 4096
minTexelBufferOffsetAlignment = 0x00000010
minUniformBufferOffsetAlignment = 0x00000010
minStorageBufferOffsetAlignment = 0x00000010
minTexelOffset = -32
maxTexelOffset = 31
minTexelGatherOffset = -32
maxTexelGatherOffset = 31
minInterpolationOffset = -2
maxInterpolationOffset = 2
subPixelInterpolationOffsetBits = 8
maxFramebufferWidth = 16384
maxFramebufferHeight = 16384
maxFramebufferLayers = 2048
framebufferColorSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
framebufferDepthSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
framebufferStencilSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
framebufferNoAttachmentsSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
maxColorAttachments = 8
sampledImageColorSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
sampledImageIntegerSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
sampledImageDepthSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
sampledImageStencilSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
storageImageSampleCounts: count = 2
SAMPLE_COUNT_1_BIT
SAMPLE_COUNT_4_BIT
maxSampleMaskWords = 1
timestampComputeAndGraphics = true
timestampPeriod = 1
maxClipDistances = 8
maxCullDistances = 8
maxCombinedClipAndCullDistances = 8
discreteQueuePriorities = 2
pointSizeRange: count = 2
0
255
lineWidthRange: count = 2
1
1
pointSizeGranularity = 0.125
lineWidthGranularity = 0
strictLines = false
standardSampleLocations = true
optimalBufferCopyOffsetAlignment = 0x00000080
optimalBufferCopyRowPitchAlignment = 0x00000080
nonCoherentAtomSize = 0x00000040
VkPhysicalDeviceSparseProperties:
---------------------------------
residencyStandard2DBlockShape = false
residencyStandard2DMultisampleBlockShape = false
residencyStandard3DBlockShape = false
residencyAlignedMipSize = false
residencyNonResidentStrict = false
VkPhysicalDeviceDriverPropertiesKHR:
------------------------------------
driverID = DRIVER_ID_MESA_LLVMPIPE
driverName = llvmpipe
driverInfo = Mesa 20.3.3 (git-124d611014) (LLVM 11.0.0)
conformanceVersion = 1.0.0.0
VkPhysicalDeviceIDPropertiesKHR:
--------------[/1]...
La fin de cet article est réservée aux abonnés. Soutenez le Club Developpez.com en prenant un abonnement pour que nous puissions continuer à vous proposer des publications.