Recherche avancée

Médias (1)

Mot : - Tags -/punk

Autres articles (106)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

Sur d’autres sites (17458)

  • configure : allow mixed declarations and code for Objective-C

    25 septembre 2024, par Marvin Scholz
    configure : allow mixed declarations and code for Objective-C
    

    Mixing declarations and code is quite common in Objective-C (as can be
    seen by the number of warnings we have for this in Objective-C files)
    and forcing to not do it usually results in worse code, with unnecessary
    widely scoped variables, which in turn makes variable shadowing and
    accidentally using the wrong variable more common and harder to notice.

    Signed-off-by : Zhao Zhili <zhilizhao@tencent.com>

    • [DH] configure
  • (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.

    &#xA;

    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 :

    &#xA;

    <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;

  • avcodec/bsf/h264_mp4toannexb : Fix mixed bitstream format

    24 avril, par Zhao Zhili
    avcodec/bsf/h264_mp4toannexb : Fix mixed bitstream format
    

    This bsf converts AV_PKT_DATA_NEW_EXTRADATA side data in avcc format
    to in-band annexb format. However, the side data wasn't been removed
    and copied from input packet to output packet. So the output packet
    has mixed bitstream format. We don't support mixed bitstream format.
    For example, h264_metadata report error in the following case :

    ffmpeg -i foo.flv \
    -bsf:v "h264_mp4toannexb,h264_metadata" \
    -c copy -f null

    This patch removed NEW_EXTRADATA side data after process.

    This patch also add a check so only NEW_EXTRADATA in avcc format is
    processed. NEW_EXTRADATA in annexb format is copied to output as is.

    Reported-by : jiangjie <jiangjie618@gmail.com>
    Signed-off-by : Zhao Zhili <zhilizhao@tencent.com>

    • [DH] libavcodec/bsf/h264_mp4toannexb.c
    • [DH] tests/fate/h264.mak