Recherche avancée

Médias (39)

Mot : - Tags -/audio

Autres articles (52)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

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

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (11588)

  • Make gif (ffmpeg) using MOST RECENT 7 jpg files in a directory

    16 juillet 2019, par Brad Sullivan

    I have a bash script which runs on a cron, to take screenshots of my cctv 1x per day to do an annual timelapse. It all works, and I get a YTD sofar.gif of the very first screenshot to the very last screenshot — which is now quite long. I wanted to add a line to make last7days.gif so I could get a shorter weekly gif etc.

    I have searched this site and the web and can list the newest 7 files in terminal using : ls -1t | head -n 9 | tail -n 7 (this removes the .gif and .mov which are modified last) but I do not know how to make that vertical list of 7 filenames into a variable to make a gif using those file names

    # runs from a cronjob. saves live screenshot from CCTV to jpg, then updates the year-to-date movie

    if [ $# -ne 1 ]
    then
     echo "Usage: `basename $0` OUTDIR"
     exit 65
    fi

    doexit=0

    start=$(date +%s)
    end=$(date +%s)

    outdir=${1%/}
    mkdir $outdir
    echo "Capturing image..."

    counter=$(date +"%Y_%m_%d_%H-%M-%S");
    file=$outdir/$counter.jpg

    if response=$(curl --silent --write-out %{http_code} --max-time 600 'URL REDACTED' -o $file) ; then
       echo "Captured & saved $file!"
    else
       echo "Failed to capture $file"
    fi

    ffmpeg -hide_banner -loglevel panic -pattern_type glob -i $outdir/'*.jpg' $outdir/sofar.mov -y
    ffmpeg -hide_banner -loglevel panic -pattern_type glob -i $outdir/'*.jpg' $outdir/sofar.gif -y

    exit 1

    Currently, the last lines create a .gif using every image file, this works only because they are saved with the date in the filename.

    I want to add a line to create a .gif using just the most 7 recent images

  • Fontconfig error : Cannot load default config file

    28 juin 2019, par sachin

    I am trying to add text in the video, but I am getting -

    Fontconfig error : Cannot load default config file
    [Parsed_drawtext_0 @ 0xea1aeaa0] impossible to init fontconfig

    below cmd to add text using FFmpeg lib-

    String[] cmd = new String[]
    "-i", savedVideoFilePath, "-vf", "drawtext=text="+"’"+timeStamp+"’"+" :
    fontfile=/android_asset/fonts/Poppins-Medium.ttf : fontcolor=white :
    fontsize=24 : x=(w-tw)/2 : y=(h/PHI)+th box=0 :","-codec:a" ,"copy" ,
    output_path
     ;

    log details -

    Error opening filters ! 2019-06-10 18:04:58.027
    18678-18678/com.rs.vir.debug E/FFMPEG FAilure : FAILED with output :
    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.8 (GCC)
    configuration : —target-os=linux —cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-
    —arch=arm —cpu=cortex-a8 —enable-runtime-cpudetect —sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot
    —enable-pic —enable-libx264 —enable-libass —enable-libfreetype —enable-libfribidi —enable-libmp3lame —enable-fontconfig —enable-pthreads —disable-debug —disable-ffserver —enable-version3 —enable-hardcoded-tables —disable-ffplay —disable-ffprobe —enable-gpl —enable-yasm —disable-doc —disable-shared —enable-static —pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config —prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a —extra-cflags=’-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include
    -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all’ —extra-ldflags=’-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib
    -Wl,-z,relro -Wl,-z,now -pie’ —extra-libs=’-lpng -lexpat -lm’ —extra-cxxflags=
    libavutil 55. 17.103 / 55. 17.103
    libavcodec 57. 24.102 / 57. 24.102
    libavformat 57. 25.100 / 57. 25.100
    libavdevice 57. 0.101 / 57. 0.101
    libavfilter 6. 31.100 / 6. 31.100
    libswscale 4. 0.100 / 4. 0.100
    libswresample 2. 0.101 / 2. 0.101
    libpostproc 54. 0.100 / 54. 0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’/data/user/0/com.rs.vir.debug/files/VIR_Customer/EVINV12207201906100303240000/Videos/sample.mp4’ :
    Metadata :
    major_brand : mp42
    minor_version : 0
    compatible_brands : isommp42
    creation_time : 2019-06-10 12:34:55
    com.android.version : 8.1.0
    Duration : 00:00:06.66, start : 0.000000, bitrate : 3724 kb/s
    Stream #0:0(eng) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x480, 3464 kb/s, SAR 1:1
    DAR 3:2, 30.04 fps, 30 tbr, 90k tbn, 180k tbc (default)
    Metadata :
    rotate : 90
    creation_time : 2019-06-10 12:34:55
    handler_name : VideoHandle
    Side data :
    displaymatrix : rotation of -90.00 degrees
    Stream #0:1(eng) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 255 kb/s (default)
    Metadata :
    creation_time : 2019-06-10 12:34:55
    handler_name : SoundHandle
    Fontconfig error : Cannot load default config file
    [Parsed_drawtext_0 @ 0xea1aeaa0] impossible to init fontconfig
    [AVFilterGraph @ 0xea1cb040] Error initializing filter ’drawtext’ with args
    ’text=java.util.GregorianCalendar[time=1560170097814,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=libcore.util.ZoneInfo[id="Asia/Kolkata",mRawOffset=19800000,mEarliestRawOffset=19800000,mUseDst=false,mDstSavings=0,transitions=5],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2019,MONTH=5,WEEK_OF_YEAR=24,WEEK_OF_MONTH=2,DAY_OF_MONTH=10,DAY_OF_YEAR=161,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=6,HOUR_OF_DAY=18,MINUTE=4,SECOND=57,MILLISECOND=814,ZONE_OFFSET=19800000,DST_OFFSET=0] :
    fontfile=/android_asset/fonts/Poppins-Medium.ttf : fontcolor=white :
    fontsize=24 : x=(w-tw)/2 : y=(h/PHI)+th box=0 :’
    Error opening filters !

    please give me the solution for this.

  • Make gif using most recent 7x updated JPG in a folder (weekly timelapse !)

    28 juillet 2019, par Brad Sullivan

    This bash script takes a cctv screenshot on cronjob, daily.
    The filenames are saved YY_MM_DD_HH_MM_SS.

    I can make a ’year to date’ timelapse (comes out as sofar.gif) easily using the below line — note that this ignores all filenames / creation dates and just sued every JPG in the folder ffmpeg -pattern_type glob -i $outdir/'*.jpg' $outdir/gif/sofar.gif -y

    But I also want to generate at the same time, a gif using EITHER :
    A) the JPG’s with the most recent 7x file names
    B) the JPG’s with the most recent modified stamp
    (same result)

    I have tried this code below, which does generate a 7days.gif but it only contains 1 frame, the 7th oldest screenshot — rather my desired output having 7 frames made up from the most 7x recent screenshots.

    #!/usr/bin/env bash
    PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin

    # runs from a cronjob. saves live screenshot from CCTV to jpg, then updates the year-to-date movie

    if [ $# -ne 1 ]
    then
     echo "Usage: `basename $0` OUTDIR"
     exit 65
    fi

    doexit=0

    start=$(date +%s)
    end=$(date +%s)

    outdir=${1%/}
    mkdir $outdir
    mkdir $outdir/gif/
    echo "Capturing image..."

    counter=$(date +"%Y_%m_%d_%H-%M-%S");
    file=$outdir/$counter.jpg

    if response=$(curl --silent --write-out %{http_code} --max-time 600 'http://192.168.1.69/cgi-bin/snapshot.cgi?chn=0&u=XXX&p=XXX&q=0&d=1&rand=0.14620004288649113' -o $file) ; then
       echo "Captured & saved $file!"
    else
       echo "Failed to capture $file"
    fi

    # THIS IS THE BIT WHICH DOES THE LAST 7 DAYS
    shopt -s nullglob
    files=( "$outdir"/*.jpg )
    file_count=${#files[@]}
    echo
    if (( ${#files[@]} == 0 )); then
     echo "ERROR: No files found" >&2; exit 1;
    elif (( ${#files[@]} > 7 )); then
     files=( "${files[@]:$(( ${#files[@]} - 7 ))}" )
    fi

    input_args=( )
    for f in "${files[@]}"; do
     input_args+=(-i "$f")
    done
    echo "Making weekly.."
    echo "${input_args[@]}"

    echo "Making weekly.."
    ffmpeg "${input_args[@]}" $outdir/gif/7days.gif -y
    echo "Making YTD.."
    ffmpeg -hide_banner -loglevel panic -pattern_type glob -i $outdir/'*.jpg' $outdir/gif/sofar.gif -y

    exit 1

    The code half works as if I echo the ${input_args[@]} I see the correct file list ; Making weekly.. -i 365/2019_07_10_15-00-00.jpg -i 365/2019_07_11_15-00-00.jpg -i 365/2019_07_12_15-00-00.jpg -i 365/2019_07_13_15-00-00.jpg -i 365/2019_07_14_15-00-00.jpg -i 365/2019_07_15_15-00-00.jpg -i 365/2019_07_16_12-00-19.jpg which seems to confuse ffmpeg it because it adds the -i over & over, meaning the gif only has one frame.

    I need to edit the script above to correctly also spit out a 7days.gif which is dynamically made using the most recent 7x screenshots in $outdir