Recherche avancée

Médias (1)

Mot : - Tags -/géodiversité

Autres articles (60)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

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

Sur d’autres sites (8803)

  • How to configure FFmpeg in windows ? [closed]

    2 août 2021, par GrassWarlock

    Hey there i'm not very tech savvy.

    


    when i invoke this command :

    


    ffmpeg -i input.mp4 -i subtitles.srt -map 0 -map 1 -c copy -c:v libx264 -crf 23 -preset veryfast output.mp4


    


    ( which is supposed to overlay 'input.mp4' with subtitles from 'subtitle.srt' )

    


    i get the following output :

    


    ffmpeg version 2021-07-27-git-0068b3d0f0-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57.  2.100 / 57.  2.100
  libavcodec     59.  3.102 / 59.  3.102
  libavformat    59.  4.101 / 59.  4.101
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  1.103 /  8.  1.103
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
Input #0, matroska,webm, from 'video.mkv':
  Metadata:
    ENCODER         : Lavf59.4.101
  Duration: 00:05:39.94, start: 0.000000, bitrate: 665 kb/s
  Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv), 720x480, SAR 1:1 DAR 3:2, 29.97 fps, 29.97 tbr, 1k tbn (default)
    Metadata:
      DURATION        : 00:05:39.839000000
  Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp (default)
    Metadata:
      HANDLER_NAME    : SoundHandler
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:05:39.940000000
Input #1, srt, from 'subtitles.srt':
  Duration: N/A, bitrate: N/A
  Stream #1:0: Subtitle: subrip
[mp4 @ 000001aa596242c0] Could not find tag for codec subrip in stream #2, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:2 --
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:0 -> #0:2 (copy)
    Last message repeated 1 times


    


    i searched the internet and the official documentation mentions that libass should be enabled in the configuration in order for subtitling to work

    


    


    11.218 subtitles

    


    Draw subtitles on top of input video using the libass library.

    


    To enable compilation of this filter you need to configure FFmpeg with
—enable-libass. This filter also requires a build with libavcodec and libavformat to convert the passed subtitles file to ASS (Advanced
Substation Alpha) subtitles format

    


    


    how do i enable libass in configuration on windows ? my FFmpeg directory doesn't contain a configuration file nor a command that configures it from cmd

    


    Thanks alot in advance

    


  • Huge memory leak when filtering video with libavfilter

    29 mai 2017, par Captain Jack

    I have a relatively simple FFMPEG C program, to which a video frame is fed, processed via filter graph and sent to frame renderer.

    Here are some code snippets :

    /* Filter graph here */
    char args[512];
    enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_RGB32 };    
    AVFilterGraph   *filter_graph;
    avfilter_register_all();
    AVFilter *buffersrc  = avfilter_get_by_name("buffer");
    AVFilter *buffersink = avfilter_get_by_name("ffbuffersink");
    AVBufferSinkParams *buffersink_params;
    AVFilterInOut *outputs = avfilter_inout_alloc();
    AVFilterInOut *inputs  = avfilter_inout_alloc();
    filter_graph = avfilter_graph_alloc();

    snprintf(args, sizeof(args),
           "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d",
           av->codec_ctx->width, av->codec_ctx->height, av->codec_ctx->pix_fmt,
           av->codec_ctx->time_base.num, av->codec_ctx->time_base.den,
           av->codec_ctx->sample_aspect_ratio.num, av->codec_ctx->sample_aspect_ratio.den);

    if(avfilter_graph_create_filter(&av->buffersrc_ctx, buffersrc, "in",args, NULL, filter_graph) < 0)
    {
       fprintf(stderr, "Cannot create buffer source\n");
       return(0);
    }

    /* buffer video sink: to terminate the filter chain. */
    buffersink_params = av_buffersink_params_alloc();
    buffersink_params->pixel_fmts = pix_fmts;

    if(avfilter_graph_create_filter(&av->buffersink_ctx, buffersink, "out",NULL, buffersink_params, filter_graph) < 0)
    {
       printf("Cannot create buffer sink\n");
       return(HACKTV_ERROR);
    }

     /* Endpoints for the filter graph. */
       outputs->name       = av_strdup("in");
       outputs->filter_ctx = av->buffersrc_ctx;
       outputs->pad_idx    = 0;
       outputs->next       = NULL;

       inputs->name       = av_strdup("out");
       inputs->filter_ctx = av->buffersink_ctx;
       inputs->pad_idx    = 0;
       inputs->next       = NULL;

    const char *filter_descr = "vflip";

       if (avfilter_graph_parse_ptr(filter_graph, filter_descr, &inputs, &outputs, NULL) < 0)
    {
       printf("Cannot parse filter graph\n");
       return(0);
    }

    if (avfilter_graph_config(filter_graph, NULL) < 0)
    {
       printf("Cannot configure filter graph\n");
       return(0);
    }

    av_free(buffersink_params);
    avfilter_inout_free(&inputs);
    avfilter_inout_free(&outputs);

    The above code is called by these elsewhere :

    av->frame_in->pts = av_frame_get_best_effort_timestamp(av->frame_in);

    /* push the decoded frame into the filtergraph*/
    if (av_buffersrc_add_frame(av->buffersrc_ctx, av->frame_in) < 0)
    {
       printf( "Error while feeding the filtdergraph\n");
       break;
    }

    /* pull filtered pictures from the filtergraph */
    if(av_buffersink_get_frame(av->buffersink_ctx, av->frame_out) < 0)
    {
         printf( "Error while sourcing the filtergraph\n");
          break;
     }  

    /* do stuff with frame */

    Now, the code works absolutely fine and the video comes out the way I expect it to (vertically flipped for testing purposes).

    The biggest issue I have is that there is a massive memory leak. An high res video will consume 2Gb in a matter of seconds and crash the program. I traced the leak to this piece of code :

    /* push the decoded frame into the filtergraph*/
    if (av_buffersrc_add_frame(av->buffersrc_ctx, av->frame_in) < 0)

    If I bypass the filter by doing av->frame_out=av->frame_in; without pushing the frame into it (and obviously not pulling from it), there is no leak and memory usage is stable.

    Now, I am very new to C, so be gentle, but it seems like I should be clearing out the buffersrc_ctx somehow but no idea how. I’ve looked in official documentations but couldn’t find anything.

    Can someone advise ?

  • How to force specific AVInputFormat in code (FFMPEG) ?

    18 février 2020, par kugipark

    ++Plaease understand that maybe some words or sentences could not be correct English.++

    I’m novice programmer and developing a video player app for Android which can play 5ch .avi video from http. It based on ffplay.c in FFMPEG libarary.

    Currently I have 2 problems for this below. It has occured only in android devices.


    1) Too much time taken for detecting format.

    • opening and finding stream info takes more than a minute when I trying to open 5ch video source whereas normal .mp4 (h264) source open almost immediately.

    2) Demuxing is too slow when it comes to large size video.

    • If the resolution of video getting larger, then displaying frame rate getting slower even though there are enough memory, network and CPU resources physically.

    To resolve my problem, I tried to force the format and decoders but I couldn’t found some information for specifying the input source in code level.
    The official doc site only refers to a sentence about those parameters like "If non-NULL, this parameter forces a specific input format. Otherwise the format is autodetected.". So I don’t have any clues how to set the number of streams, decoders, decoders’ private options, and etc. (And also which parameters should I manage.) If someone knows how to set the options(like AVDictionary), and pass to the av functions, please let me know an exmple. The source contains 2 video streams, 1 audio stream, and 2 more extra streams (for custom data like gps). The stream information of video is below. I printed it manually, and these are auto-detected information.

       ---------- File format information ----------
    flags=2097152
    video_codec_id=0 (NONE)
    audio_codec_id=0 (NONE)
    ctx_flags=0
    data_codec_id=0 (NONE)
    format_whitelist=(null)
    iformat=0xa19d0d2c
    ---------- Stream information ----------
    stream 1 of 5:
    ----- common ----------
    bit_rate: 11383235
    bits_per_coded_sample: 24
    bits_per_raw_sample: 0
    codec_id: 0x1C (H264)
    codec_tag: 875967048
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 0
    ----- Video Stream ----------
    chroma_location: 0
    color_primaries: 2
    color_space: 2
    color_trc: 2
    field_order: 0
    format: -1 (NONE)
    height: 1080
    width: 1920
    sample_aspect_ratio.den: 1
    sample_aspect_ratio.num: 0
    video_delay: 0
    ----------------------------------------
    stream 2 of 5:
    ----- common ----------
    bit_rate: 6185438
    bits_per_coded_sample: 24
    bits_per_raw_sample: 0
    codec_id: 0x1C (H264)
    codec_tag: 875967048
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 0
    ----- Video Stream ----------
    chroma_location: 0
    color_primaries: 2
    color_space: 2
    color_trc: 2
    field_order: 0
    format: -1 (NONE)
    height: 720
    width: 1280
    sample_aspect_ratio.den: 1
    sample_aspect_ratio.num: 0
    video_delay: 0
    ----------------------------------------
    stream 3 of 5:
    ----- common ----------
    bit_rate: 352800
    bits_per_coded_sample: 16
    bits_per_raw_sample: 0
    codec_id: 0x10000 (PCM_S16LE)
    codec_tag: 1
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 22050
    ----- Audio Stream ----------
    block_align: 2
    channels: 1
    channel_layout: 0
    color_range: 0
    frame_size: 0
    initial_padding: 0
    seek_preroll: 0
    trailing_padding: 0
    ----------------------------------------
    stream 4 of 5:
    ----- common ----------
    bit_rate: 15625
    bits_per_coded_sample: 0
    bits_per_raw_sample: 0
    codec_id: 0x0 (NONE)
    codec_tag: 0
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 0
    ----- Subtitle Stream ----------
    ----------------------------------------
    stream 5 of 5:
    ----- common ----------
    bit_rate: 33862
    bits_per_coded_sample: 0
    bits_per_raw_sample: 0
    codec_id: 0x0 (NONE)
    codec_tag: 0
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 0
    ----- Subtitle Stream ----------