Recherche avancée

Médias (91)

Autres articles (108)

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

  • Ajouter notes et légendes aux images

    7 février 2011, par

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

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (9341)

  • ffmpeg : fix transcoding dvbsub to dvbsub

    22 juin 2014, par Anshul Maheshwari
    ffmpeg : fix transcoding dvbsub to dvbsub
    

    fix ticket #2024

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] ffmpeg.c
  • FFMPEG RTX 8000 out of memory

    23 juin 2020, par Mahdi Adnan

    I have an RTX 8000 and I'm using FFMPEG to transcode multiple streams concurrently.&#xA;Each stream consume around 575MiB, and when the memory usage reaches around 28000MiB, FFMPEG throw the following message when starting a new transcode session :

    &#xA;&#xA;

    [h264_nvenc @ 0x55cd1d574800] dl_fn->cuda_dl->cuCtxCreate(&ctx->cu_context_internal, 0, cu_device) failed -> CUDA_ERROR_OUT_OF_MEMORY : out of memory&#xA;[h264_nvenc @ 0x55cd1d574800] No NVENC capable devices found&#xA;Error initializing output stream 2:0 — Error while opening encoder for output stream #2:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    &#xA;&#xA;

    The machine is running Ubuntu 20.04&#xA;FFMPEG is a snap package from Ubuntu repo "version 4.2.2-1ubuntu1"&#xA;nVidia driver nvidia-driver-435 installed from Ubuntu repo

    &#xA;&#xA;

    command used for the transcode :&#xA;ffmpeg -i SRC -c:v h264_cuvid -vcodec h264_nvenc -preset:v medium -profile:v main -vf "scale=1920 :-2" -hls_flags delete_segments -hls_init_time 4 -hls_time 4 -maxrate 6000k -g 100 -bufsize 12000k -b:v 3000k -start_number 1 -async 1 -c:a aac -b:a 128k 1080.m3u8

    &#xA;&#xA;

    Is the RTX 8000 have any limitation on the Memory usage ? are the parameters I'm using causing this issue ?

    &#xA;&#xA;

    Thanks

    &#xA;

  • Transcoding with custom commands using streamio-ffmpeg

    14 avril 2017, par ACIDSTEALTH

    I’m trying to transcode a video file using streamio-ffmpeg with some custom commands, but nothing I try seems to work. I want to transcode the video with the following options :

    ffmpeg -i input.mp4 -vf
       "format=yuv444p,
        drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,
        drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th,
        format=yuv420p"
    -c:v libx264 -c:a copy -movflags +faststart output.mp4

    I’ve tried the following code combinations without success :

    1. Tried removing the line breaks and converting the command string to an array, following the instructions in the docs.

      video = FFMPEG::Movie.new('input.mp4')
      opts = %w(ffmpeg -i input.mp4 -vf "format=yuv444p, drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, format=yuv420p" -c:v libx264 -c:a copy -movflags +faststart output.mp4)
      video.transcode('output.mp4', opts)

      But this yields the error :

      [NULL @ 0x7f962100e200] Unable to find a suitable output format for 'ffmpeg'
      ffmpeg: Invalid argument
      from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file'
    2. Tried stripping out the input file name and output file name since the gem seems to handle that for you.

      video = FFMPEG::Movie.new('input.mp4')
      opts = %w(-vf "format=yuv444p, drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, format=yuv420p")
      video.transcode('output.mp4', opts)

      Which returns this error :

      [NULL @ 0x7fd0a9008c00] Unable to find a suitable output format for 'drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,'
      drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,: Invalid argument
      from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file'
    3. Tried removing the -vf flag and just running everything within the quotation marks.

      video = FFMPEG::Movie.new('input.mp4')
      opts = %w(format=yuv444p, drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, format=yuv420p)
      video.transcode('output.mp4', opts)

      This returns another error :

      [NULL @ 0x7fab8101fe00] Unable to find a suitable output format for 'format=yuv444p,'
      format=yuv444p,: Invalid argument
      from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file'
    4. Tried removing the format arguments since ffmpeg is clearly complaining about those.

      video = FFMPEG::Movie.new('input.mp4')
      opts = %w("drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th")
      video.transcode('output.mp4', opts)

      Again another error :

      [NULL @ 0x7fc7f880a800] Unable to find a suitable output format for 'drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,'
      drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,: Invalid argument
      from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file'
    5. Tried building a hash from the command string and feeding that into the transcode method.

      video = FFMPEG::Movie.new('input.mp4')
      opts = {
         '-vf' => {
             format: 'yuv444p',
             drawbox: {
                 y: 'ih/PHI', color: '0x000000@0.4', width: 'iw', height: '48', t: 'max'
             },
             drawtext: {
                 font: 'OpenSans-Regular,Sans', text: snap.title, fontcolor: '0xFFFFFF', fontsize: '24', x: '(w-tw)/2', y: '(h/PHI)+th'
             },
             format: 'yuv420p'
         }
      }
      video.transcode('output.mp4', opts)

      I also tried a variation without the -vf flag :

      video = FFMPEG::Movie.new('input.mp4')
      opts = {
         format: 'yuv444p',
         drawbox: {
             y: 'ih/PHI', color: '0x000000@0.4', width: 'iw', height: '48', t: 'max'
         },
         drawtext: {
             font: 'OpenSans-Regular,Sans', text: snap.title, fontcolor: '0xFFFFFF', fontsize: '24', x: '(w-tw)/2', y: '(h/PHI)+th'
         },
         format: 'yuv420p'
      }
      video.transcode('output.mp4', opts)

    These both produced an output.mp4 video file but the output file was unchanged from the input. There was no text overlay.

    Nothing I try seems to work. What am I doing wrong here ?