Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (112)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

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

Sur d’autres sites (8155)

  • Is there a way to speed up audio processing (amix and adelay) in FFMPEG ?

    30 mars 2017, par Nadir

    I’m using, in android application, many ffmpeg amix and adelay filter commands over very small mp3 files (not longer than 3 seconds).
    Unfortunately each adelay or amix command takes between 2 and 4 seconds to execute, which is a lot considering that I should run the same operation for a lot of files.
    Here are two example of commands I’m running :

    amix :

    [-i, input1.mp3, -i, input2.mp3, -filter_complex, amix=inputs=2:duration=longest:dropout_transition=0,dynaudnorm=f=100[aout], -map, [aout], -ac, 2, -c:a, libmp3lame, -q:a, 4, output.mp3]

    adelay :

    [-i, input3.mp3, -filter_complex, [0:a]adelay=1|1, -c:a, libmp3lame, output1.mp3]

    I know in video there is an option (-preset ultrafast) to make the execution faster, is there a way to do the same for audio ?

  • FFMPEG being killed when processing H264 video

    4 mai 2017, par Stuart Clarke

    I have a program that when given a video (video.mp4), extracts the audio, a thumbnail image and the video into separate files, adds some background music to the audio file to create a new file (combined.mp3), increases the resolution of the video to 1080p and saves to a new file (videoHD.mp4), adds intro and credits to the start and end (already in 1080p) and saves that to a new file (merged.mp4) and finally combines the processed video and audio into an output file (videoExt.mp4). I’m using ffmpeg through python and subprocess.call to do all this but the raw ffmpeg commands are as follows.

    ffmpeg -y -i video.mp4 -acodec mp3 audioTrack.mp3

    ffmpeg -y -ss 00:00:00 -i video.mp4 -vframes 1 -q:v 2 thumb.jpg

    ffmpeg -y -i video.mp4 -an videoTrack.mp4

    ffmpeg -y -i audioTrack.mp3 -i musicTrack.mp3 -filter_complex amerge -c:a libmp3lame -q:a 4 combined.mp3

    ffmpeg -y -i videoTrack.mp4 -vf 'scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:x=(1920-iw)/2:y=(1080-ih)/2:color=black' videoHD.mp4

    ffmpeg -y -f concat -i vids.ini -an merged.mp4

    ffmpeg -y -i merged.mp4 -i combined.mp3 -strict -2 -shortest videoExt.mp4

    Between extracting the audio and combining with the music I add a silent period matching the intro length to the beginning for the audio and lower the volume of the music for the duration of the video section and crop the music to the length of the combined intro, video and credits. This is all done with AudioSegment and works well.

    My problem is that the ffmpeg process keeps being killed. It happens in various places at various times, but always when processing the video at 1080p. I’m sure it has something to do with the H264 codec but when I use mpeg4 the quality is terrible. The videos are always less than a minute (Instagram videos) and at most 25Mb, I’m using a VPS with Ubuntu Server 15.04 installed, it should be able to handle this surely. If not is there a way around it, processing the video in parts ?

    Here is an example of the error but as I said, it can happen in various places and sometimes will complete for one command but I have never had it complete for all.

    # ffmpeg -y -f concat -i vids.ini -an merged.mp4

    ffmpeg version 2.5.10-0ubuntu0.15.04.1 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
     configuration: --prefix=/usr --extra-version=0ubuntu0.15.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libwavpack --enable-libwebp --enable-libxvid --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libvpx --enable-libx264 --enable-libsoxr --enable-gnutls --enable-openal --enable-libopencv --enable-librtmp --enable-libx265
     libavutil      54. 15.100 / 54. 15.100
     libavcodec     56. 13.100 / 56. 13.100
     libavformat    56. 15.102 / 56. 15.102
     libavdevice    56.  3.100 / 56.  3.100
     libavfilter     5.  2.103 /  5.  2.103
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, concat, from 'vids.ini':
     Duration: N/A, start: 0.000000, bitrate: 2999 kb/s
       Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2996 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc
       Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s
    [libx264 @ 0x134fd00] using SAR=1/1
    [libx264 @ 0x134fd00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x134fd00] profile High, level 4.0
    [libx264 @ 0x134fd00] 264 - core 142 r2495 6a301b6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'merged.mp4':
     Metadata:
       encoder         : Lavf56.15.102
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc
       Metadata:
         encoder         : Lavc56.13.100 libx264
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    frame=   13 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=1 dro
    frame=   28 fps= 27 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=1 dro
    frame=   46 fps= 21 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A dup=1 dro
    frame=   51 fps= 16 q=29.0 size=     120kB time=00:00:00.-3 bitrate=N/A dup=1 dr
    frame=   55 fps= 15 q=29.0 size=     154kB time=00:00:00.10 bitrate=12574.5kbits
    frame=   60 fps= 14 q=29.0 size=     195kB time=00:00:00.26 bitrate=5981.0kbits/
    frame=   65 fps= 13 q=29.0 size=     254kB time=00:00:00.43 bitrate=4797.0kbits/
    frame=   69 fps= 12 q=29.0 size=     287kB time=00:00:00.56 bitrate=4142.1kbits/
    frame=   73 fps= 12 q=29.0 size=     375kB time=00:00:00.70 bitrate=4384.2kbits/
    frame=   76 fps= 11 q=29.0 size=     418kB time=00:00:00.80 bitrate=4278.4kbits/
    frame=   81 fps= 11 q=29.0 size=     441kB time=00:00:00.96 bitrate=3732.4kbits/
    frame=   85 fps= 10 q=29.0 size=     472kB time=00:00:01.10 bitrate=3511.0kbits/
    Killed1 drop=0

    Any ideas or if anyone knows a better way to this please let me know.

    Cheers,

    Stu

  • Is it possible to be notified each time ffmpeg finish processing one of multiple outputs ?

    8 juin 2017, par Marcos Pinazo

    I am trying to use a single ffmpeg command to encode a streaming url and generate many output files. In this example, ffmpeg will output three files of duration 5, 10 and 15 seconds :

    ffmpeg -i <url> \
    -t  5 output_5.wav \
    -t 10 output_10.wav \
    -t 15 output_15.wav \
    </url>

    The command works as expected, but I need to know when each one of the output files is available, in order to start further processing as soon as possible.

    Is there any way to be notified of each one of the events "file output_XX.wav is ready" ?

    One approach I have tried is to use inotifywatch to listen for CLOSE events, but I have found that ffmpeg only closes the files when the last one ends.

    I could also listen for MODIFY events but there is no way to know when ffmpeg is done, I can only guess it by testing against a hardcoded maximum file size (very nasty solution !).