Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (47)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

Sur d’autres sites (5341)

  • Matching a specific media format with ffmpeg/avconv

    5 mai 2020, par Markus A.

    I need to encode a video from static images in such a way that it format-matches another one so I can splice the video streams together.

    



    Here is the mediainfo of the file I'm trying to match :

    



    Video
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L3.1
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Codec ID                                 : 7
Duration                                 : 2mn 46s
Bit rate                                 : 1 614 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Stream size                              : 32.0 MiB (87%)
Color primaries                          : BT.601 PAL
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.601


    



    So far, what I have been able to come up with is the following :

    



    avconv -f image2 -framerate 1.2 -i loop_%d.tif -c:v libx264 -preset veryslow -profile:v baseline -level:v 31 -b:v 1614K -refs 1 loop.flv


    



    This gets me to :

    



    Video
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L3.1
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Codec ID                                 : 7
Duration                                 : 2s 917ms
Bit rate                                 : 1 614 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 1.200 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 1.459
Stream size                              : 575 KiB
Writing library                          : x264 core 142 r2431 a5831aa
Encoding settings                        : cabac=0 / ref=1 / deblock=1:0:0 / analyse=0x1:0x131 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=abr / mbtree=1 / bitrate=1614 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00


    



    Which, unfortunately, still isn't good enough as VLC Media Player crashes hard (just closes), logging main error: Failed to compensate for the format changes, removing all filters; main error: Failed to create video converter as soon as the stream splice occurs. I tried splicing another stream in that does have the exact same encoding, and it works fine. I'm also making sure to only splice on key-frames and I am including the NALU containing the AVCDecoderConfigRecord, so I'm pretty sure I'm not doing anything else wrong, especially since a couple other programs are fine with the splice. It's just VLC that expects an even closer match.

    



    Here are things I've tried :

    



      

    • Adding -vsync 2 to get variable frame rate mode. Doesn't change anything.
    • 


    • Adding -color_primaries bt470bg -color_trc gamma28 -colorspace bt470bg to try to get BT.601 PAL settings (several websites mentioned this). Doesn't change anything.
    • 


    • Adding -s ntsc to set the standard to NTSC. This also changes the resolution to 720x480 (not OK), and specifying -s 1280x720 in addition gets rid of the NTSC tag again.
    • 


    



    If anyone knows what flags I need to supply to get closer, that would be super-helpful ! The stream I'm trying to match is encoded on an Android device (it's a live-stream), so I'm assuming it is built using the standard Android MediaCoder framework, in case that helps.

    


  • Ffmpeg - Generate VTT File From Sprite, Using Spatial Media Fragment

    20 octobre 2019, par David

    Hi I am looking to create a .VTT file from a sprite that i have generated using Ffmpeg.

    Ffmpeg command :

    $"-i {inputMediaFile} -vf \"select = not(mod(n\\, 30)),scale = 120:80,tile = 7x7\" -an -vsync 0 {outputMediaFile}"

    This selects every 30th frame, and then scales it to 120x80 pixels and creates 8x8 tiles in the output image.

    I would like to make a .VTT from the generated image in C#, so i know the height and width of my individual images in the sprite (120x80) and there is 64 images in total in the output image.

    From this i need to produce a VTT like this :

    WEBVTT

    1
    00:00:00.000 --> 00:00:01.000
    test-00001.jpg#xywh=0,0,120,80

    2
    00:00:01.000 --> 00:00:02.000
    test-00001.jpg#xywh=120,0,120,80

    3
    00:00:02.000 --> 00:00:03.000
    test-00001.jpg#xywh=240,0,120,80

    4
    00:00:03.000 --> 00:00:04.000
    test-00001.jpg#xywh=360,0,120,80

    5
    00:00:04.000 --> 00:00:05.000
    test-00001.jpg#xywh=480,0,120,80

    6
    00:00:05.000 --> 00:00:06.000
    test-00001.jpg#xywh=600,0,120,80

    7
    00:00:06.000 --> 00:00:07.000
    test-00001.jpg#xywh=720,0,120,80

    8
    00:00:07.000 --> 00:00:08.000
    test-00001.jpg#xywh=840,0,120,80

    9
    00:00:08.000 --> 00:00:09.000
    test-00001.jpg#xywh=0,80,120,80

    There is also situations when there is n amount of sprite files.

    Im hoping there may be a library out there that can handle this, or even better if i can keep it contained within Ffmpeg - based on Ffmpeg docs i dont think this is possible though.

    Thanks in advance if anyone as any ideas, its doable as ive seen Nodejs and Ruby examples.

  • how to output a media stream using ffmpeg ?

    26 juin 2017, par Sanduni Wickramasinghe

    I am reading a mpeg4 video stream using ffmpeg. I use some of its properties and do some processes using those properties. What I want is to play the opened video using a player like vlc. And then consequently I need to play the output video after processing in order to check whether there is a latency. Is it possible to give the video to a port. So that I can get the video as a input to the vlc player from the specific port.

    This is my code up to now. I use MV_generation method to extract features from it and to do a comparison from it.

    static int MV_generation(const AVPacket *pkt)
    {
       std::vector<unsigned long="long"> vl = File_read();
       std::hash<string> hash1;
       std::ios_base::app);
       double x_src_val = 0;
       double y_src_val = 0;
       double x_dst_val = 0;
       double y_dst_val = 0;

       int ret = avcodec_send_packet(video_dec_ctx, pkt);
       if (ret &lt; 0) {
           //fprintf(stderr, "Error while sending a packet to the decoder: %s\n", av_err2str(ret));
           return ret;
       }
       video_frame_count++;
       while (ret >= 0){

           ret = avcodec_receive_frame(video_dec_ctx, frame);
           if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
               break;
           }
           else if (ret &lt; 0) {
               return ret;
           }
           if (ret >= 0) {
               AVFrameSideData *sd;
               sd = av_frame_get_side_data(frame, AV_FRAME_DATA_MOTION_VECTORS);

               if (sd) {

                   const AVMotionVector *mvs = (const AVMotionVector *)sd->data;

                   int size_sd = sd->size;
                   //outData &lt;&lt; size_sd &lt;&lt; endl;

                   string str = "", str1, str2, str3, str4;
                   for (int i = 0; i &lt; size_sd / sizeof(*mvs); i++) {
                       const AVMotionVector *mv = &amp;mvs[i];

                       int x_src = mv->src_x;
                       int y_src = mv->src_y;
                       int x_dst = mv->dst_x;
                       int y_dst = mv->dst_y;


                       if (x_src != x_dst || y_src != y_dst || x_src > 100 || y_src > 100 || x_dst > 100 || y_dst > 100){
                           str1 = to_string(x_src);
                           str2 = to_string(y_src);
                           str3 = to_string(x_dst);
                           str4 = to_string(y_dst);

                           str = str.append(str1).append(str2).append(str3).append(str4);
                       }
                   }

                   for (unsigned long long y : vl)
                   {
                       // Check if any of the numbers are equal to x
                       if (hash1(str) == y)
                       {
                           cout &lt;&lt; "matched frame_no : " &lt;&lt; video_frame_count &lt;&lt; endl;
                       }
                   }
               }
               av_frame_unref(frame);
           }
       }
       outData.close();
       return 0;
    }
    </string></unsigned>