Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (98)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les 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 (...)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

Sur d’autres sites (6998)

  • FFmpeg transcode GIF into Mp4 and Mp4 to AVI using GPU

    9 octobre 2023, par Cristian

    I'm trying to convert GIF animated to mp4 and mp4 to AVI with FFmpeg.

    


    I started to use just the CPU, but I have to process millions of GIFs/mp4 content pieces. So, I started to have a lot of errors processing them, and it ended as a bottleneck. Therefore, I'm trying to use GPU to process the videos.

    


    Converting GIF to mp4 with CPU, I run the following command :

    


    ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4


    


    Using the GPU I'm trying the following :

    


    ffmpeg
  -y
  -hwaccel nvdec
  -hwaccel_output_format cuda
  -i gifInputPath
  -threads 1
  -filter_threads 1
  -c:v h264_nvenc
  -vf hwupload_cuda,scale_cuda=-2:320:240:format=yuv420p
  -gpu 0
   mp4VideoPath


    


    The above command generates an exit status 1.

    


    The following is the dmesg command log

    


    Converting mp4 videos to AVI videos I'm running the following command

    


    ffmpeg
-i videoInputPath
-vcodec rawvideo
-pix_fmt yuv420p
-acodec pcm_s16le
-ar 44100
-ac 2
-s 320x240
-r 4
-f avi
aviOutputVideoPath


    


    For GPU I tried :

    


    ffmpeg
 -y
 -hwaccel cuda
 -hwaccel_output_format cuda
 -i videoInputPath
 -threads 1
 -filter_threads 1
 -c:a pcm_s16le
 -ac 2
 -ar 44100
 -c:v h264_nvenc
 -vf hwupload_cudascale_cuda=-2:320:240:format=yuv420p
 -r 4
 -f avi
 -gpu 0
 aviOutputVideoPath


    


    The following is the dmseg output is log

    


      

    1. What should be the best command for converting the GIF into Mp4 and Mp4 into AVI based on CPU configuration using the GPU(Amazon Nvidia t4) for best performance, low CPU, and moderated GPU consumption ?

      


    2. 


    3. What are the best suggestions to Process these content pieces concurrently using GPU ?

      


    4. 


    


    Note : I'm using Golang to execute the FFmpeg commands.

    


  • AWS Lambda : "Unzipped size must be smaller than 106534017 bytes" after adding single file

    17 septembre 2023, par leon

    When trying to deploy my lambdas using AWS through the serverless framework I had no problems until I tried adding the ffmpeg binary.

    


    Now the ffmpeg binaries I have tried to add have ranged from 26 mb to 50 mb. Whichever I add, I get the following error :

    


    UPDATE_FAILED: WhatsappDocumentHandlerLambdaFunction (AWS::Lambda::Function)
Resource handler returned message: "Unzipped size must be smaller than 106534017 bytes (Service: Lambda, Status Code: 400, Request ID: ...)" (RequestToken: ..., HandlerErrorCode: InvalidRequest)


    


    The problem is that I did not add the file to this function. I added it to a completely different one.

    


    I have tried the following things :

    


    


    When trying every single one of these options I get the UPDATE_FAILED error in a different function that surely is not too big.

    


    I know I can deploy using a docker image but why complicate things with docker images when it should work ?

    


    I am very thankful for any ideas.

    


  • Extracting Thumbnail URL from Video URL

    29 août 2023, par Deepak Sangle

    So, I have a video URL in an Amazon S3 bucket. I must extract the thumbnail image (preview image) from the video URL. The catch is that I do not have the luxury to download or upload the complete video since it takes time. My approach is something like this.
I first created a blob object containing the first few seconds of that video using something like this.

    


      const chunkSize = 1024*1024; // 1MB
  const start = 0;
  const end = chunkSize - 1;
  const rangeHeader = `bytes=${start}-${end}`;
  
  const VideoResponse = await axios.get(url, { 
    responseType: 'arraybuffer',
    headers: { Range: rangeHeader }
  });

  const chunkData = VideoResponse.data; 
  
  const videoBlob = new Blob([chunkData], { type: 'video/mp4' });
  const videoUrl = URL.createObjectURL(videoBlob);
  console.log({chunkData, videoBlob, videoUrl});


    


    Console gives me something like this

    


    {&#xA;  chunkData: <buffer 00="00" 1c="1c" 66="66" 74="74" 79="79" 70="70" 6d="6d" 34="34" 32="32" 69="69" 73="73" 6f="6f" 61="61" 76="76" 63="63" 31="31" 02="02" bd="bd" ab="ab" 6c="6c" 68="68" 64="64" c7="c7" 1048526="1048526" more="more" bytes="bytes">,&#xA;  videoBlob: Blob { size: 1048576, type: &#x27;video/mp4&#x27; },&#xA;  videoUrl: &#x27;blob:nodedata:764fce87-792f-47e8-bc3e-15921ee5787f&#x27;&#xA;}&#xA;</buffer>

    &#xA;

    Now, there are many options after this. I am trying to download this blob object by converting it into a file. After I successfully convert it into an mp4 file, I can easily take a screenshot of it using fluent-ffmpeg package. However, I couldn't convert it into a file. If I try to do something like this

    &#xA;

      const BlobResponse = await axios({&#xA;    method: &#x27;GET&#x27;,&#xA;    url: videoUrl,&#xA;    responseType: &#x27;stream&#x27;&#xA;  });&#xA;&#xA;  const file = fs.createWriteStream(`video.mp4`);&#xA;  BlobResponse.data.pipe(file);&#xA;  &#xA;  file.on("error", (error) => {&#xA;    console.log(`There was an error writing the file. Details: $ {error}`);&#xA;  });&#xA;&#xA;  file.on(&#x27;finish&#x27;, () => {&#xA;    file.close();&#xA;    console.log("File downloaded successfully");&#xA;  });&#xA;

    &#xA;

    But it throws me the error AxiosError: Unsupported protocol blob:

    &#xA;

    I also tried to directly convert the blob object to a jpeg object but to no avail.

    &#xA;

    I have searched complete StackOverflow, and I have not found a single solution working so please let me know why those are not working or if there is any new solution to do this.

    &#xA;