Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (78)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (4355)

  • FFmpeg with Pipe - how can I periodically grab real-time frames out of live streams in C# ?

    2 mars 2020, par BBy

    I am new to FFmpeg and C# and I want grab frames to do image processing with IP Camera.

    I have made the following C# class and I could get a single frame from IP Camera.

    class FFmpegHandler
       {
           public Process ffmpeg = new Process();
           public Image image;

           public Image init()
           {
               ffmpeg = new Process()
               {
                   StartInfo =
                   {
                       FileName = @"./ffmpeg/ffmpeg.exe",
                       //Arguments = "-i http://admin:@192.168.10.1/videostream.asf -an -f image2pipe -preset ultrafast -tune zerolatency -s 320x240 pipe:1", // Hangs
                       Arguments = "-i http://admin:@192.168.10.1/videostream.asf -vframes 1 -an -f image2pipe -preset ultrafast -tune zerolatency -s 320x240 pipe:1",
                       UseShellExecute = false,
                       RedirectStandardOutput = true,
                       RedirectStandardError = true,
                       CreateNoWindow = true,
                       WorkingDirectory = "./ffmpeg/"
                   }
               };

               ffmpeg.EnableRaisingEvents = true;
               ffmpeg.Start();

               var stream = ffmpeg.StandardOutput.BaseStream;
               var img = Image.FromStream(stream);
               //ffmpeg.WaitForExit();

               return img;
           }
       }  

    The problem is that I want to grab real-time (latest) images when I request.

    If I run FFmpegHandler.init(), it will take 2 seconds to give me delayed image output.

    I have tried removing argument -vframes 1, then it will hang after image = Image.FromStream(stream) ;.

    When I check the ffmpeg output directly, it looks like ffmpeg is keep building the stream

    frame=    6 fps=0.0 q=2.2 size=      25kB time=00:00:00.24 bitrate= 861.9kbits/s dup=4 drop=0 speed=0.435x    
    frame=   65 fps= 60 q=24.8 size=     140kB time=00:00:02.60 bitrate= 440.9kbits/s dup=4 drop=0 speed=2.41x    
    frame=   77 fps= 49 q=24.8 size=     161kB time=00:00:03.08 bitrate= 428.0kbits/s dup=4 drop=0 speed=1.95x    
    frame=   89 fps= 43 q=24.8 size=     182kB time=00:00:03.56 bitrate= 418.6kbits/s dup=4 drop=0 speed= 1.7x    
    frame=  102 fps= 39 q=24.8 size=     205kB time=00:00:04.08 bitrate= 410.7kbits/s dup=4 drop=0 speed=1.57x    
    frame=  116 fps= 37 q=24.8 size=     229kB time=00:00:04.64 bitrate= 404.2kbits/s dup=4 drop=0 speed=1.49x    
    frame=  128 fps= 35 q=24.8 size=     250kB time=00:00:05.12 bitrate= 399.8kbits/s dup=4 drop=0 speed=1.41x    
    frame=  142 fps= 34 q=24.8 size=     274kB time=00:00:05.68 bitrate= 395.7kbits/s dup=4 drop=0 speed=1.36x    
    frame=  156 fps= 33 q=24.8 size=     299kB time=00:00:06.24 bitrate= 392.3kbits/s dup=4 drop=0 speed=1.32x    
    frame=  169 fps= 32 q=24.8 size=     322kB time=00:00:06.76 bitrate= 389.7kbits/s dup=4 drop=0 speed=1.29x    
    frame=  182 fps= 32 q=24.8 size=     344kB time=00:00:07.28 bitrate= 387.4kbits/s dup=4 drop=0 speed=1.26x    
    frame=  195 fps= 31 q=24.8 size=     367kB time=00:00:07.80 bitrate= 385.5kbits/s dup=4 drop=0 speed=1.24x    
    frame=  208 fps= 31 q=24.8 size=     390kB time=00:00:08.32 bitrate= 383.8kbits/s dup=4 drop=0 speed=1.22x    
    frame=  221 fps= 30 q=24.8 size=     413kB time=00:00:08.84 bitrate= 382.3kbits/s dup=4 drop=0 speed=1.21x  

    How can I grab the latest frames out of this live-stream image ? (OR is there a thread-safe way to clean the stream and only get the latest frame when I request ?)

  • FFmpeg + iOS + lossy cellular connections

    9 novembre 2014, par Moss

    I am able to play an RTMP audio + video real-time stream on iOS with FFmpeg. Works fantastic when everything is on a solid WiFi connection.

    When I switch to a cellular connection (great signal strength and LTE/4G), av_read_frame() will intermittently block for an unacceptable amount of time. From what I can tell, it’s not that the cellular data connection just dropped, because I can reconnect immediately and start downloading more packets. In some cases, I’ve clocked 30+ seconds of hang time before it returns the next frame. When the next frame finally comes in, my real-time video stream is permanently delayed by the amount of time that av_read_frame() blocked.

    I attempted a work-around by using the AVIOInterruptCB interrupt callback to abort av_read_frame() if the function takes longer than 1 second to return. Here’s what that code looks like :

    - (void)readPackets {
       // Make sure FFmpeg calls our interrupt periodically
       _context->interrupt_callback.callback = interrupt_cb;
       _context->interrupt_callback.opaque = self;

       dispatch_async(_readPacketQueue, ^(void) {
           int err;

           while(true) {
               _readFrameTimeStamp = [[NSDate date] timeIntervalSince1970];
               err = av_read_frame(_context, &packet);
               _readFrameTimeStamp = 0;

               if(err) {
                   // Error - Reconnect the entire stream from scratch, taking 5-10 seconds
                   // And we know when av_read_frame() was aborted
                   // because its error code is -1414092869 ("EXIT")
               }
               else {
                   // Play this audio or video packet
               }
           }
      });
    }

    /**
    * Interrupt
    * @return 1 to abort the current operation
    */
    static int interrupt_cb(void *decoder) {
       if(decoder) {
           if(_readFrameTimeStamp != 0) {
               if([[NSDate date] timeIntervalSince1970] - _readFrameTimeStamp > 1) {
                   // Abort av_read_frame(), it's taking longer than 1 second
                   return 1;
               }
           }
       }
    }

    This definitely aborts av_read_frame() after 1 second, but unfortunately after I do this, future attempts to call av_read_frame() result in EIO errors (-5), which indicates that the connection has been severed.

    As a result, I am forced to fully reconnect the viewer, which takes 5-10 seconds. (avformat_open_input() takes 3-4 seconds, and then find the stream info again takes 2-3 seconds, and then start reading frames).

    The 5-10 second delay to fully reconnect is much better than waiting more than 10 seconds for av_read_frame() to unblock, and it’s much better than the real-time stream being delayed by a significant amount. But it’s much worse than being able to retry av_read_frame() immediately.

    From a cellular user’s perspective, their video locks up intermittently for 5-10 seconds while we reconnect the stream in the background from scratch, which isn’t a good user experience.

    What strategies are there to better way to manage av_read_frame() on a lossy cellular connection ?
    (Or strategies to improve the reconnect time ?)

  • Revision 30970 : Début de compatibilité avec les squelettes Z. Reste à forcer la création ...

    17 août 2009, par vincent@… — Log

    Début de compatibilité avec les squelettes Z.
    Reste à forcer la création d’un menu "barrenav" quand on détecte qu’il y a un squelette Z d’activé.