Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (110)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

  • La gestion des forums

    3 novembre 2011, par

    Si les forums sont activés sur le site, les administrateurs ont la possibilité de les gérer depuis l’interface d’administration ou depuis l’article même dans le bloc de modification de l’article qui se trouve dans la navigation de la page.
    Accès à l’interface de modération des messages
    Lorsqu’il est identifié sur le site, l’administrateur peut procéder de deux manières pour gérer les forums.
    S’il souhaite modifier (modérer, déclarer comme SPAM un message) les forums d’un article particulier, il a à sa (...)

Sur d’autres sites (8309)

  • How to implement live video streaming with ffmpeg without using WebRTC ?

    8 août 2024, par Artem

    Following up on my previous question, I'd like to inquire about alternative methods for live video streaming using ffmpeg (WebRTC is not an option due to certain constraints I prefer not to discuss here).

    


    Context :

    


    I have a Go application where a goroutine launches ffmpeg to process a video stream, which is then delivered to the main goroutine via a chan []byte. I tried using WebSocket, but encountered issues as described in the previous question. HLS also didn't work well due to significant latency and artifacts like green squares on the video.

    


    Based on a comment in the previous question, I attempted to stream the video via a simple GET request. Here's the Go handler I implemented :

    


    func stream(helperApp agent.Helper) func(rw http.ResponseWriter, rr *http.Request) {
   a := atomic.Bool{}
   return func(rw http.ResponseWriter, rr *http.Request) {
      if !a.CAS(false, true) {
         http.Error(rw, "already running", http.StatusInternalServerError)
         return
      }

      rw.Header().Set("Access-Control-Allow-Origin", "*")
      rw.Header().Set("Content-Type", "video/mp2t")

      out := make(chan []byte)

      // create StreamParam
      go ScreenCaptureForLiveStream(StreamParam, out) // ffmpeg process starts inside

      r, w := io.Pipe()
      go func() {
         for data := range out {
            w.Write(data)
            fmt.Println(len(data))
         }
      }()
      io.Copy(rw, r)
   }
}



    


    On the client side (HTML) :

    


    <video muted="muted" src="http://localhost:8080/stream" controls="controls"></video>&#xA;

    &#xA;

    In the browser console, I can see data being received, but the video doesn't play.

    &#xA;

    FFmpeg is executed with these parameters :

    &#xA;

    -loglevel error -f avfoundation -framerate 5 -capture_cursor 1 -capture_mouse_clicks 1 -i 1 -c:v libx264 -pix_fmt yuv420p -vf pad=&#x27;ceil(iw/2)*2:ceil(ih/2)*2&#x27; -threads 0 -preset veryfast -bf 2 -f mpegts pipe:1&#xA;&#xA;

    &#xA;

    For validation, I ran :

    &#xA;

    ffmpeg -i http://localhost:8080/stream -c copy out.mp4&#xA;&#xA;

    &#xA;

    The video was successfully saved and plays.

    &#xA;

    Question :&#xA;What alternative methods exist to implement live video streaming with ffmpeg, aside from WebRTC ? Why does the current approach of streaming video via HTTP GET request not function correctly in the browser, and how can this be resolved ?

    &#xA;

  • How to set header metadata to encoded video ?

    11 juin 2013, par Jona

    I'm encoding some images into an h264 video inside an mp4 container. I'm essentially using the ffmpeg example muxing.c. The thing is I'm trying to set some metadata in the mp4 container such as artist, title, etc...

    I thought using the following would work but it didn't :

    AVDictionary *opts = NULL;
    av_dict_set(&amp;opts, "title", "Super Lucky Dude", 0);
    av_dict_set(&amp;opts, "author", "Jacky Chan", 0);
    av_dict_set(&amp;opts, "album", "Chinese Movie", 0);
    av_dict_set(&amp;opts, "year", "05/10/2013", 0);
    av_dict_set(&amp;opts, "comment", "This video was created using example app.", 0);
    av_dict_set(&amp;opts, "genre", "Action", 0);

    // Write the stream header, if any.
    ret = avformat_write_header(oc, &amp;opts);

    After the whole video is created I don't see any metadata written to the video file. Any pointers how to actually do this properly ?

  • Revision 6723e34224 : Merge "fix permissions on cpplint.py (0644->0755)" into experimental

    4 mai 2013, par James Zern

    Merge "fix permissions on cpplint.py (0644->0755)" into experimental