Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (45)

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

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

Sur d’autres sites (3261)

  • Pipe a HTTP response

    30 juillet 2014, par viperfx

    How do I pipe an HTTP response like in NodeJS. Here is the snippet I am using in NodeJS :

    request({
     url: audio_file_url,
    }).pipe(ffmpeg_process.stdin);

    How can I achieve the same result in Go ?

    I am trying to pipe a audio stream from HTTP into an FFmpeg process so that it converts it on the fly and returns the converted file back to the client.

    Just so its clear to everyone here is my source code so far :

    func encodeAudio(w http.ResponseWriter, req *http.Request) {
       path, err := exec.LookPath("youtube-dl")
       if err != nil {
           log.Fatal("LookPath: ", err)
       }
       path_ff, err_ff := exec.LookPath("ffmpeg")
       if err != nil {
           log.Fatal("LookPath: ", err_ff)
       }

       streamLink := exec.Command(path,"-f", "140", "-g", "https://www.youtube.com/watch?v=VIDEOID")

       var out bytes.Buffer
       streamLink.Stdout = &out
       cmdFF := exec.Command(path_ff, "-i", "pipe:0", "-acodec", "libmp3lame", "-f", "mp3", "-")
       resp, err := http.Get(out.String())
       if err != nil {
           log.Fatal(err)
       }
       // pr, pw := io.Pipe()
       defer resp.Body.Close()
       cmdFF.Stdin = resp.Body
       cmdFF.Stdout = w
       streamLink.Run()
       //get ffmpeg running in another goroutine to receive data
       errCh := make(chan error, 1)
       go func() {
           errCh <- cmdFF.Run()
       }()

       // close the pipeline to signal the end of the stream
       // pw.Close()
       // pr.Close()

       // check for an error from ffmpeg
       if err := <-errCh; err != nil {
           // ff error
       }
    }

    Error : 2014/07/29 23:04:02 Get : unsupported protocol scheme ""

  • closing goroutine spawned by fiber endpoint

    30 mai 2023, par Nitin

    I have a program that is rtsp cameras to hls format using ffmpeg for streaming.
creating goroutines for each rtsp link as ffmpeg runs in background

    


    Streams are added by following code.

    


    func StreamProcess(data <-chan StreamData, ctx context.Context) {
for v := range data {
    ctx, _ := context.WithCancel(ctx)
    go func() {
        if !getStreams(v.camera_id) {
            var stream StreamState
            stream.camera_id = v.camera_id
            stream.state = true
            go Stream(v, ctx)
            wg.Wait()
        } else {
            return
        }
    }()
}   


    


    }

    


    Streaming function which runs ffmpeg command.

    


    func Stream(meta StreamData, ctx context.Context) error {
    log.Println("Started Streaming")
    ffmpegCmd := exec.Command("ffmpeg", "-i", meta.rtsp, "-pix_fmt", "yuv420p", "-c:v", "libx264", "-preset", "ultrafast", "-b:v", "600k", "-c:a", "aac", "-b:a", "160k", "-f", "rtsp", fmt.Sprintf("rtsp://localhost:8554/%s", meta.camera_id))
    output, _ := ffmpegCmd.CombinedOutput()

    log.Println(string(output))

    for {
        select {
        case <-ctx.Done():
           log.Println("killing process")
           ffmpegCmd.Process.Kill()
           return nil
        }
    }}


    


    my Goal is to stop each os.exec process (ffmpeg command) or at least close all goroutines that are under ffmpeg commands without closing fiber server.

    


    ** help required new to golang **

    


  • avfilter/internal : Move ff_norm_qscale() to qp_table.h

    2 août 2021, par Andreas Rheinhardt
    avfilter/internal : Move ff_norm_qscale() to qp_table.h
    

    It is the natural header for it.

    Reviewed-by : Michael Niedermayer <michael@niedermayer.cc>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavfilter/internal.h
    • [DH] libavfilter/qp_table.h