Recherche avancée

Médias (91)

Autres articles (72)

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

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (8514)

  • Linux distribution with built-in ffmpeg library

    18 novembre 2020, par Rouki

    Is there a Linux distribution with a built-in ffmpeg library (compiled) ?

    &#xA;

    It seems to cause a lot of problems to install ffmpeg these days (for development). No matter how hard I tried using this wiki, it refuses to link properly. A lot of undefined references...

    &#xA;

  • Anomalie #4729 : problème d’affichage dans la colone date

    16 avril 2021

    En fait quel est le problème ?

    Parce que "2019-W16" ça veut dire Semaine 16 de 2019…
    C’est ça qui te gène ?

    C’est un format de date normalisé aussi.
    https://en.wikipedia.org/wiki/ISO_week_date

  • What's the most desireable way to capture system display and audio in the form of individual encoded audio and video packets in go (language) ? [closed]

    11 janvier 2023, par Tiger Yang

    Question (read the context below first) :

    &#xA;

    For those of you familiar with the capabilities of go, Is there a better way to go about all this ? Since ffmpeg is so ubiquitous, I'm sure it's been optomized to perfection, but what's the best way to capture system display and audio in the form of individual encoded audio and video packets in go (language), so that they can be then sent via webtransport-go ? I wish for it to prioritize efficiency and low latency, and ideally capture and encode the framebuffer directly like ffmpeg does.

    &#xA;

    Thanks ! I have many other questions about this, but I think it's best to ask as I go.

    &#xA;

    Context and what I've done so far :

    &#xA;

    I'm writing a remote desktop software for my personal use because of grievances with current solutions out there. At the moment, it consists of a web app that uses the webtransport API to send input datagrams and receive AV packets on two dedicated unidirectional streams, and the webcodecs API to decode these packets. On the serverside, I originally planned to use python with the aioquic library as a webtransport server. Upon connection and authentication, the server would start ffmpeg as a subprocess with this command :

    &#xA;

    ffmpeg -init_hw_device d3d11va -filter_complex ddagrab=video_size=1920x1080:framerate=60 -vcodec hevc_nvenc -tune ll -preset p7 -spatial_aq 1 -temporal_aq 1 -forced-idr 1 -rc cbr -b:v 400K -no-scenecut 1 -g 216000 -f hevc -

    &#xA;

    What I really appreciate about this is that it uses windows' desktop duplication API to copy the framebuffer of my GPU and hand that directly to the on-die hardware encoder with zero round trips to the CPU. I think it's about as efficient and elegant a solution as I can manage. It then outputs the encoded stream to the stdout, which python can read and send to the client.

    &#xA;

    As for the audio, there is another ffmpeg instance :

    &#xA;

    ffmpeg -f dshow -channels 2 -sample_rate 48000 -sample_size 16 -audio_buffer_size 15 -i audio="RD Audio (High Definition Audio Device)" -acodec libopus -vbr on -application audio -mapping_family 0 -apply_phase_inv true -b:a 25K -fec false -packet_loss 0 -map 0 -f data -

    &#xA;

    which listens to a physical loopback interface, which is literally just a short wire bridging the front panel headphone and microphone jacks (I'm aware of the quality loss of converting to analog and back, but the audio is then crushed down to 25kbps so it's fine) ()

    &#xA;

    Unfortunately, aioquic was not easy to work with IMO, and I found webtransport-go https://github.com/adriancable/webtransport-go, which was a hell of a lot better in both simplicity and documentation. However, now I'm dealing with a whole new language, and I wanna ask : (above)

    &#xA;

    EDIT : Here's the code for my server so far :

    &#xA;

    &#xD;&#xA;
    &#xD;&#xA;
    package main&#xA;&#xA;import (&#xA;    "bytes"&#xA;    "context"&#xA;    "fmt"&#xA;    "log"&#xA;    "net/http"&#xA;    "os/exec"&#xA;    "time"&#xA;&#xA;    "github.com/adriancable/webtransport-go"&#xA;)&#xA;&#xA;func warn(str string) {&#xA;    fmt.Printf("\n===== WARNING ===================================================================================================\n   %s\n=================================================================================================================\n", str)&#xA;}&#xA;&#xA;func main() {&#xA;&#xA;    password := []byte("abc")&#xA;&#xA;    videoString := []string{&#xA;        "ffmpeg",&#xA;        "-init_hw_device", "d3d11va",&#xA;        "-filter_complex", "ddagrab=video_size=1920x1080:framerate=60",&#xA;        "-vcodec", "hevc_nvenc",&#xA;        "-tune", "ll",&#xA;        "-preset", "p7",&#xA;        "-spatial_aq", "1",&#xA;        "-temporal_aq", "1",&#xA;        "-forced-idr", "1",&#xA;        "-rc", "cbr",&#xA;        "-b:v", "500K",&#xA;        "-no-scenecut", "1",&#xA;        "-g", "216000",&#xA;        "-f", "hevc", "-",&#xA;    }&#xA;&#xA;    audioString := []string{&#xA;        "ffmpeg",&#xA;        "-f", "dshow",&#xA;        "-channels", "2",&#xA;        "-sample_rate", "48000",&#xA;        "-sample_size", "16",&#xA;        "-audio_buffer_size", "15",&#xA;        "-i", "audio=RD Audio (High Definition Audio Device)",&#xA;        "-acodec", "libopus",&#xA;        "-mapping_family", "0",&#xA;        "-b:a", "25K",&#xA;        "-map", "0",&#xA;        "-f", "data", "-",&#xA;    }&#xA;&#xA;    connected := false&#xA;&#xA;    http.HandleFunc("/", func(writer http.ResponseWriter, request *http.Request) {&#xA;        session := request.Body.(*webtransport.Session)&#xA;&#xA;        session.AcceptSession()&#xA;        fmt.Println("\nAccepted incoming WebTransport connection.")&#xA;        fmt.Println("Awaiting authentication...")&#xA;&#xA;        authData, err := session.ReceiveMessage(session.Context()) // Waits here till first datagram&#xA;        if err != nil {                                            // if client closes connection before sending anything&#xA;            fmt.Println("\nConnection closed:", err)&#xA;            return&#xA;        }&#xA;&#xA;        if len(authData) >= 2 &amp;&amp; bytes.Equal(authData[2:], password) {&#xA;            if connected {&#xA;                session.CloseSession()&#xA;                warn("Client has authenticated, but a session is already taking place! Connection closed.")&#xA;                return&#xA;            } else {&#xA;                connected = true&#xA;                fmt.Println("Client has authenticated!\n")&#xA;            }&#xA;        } else {&#xA;            session.CloseSession()&#xA;            warn("Client has failed authentication! Connection closed. (" &#x2B; string(authData[2:]) &#x2B; ")")&#xA;            return&#xA;        }&#xA;&#xA;        videoStream, _ := session.OpenUniStreamSync(session.Context())&#xA;&#xA;        videoCmd := exec.Command(videoString[0], videoString[1:]...)&#xA;        go func() {&#xA;            videoOut, _ := videoCmd.StdoutPipe()&#xA;            videoCmd.Start()&#xA;&#xA;            buffer := make([]byte, 15000)&#xA;            for {&#xA;                len, err := videoOut.Read(buffer)&#xA;                if err != nil {&#xA;                    break&#xA;                }&#xA;                if len > 0 {&#xA;                    videoStream.Write(buffer[:len])&#xA;                }&#xA;            }&#xA;        }()&#xA;&#xA;        time.Sleep(50 * time.Millisecond)&#xA;&#xA;        audioStream, err := session.OpenUniStreamSync(session.Context())&#xA;&#xA;        audioCmd := exec.Command(audioString[0], audioString[1:]...)&#xA;        go func() {&#xA;            audioOut, _ := audioCmd.StdoutPipe()&#xA;            audioCmd.Start()&#xA;&#xA;            buffer := make([]byte, 15000)&#xA;            for {&#xA;                len, err := audioOut.Read(buffer)&#xA;                if err != nil {&#xA;                    break&#xA;                }&#xA;                if len > 0 {&#xA;                    audioStream.Write(buffer[:len])&#xA;                }&#xA;            }&#xA;        }()&#xA;&#xA;        for {&#xA;            data, err := session.ReceiveMessage(session.Context())&#xA;            if err != nil {&#xA;                videoCmd.Process.Kill()&#xA;                audioCmd.Process.Kill()&#xA;&#xA;                connected = false&#xA;&#xA;                fmt.Println("\nConnection closed:", err)&#xA;                break&#xA;            }&#xA;&#xA;            if len(data) == 0 {&#xA;&#xA;            } else if data[0] == byte(0) {&#xA;                fmt.Printf("Received mouse datagram: %s\n", data)&#xA;            }&#xA;        }&#xA;&#xA;    })&#xA;&#xA;    server := &amp;webtransport.Server{&#xA;        ListenAddr: ":1024",&#xA;        TLSCert:    webtransport.CertFile{Path: "SSL/fullchain.pem"},&#xA;        TLSKey:     webtransport.CertFile{Path: "SSL/privkey.pem"},&#xA;        QuicConfig: &amp;webtransport.QuicConfig{&#xA;            KeepAlive:      false,&#xA;            MaxIdleTimeout: 3 * time.Second,&#xA;        },&#xA;    }&#xA;&#xA;    fmt.Println("Launching WebTransport server at", server.ListenAddr)&#xA;    ctx, cancel := context.WithCancel(context.Background())&#xA;    if err := server.Run(ctx); err != nil {&#xA;        log.Fatal(err)&#xA;        cancel()&#xA;    }&#xA;&#xA;}

    &#xD;&#xA;

    &#xD;&#xA;

    &#xD;&#xA;&#xA;