Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (80)

  • 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

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

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (10110)

  • matroskaenc : Don’t write a track language tag

    25 septembre 2015, par John Stebbins
    matroskaenc : Don’t write a track language tag
    

    "language" is not an offical matroska tag.
    Track languages are specified with the MATROSKA_ID_TRACKLANGUAGE ebml.
    Writing the tag overrides the ebml specified language during playback with
    libav and some other players.

    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DBH] libavformat/matroskaenc.c
  • How to choose a language and a quality for HLS input in FFmpeg ?

    15 mars 2023, par andre487

    I need to retranslate HLS to RTMP with FFmpeg. I can do it like this :

    &#xA;

    ffmpeg -i &#x27;http://example.com/master.m3u8&#x27; -c:v copy -c:a aac -f flv rtmp://a.rtmp.youtube.com/live2/SOME_KEY&#xA;

    &#xA;

    But master.m3u8 contains a lot of languages and qualities. How to choose these parameters in command line ?

    &#xA;

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