Recherche avancée

Médias (1)

Mot : - Tags -/remix

Autres articles (80)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (9889)

  • FFMPEG Error Code : "Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_scale_10" ; [complex_filter], [-loop 1], [overlay]

    30 août 2020, par Leroy Freyler

    I'm currently experimenting a bit with ffmpeg around.

    


    I want to produce a video that has a .jpg background image over which several videos are overlaid.

    


    Currently I can overlay a black background with any number of videos. But I'm trying to add a static image to the background and then it doesn't work anymore.

    


    My FFMPEG command line is

    


    command = f"ffmpeg -loop 1 -i background.jpg -i vid1.mp4 -i vid2.mp4 -i vid3.mp4 -i vid4.mp4 -filter_complex "nullsrc=size=1920x1080 [base]; 
    [0:v] setpts=PTS-STARTPTS, scale=320x240 [low]; 
    [1:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft]; 
    [2:v] setpts=PTS-STARTPTS, scale=320x240 [upperright]; 
    [3:v] setpts=PTS-STARTPTS, scale=320x240 [lowerleft]; 
    [4:v] setpts=PTS-STARTPTS; scale=320x240 [lowerright]; 
    [base][upperleft] overlay=shortest=1 [tmp0]; 
    [tmp0][low] overlay=shortest=1:x=420:y=240 [tmp1]; 
    [tmp1][upperright] overlay=shortest=1:x=320 [tmp2]; 
    [tmp2][lowerleft] overlay=shortest=1:y=240 [tmp3]; 
    [tmp3][lowerright] overlay=shortest=1:x=320:y=240" 
    -c:v libx264 output.mkv"


    


    This will generate the following error message

    


    Input #0, image2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/bild.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 71996 kb/s
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/1.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2015-08-07T09:13:36.000000Z
  Duration: 00:00:30.53, start: 0.000000, bitrate: 4675 kb/s
    Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 4486 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2015-08-07T09:13:36.000000Z
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding
    Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
    Metadata:
      creation_time   : 2015-08-07T09:13:36.000000Z
      handler_name    : L-SMASH Audio Handler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/2.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-03-20T21:29:11.000000Z
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s
    Stream #2:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
      encoder         : JVT/AVC Coding
    Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
Input #3, mov,mp4,m4a,3gp,3g2,mj2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/3.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-03-20T21:29:11.000000Z
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s
    Stream #3:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
      encoder         : JVT/AVC Coding
    Stream #3:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
Input #4, mov,mp4,m4a,3gp,3g2,mj2, from '/home/leroy/Schreibtisch/FFMPEG_TEST/4.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2010-03-20T21:29:11.000000Z
    encoder         : HandBrake 0.9.4 2009112300
  Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s
    Stream #4:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z
      encoder         : JVT/AVC Coding
    Stream #4:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default)
    Metadata:
      creation_time   : 2010-03-20T21:29:11.000000Z

Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_scale_10


    


    I used Ubuntu 18.04.LST and Programmed in Python3.6.9.

    


    My complet Code is :

    


    from pathlib import Path
import os
suffix = '.mp4'
suffix1 = '.jpg'
os.system("clear")


input_path = Path.home() / "/home/leroy/Schreibtisch/FFMPEG_TEST"
file_paths = [subp for subp in input_path.rglob('*') if  suffix == subp.suffix or suffix1 == subp.suffix]
file_paths.sort()
output_path =  Path.home() / "/home/leroy/Schreibtisch/FFMPEG_TEST/new"
output_path.mkdir(parents=True, exist_ok=True)


vid1 = '/home/leroy/Schreibtisch/FFMPEG_TEST/1.mp4'
vid2 = '/home/leroy/Schreibtisch/FFMPEG_TEST/2.mp4'
vid3 = '/home/leroy/Schreibtisch/FFMPEG_TEST/3.mp4'
vid4 = '/home/leroy/Schreibtisch/FFMPEG_TEST/4.mp4'
background = '/home/leroy/Schreibtisch/FFMPEG_TEST/bild.jpg'


command = f"ffmpeg -loop 1 -i {background} -i {vid1} -i {vid2} -i {vid3} -i {vid4} -filter_complex \
\"nullsrc=size=1920x1080 [base]; \
[0:v] setpts=PTS-STARTPTS, scale=320x240 [low]; \
[1:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft]; \
[2:v] setpts=PTS-STARTPTS, scale=320x240 [upperright]; \
[3:v] setpts=PTS-STARTPTS, scale=320x240 [lowerleft]; \
[4:v] setpts=PTS-STARTPTS; scale=320x240 [lowerright]; \
[base][upperleft] overlay=shortest=1 [tmp0]; \
[tmp0][low] overlay=shortest=1:x=420:y=240 [tmp1]; \
[tmp1][upperright] overlay=shortest=1:x=320 [tmp2]; \
[tmp2][lowerleft] overlay=shortest=1:y=240 [tmp3]; \
[tmp3][lowerright] overlay=shortest=1:x=320:y=240 \" \
-c:v libx264 output.mkv"
print(command)
os.system(command)



    


  • Anomalie #4522 : erreur en php 8 dans mysql.log

    14 juillet 2020

    Ok, là on a un petit souci semble t’il (probablement pas du à PHP8 non plus, mais à la version de Mysql ou de sa remontée d’erreur)

    Dans ces pipelines, on récupère $mydate = $flux['args']['date'];, et on lui applique, sur les requêtes sql_quote($mydate).
    Sauf que $mydate vaut la chaine '2020-07-13 15:38:14', guillemets compris.
    Du coup, ça crée quelque chose de faux ensuite dans les requêtes (guillemet + guillement échappé).
    Je suppose que c’était vu comme une date invalide avant ? ou mysql s’en accomodait très bien ?
    (parce que je crois pas qu’on ait eu de retours comme quoi ces pipelines "optimiser_base_disparus" ne fonctionnent pas comme prévus)

    Cette date est calculée là https://git.spip.net/spip/spip/src/branch/master/ecrire/genie/optimiser.php#L157 est a déjà sql_quote d’appliqué, depuis 9 ans, par https://github.com/spip/SPIP/commit/472dc705e72557172ee3e53bd3a06465a9968ab9

    Mais par exemple dans les plugins, un commit ultérieur (il y a 6 ans) a rajouté les sql_quote doublons sur les dates…
    - https://github.com/spipremix/breves/commit/4f82b6481
    - https://github.com/spipremix/sites/commit/1dae8e8fe73340
    - https://github.com/spipremix/petitions/commit/21c15b08edc7
    - ...

    Je pense que ces sql_quote($mydate) ajoutés dans les pipelines sont erronés du coup, mais il y a peut être quelque chose qui m’échappe.

    (désolé, j’utilise Github pour remonter l’historique via blame + les boutons voir le fichier avant cette révision, tellement pratique... et Gitea n’a pas ça)

  • Anomalie #4401 (Nouveau) : Erreur bloquante avec sql_showtable() en sqlite

    20 novembre 2019, par tcharlss (*´_ゝ`)

    Glop,

    (Constaté sur un SPIP 3.2.4)

    La fonction spip_sqlite_showtable() renvoie un tableau incorrect pour `field` dans certains cas (cf. les clés `6` et `4` ci-dessous) :

    var_dump(sql_showtable(’spip_billets_types’)) ;
    

    array (size=2)
    ’field’ =>
    array (size=18)
    ’id_billets_type’ => string ’INTEGER NOT NULL’ (length=16)
    ’id_billetterie’ => string ’bigint ( 21 ) NOT NULL DEFAULT 0’ (length=32)
    ’titre’ => string ’text NOT NULL DEFAULT "" COLLATE NOCASE’ (length=39)
    ’descriptif’ => string ’text NOT NULL DEFAULT "" COLLATE NOCASE’ (length=39)
    ’quota’ => string ’int ( 11 ) NOT NULL DEFAULT 0’ (length=29)
    ’prix’ => string ’decimal ( 20 ’ (length=13)
    6 => string ’) NOT NULL DEFAULT 0’ (length=20)
    ’taxe’ => string ’decimal ( 4 ’ (length=12)
    4 => string ’) NOT NULL DEFAULT 0’ (length=20)
    ’selection_min’ => string ’int ( 11 ) NOT NULL DEFAULT 0’ (length=29)
    ’selection_max’ => string ’int ( 11 ) NOT NULL DEFAULT 0’ (length=29)
    ’date_fin’ => string ’datetime NOT NULL DEFAULT "0000-00-00 00:00:00"’ (length=47)
    ’date_debut’ => string ’datetime NOT NULL DEFAULT "0000-00-00 00:00:00"’ (length=47)
    ’maj’ => string ’TIMESTAMP’ (length=9)
    ’composition’ => string ’varchar ( 255 ) NOT NULL DEFAULT ’’ COLLATE NOCASE’ (length=50)
    ’composition_lock’ => string ’tinyint ( 1 ) NOT NULL DEFAULT 0’ (length=32)
    ’rang’ => string ’int NOT NULL DEFAULT 0’ (length=22)
    ’id_profil’ => string ’bigint(21) NOT NULL DEFAULT 0’ (length=29)
    ’key’ =>
    array (size=2)
    ’PRIMARY KEY’ => string ’id_billets_type’ (length=15)
    ’KEY id_billetterie’ => string ’CREATE INDEX `spip_billets_types_id_billetterie` ON `spip_billets_types` (
    `id_billetterie`
    )’ (length=94)

    Et voici ce qu’on devrait avoir, selon la vraie déclaration des champs :

    ’field’=> array(
        ’id_billets_type’    => ’bigint(21) NOT NULL’,
        ’id_billetterie’     => ’bigint(21) NOT NULL DEFAULT 0’,
        ’rang’               => ’int NOT NULL DEFAULT 0’,
        ’titre’              => ’text NOT NULL DEFAULT ""’,
        ’descriptif’         => ’text NOT NULL DEFAULT ""’,
        ’quota’              => ’int(11) NOT NULL DEFAULT 0’,
        ’prix’               => ’decimal(20,6) NOT NULL DEFAULT 0’,
        ’taxe’               => ’decimal(4,4) NOT NULL DEFAULT 0’,
        ’selection_min’      => ’int(11) NOT NULL DEFAULT 0’,
        ’selection_max’      => ’int(11) NOT NULL DEFAULT 0’,
        ’date_fin’           => ’datetime NOT NULL DEFAULT "0000-00-00 00:00:00"’,
        ’date_debut’         => ’datetime NOT NULL DEFAULT "0000-00-00 00:00:00"’,
        ’maj’                => ’TIMESTAMP’
    ),
    

    Donc ça se plante sur les champs prix_ht et taxe qui sont tous les 2 identiques : decimal(20,6) NOT NULL DEFAULT 0.
    On dirait qu’il y a un souci soit quand il y a une parenthèse, soit quand il y a une virgule dans la déclaration d’une colonne.

    Du coup sur une table en Sqlite, la requête suivante ne passe pas :

    sql_alter(’TABLE spip_billets_types CHANGE prix prix_ht decimal(20,6) NOT NULL DEFAULT 0’)
    


    Car au moment de créer la table temporaire, la requête est erronée :

    2019-11-20 11:49:50 127.0.0.1 (pid 12659) :Pub:ERREUR : near "6" : syntax error - CREATE TABLE IF NOT EXISTS spip_billets_types_tmp (
            id_billets_type INTEGER NOT NULL,
            id_billetterie bigint ( 21 ) NOT NULL DEFAULT 0,
            titre text NOT NULL DEFAULT "" COLLATE NOCASE,
            descriptif text NOT NULL DEFAULT "" COLLATE NOCASE,
            quota int ( 11 ) NOT NULL DEFAULT 0,
            prix_ht decimal(20,6) NOT NULL DEFAULT 0,
            6 ) NOT NULL DEFAULT 0,
            taxe decimal ( 4 ,
            4 ) NOT NULL DEFAULT 0,
            selection_min int ( 11 ) NOT NULL DEFAULT 0,
            selection_max int ( 11 ) NOT NULL DEFAULT 0,
            date_fin datetime NOT NULL DEFAULT "0000-00-00 00:00:00",
            date_debut datetime NOT NULL DEFAULT "0000-00-00 00:00:00",
            maj TIMESTAMP,
            composition varchar ( 255 ) NOT NULL DEFAULT ’’ COLLATE NOCASE,
            composition_lock tinyint ( 1 ) NOT NULL DEFAULT 0,
            rang int NOT NULL DEFAULT 0,
            id_profil bigint(21) NOT NULL DEFAULT 0,
            PRIMARY KEY (id_billets_type))
    

    Allez, une petite une aspirine et je regarde la Regex qui décrypte la déclaration SQL : /^[^(),]*\(((?:[^()]*\((?:[^()]*\([^()]*\))?[^()]*\)[^()]*)*[^()]*)\)[^()]*$/