Recherche avancée

Médias (0)

Mot : - Tags -/utilisateurs

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

Autres articles (103)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (16449)

  • Script to cut video by silence part with FFMPEG

    11 février 2020, par fricadelle

    This is a question that is raised here How to split video or audio by silent parts or here How can I split an mp4 video with ffmpeg every time the volume is zero ?

    So I was able to come up with a straightforward bash script that works on my Mac.

    Here it is (only argument is the name of the video to be cut, it will generate a file start_timestamps.txt with the list of silence starts if the file does not exist and reuse it otherwise) :

    #!/bin/bash

    INPUT=$1

    filename=$(basename -- "$INPUT")
    extension="${filename##*.}"
    filename="${filename%.*}"

    SILENCE_DETECT="silence_detect_logs.txt"
    TIMESTAMPS="start_timestamps.txt"

    if [ ! -f $TIMESTAMPS ]; then
       echo "Probing start timestamps"
       ffmpeg -i "$INPUT" -af "silencedetect=n=-50dB:d=3" -f null - 2> "$SILENCE_DETECT"
       cat "$SILENCE_DETECT"| grep "silence_start: [0-9.]*" -o| grep -E '[0-9]+(?:\.[0-9]*)?' -o > "$TIMESTAMPS"
    fi

    PREV=0.0
    number=0

    cat "$TIMESTAMPS"| ( while read ts
    do
       printf -v fname -- "$filename-%02d.$extension" "$(( ++number ))"
       DURATION=$( bc <<< "$ts - $PREV")
       ffmpeg -y -ss "$PREV" -i "$INPUT" -t "$DURATION" -c copy "$fname"
       PREV=$ts
    done
    printf -v fname -- "$filename-%02d.$extension" "$(( ++number ))"
    ffmpeg -y -ss "$PREV" -i "$INPUT" -c copy "$fname" )

    Unfortunately it does not seem to work :

    I have a video that is basically a collection of clips, each clip being introduced by a 5 second silence with a static frame with a title on it. So I want to cut the original video so that each chunk is the 5 seconds "introduction" + video until the next introduction. Hope it’s clear.

    Anyway, in my script I first find all silence_start using ffmpeg silencedetect plugin. I get a start_timestamps.txt that read :

    141.126
    350.107
    1016.07
    etc.

    Then for example I would call (I don’t need to transcode again the video), knowing that (1016.07 - 350.107) = 665.963

    ffmpeg -ss 350.107 -i Some_video.mp4 -t 665.963 -c copy "Some_video02.mp4"

    The edge cases being the first chunk that has to go from 0 to 141.126 and the last chunk that has to go from last timestamp to end of the video.

    Anyway the start_timestamps seem legit. But my output chunks are completely wrong. Sometimes the video does not even play anymore in Quicktime. I don’t even have my static frame with the title in any of the videos...

    Hope someone can help. Thanks.

    EDIT Ok as explained in the comments, if I echo $PREV while commenting out the ffmpeg command I get a perfectly legit list of values :

    0.0
    141.126
    350.107
    1016.07
    etc.

    With the ffmpeg command I get :

    0.0
    141.126
    50.107
    016.07
    etc.

    bash variable changes in loop with ffmpeg shows why.

    I just need to append < /dev/null to the ffmpeg command or add -nostdin argument. Thanks everybody.

  • How do you generate a looping animated gif for Facebook with ffmpeg

    7 février 2020, par Alan W. Smith

    When I paste a giphy url (like this one) into a facebook post or comment, the gif plays immediately and loops indefinitely. When I upload ones I make from ffmpeg, neither of those things happen. You have to click a play button to start the animation and then it ends after one time through.

    I have a couple of ffmpeg commands I use to create the gifs. They are :

    ffmpeg -ss 10 -t 5  -i input.m4v -vf "fps=15,scale=800:-2:flags=lanczos,palettegen" -y palette.png

    and

    ffmpeg -ss 10.6 -t 5 -i input.m4v -i palette.png -filter_complex "fps=15,scale=800:-1:lanczos[video];[video][1:v]paletteuse" output.gif

    The first one generates a custom color pallet that’s used by the second one to create a high quality animated gif. I’ve also tried adding -loop 0 (i.e. ffmpeg -ss 10.6 -t 5 -i input.m4v -i palette.png -filter_complex "fps=15,scale=800:-1:lanczos[video];[video][1:v]paletteuse" -loop 0 output.gif) but that didn’t work either.

    I also tried uploading the ffmpeg generated images to a personal website and calling them from there but those didn’t load at all.

    In case it helps, here’s a copy of one of the gifs (which autostarts and loops on StackOverflow for me but not on FB)

    enter image description here

    How does one go about creating a gif that will autostart and loop indefinitely for facebook ?

    (Note : I’ve got no problem if I need to do something with a personal website, but I don’t want to use Giphly or the other animated gif sites directly if at all possible. Also worth pointing out that I discovered if I download the image from giphly and upload it, it doesn’t autostart either. So, this may be something internal to FB, but I’d still like to figure that out.)

  • Command line ffmpeg, to insert part of a mp3 audio to another file

    14 janvier 2020, par tgkprog

    Want to copy from 3rd second of b.mp3 till 2:05 seconds of b.mp3 and append to the end of a.mp3 (its 3:23 long).

    Command :

    ffmpeg -i a.mp3 -i b.mp3

    Output :

    ffmpeg version 4.0.4-0ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers   built with gcc 8 (Ubuntu 8.2.0-7ubuntu1)
     configuration: --prefix=/usr --extra-version=0ubuntu1 --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-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    Input #0, mp3, from 'a.mp3':
     Metadata:
       encoder         : Lavf58.12.100
     Duration: 00:02:48.00, start: 0.011021, bitrate: 144 kb/s
       Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 144 kb/s
       Metadata:
         encoder         : Lavc58.18
    Input #1, mp3, from 'b.mp3':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2mp41
       encoder         : Lavf58.12.100
     Duration: 00:01:33.02, start: 0.011995, bitrate: 117 kb/s
       Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 117 kb/s
       Metadata:
         encoder         : Lavc58.18
    At least one output file must be specified