Recherche avancée

Médias (3)

Mot : - Tags -/Valkaama

Autres articles (44)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6163)

  • Node 18 or Node 20 break ffmpeg (in google cloud functions -> ffprobe was killed with signal SIGSEGV)

    10 janvier 2024, par user20206929

    Please see below, the code is working on node js 16, but not when upgrading to node 18 or 20.

    


    const ffmpeg = require("fluent-ffmpeg");

// Following is inside a .https.onRequest Google Cloud function with enough memory

try {
  const duration = new Promise((resolve, reject) => {
  ffmpeg.ffprobe(videoUrl, async (err, metadata) => {
    if (err) {
      if (res.headersSent) {
        console.error("Response already sent");
        return;
      } else {
        console.log("Metadata:", metadata);
        console.log("err: " + err);
        res.status(400).send("Error getting video metadata");
        return;
      }
    }
  const duration = metadata.format.duration;
  console.log("video duration in second: " + duration);
  resolve(duration);
  });
});
  videoDuration = await duration;
} catch (err) {
  console.log(err);
  throw err;
}


    


    When upgrading to node 18/20 (No other change than upgrading node), the error "ffprobe not found" appears.

    


    But setting the path manually using ffmpeg.setFfprobePath(ffprobePath) ;
trigger the error : Error : ffprobe was killed with signal SIGSEGV

    


    So it seem its a permissions issue.

    


    However, I tried a lot of different solutions, none of them made this work.
For instance i tried to download manually the ffprobe from the official website https://ffbinaries.com/downloads. Then manually add it to the code.

    


    I tried to use https://www.npmjs.com/package/@ffprobe-installer/ffprobe or others package like https://www.npmjs.com/package/ffprobe-static

    


    I also tried to download the ffprobe file to the temporary folder of google cloud, and change the permission of this folder.

    


    All of those was doing the same error.

    


    None of what i could think of made any difference.

    


    Please help because i need to update node 16 to 18 or 20 before google remove node 16 on january 31 2024 and for now i don't see a solution.

    


    I also looked for other solution to get this duration from a video file url, but using ffmpeg seem to be the only one that should work out of the box. As it is working on node 16.

    


    Thank you,

    


    UPDATE - 11/26/2023

    


    GCP Functions NodeJS 16 runtime uses Ubuntu 18.04 with FFMpeg installed.
NodeJS 18/20 use Ubuntu 22.04, and Google decided not to include FFMpeg.

    


    https://cloud.google.com/functions/docs/runtime-support#node.js
https://cloud.google.com/functions/docs/reference/system-packages

    


    No workaround or solutions found as of now

    


    UPDATE - 01/10/2024

    


    Google added back ffmpeg to latest version, this is working as before now.

    


  • ffmpeg drawtext Arabic fonts doesn't render correctly [closed]

    11 février 2024, par Mahmoud Abdellatief

    what i'm trying to achieve :
loop an image into a video and overlay Arabic Text from the Qur'an on it including the text diacritical mark, using a custom font.

    


    example of the text to be rendered :

    


    بِسْمِ ٱللَّهِ ٱلرَّحْمَـٰنِ ٱلرَّحِيمِ


    


    the font used :
https://fonts.qurancomplex.gov.sa/wp02/wp-content/uploads/2024/01/UthmanicHafs_v22.zip

    


    font's unicode module :

    


    Unicode Module 
 
The Research and Development Unit in the Computer Department at King Fahd Glorious Qur’an Printing Complex relied on the unicode system unicode to create (Hafs) font in the Uthmanic Script, because this system is followed globally among computer and systems manufacturing companies in the world.

Unicode organization is a global code group that is used to define all codes and letters used in most of the world's languages and gathered in one code to facilitate the presentation and delivery on information despite of the language used. This global coding uses 1 to 4 bytes (byte = 8 bits) to encode letters, and so far only a third of the number available in Unicode organization to encode the letters of these languages.

Taking into account Hafs font with the Uthmanic Script, which was built entirely on the unicode system. We can explore the basic letters that were formed according to the following figure:

Whereas the font was developed starting from code (0600 ) to code (066FF ) Taking into account there are several encoded letters that haven't been used at all so it was replaces with the code []. The displayed copy above is the one that is been developed from the basic Arabic coding (0600-06FF) which was updated by Unicode organization in 2009.


    


    expected result :
exported video with correctly rendered text using the given font.

    


    actual result :
the text rendered contains only the diacritical marks ( which are the accents on top of the letters ) without the actual letters.
actual result

    


    what i tried :
this is my test command which exports just an image for faster results :

    


    Ffmpeg -loop 1  -i "image-2.jpg" -vf "drawtext=text='بِسْمِ ٱللَّهِ ٱلرَّحْمَـٰنِ ٱلرَّحِيمِ':fontsize=124:fontcolor=white:fontfile='UthmanicHafsV22.ttf':x=(w-text_w)/2:y=(h-text_h)/2" -frames:v 1  "output.png"


    


      

    • tried adding ft_load_flags , almost tried all of them
    • 


    • tried text_shaping=1 , with no success
    • 


    • tried textfile instead of text
    • 


    • tried changing the font, any font i try with it always have different problems, either some squares instead of the diacritical mark
    • 


    


    p.s im having same results on both latest ffmpeg compiled by myself on macos terminal with all required libraries enabled , and also on flutter ffmpeg kit full gpl

    


  • Correct syntax for using ffmpeg CUDA to crop and scale videos [closed]

    9 septembre 2024, par Stuart

    My NVIDIA and FFMPEG configuration is as follows :

    


    Linux TestBox1 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 2 20:41:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

    


    NVIDIA-Linux-x86_64-560.31.02

    


    ffmpeg version git-2024-08-19-507c2a577
encoders:
 V....D av1_nvenc            NVIDIA NVENC av1 encoder (codec av1)
 V....D h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V....D hevc_nvenc           NVIDIA NVENC hevc encoder (codec hevc)
decoders:
 V..... av1_cuvid            Nvidia CUVID AV1 decoder (codec av1)
 V..... h264_cuvid           Nvidia CUVID H264 decoder (codec h264)
 V..... hevc_cuvid           Nvidia CUVID HEVC decoder (codec hevc)
 V..... mjpeg_cuvid          Nvidia CUVID MJPEG decoder (codec mjpeg)
 V..... mpeg1_cuvid          Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)
 V..... mpeg2_cuvid          Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)
 V..... mpeg4_cuvid          Nvidia CUVID MPEG4 decoder (codec mpeg4)
 V..... vc1_cuvid            Nvidia CUVID VC1 decoder (codec vc1)
 V..... vp8_cuvid            Nvidia CUVID VP8 decoder (codec vp8)
 V..... vp9_cuvid            Nvidia CUVID VP9 decoder (codec vp9)
filters:
 ... bilateral_cuda    V->V       GPU accelerated bilateral filter
 T.. bwdif_cuda        V->V       Deinterlace CUDA frames
 ... chromakey_cuda    V->V       GPU accelerated chromakey filter
 ... colorspace_cuda   V->V       CUDA accelerated video color converter
 ..C crop              V->V       Crop the input video.
 T.C cropdetect        V->V       Auto-detect crop size.
 ... hwupload_cuda     V->V       Upload a system memory frame to a CUDA device.
 ... overlay_cuda      VV->V      Overlay one video on top of another using CUDA
 ... scale_cuda        V->V       GPU accelerated video resizer
 ... scale_npp         V->V       NVIDIA Performance Primitives video scaling and format conversion
 ... scale2ref_npp     VV->VV     NVIDIA Performance Primitives video scaling and format conversion to the given reference.
 ... sharpen_npp       V->V       NVIDIA Performance Primitives video sharpening filter.
 ... thumbnail_cuda    V->V       Select the most representative frame in a given sequence of consecutive frames.
 ... transpose_npp     V->V       NVIDIA Performance Primitives video transpose
 T.. yadif_cuda        V->V       Deinterlace CUDA frames


    


    I would like to be able to use CUDA to crop and scale videos but I cannot find the correct syntax.
My efforts usually work in terms of the scale but not the crop, here is an example of the type of problems I have been having :

    


    The source file in this example is a short mpeg2 video (960x540 with black bars top and bottom). The command is currently run from a bash script.

    


    ffmpeg -y -hwaccel cuda -hwaccel_output_format cuda -c:v mpeg2_cuvid -crop 960x408x0x66 -i $1 -vf scale_npp=1280x544 -c:a copy -c:v h264_nvenc -b:v 2M -preset slow $2


    


    This is throwing the following error :

    


    [mpeg2_cuvid @ 0x5e6d9deb56c0] cuvid decode callback error
[vist#0:0/mpeg2video @ 0x5e6d9de85b40] [dec:mpeg2_cuvid @ 0x5e6d9de7b7c0] Decoding error:        Generic error in an external library


    


    Have I a problem with my ffmpeg build, should the list of filters include something like crop_cuda or crop_npp or have I just got the wrong syntax to perform everything on the GPU (is it even possible).