Recherche avancée

Médias (1)

Mot : - Tags -/publishing

Autres articles (99)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

  • Anomalie #4830 : extraire_date extravagant

    6 juillet 2021

    Pourquoi pas. Je te propose (ou quelqu’un) de faire une PR pour ça.
    Il faudrait ajouter en même temps des tests unitaires parce que bon.
    Ci dessous un code valide qui fait la demande.

    Ce qui me gène tout de même c’est le [^0-9]* dans la regex (déjà présente dans l’ancienne fonction) qui du coup peut chercher une date coupée dans un grand texte…
    Tel que : "En 2012 à l’orée du bois se trouvait 10 chevaux et 4 biches.", qui sort la date "2012-10-04" (ou 2012-10-01 avant cette proposition).
    Donc l’usage est possiblement assez limité de cette fonction si laissée telle quelle.

    1. <span class="CodeRay">
    2. <span class="comment">/**
    3.  * Extrait une date d'un texte et renvoie le résultat au format de date SQL
    4.  *
    5.  * L'année et le mois doivent être numériques.
    6.  * Le séparateur entre l'année et le mois peut être un `-`, un `:` ou un texte
    7.  * quelconque ne contenant pas de chiffres.
    8.  *
    9.  * Si un numéro de jour valide n'est pas indiqué, le résultat est alors le 1er du mois.
    10.  *
    11.  * @link https://www.spip.net/5516
    12.  * @param string $texte
    13.  *    Texte contenant une date tel que `2008-04`
    14.  * @return string
    15.  *    Date au format SQL tel que `2008-04-01`
    16.  **/</span>
    17. <span class="keyword">function</span> <span class="function">extraire_date</span>(<span class="local-variable">$texte</span>) {
    18.     <span class="comment">// format = 2001-08-12 ou 2001-08</span>
    19.     <span class="local-variable">$has_date</span> = <span class="predefined">preg_match</span>(
    20.         <span class="string"><span class="delimiter">"</span><span class="content">,
    21.        # une annee
    22.        (?P<annee>[1-2][0-9]</annee></span><span class="content">{</span><span class="content">3})
    23.        # des caracteres sans numeros
    24.        [^0-9]*
    25.        # un mois
    26.        (?P<mois>1[0-2]|0?[1-9])
    27.        (?:
    28.            # des caracteres sans numeros
    29.            [^0-9]*
    30.            # un jour
    31.            (?P<jour>3[0-1]|[1-2][0-9]|0?[1-9])
    32.        )?
    33.        ,x</jour></mois></span><span class="delimiter">"</span></span>,
    34.         <span class="local-variable">$texte</span>,
    35.         <span class="local-variable">$regs</span>
    36.     );
    37.     <span class="keyword">if</span> (<span class="local-variable">$has_date</span>) {
    38.         <span class="local-variable">$date</span> = [
    39.             <span class="local-variable">$regs</span>[<span class="string"><span class="delimiter">"</span><span class="content">annee</span><span class="delimiter">"</span></span>],
    40.             <span class="predefined">sprintf</span>(<span class="string"><span class="delimiter">"</span><span class="content">%02d</span><span class="delimiter">"</span></span>, <span class="local-variable">$regs</span>[<span class="string"><span class="delimiter">"</span><span class="content">mois</span><span class="delimiter">"</span></span>]),
    41.             <span class="predefined">sprintf</span>(<span class="string"><span class="delimiter">"</span><span class="content">%02d</span><span class="delimiter">"</span></span>, <span class="local-variable">$regs</span>[<span class="string"><span class="delimiter">"</span><span class="content">jour</span><span class="delimiter">"</span></span>] ?? <span class="string"><span class="delimiter">"</span><span class="content">01</span><span class="delimiter">"</span></span>)
    42.         ];
    43.         <span class="keyword">return</span> <span class="predefined">implode</span>(<span class="string"><span class="delimiter">"</span><span class="content">-</span><span class="delimiter">"</span></span>, <span class="local-variable">$date</span>);
    44.     }
    45. }
    46. </span>

    Télécharger


    #SQUELETTE

    #SET{liste,#LISTE{
       "Une date 2020 01",
       "Une date 2020 12 autre",
       "Une date 2020 autre 12 autre",
       "Une date 2021 12 01",
       "Une date 2021 12 00",
       "Une date 2021 12 31",
       "Une date 2021 12 32",
       "Une date 2021 autre 12 date 21",
       "En 2012 à l’orée du bois se trouvait 10 chevaux et 4 biches."
    }}

    <dl>

    <dt>#VALEUR</dt>
    <dd>[(#VALEUR|extraire_date)]</dd>

    </dl>

    Sortie :

    1. Une date 2020 01
    2.     2020-01-01
    3. Une date 2020 12 autre
    4.     2020-12-01
    5. Une date 2020 autre 12 autre
    6.     2020-12-01
    7. Une date 2021 12 01
    8.     2021-12-01
    9. Une date 2021 12 00
    10.     2021-12-01
    11. Une date 2021 12 31
    12.     2021-12-31
    13. Une date 2021 12 32
    14.     2021-12-03
    15. Une date 2021 autre 12 date 21
    16.     2021-12-21
    17. En 2012 à l’orée du bois se trouvait 10 chevaux et 4 biches.
    18.     2012-10-04

    Télécharger

  • Failed to run the ffmpeg binary : The process "ffmpeg exceeded the timeout of 60 seconds

    6 janvier 2024, par Sufian The Geek

    I am using FSPOSTER wordpress plugin to share videos on instagram as a reels and story. I have installed wordpress on amazon aws ec2 t2.micro. FsPoster required FFmpeg plugin to work with the videos.

    &#xA;

    Whenever I share the video, I get error after 60 seconds. There are some videos that are easily getting shared as a reel and story. I looked into the plugin code and changed every single timeout function value to 300 seconds including php.ini file. There are some libraries like symfony in the plugin, I also changed the timeout 60 sec to 300 seconds. Restarted the server and all but still getting the error.

    &#xA;

    &#xA;

    Failed to run the ffmpeg binary : The process "'ffmpeg' -v error -y -i '/opt/bitnami/wordpress/wp-content/uploads/2024/01/videoWater-First-18.mp4' -vf 'crop=w=1280:h=720:x=0:y=0' -metadata:s:v rotate="" -f mp4 -c:v libx264 -preset fast -crf 24 -strict -2 -c:a aac -b:a 96k '/tmp/fs_65994ac0ddf8b.mp4'" exceeded the timeout of 60 seconds.

    &#xA;

    &#xA;

    I am using bitnami wordpress on ec3 aws t2.micro that has 1 vcpu and 1 GB ram. I also switched to 2 vcpu and 8 gb ram but still this timeout issue.

    &#xA;

  • avcodec/proresenc : fix alpha plane encoding bitstream

    26 décembre 2023, par Clément Bœsch
    avcodec/proresenc : fix alpha plane encoding bitstream
    

    These functions encode a slice of alpha (1 to 8 macroblocks) which are
    expected to be encoded as a repeated sequence of "[diff][run-1]", where
    diff is the running difference of the alpha value and run is how many
    times that value is expected to be duplicated (within the limit of a
    grand total of 2048 unpacked samples, corresponding to a slice of 8 MB).

    Even when run==0 (the run variable semantic is actually "run minus 1"),
    there is always a diff previously encoded that needs a counter of at
    least 1. This means we need to call put_alpha_run() unconditionally at
    the end of the bitstream to account for the last running diff.

    This commit fixes glitchy playbacks on QuickTime with M2 and M3 hardware
    (but not M1 for some mysterious reason) with files generated with
    commands such as :

    ffmpeg -f lavfi -i testsrc2=d=5:s=912x320,chromakey -c:v prores_aw -profile:v 4 -y aw.mov
    ffmpeg -f lavfi -i testsrc2=d=5:s=912x320,chromakey -c:v prores_ks -profile:v 4444 -y ks.mov

    The glitch expresses itself deterministically as blinking black
    rectangles on random frames (for example on frame 21, 54, 71, 79, ...).

    Even with the proresdec from FFmpeg, overreads actually happens while
    reading the run-minus-1 value (around val = get_bits(gb, 4) in
    unpack_alpha()). This doesn't seem to cause any particular issue because
    it simply overreads into the next slice, and because the decoder is
    resilient, but it's still a problem.

    The investigation leading to this fix was made possible because of paid
    work for Jitter (https://jitter.video).

    Fixes ticket #10255.

    • [DH] libavcodec/proresenc_anatoliy.c
    • [DH] libavcodec/proresenc_kostya.c