Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (87)

  • 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 (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (11397)

  • avformat/demux : Remove fake-loop

    9 décembre 2021, par Andreas Rheinhardt
    avformat/demux : Remove fake-loop
    

    When flushing, try_decode_frame() itself loops until the desired
    properties have been found or the decoder is drained.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavformat/demux.c
  • File encoded as FFV1 with ffmpeg is unplayable

    18 novembre 2016, par Ali Alidoust

    I’m using the following code to encode a series of frames into an mkv or avi file with FFV1 encoding :

    HRESULT Session::createContext(LPCSTR filepath, UINT width, UINT height, UINT fps_num, UINT fps_den) {
       LOG(filepath);

       this->codec = avcodec_find_encoder(AV_CODEC_ID_FFV1);
       RET_IF_NULL(this->codec, "Could not create codec", E_FAIL);

       this->oformat = av_guess_format(NULL, filepath, NULL);
       RET_IF_NULL(this->oformat, "Could not create format", E_FAIL);
       this->oformat->video_codec = AV_CODEC_ID_FFV1;
       this->width = width;
       this->height = height;
       this->context = avcodec_alloc_context3(this->codec);
       RET_IF_NULL(this->context, "Could not allocate context for the codec", E_FAIL);

       this->context->codec = this->codec;
       this->context->codec_id = AV_CODEC_ID_FFV1;
       this->context->codec_type = AVMEDIA_TYPE_VIDEO;

       this->context->pix_fmt = AV_PIX_FMT_YUV420P;
       this->context->width = this->width;
       this->context->height = this->height;
       this->context->time_base.num = fps_num;
       this->context->time_base.den = fps_den;

       this->context->gop_size = 1;

       av_opt_set_int(this->context->priv_data, "coder", 0, 0);
       av_opt_set_int(this->context->priv_data, "context", 1, 0);
       av_opt_set_int(this->context->priv_data, "slicecrc", 1, 0);

       avformat_alloc_output_context2(&amp;fmtContext, NULL, NULL, filepath);

       this->fmtContext->oformat = this->oformat;
       this->fmtContext->video_codec_id = AV_CODEC_ID_FFV1;

       this->stream = avformat_new_stream(this->fmtContext, this->codec);
       RET_IF_NULL(this->fmtContext, "Could not create new stream", E_FAIL);
       avcodec_parameters_from_context(this->stream->codecpar, this->context);
       this->stream->codecpar->level = 3;

       /*if (this->fmtContext->oformat->flags &amp; AVFMT_GLOBALHEADER)
       {*/
           this->context->flags |= CODEC_FLAG_GLOBAL_HEADER;
       /*}*/

       RET_IF_FAILED_AV(avcodec_open2(this->context, this->codec, NULL), "Could not open codec", E_FAIL);
       RET_IF_FAILED_AV(avio_open(&amp;this->fmtContext->pb, filepath, AVIO_FLAG_READ_WRITE), "Could not open output file", E_FAIL);
       RET_IF_NULL(this->fmtContext->pb, "Could not open output file", E_FAIL);
       RET_IF_FAILED_AV(avformat_write_header(this->fmtContext, NULL), "Could not write header", E_FAIL);

       frame = av_frame_alloc();
       RET_IF_NULL(frame, "Could not allocate frame", E_FAIL);
       frame->format = this->context->pix_fmt;
       frame->width = width;
       frame->height = height;
       // RET_IF_FAILED(av_image_alloc(frame->data, frame->linesize, context->width, context->height, context->pix_fmt, 32), "Could not allocate image", E_FAIL);
       return S_OK;
    }

    HRESULT Session::writeFrame(IMFSample * pSample) {
       IMFMediaBuffer *mediaBuffer = NULL;
       BYTE *pData = NULL;
       DWORD length;

       RET_IF_FAILED(pSample->ConvertToContiguousBuffer(&amp;mediaBuffer), "Could not convert IMFSample to contagiuous buffer", E_FAIL);
       RET_IF_FAILED(mediaBuffer->GetCurrentLength(&amp;length), "Could not get buffer length", E_FAIL);
       RET_IF_FAILED(mediaBuffer->Lock(&amp;pData, NULL, NULL), "Could not lock the buffer", E_FAIL);
       RET_IF_FAILED(av_image_fill_arrays(frame->data, frame->linesize, pData, AV_PIX_FMT_YUV420P, this->width, this->height, 1), "Could not fill the frame with data from the buffer", E_FAIL);
       LOG_IF_FAILED(mediaBuffer->Unlock(), "Could not unlock the buffer");

       frame->pts = this->pts++;

       AVPacket pkt;

       av_init_packet(&amp;pkt);
       pkt.data = NULL;
       pkt.size = 0;

       RET_IF_FAILED_AV(avcodec_send_frame(this->context, frame), "Could not send the frame to the encoder", E_FAIL);
       if (SUCCEEDED(avcodec_receive_packet(this->context, &amp;pkt))) {
           RET_IF_FAILED_AV(av_interleaved_write_frame(this->fmtContext, &amp;pkt), "Could not write the received packet.", E_FAIL);
       }

       av_packet_unref(&amp;pkt);

       return S_OK;
    }

    HRESULT Session::endSession() {
       LOG("Ending session...");
       LOG("Closing files...");
       av_write_trailer(this->fmtContext);
       avio_close(this->fmtContext->pb);
       avcodec_close(this->context);
       av_free(this->context);
       //fclose(this->file);
       LOG("Done.");
       return S_OK;
    }

    The problem is that the generated file is not playable in either VLC or MPC-HC. However, MPC-HC reports following info in file properties :

    General
    Unique ID                      : 202978442142665779317960161865934977227 (0x98B439D9BE859109BD5EC00A62A238CB)
    Complete name                  : T:\Test.mkv
    Format                         : Matroska
    Format version                 : Version 4 / Version 2
    File size                      : 24.6 MiB
    Duration                       : 147ms
    Overall bit rate               : 1 401 Mbps
    Writing application            : Lavf57.57.100
    Writing library                : Lavf57.57.100

    Video
    ID                             : 1
    Format                         : FFV1
    Format version                 : Version 0
    Codec ID                       : V_MS/VFW/FOURCC / FFV1
    Duration                       : 147ms
    Width                          : 1 280 pixels
    Height                         : 720 pixels
    Display aspect ratio           : 16:9
    Frame rate mode                : Constant
    Frame rate                     : 1 000.000 fps
    Color space                    : YUV
    Chroma subsampling             : 4:2:0
    Bit depth                      : 8 bits
    Compression mode               : Lossless
    Default                        : Yes
    Forced                         : No
    DURATION                       : 00:00:00.147000000
    coder_type                     : Golomb Rice

    Something to note is that it reports 1000 FPS which is weird since I’ve set AVCodecContext::time_base in the code.

  • configure : Use a separate config_components.h header for $ALL_COMPONENTS

    23 février 2022, par Martin Storsjö
    configure : Use a separate config_components.h header for $ALL_COMPONENTS
    

    This avoids unnecessary rebuilds of most source files if only the
    list of enabled components has changed, but not the other properties
    of the build, set in config.h.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] configure
    • [DH] fftools/ffplay.c
    • [DH] libavcodec/8svx.c
    • [DH] libavcodec/a64multienc.c
    • [DH] libavcodec/aac_ac3_parser.c
    • [DH] libavcodec/aactab.c
    • [DH] libavcodec/aarch64/h264cmc_neon.S
    • [DH] libavcodec/ac3_parser.c
    • [DH] libavcodec/ac3dec.c
    • [DH] libavcodec/ac3dec_float.c
    • [DH] libavcodec/ac3enc.c
    • [DH] libavcodec/ac3enc_template.c
    • [DH] libavcodec/adpcm.c
    • [DH] libavcodec/adpcmenc.c
    • [DH] libavcodec/allcodecs.c
    • [DH] libavcodec/amfenc.c
    • [DH] libavcodec/aptxdec.c
    • [DH] libavcodec/aptxenc.c
    • [DH] libavcodec/arm/flacdsp_init_arm.c
    • [DH] libavcodec/arm/h264cmc_neon.S
    • [DH] libavcodec/assdec.c
    • [DH] libavcodec/assenc.c
    • [DH] libavcodec/asvdec.c
    • [DH] libavcodec/asvenc.c
    • [DH] libavcodec/audiotoolboxdec.c
    • [DH] libavcodec/av1dec.c
    • [DH] libavcodec/binkaudio.c
    • [DH] libavcodec/bintext.c
    • [DH] libavcodec/bsf.c
    • [DH] libavcodec/crystalhd.c
    • [DH] libavcodec/cuviddec.c
    • [DH] libavcodec/cyuv.c
    • [DH] libavcodec/dxva2_av1.c
    • [DH] libavcodec/dxva2_h264.c
    • [DH] libavcodec/dxva2_hevc.c
    • [DH] libavcodec/dxva2_mpeg2.c
    • [DH] libavcodec/dxva2_vc1.c
    • [DH] libavcodec/dxva2_vp9.c
    • [DH] libavcodec/flashsv.c
    • [DH] libavcodec/g726.c
    • [DH] libavcodec/gsmdec.c
    • [DH] libavcodec/h263dec.c
    • [DH] libavcodec/h264_slice.c
    • [DH] libavcodec/h264dec.c
    • [DH] libavcodec/hevcdec.c
    • [DH] libavcodec/huffyuvdec.c
    • [DH] libavcodec/huffyuvenc.c
    • [DH] libavcodec/idctdsp.c
    • [DH] libavcodec/iff.c
    • [DH] libavcodec/imc.c
    • [DH] libavcodec/ituh263dec.c
    • [DH] libavcodec/ituh263enc.c
    • [DH] libavcodec/lcldec.c
    • [DH] libavcodec/libgsmdec.c
    • [DH] libavcodec/libgsmenc.c
    • [DH] libavcodec/libopencore-amr.c
    • [DH] libavcodec/libvpx.c
    • [DH] libavcodec/libvpxdec.c
    • [DH] libavcodec/libvpxenc.c
    • [DH] libavcodec/libx264.c
    • [DH] libavcodec/me_cmp.c
    • [DH] libavcodec/mediacodecdec.c
    • [DH] libavcodec/metasound_data.c
    • [DH] libavcodec/mjpegdec.c
    • [DH] libavcodec/mjpegenc.c
    • [DH] libavcodec/mlpdec.c
    • [DH] libavcodec/mlpenc.c
    • [DH] libavcodec/mpeg12dec.c
    • [DH] libavcodec/mpeg12enc.c
    • [DH] libavcodec/mpeg4videodec.c
    • [DH] libavcodec/mpegaudiodec_fixed.c
    • [DH] libavcodec/mpegaudiodec_float.c
    • [DH] libavcodec/mpegaudiodec_template.c
    • [DH] libavcodec/mpegvideo.c
    • [DH] libavcodec/mpegvideo_enc.c
    • [DH] libavcodec/mpegvideo_motion.c
    • [DH] libavcodec/msmpeg4.c
    • [DH] libavcodec/msmpeg4dec.c
    • [DH] libavcodec/mvcdec.c
    • [DH] libavcodec/nvdec.c
    • [DH] libavcodec/nvdec_mjpeg.c
    • [DH] libavcodec/nvdec_mpeg12.c
    • [DH] libavcodec/nvdec_vc1.c
    • [DH] libavcodec/nvenc.c
    • [DH] libavcodec/options.c
    • [DH] libavcodec/options_table.h
    • [DH] libavcodec/opus_pvq.c
    • [DH] libavcodec/pcm.c
    • [DH] libavcodec/pngdec.c
    • [DH] libavcodec/pnmdec.c
    • [DH] libavcodec/pnmenc.c
    • [DH] libavcodec/proresdec2.c
    • [DH] libavcodec/qpeldsp.c
    • [DH] libavcodec/qsvdec.c
    • [DH] libavcodec/qsvenc.c
    • [DH] libavcodec/r210dec.c
    • [DH] libavcodec/r210enc.c
    • [DH] libavcodec/rv34_parser.c
    • [DH] libavcodec/sonic.c
    • [DH] libavcodec/sp5xdec.c
    • [DH] libavcodec/speedhq.c
    • [DH] libavcodec/speedhqenc.c
    • [DH] libavcodec/srtdec.c
    • [DH] libavcodec/srtenc.c
    • [DH] libavcodec/tests/dct.c
    • [DH] libavcodec/tests/x86/dct.c
    • [DH] libavcodec/textdec.c
    • [DH] libavcodec/v408dec.c
    • [DH] libavcodec/v408enc.c
    • [DH] libavcodec/vaapi_decode.c
    • [DH] libavcodec/vaapi_encode.c
    • [DH] libavcodec/vaapi_mpeg4.c
    • [DH] libavcodec/vaapi_vc1.c
    • [DH] libavcodec/vc1dec.c
    • [DH] libavcodec/vc1dsp.c
    • [DH] libavcodec/vdpau.c
    • [DH] libavcodec/vdpau_mpeg12.c
    • [DH] libavcodec/vdpau_vc1.c
    • [DH] libavcodec/videotoolbox.c
    • [DH] libavcodec/vorbis_parser.c
    • [DH] libavcodec/vp3.c
    • [DH] libavcodec/vp56dsp.c
    • [DH] libavcodec/vp8.c
    • [DH] libavcodec/vp8dsp.c
    • [DH] libavcodec/vp9.c
    • [DH] libavcodec/wmadec.c
    • [DH] libavcodec/wmaenc.c
    • [DH] libavcodec/x86/flacdsp_init.c
    • [DH] libavcodec/x86/hpeldsp_init.c
    • [DH] libavdevice/alsa.c
    • [DH] libavdevice/iec61883.c
    • [DH] libavfilter/aeval.c
    • [DH] libavfilter/af_afade.c
    • [DH] libavfilter/af_agate.c
    • [D