Recherche avancée

Médias (91)

Autres articles (111)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

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

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

Sur d’autres sites (5565)

  • Anomalie #3248 (Nouveau) : Les fonctions parametre_url (js et php) n’insèrent pas correctement les...

    26 juillet 2014, par Michel Bystranowski

    L’appel

    parametre_url(’http://domaine/spip.php?t[]=1’,’t’,array(0,2)) ;
    


    retourne

    http://domaine/spip.php?t[]=1&t[]=0&t[]=2
    


    au lieu de

    http://domaine/spip.php?t[]=0&t[]=2
    

    Ce problème est présent à la fois dans la version javascript et la version php. Je n’ai testé que sur SPIP 3.0.16.

    J’ai un patch qui corrige ça dans les deux cas.

    Pour le javascript, il y a une regexp mal échappée, et un appel à la fonction substring avec un index négatif, ce qui n’est pas permis, seule la fonction substr le permet… (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring)

    Et dans les deux cas, il faut bien vider les valeurs initiale du tableau dans l’url avant d’ajouter les nouvelles valeurs.

    Je joins des fichiers corrigés, et voici un patch :

    2 files changed, 9 insertions(+), 3 deletions(-)
     2014/ecrire/inc/utils.php             | 5 +++++
     2014/prive/javascript/ajaxCallback.js | 7 ++++---
    

    Modified 2014/ecrire/inc/utils.php
    diff —git a/2014/ecrire/inc/utils.php b/2014/ecrire/inc/utils.php
    index b875aa2..01a7f53 100644
    — - a/2014/ecrire/inc/utils.php
    +++ b/2014/ecrire/inc/utils.php
    @@ -333,6 +333,11 @@ function parametre_url($url, $c, $v=NULL, $sep=’&amp ;’)
    $url[$n] = $r[1].’=’.$u ;
    unset($ajouts[$r[1]]) ;

    + // Pour les tableaux on laisse tomber les valeurs de
    + // départ, on remplira à l’étape suivante
    + else
    + unset($url[$n]) ;
    +


    Modified 2014/prive/javascript/ajaxCallback.js
    diff —git a/2014/prive/javascript/ajaxCallback.js b/2014/prive/javascript/ajaxCallback.js
    index 118fc31..de434c4 100644
    — - a/2014/prive/javascript/ajaxCallback.js
    +++ b/2014/prive/javascript/ajaxCallback.js
    @@ -809,7 +809,7 @@ function parametre_url(url,c,v,sep,force_vide)

    else
    a=url ;
    - var regexp = new RegExp(’^(’ + c.replace(’[]’,’[]’) + ’[?] ?)(=.*) ?$’) ;
    + var regexp = new RegExp(’^(’ + c.replace(’[]’,’[]’) + ’[?] ?)(=.*) ?$’) ;
    var ajouts = [] ;
    var u = (typeof(v) !==’object’) ?encodeURIComponent(v):v ;
    var na = [] ;
    @@ -829,11 +829,12 @@ function parametre_url(url,c,v,sep,force_vide)

    // Ajout. Pour une variable, remplacer au meme endroit,
    // pour un tableau ce sera fait dans la prochaine boucle
    - else if (r[1].substring(-2) != ’[]’)
    + else if (r[1].substr(-2) != ’[]’)
    na.push(r[1]+’=’+u) ;
    ajouts.push(r[1]) ;

    - else na.push(args[n]) ;
    + /* Pour les tableaux ont laisse tomber les valeurs de départ, on
    + remplira à l’étape suivante */

    else
    na.push(args[n]) ;

  • ffmpeg detects a videofile path when it does not exist

    17 novembre 2020, par Nejc Kejzar

    this is boggling my mind. I am using ffmpeg to compress videos within the following python script :

    


    import re
import os

kage = 'MH5'
year = '2020'
month = '11'
day = '10'

# Set output dir; create it if it doesn't exist yet
downsampled_video_dir = home_data_dir + f'piCamera/downsampled_videos/{kage}/{year}/{month}/{day}/'
Path(downsampled_video_dir).mkdir(parents=True, exist_ok=True)
    
for i, video in enumerate(videos):
        # Set ffmpeg video compression terminal command and output directory for downsampled videos
        video_name = re.findall('\d+_\d+.mp4', video)[0]
        ds_output = downsampled_video_dir + video_name
        compress_command = f"ffmpeg -i {video} -vf scale={video_res[0]}:-2 {ds_output}"
        
        # Run ffmpeg video compression
        os.system(compress_command)


    


    videos is a list of full video paths of the videos that I wish to compress, and ds_output is a full path of where to write the compressed video. video_res[0] contains the desired height of the video with the following -2 automatically calculating the width so that the aspect ratio is preserved.

    


    For some reason when running this, ffmpeg detects some of the videos in the output directory as already existing and asks if I wish to overwrite them. The videos of course aren't there yet, so when I pass y, ffmpeg complains that no such file exists. Here is an example output for one of the problematic videos :

    


    ffmpeg -y -i '/home/piCamera/MH4/2020/11/10/20201110_085451.mp4' -vf scale=400:300  '/home/piCamera/downsampled_videos/MH4/2020/11/10/20201110_085451.mp4'
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/piCamera/MH4/2020/11/10/20201110_085451.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.20.100
  Duration: 00:03:58.84, start: 0.000000, bitrate: 1190 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x720, 1190 kb/s, 5 fps, 5 tbr, 10240 tbn, 20480 tbc (default)
    Metadata:
      handler_name    : VideoHandler
/home/piCamera/downsampled_videos/MH4/2020/11/10/20201110_085451.mp4: No such file or directory


    


    This happens with about 3 videos out of 53, the rest run normally. I've tried restarting the terminal, deleted the whole created downsampled_video_dir and run again, but no matter how many times I restart, the same videos are the problem. The only thing that appears to help is if I change the output directory name. Any ideas of why this strange error is happening ?

    


    This is being run on Ubuntu20 with python3.7.9 in a Jupyter Notebook.

    


    Many, many thanks for all the insights !

    


  • ffmpeg change metadata inside video file

    26 novembre 2020, par virtualsets

    Hello I have problems to change timecode insdie metadata of a video file "mov"

    


    ruta=r"E:\Brutos-sin-eliminar\inma-ruben-22-2-2020\multicam\\"
nombre=r"A019_02230134_C186.mov"
comand="ffmpeg -i " + nombre + " -ss 0 -map 0 -acodec copy -vcodec copy -timecode 01:20:10:00 -metadata:s:2:0 timecode=01:20:10:00 -metadata:s:1:0 timecode=01:20:10:00 -metadata:s:0:2 -metadata:s:0:2  timecode=01:10:10:00"+ " convert_" + nombre

os.popen(comand)


    


    I need to put muy own timecode to the file but this command not works.

    


    The console give me

    


      mov @ 00000225287fdc00] You requested a copy of the original timecode track so timecode metadata are now ignored
Output #0, mov, to 'convert_A019_02230134_C186.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    com.blackmagic-design.camera.windowedSensor: 1
    com.apple.proapps.manufacturer: Blackmagic Design
    com.blackmagic-design.camera.uuid: 3cf1dd9e-e307-47ff-864e-5487fea3fa47
    com.blackmagic-design.camera.projectFPS: 25
    com.apple.proapps.shootingRate: 50
    com.blackmagic-design.camera.cameraType: Blackmagic Pocket Cinema Camera 4K
    com.blackmagic-design.camera.shutterAngle: 180°
    com.blackmagic-design.camera.shutterMode: Angle
    com.blackmagic-design.camera.iso: 3200
    com.blackmagic-design.camera.whiteBalanceKelvin: 3000
    com.blackmagic-design.camera.whiteBalanceTint: -44
    com.apple.proapps.customgamma: com.blackmagic-design.camera.filmlog
    com.blackmagic-design.camera.look.LUTName: Blackmagic Pocket 4K Film to Extended Video.cube
    com.blackmagic-design.camera.guides.aspectRatio: 2:1
    com.blackmagic-design.camera.guides.safeArea: 90
    com.blackmagic-design.camera.firmware: 6.6
    com.apple.proapps.clipID: A019_02230134_C186
    com.apple.proapps.reel: 19
    com.apple.proapps.scene: 1
    com.apple.proapps.shot: 99
    com.apple.proapps.isGood: 0
    com.blackmagic-design.camera.environment: interior
    com.blackmagic-design.camera.dayNight: day
    com.apple.proapps.cameraName: A
    com.blackmagic-design.camera.colorScience: Blackmagic Pocket Cinema Camera 4K, Color Science Gen 4
    com.blackmagic-design.camera.dateRecorded: 2020:02:23
    timecode        : 01:20:10:00
    encoder         : Lavf58.11.101
    Stream #0:0(eng): Video: prores (apcn / 0x6E637061), yuv422p10le(bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 122315 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 01:10:10:00
      handler_name    : ?Apple Alias Data Handler
      encoder         : Apple ProRes 422
      timecode        : 01:10:10:00
    Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2020-02-23T00:34:02.000000Z
      handler_name    : ?Apple Alias Data Handler
      timecode        : 01:20:10:00
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2020-02-23T00:34:02.000000Z
      handler_name    : ?Apple Alias Data Handler
      timecode        : 01:20:10:00
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
frame=  467 fps=0.0 q=-1.0 Lsize=  281452kB time=00:00:18.64 bitrate=123693.3kbits/s speed=71.1x    
video:278913kB audio:2531kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002533%


    


    I dont understand why not modificate the mov file... when open the metadata it is oringinal.

    


    Reggards