Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (96)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (5233)

  • FFmpeg overwrite an AVPacket

    26 janvier 2019, par Alejandro Ramírez

    Hello guys I am working with video. I wan to encrypt the I-frames of one video compressed in H.264. So I get the AVPacket from the video and compare if (AVPacket.flags & AV_PKT_FLAG_KEY) to know if the packet has an I frame, but when I try to print the AVPacket.data I don’t have any information to encrypt.
    Where can I get the information regarding to I-frame. ahead a put my code, thank you.

    #include <iostream>
    extern "C" {
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libswscale></libswscale>swscale.h>
    #include <libavutil></libavutil>avutil.h>
    }
    #define INBUF_SIZE 4096
    //#define AV_INPUT_BUFFER_PADDING_SIZE 32
    int main (int argc, char * argv[])
    {
       //av_register_all();//omit
       //revisar el número de argumentos en el video
       AVFormatContext *pFormatCtx = NULL;
       AVCodec *dec = NULL;
       AVCodecContext *pCodecCtx = NULL;
       AVStream *st = NULL;
       AVDictionary *opts = NULL;
       AVFrame *frame;
       AVPacket avpkt;
       uint8_t inbuf [INBUF_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
       FILE *f;
       int frame_count;
       int video_stream_index = -1;

       //av_init_packet (&amp;avpkt);

       memset (inbuf + INBUF_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);
       if (avformat_open_input (&amp;pFormatCtx, argv[1], NULL, NULL) != 0)
           return -1;
       if (avformat_find_stream_info (pFormatCtx, NULL) &lt; 0)
           return -1;
       //video_stream_index = av_find_best_stream (pFormatCtx,AVMEDIA_TYPE_VIDEO, -1, -1, &amp;dec,0);
       video_stream_index = av_find_best_stream (pFormatCtx,AVMEDIA_TYPE_VIDEO, -1, -1, &amp;dec,0);
       if ( video_stream_index &lt; 0)
           return -1;
       std::cout &lt;&lt; "video_stream; " &lt;&lt; video_stream_index &lt;&lt; "\n";
       st = pFormatCtx -> streams [video_stream_index];
       std::cout &lt;&lt; "number of frames " &lt;&lt; st -> nb_frames &lt;&lt; "\n";
       std::cout &lt;&lt; "event_flags " &lt;&lt; st -> event_flags &lt;&lt; "\n";
       //pCodecCtx = st -> codec;//deprecated

       dec = avcodec_find_decoder (st -> codecpar -> codec_id);
       std::cout &lt;&lt; "codec_id: " &lt;&lt; st -> codecpar -> codec_id &lt;&lt; "\n";
       std::cout &lt;&lt; "AV_CODEC_ID_H264: " &lt;&lt; AV_CODEC_ID_H264 &lt;&lt; "\n";
       if (!dec)
           return -1;
       pCodecCtx = avcodec_alloc_context3 (dec);
       if (!pCodecCtx)
           return -1;
       //av_dict_set (&amp;opts, "refcounted_frames", "0", 0);
       avcodec_parameters_to_context (pCodecCtx, st -> codecpar);


       std::cout &lt;&lt; "todo bien \n";    
       if (avcodec_open2 (pCodecCtx, dec, &amp;opts) &lt; 0)
           return -1;
       /*************hasta aqui buen codigo*********************************************/
       frame = av_frame_alloc ();
       if (!frame)
           return -1;
       av_init_packet (&amp;avpkt);
       avpkt.data = NULL;
       avpkt.size = 0;
       f = fopen (argv[1], "r");
       int times = 1;
       while (av_read_frame (pFormatCtx, &amp;avpkt) >= 0){
           AVPacket oripkt = avpkt;
           if (oripkt.stream_index == video_stream_index){
               if (oripkt.flags &amp; AV_PKT_FLAG_KEY){
                   std::cout &lt;&lt; "times: " &lt;&lt; times ++ &lt;&lt; "\n";
                   std::cout &lt;&lt; "avpkt.flags: " &lt;&lt; oripkt.flags &lt;&lt; "\n";
                   std::cout &lt;&lt; "tam avpkt.data: " &lt;&lt; sizeof(oripkt.data) &lt;&lt; "\n";
                   std::cout &lt;&lt; "tam avpkt.data: " &lt;&lt; oripkt.data &lt;&lt; "\n";
                   std::cout &lt;&lt; "oripkt.size: " &lt;&lt; oripkt.size &lt;&lt; "\n";
                   std::cout &lt;&lt; "oripkt.side_date_eme: " &lt;&lt; oripkt.side_data_elems &lt;&lt; "\n";
                   if (!oripkt.data)
                       std::cout &lt;&lt; "no tengo dinero \n";
               }
           }
       }

       std::cout &lt;&lt; "Fin del programa " &lt;&lt; "\n";
    }
    </iostream>
  • Converting mp4 audio & video for JavaScript's MediaSource API

    10 janvier 2020, par Crayzzit

    So I have two files. frag_bunny.mp4 and raw.mp4 (you can download them in a tar on my Google drive). The frag_bunny.mp4 works perfectly when I use it with the JavaScript’s MediaSource API. But it’s not the case with raw.mp4, why is that ?

    Here’s the mediainfo of frag_bunny.mp4 :

    General
    Complete name                            : frag_bunny.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (mp42/avc1/iso5)
    File size                                : 5.27 MiB
    Duration                                 : 1 min 0 s
    Overall bit rate                         : 734 kb/s

    Video
    ID                                       : 2
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Baseline@L3
    Format settings                          : 2 Ref Frames
    Format settings, CABAC                   : No
    Format settings, ReFrames                : 2 frames
    Format settings, GOP                     : M=1, N=64
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 1 min 0 s
    Bit rate                                 : 613 kb/s
    Width                                    : 640 pixels
    Height                                   : 360 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Frame rate                               : 23.976 (23976/1000) FPS
    Minimum frame rate                       : 7.317 FPS
    Maximum frame rate                       : 24.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.111
    Stream size                              : 4.39 MiB (83%)
    Language                                 : English
    Color range                              : Limited
    Color primaries                          : BT.601 NTSC
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.601

    Audio
    ID                                       : 1
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : mp4a-40-2
    Duration                                 : 1 min 0 s
    Bit rate mode                            : Constant
    Bit rate                                 : 64.0 kb/s
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 22.05 kHz
    Frame rate                               : 21.533 FPS (1024 SPF)
    Compression mode                         : Lossy
    Stream size                              : 478 KiB (9%)
    Language                                 : English

    Other #1
    ID                                       : 3
    Type                                     : Hint
    Format                                   : RTP
    Codec ID                                 : rtp
    Duration                                 : 1 min 0 s
    Language                                 : English

    Other #2
    ID                                       : 4
    Type                                     : Hint
    Format                                   : RTP
    Codec ID                                 : rtp
    Duration                                 : 1 min 0 s
    Language                                 : English

    And same for raw.mp4 :

    General
    Complete name                            : raw.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (isom/iso2/avc1/mp41)
    File size                                : 16.9 MiB
    Duration                                 : 3 min 32 s
    Overall bit rate                         : 668 kb/s
    Writing application                      : Lavf57.83.100

    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L3
    Format settings                          : CABAC / 4 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 3 min 32 s
    Bit rate                                 : 532 kb/s
    Width                                    : 640 pixels
    Height                                   : 360 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.092
    Stream size                              : 13.4 MiB (80%)
    Writing library                          : x264 core 152 r2854 e9a5903
    Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / 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=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

    Audio
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : mp4a-40-2
    Duration                                 : 3 min 32 s
    Bit rate mode                            : Constant
    Bit rate                                 : 132 kb/s
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 44.1 kHz
    Frame rate                               : 43.066 FPS (1024 SPF)
    Compression mode                         : Lossy
    Stream size                              : 3.30 MiB (20%)
    Default                                  : Yes
    Alternate group                          : 1

    And in my js, I’m using this codec : ...addSourceBuffer('video/mp4; codecs="avc1.42c00d,mp4a.40.2"')

  • FFmpeg to transfer from bad media

    31 décembre 2017, par TheSavo

    I have an SDcard that has two videos recorded from an old phone. The media is bad and I have already run SpinRite and chkdsk, to fix the errors. The files still fail to copy completely.

    I can play some portion of the files in VLC player. It plays about as far as File copy and TeraCopy before the copy job fails.
    They and MP4 files. I would like to use ffmpeg to transfer the portion of the video that will play out. is -i the best parameter ?

    ffmpeg -i H:\badfile.mp4 e:\portion.mp4

    Here is the output from mediainfo if that helps

    Complete name                            : H:\DCIM\badfile.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/3gp4)
    File size                                : 422 MiB
    Duration                                 : 3 min 46 s
    Overall bit rate                         : 15.6 Mb/s
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4
    Format settings                          : CABAC / 1 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, RefFrames               : 1 frame
    Format settings, GOP                     : M=1, N=61
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 3 min 45 s
    Bit rate                                 : 15.5 Mb/s
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Frame rate                               : 19.469 FPS
    Minimum frame rate                       : 14.085 FPS
    Maximum frame rate                       : 30.303 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.385
    Stream size                              : 418 MiB (99%)
    Title                                    : VideoHandle
    Language                                 : English
    Encoded date                             : UTC 2013-09-17 13:18:06
    Tagged date                              : UTC 2013-09-17 13:18:06
    mdhd_Duration                            : 225892

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : mp4a-40-2
    Duration : 3 min 46 s
    Bit rate mode : Constant
    Bit rate : 128 kb/s
    Nominal bit rate : 96.0 kb/s
    Channel(s) : 2 channels
    Channel positions : Front : L R
    Sampling rate : 44.1 kHz
    Frame rate : 43.066 FPS (1024 SPF)
    Compression mode : Lossy
    Stream size : 3.46 MiB (1%)
    Title : SoundHandle
    Language : English
    Encoded date : UTC 2013-09-17 13:18:06
    Tagged date : UTC 2013-09-17 13:18:06