
Recherche avancée
Autres articles (103)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (15757)
-
lavc : add hevc_vulkan hardware encoder
14 septembre 2024, par Lynnelavc : add hevc_vulkan hardware encoder
This commit adds a Vulkan hardware HEVC encoder, with full support
of the spec - I, P, and B-frames. -
lavc : Make hardware config method support more explicit for hwaccels
8 décembre 2017, par Thomas Guillemlavc : Make hardware config method support more explicit for hwaccels
This fixes the use of old ad-hoc methods which are still supported by some
hwaccels which also support newer methods (DXVA2, VAAPI, VDPAU,
videotoolbox) - without the method being visible here, ff_get_format()
would refuse to use it.Signed-off-by : Mark Thompson <sw@jkqxz.net>
-
FFmpeg : The hardware pixel format is not supported by the device type
14 mars 2024, par ffvideonerWindows, C#, FFmpeg.AutoGen


I want to use hardware acceleration to encode videos using FFmpeg.


These are parts of my code :


AVBufferRef* hw_device_ctx = null;
int err = ffmpeg.av_hwdevice_ctx_create(&hw_device_ctx, AVHWDeviceType.AV_HWDEVICE_TYPE_DXVA2, null, null, 0);

AVBufferRef* hw_frames_ref;
AVHWFramesContext* frames_ctx = null;

hw_frames_ref = ffmpeg.av_hwframe_ctx_alloc(hw_device_ctx);

frames_ctx = (AVHWFramesContext*)(hw_frames_ref->data);

for (int i = 0; i < 256; i++)
{

 frames_ctx->format = (AVPixelFormat)i;
 frames_ctx->sw_format = (AVPixelFormat)i;
 
 frames_ctx->width = ctx->width;
 frames_ctx->height = ctx->height;
 frames_ctx->initial_pool_size = 20;
 
 ffmpeg.av_hwframe_ctx_init(hw_frames_ref);

}



That is, all
AVPixelFormat
values are enumerated.

Besides
AV_HWDEVICE_TYPE_DXVA2
I also useAV_HWDEVICE_TYPE_CUDA
andAV_HWDEVICE_TYPE_D3D11VA
.

I get one response for all
AVHWDeviceType
and for allAVPixelFormat
:

The hardware pixel format %PixelFormat% is not supported by the device type %DeviceType%



Why isn't any pixel format supported ?


FFmpeg code sources :


int av_hwframe_ctx_init(AVBufferRef *ref)
{
 FFHWFramesContext *ctxi = (FFHWFramesContext*)ref->data;
 AVHWFramesContext *ctx = &ctxi->p;
 const enum AVPixelFormat *pix_fmt;
 int ret;

 if (ctxi->source_frames) {
 /* A derived frame context is already initialised. */
 return 0;
 }

 /* validate the pixel format */
 for (pix_fmt = ctxi->hw_type->pix_fmts; *pix_fmt != AV_PIX_FMT_NONE; pix_fmt++) {
 if (*pix_fmt == ctx->format)
 break;
 }
 if (*pix_fmt == AV_PIX_FMT_NONE) {
 av_log(ctx, AV_LOG_ERROR,
 "The hardware pixel format '%s' is not supported by the device type '%s'\n",
 av_get_pix_fmt_name(ctx->format), ctxi->hw_type->name);
 return AVERROR(ENOSYS);
 }

}



...


const HWContextType ff_hwcontext_type_dxva2 = {
 .type = AV_HWDEVICE_TYPE_DXVA2,
 .name = "DXVA2",

 .device_hwctx_size = sizeof(AVDXVA2DeviceContext),
 .frames_hwctx_size = sizeof(DXVA2FramesContext),

 .device_create = dxva2_device_create,
 .frames_init = dxva2_frames_init,
 .frames_uninit = dxva2_frames_uninit,
 .frames_get_buffer = dxva2_get_buffer,
 .transfer_get_formats = dxva2_transfer_get_formats,
 .transfer_data_to = dxva2_transfer_data_to,
 .transfer_data_from = dxva2_transfer_data_from,
 .map_from = dxva2_map_from,

 .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_DXVA2_VLD, AV_PIX_FMT_NONE },
};



Similarly for other device types.


That is, at least one pixel format must be supported !