Recherche avancée

Médias (91)

Autres articles (46)

  • MediaSPIP : Modification des droits de création d’objets et de publication définitive

    11 novembre 2010, par

    Par défaut, MediaSPIP permet de créer 5 types d’objets.
    Toujours par défaut les droits de création et de publication définitive de ces objets sont réservés aux administrateurs, mais ils sont bien entendu configurables par les webmestres.
    Ces droits sont ainsi bloqués pour plusieurs raisons : parce que le fait d’autoriser à publier doit être la volonté du webmestre pas de l’ensemble de la plateforme et donc ne pas être un choix par défaut ; parce qu’avoir un compte peut servir à autre choses également, (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (8683)

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

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

  • avformat/http: split the fragment part from the HTTP URL before the request

    3 février 2020, par Marton Balint
    avformat/http: split the fragment part from the HTTP URL before the request
    

    RFC 3986 states that the fragment identifier is separated from the rest of the
    URI prior to a dereference, and thus the identifying information within the
    fragment itself is dereferenced solely by the user agent.

    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] libavformat/http.c