Recherche avancée

Médias (0)

Mot : - Tags -/page unique

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

Autres articles (56)

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

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

  • 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

Sur d’autres sites (11774)

  • (Go) FFmpeg stdout produces a jumbled mess of plain text mixed with binary [closed]

    30 juillet 2024, par EricFrancis12

    I'm trying to pipe r.Body into ffmpeg as it's stdin, then pipe stdout as the http response.

    


    On the client, I am sending the data via POST from an html form, then creating a blob for the response and prompting the browser to download it :

    


    <code class="echappe-js">&lt;script&gt;&amp;#xA;        document.getElementById(&amp;#x27;uploadForm&amp;#x27;).addEventListener(&amp;#x27;submit&amp;#x27;, function (event) {&amp;#xA;            event.preventDefault();&amp;#xA;&amp;#xA;            const fileInput = document.getElementById(&amp;#x27;file&amp;#x27;);&amp;#xA;            const file = fileInput.files[0];&amp;#xA;&amp;#xA;            const formData = new FormData();&amp;#xA;            formData.append(&amp;#x27;file&amp;#x27;, file);&amp;#xA;&amp;#xA;            fetch(&amp;#x27;/http&amp;#x27;, {&amp;#xA;                method: &amp;#x27;POST&amp;#x27;,&amp;#xA;                body: file,&amp;#xA;                headers: {&amp;#xA;                    &amp;#x27;Content-Type&amp;#x27;: file.type,&amp;#xA;                }&amp;#xA;            })&amp;#xA;                .then(response =&gt; {&amp;#xA;                    const blob = response.blob();&amp;#xA;                    const url = window.URL.createObjectURL(blob);&amp;#xA;                    const a = document.createElement(&amp;#x27;a&amp;#x27;);&amp;#xA;                    a.style.display = &amp;#x27;none&amp;#x27;;&amp;#xA;                    a.href = url;&amp;#xA;                    a.download = &amp;#x27;output.flv&amp;#x27;;&amp;#xA;                    document.body.appendChild(a);&amp;#xA;                    a.click();&amp;#xA;                    window.URL.revokeObjectURL(url);&amp;#xA;                })&amp;#xA;                .catch(error =&gt; console.error(error));&amp;#xA;        });&amp;#xA;    &lt;/script&gt;&#xA;

    &#xA;

    On the server, I am creating an *exec.Cmd, assigning r.Body to it's stdin, and assigning w to both it's stdout and stderr :

    &#xA;

    func handleHTTP(w http.ResponseWriter, r *http.Request) {&#xA;    command := "ffmpeg -f mp4 -i - -vf scale=100:50 -c:a copy -c:v libx264 -f flv pipe:1"&#xA;    ffmpegCmd := PrepareCommand(command, r.Body, w, w)&#xA;&#xA;    // Run FFmpeg command&#xA;    if err := ffmpegCmd.Run(); err != nil {&#xA;        http.Error(w, fmt.Sprintf("FFmpeg command failed: %v", err), http.StatusInternalServerError)&#xA;    }&#xA;}&#xA;&#xA;func PrepareCommand(command string, stdin io.ReadCloser, stdout io.Writer, stderr io.Writer) *exec.Cmd {&#xA;    command = strings.TrimSpace(command)&#xA;    name, args := FormatCommand(command)&#xA;    ffmpegCmd := exec.Command(name, args...)&#xA;    ffmpegCmd.Stdin = stdin&#xA;    ffmpegCmd.Stdout = stdout&#xA;    ffmpegCmd.Stderr = stderr&#xA;    return ffmpegCmd&#xA;}&#xA;&#xA;func FormatCommand(str string) (name string, args []string) {&#xA;    parts := strings.Split(str, " ")&#xA;    return parts[0], parts[1:]&#xA;}&#xA;

    &#xA;

    When viewed in a text editor, the output file consists of the plain text emitted from stdout when the command starts and the binary data mixed together :

    &#xA;

    Part 1/3&#xA;Part 2/3&#xA;Part 3/3

    &#xA;

    Does anyone know how to get rid of the plain text output before piping the data into stdin ? Thanks.

    &#xA;

    The output file should not contain plain text from the command start-up.

    &#xA;

  • FFMPEG script to cut audio at exact time intervals [duplicate]

    15 janvier 2021, par BitBit

    I have an audio file which is about 1 hour 10 minutes long, and I want to cut the audio into several parts which are exactly time 15 mins apart. Can someone please help me with a ffmpeg script that cuts audio at every 15th minute(i.e. at 15:00,30:00,45:00,60:00) and hence make my 1 hour 10 minutes audio clip into 5 cut clips of 15 minutes length(the last clip being only 10 minutes due to the video length)

    &#xA;

  • Remove Black Frames from an overlayed Circled Video

    7 juillet 2017, par amanguel

    I have a video that I need to overlay on top of another video. The first video have parts with black frames that I don’t want to be overlayed and I also need to mask this video with a circle.

    In other words, I will be overlaying a few circled videos on top of a bigger rectangular video and I also don’t want to show black frames from the circled videos.

    Could you please help me.

    Thanks !!!!!