Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

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

Autres articles (5)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (5077)

  • How to silent the MP3 decoding process

    3 août 2019, par Golu

    I am learning ffmpeg and I made a MP3 decoder but when I am executing it , some kind of information is printing on my terminal but I don’t want it. So how to silent it ?

    Here is code (full code)

    /* FFmpeg Usage Example
    * Date : 28 July 2019
    */
    #include
    #include <libavformat></libavformat>avformat.h>
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavutil></libavutil>avutil.h>
    #include

    int decode_packet(AVCodecContext*, AVPacket*, AVFrame*);

    int main(void) {
           AVFormatContext *pFormatContext = avformat_alloc_context();
           AVCodecParameters *pCodecParameters = NULL;
           if(avformat_open_input(&amp;pFormatContext,"song.mp3",NULL,NULL)!=0) {
                   fprintf(stderr,"Could not open file\n");
                   return -1;
           }
           if(avformat_find_stream_info(pFormatContext,NULL)&lt;0) {
                   fprintf(stderr,"Could not find stream\n");
                   return -1;
           }

           size_t stream_index = 0;
           for(;stream_indexnb_streams;stream_index++) {
                   if(pFormatContext->streams[stream_index]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
                           pCodecParameters = pFormatContext->streams[stream_index]->codecpar;
                   }
                           break;
           }

           if(stream_index == -1) {
                   fprintf(stderr,"could not retrive stream info from file\n");
                   return -1;
           }
           AVStream *stream = pFormatContext->streams[stream_index];
           pCodecParameters = stream->codecpar;
           AVCodec *cdc = avcodec_find_decoder(pCodecParameters->codec_id);
           AVCodecContext *cdc_ctx = avcodec_alloc_context3(cdc);
           assert(pCodecParameters);

           if(avcodec_parameters_to_context(cdc_ctx,pCodecParameters) &lt; 0) {
                   fprintf(stderr,"Can't copy params to codec context\n");
                   return -1;
           }

           if(avcodec_open2(cdc_ctx,cdc,NULL) &lt; 0) {
                   fprintf(stderr,"Failed to open decoder for stream\n");
                   return -1;
           }

           AVFrame *frame = av_frame_alloc();
           if(!frame) {
                   fprintf(stderr,"could not allocate memory for frame\n");
                   return -1;
           }

           AVPacket *packet = av_packet_alloc();
    //      av_init_packet(&amp;packet);
           if(!packet) {
                   fprintf(stderr,"could not allocate memory for packet");
                   return -1;
           }

           packet->data=NULL;
           packet->size=0;
           // lets read the packets
           while(av_read_frame(pFormatContext,packet) >= 0) {
                   if(packet->stream_index==stream_index) {
                           int response = 0 ;
               response = decode_packet(cdc_ctx,packet,frame);

                           if(response &lt; 0)
                                   continue;
                   }
           av_packet_unref(packet);
           }

           return 0;
    }

    int decode_packet(AVCodecContext *cdc_ctx , AVPacket *pkt, AVFrame *frm) {
       int response = avcodec_send_packet(cdc_ctx,pkt);
       if(response &lt; 0)
           return response;
       while(response >= 0) {
           response = avcodec_receive_frame(cdc_ctx,frm);
           if(response == AVERROR(EAGAIN) || response == AVERROR_EOF)
               return -1;
           else if(response &lt; 0)
               return response;
       }
       return 0;
    }

    Expected behaviour : nothing should be printed on screen

    Actual behaviour : some kind of logs are printing automatically

    Here is output logs ( some of them )

    [mp3float @ 0x75172e7400] overread, skip -6 enddists: -5 -5        
    [mp3float @ 0x75172e7400] overread, skip -7 enddists: -6 -6
    [mp3float @ 0x75172e7400] overread, skip -6 enddists: -5 -5
    [mp3float @ 0x75172e7400] overread, skip -6 enddists: -4 -4
  • How to mark TIME on each h.264 frames [duplicate]

    22 août 2019, par kylesong

    This question already has an answer here :

    I want to create python script to make time shown in video(h.264) file.
    There’s unixtime(in hex) in each frame header, so I want to use this time value to put in the video.

    In video.h264 binary file, there’s unix time written like below.
    frame header

    004D195D (offset 0x12)
    => 2019-07-01 00:00:00(UTC0)

    What I’ve tried is, parse unixtime and convert to 2019-07-01 00:00:00 format using datetime module.

    unixtime = int.from_bytes(fh.read(4), byteorder='little')
    timestring = datetime.utcfromtimestamp(unixtime).strftime('%Y-%m-%d %H:%M:%S')

    However, I’m stuck to express time in video frame.

    I attached sample video files(video.h264), and some screenshots.

    Any possible way to make this thing work ?
    original.png possible_result.png

    And you can download sample video, always welcome to test and play wih it.
    https://drive.google.com/open?id=1Csn7RdvUifSGIGjhTFUJbkRru5J2uDFd

    if you want to see the sample video(video.h264) that I’ve attached, use "ffplay" command like below.

    ffplay.exe video.h264

    To convert to AVI,

    ffmpeg.exe -i video.h264 video.avi
  • Using Unicast RTSP URIs via ffmpeg

    6 août 2019, par Chris Marshall

    I’m fairly new to ffmpeg, so I’d certainly appreciate being given an "M" to "RTFM." The ffmpeg docs are...not-so-easy...to navigate, but I’m trying.

    The goal is to develop a compiled server that incorporates ffmpeg, but first, I need to get it working via CLI.

    I have a standard AXIS Surveillance camera (AXIS M5525-E), set up as an ONVIF device (but that isn’t really relevant to this issue).

    When I query it, I get the following URI as its video streaming URI :

    rtsp://192.168.4.12/onvif-media/media.amp?profile=profile_1_jpeg&amp;streamtype=unicast

    The IP is local to a sandboxed network.

    I add the authentication parameters to it, like so :

    rtsp://<login>:<password>@192.168.4.12/onvif-media/media.amp?profile=profile_1_jpeg&amp;streamtype=unicast
    </password></login>

    (Yeah, I know that’s not secure, but this is just for testing and feasibility study. The whole damn sandbox is an insecure mess).

    Now, if I use VLC to open the URI, it works great (of course). Looking at it with a packet analyzer, I see the following negotiation between the device and my computer (at .2 - Clipped for brevity) :

    Id = 11
    Source = 192.168.4.12
    Destination = 192.168.4.2
    Captured Length = 82
    Packet Length = 82
    Protocol = TCP
    Date Received = 2019-08-06 12:18:37 +0000
    Time Delta = 1.342024087905884
    Information = 554 -> 53755 ([ECN, ACK, SYN], Seq=696764098, Ack=3139240483, Win=28960)
                       °
                       °
                       °
    Id = 48
    Source = 192.168.4.12
    Destination = 192.168.4.2
    Captured Length = 366
    Packet Length = 366
    Protocol = TCP
    Date Received = 2019-08-06 12:18:38 +0000
    Time Delta = 2.09382700920105
    Information = 554 -> 53755 ([ACK, PUSH], Seq=696765606, Ack=3139242268, Win=1073)

    Followed immediately by UDP stream packets.

    If, however, I feed the same URI to ffmpeg :

    ffmpeg -i rtsp://<login>:<password>@192.168.4.12/onvif-media/media.amp?profile=profile_1_jpeg&amp;streamtype=unicast -c:v libx264 -crf 21 -preset veryfast -g 30 -sc_threshold 0 -f hls -hls_time 4 /Volumes/Development/webroot/fftest/stream.m3u8
    </password></login>

    I get nothing. No negotiation at all between the device and my computer.

    After that, if I then remove the &amp;streamtype=unicast argument, I get a negotiation, and a stream :

    Id = 10
    Source = 192.168.4.12
    Destination = 192.168.4.2
    Captured Length = 82
    Packet Length = 82
    Protocol = TCP
    Date Received = 2019-08-06 10:37:48 +0000
    Time Delta = 3.047425985336304
    Information = 554 -> 49606 ([ECN, ACK, SYN], Seq=457514925, Ack=2138974173, Win=28960)
                       °
                       °
                       °
    Id = 31
    Source = 192.168.4.12
    Destination = 192.168.4.2
    Captured Length = 345
    Packet Length = 345
    Protocol = TCP
    Date Received = 2019-08-06 10:37:49 +0000
    Time Delta = 3.840152025222778
    Information = 554 -> 49606 ([ACK, PUSH], Seq=457516393, Ack=2138975704, Win=1039)

    I will, of course, be continuing to work out why this is [not] happening, and will post any solutions that I find, but, like I said, I’m fairly new to this, so it’s entirely possible that I’m missing some basic stuff, and would appreciate any guidance.

    Thanks !