Recherche avancée

Médias (0)

Mot : - Tags -/masques

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

Autres articles (111)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (2456)

  • Mix audio from various sources, regardless if an input video has sound or not

    17 février 2021, par Basj

    The following code :

    &#xA;

    ffmpeg -i test.png            &#xA;       -t 2 -i a.mp3          &#xA;       -t 4 -i video.mp4      &#xA;       -t 1 -i b.mp3          &#xA;       -filter_complex [1]adelay=2000|2000[s1];[3]adelay=5000|5000[s3];[s1][2][s3]amix=inputs=3[outa];[0][2]overlay[outv]^&#xA;       -map [outa] -map [outv]^&#xA;       out.mp4 -y&#xA;

    &#xA;

    works, and mixes the audio from the MP3s (time-shifted, as desired) and from the MP4 video.

    &#xA;

    But it fails if the MP4 has no audio channel (= a no-sound video) :

    &#xA;

    &#xA;

    Stream specifier '' in filtergraph description ... matches no stream

    &#xA;

    &#xA;

    I'd like my script to work in both cases, if the video has audio or not.

    &#xA;

    How to include [2] in the amix if and only if this video has sound ?

    &#xA;


    &#xA;

    Note : A good way would be to be able to load a MP4 with always a sound stream : the original sound stream if the video has sound, and a silence audio track if the MP4 has no sound in it. Is this possible with a single command in ffmpeg ?

    &#xA;

  • Mixing various audio and video sources into a single video

    18 février 2021, par Basj

    I've already read FFmpeg - Overlay one video onto another video ?, How to overlay 2 videos at different time over another video in single ffmpeg command ?, FFmpeg - Multiple videos with 4 areas and different play times (and many similar questions tagged [ffmpeg] about setpts), and the following code is working, but I'm sure we can simplify it, and have a more elegant solution.

    &#xA;

    I'd like to mix multiple sources (image and sound) , with different starting points :

    &#xA;

    t (seconds)           0   1   2   3   4   5   6   7   8   9  10  11  12  13    &#xA;test.png              [-------------------------------]&#xA;a.mp3                         [-------]&#xA;without_sound.mp4                                 [-------------------]        (overlay at x,y=200,200)&#xA;b.mp3                                     [---]&#xA;with_sound.mp4                    [---------------------------------------]    (overlay at x,y=100,100)&#xA;

    &#xA;

    This works :

    &#xA;

    ffmpeg -i test.png &#xA;       -t 2 -i a.mp3 &#xA;       -t 5 -i without_sound.mp4 &#xA;       -t 1 -i b.mp3 &#xA;       -t 10 -i with_sound.mp4 &#xA;       -filter_complex "&#xA;            [0]setpts=PTS-STARTPTS[s0];&#xA;            [1]adelay=2000^|2000[s1];&#xA;            [2]setpts=PTS-STARTPTS&#x2B;7/TB[s2];&#xA;            [3]adelay=5000^|5000[s3];&#xA;            [4]setpts=PTS-STARTPTS&#x2B;3/TB[s4];&#xA;            [4:a]adelay=3000^|3000[t4];&#xA;            [s1][s3][t4]amix=inputs=3[outa];&#xA;            [s0][s4]overlay=100:100[o2];&#xA;            [o2][s2]overlay=200:200[outv]&#xA;       " -map [outa] -map [outv]&#xA;       out.mp4 -y&#xA;

    &#xA;

    but :

    &#xA;

      &#xA;
    • is it normal that we have to use both setpts and adelay ? I have tried without adelay and then the sound is not shifted. Said differently, is there a way to simplify :

      &#xA;

      [4]setpts=PTS-STARTPTS&#x2B;3/TB[s4];&#xA;[4:a]adelay=3000^|3000[t4];&#xA;

      &#xA;

       ?

      &#xA;

    • &#xA;

    • is there a way to do it with setpts and asetpts only ? When I replaced adelay=5000|5000 with asetpts=PTS-STARTPTS&#x2B;5/TB and also for the other one, it didn't give the expected time-shifting (see below)

      &#xA;

    • &#xA;

    • in similar questions/answers I often see overlay=...:enable=&#x27;between(t,...,...)&#x27;, here it seems it is not needed, why ?

      &#xA;

    • &#xA;

    &#xA;

    More generally, how would you simplify this "mix multiple audio and video" ffmpeg code ?

    &#xA;


    &#xA;

    More details about the second bullet point : if we replace adelay by asetpts,

    &#xA;

    -filter_complex "&#xA;            [0]setpts=PTS-STARTPTS[s0];&#xA;            [1]asetpts=PTS-STARTPTS&#x2B;2/TB[s1];&#xA;            [2]setpts=PTS-STARTPTS&#x2B;7/TB[s2];&#xA;            [3]asetpts=PTS-STARTPTS&#x2B;5/TB[s3];&#xA;            [4]setpts=PTS-STARTPTS&#x2B;3/TB[s4];&#xA;            [4:a]asetpts=PTS-STARTPTS&#x2B;3/TB[t4];&#xA;            [s1][s3][t4]amix=inputs=3[outa];&#xA;            [s0][s4]overlay=100:100[o2];&#xA;            [o2][s2]overlay=200:200[outv]&#xA;

    &#xA;

    it doesn't work : [3] should begin at 0'05", and [4:a] at 0'03" but they all begin at the same time than [1], i.e. at 0'02".

    &#xA;

    It seems that amix only takes the first asetpts in consideration, and discards the others ; is it true ?

    &#xA;

  • How to use FFMPEG with Nvidia Acceleration (Nvenc) to hardcode subtitles

    21 février 2021, par Ibraheem Nofal

    So I'm trying to use Nvenc to accelerate video encoding. The aim is to have 1 input video file and 1 input subtitle, and to get multiple outputs at different resolutions with subtitles hardcoded or burned into the video. I've tried multiple approaches but can't figure out how to do it.

    &#xA;

    Here's the command that I'm currently using :

    &#xA;

    ffmpeg -hwaccel cuvid -i 3030025890-TEST.mp4 -i output_ar.srt  -filter_complex "[0:v]scale_npp=1920:1080, hwdownload,format=nv12[base], [base]subtitles=output_ar.srt[marked]" -map "[marked]" -c:v h264_nvenc -map 0:v:0 -map 0:a:0 -g 50 -b:v 5M -maxrate 5.5M -minrate 4M -bufsize 5M -preset fast 1080_output.mp4&#xA;

    &#xA;

    and here's the output :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;3030025890-TEST.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : M4V &#xA;    minor_version   : 1&#xA;    compatible_brands: isomavc1mp42&#xA;    creation_time   : 2021-01-05T13:45:58.000000Z&#xA;  Duration: 00:45:04.28, start: 0.000000, bitrate: 5574 kb/s&#xA;    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5000 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-01-05T13:45:58.000000Z&#xA;      handler_name    : ETI ISO Video Media Handler&#xA;      encoder         : Elemental H.264&#xA;    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-01-05T13:45:58.000000Z&#xA;      handler_name    : ETI ISO Audio Media Handler&#xA;    Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-01-05T13:45:58.000000Z&#xA;      handler_name    : ETI ISO Audio Media Handler&#xA;    Stream #0:3(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-01-05T13:45:58.000000Z&#xA;      handler_name    : ETI ISO Audio Media Handler&#xA;    Stream #0:4(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-01-05T13:45:58.000000Z&#xA;      handler_name    : ETI ISO Audio Media Handler&#xA;    Stream #0:5(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-01-05T13:45:58.000000Z&#xA;      handler_name    : ETI ISO Audio Media Handler&#xA;    Stream #0:6(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2021-01-05T13:45:58.000000Z&#xA;      handler_name    : ETI ISO Audio Media Handler&#xA;Input #1, srt, from &#x27;output_ar.srt&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;    Stream #1:0: Subtitle: subrip&#xA;[Parsed_subtitles_3 @ 0x5601070b1dc0] Shaper: FriBidi 0.19.7 (SIMPLE)&#xA;Fontconfig error: Cannot load default config file&#xA;[Parsed_subtitles_3 @ 0x5601070b1dc0] No usable fontconfig configuration file found, using fallback.&#xA;Fontconfig error: Cannot load default config file&#xA;[Parsed_subtitles_3 @ 0x5601070b1dc0] Using font provider fontconfig&#xA;Stream mapping:&#xA;  Stream #0:0 (h264) -> scale_npp (graph 0)&#xA;  subtitles (graph 0) -> Stream #0:0 (h264_nvenc)&#xA;  Stream #0:0 -> #0:1 (h264 (native) -> h264 (h264_nvenc))&#xA;  Stream #0:1 -> #0:2 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[h264 @ 0x56010792f980] Error creating a NVDEC decoder: 1&#xA;[h264 @ 0x56010792f980] Failed setup for format cuda: hwaccel initialisation returned error.&#xA;[Parsed_subtitles_3 @ 0x560107364cc0] Shaper: FriBidi 0.19.7 (SIMPLE)&#xA;Fontconfig error: Cannot load default config file&#xA;[Parsed_subtitles_3 @ 0x560107364cc0] No usable fontconfig configuration file found, using fallback.&#xA;Fontconfig error: Cannot load default config file&#xA;[Parsed_subtitles_3 @ 0x560107364cc0] Using font provider fontconfig&#xA;Impossible to convert between the formats supported by the filter &#x27;graph 0 input from stream 0:0&#x27; and the filter &#x27;auto_scaler_0&#x27;&#xA;Error reinitializing filters!&#xA;Failed to inject frame into filter network: Function not implemented&#xA;Error while processing the decoded data for stream #0:0&#xA;[aac @ 0x56010734d400] Qavg: 65536.000&#xA;[aac @ 0x56010734d400] 2 frames left in the queue on closing&#xA;Conversion failed!&#xA;

    &#xA;

    Edit : Made some progress. I now no longer get an error, but upon viewing the output, there's no subtitles burned in.&#xA;Command :

    &#xA;

    ffmpeg -hwaccel cuvid -c:v h264_cuvid -i 3030025890-TEST.mp4  -c:v h264_nvenc -map 0:v:0 -map 0:a:0 -g 50 -b:v 5M -maxrate 5.5M -minrate 4M -bufsize 5M -vf "scale_npp=1920:1080, hwdownload, format=nv12, subtitles=output_ar.srt, hwupload" -preset fast 1080_output.mp4&#xA;

    &#xA;