Recherche avancée
Autres articles (16)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)
Sur d’autres sites (4920)
-
System.AccessViolationException on avcodec_open2 using FFMpeg.AutoGen
5 décembre 2024, par forlayoI am using FFMpeg.AutoGen (v6.0.0.2) with hwencode support for Nvidia cards, and in few devices (for example on NVIDIA GeForce MX350) when I am doing fffmpeg.avcodec_open2 I got the following ffmpeg message in logs :


[h264_nvenc @ 000001f473fcc480] OpenEncodeSessionEx failed: unsupported device (2): (no details)



And then it crashes with the following crash :


Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
 at FFmpeg.AutoGen.DynamicallyLoadedBindings+<>c.<initialize>b__2_494(FFmpeg.AutoGen.AVCodecContext*, FFmpeg.AutoGen.AVCodec*, FFmpeg.AutoGen.AVDictionary**)
 at FFmpeg.AutoGen.ffmpeg.avcodec_open2(FFmpeg.AutoGen.AVCodecContext*, FFmpeg.AutoGen.AVCodec*, FFmpeg.AutoGen.AVDictionary**)
 at GraphicsCheck.FfmpegChecker.StartEncoder(Omni.Platforms.Windows.Services.AV.CodecInfo, Int32, Int32, Int32)
 at GraphicsCheck.FfmpegChecker.CheckConfig(CodecConfig)
 at Program.<main>$(System.String[])
</main></initialize>

I created a sample app to demo this issue. And following the path of the calls..


- 

- That happens at nvenc_open_session and is called here
- That would cause going to fail2 routine, which is this one :






fail2:
 CHECK_CU(dl_fn->cuda_dl->cuCtxDestroy(ctx->cu_context_internal));
 ctx->cu_context_internal = NULL;


- 

- ctx->cu_context_internal comes from (in same method) then I suppose it was created properly (as otherwise wouldn't continue).




ret = CHECK_CU(dl_fn->cuda_dl->cuCtxCreate(&ctx->cu_context_internal, 0, cu_device));
 if (ret < 0)
 goto fail;


- 

- ctx in that method is the priv_data of AVCodecContext as we can see here :




static av_cold int nvenc_check_device(AVCodecContext *avctx, int idx)
{
 NvencContext *ctx = avctx->priv_data;


- 

- Also the act of printing the error message, on nvenc_print_error, is interacting with context.




static int nvenc_print_error(AVCodecContext *avctx, NVENCSTATUS err,
 const char *error_string)
{
 const char *desc;
 const char *details = "(no details)";
 int ret = nvenc_map_error(err, &desc);

#ifdef NVENC_HAVE_GETLASTERRORSTRING
 NvencContext *ctx = avctx->priv_data;
 NV_ENCODE_API_FUNCTION_LIST *p_nvenc = &ctx->nvenc_dload_funcs.nvenc_funcs;

 if (p_nvenc && ctx->nvencoder)
 details = p_nvenc->nvEncGetLastErrorString(ctx->nvencoder);
#endif

 av_log(avctx, AV_LOG_ERROR, "%s: %s (%d): %s\n", error_string, desc, err, details);

 return ret;
}


- 

-
av_log is executed as we can see the error message on logs then the other lines shouldn't be a problem.


-
Seeing the other calls, when nvenc_check_device fails the error is going up to nvenc_check_device -> nvenc_setup_device but we aren't seeing more logs then the issue may be on nvenc_check_device on fail2 routine or on nvenc_print_error








Any thoughts ?


-
FFMPEG extracting frames is slow even with CUDA
5 juin 2023, par Ξένη ΓήινοςI have a bunch of videos at some location that I want to extract frames from.


The videos are of .wmv format, and have a framerate of 25, and I want to extract all frames from them losslessly.


And I do have a dedicated graphics card (NVIDIA Geforce GTX 1050 Ti, I know it's old), so I want to utilize it to accelerate frame extraction. I downloaded FFMPEG with CUDA support from www.gyan.dev for exactly this.


I came up with this PowerShell command :


gci C:\Users\Xeni\Documents -filter *.wmv | %{
 $folder = 'C:\Users\Xeni\Desktop\' + $($_.name -replace '.wmv')
 md $folder;
 D:\ffmpeg\ffmpeg.exe -hwaccel cuda -i $_.fullname -vf fps=25 "$folder\%05d.bmp"
}


But somehow it is slow, its disk write speed is less than 100 MiB/s and it uses less than 1% GPU, and it takes about 2 seconds to process 25 frames.


How can I speed up this command ?


-
vulkan_decode : do not align the image dimensions
29 mai 2023, par Lynnevulkan_decode : do not align the image dimensions
According to Dave Airlie :
> <airlied> but I think ignoring it should be fine, I can't see any
> other way to get the imaeg extents correct for other usage
> <Lynne> what width/height should be used for the images ?
> the final presentable dimensions, or the coded dimensions ?
> <airlied> if you don't want noise I think the presentable dims
> <airlied> the driver should round up the allocations internally,
> but if you are going to sample from the images then w/h have to be
> the bounds of the image you want
> <airlied> since otherwise there's no way to stop the sampler from
> going outside the edgesApparently, the alignment values are informative, rather than mandatory,
but the spec's wording makes it sound as if they're mandatory.