Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (54)

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

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

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (7344)

  • doc/fftools-common-opts : document ffmpeg -h bsf=bitstream_filter_name

    8 juin 2019, par Jun Zhao
    doc/fftools-common-opts : document ffmpeg -h bsf=bitstream_filter_name
    

    document ffmpeg -h bsf=bitstream_filter_name

    Signed-off-by : Jun Zhao <barryjzhao@tencent.com>

    • [DH] doc/fftools-common-opts.texi
  • How to print the video meta output by the browser version of ffmpeg.wasm to the console of Google Chrome ?

    17 janvier 2021, par helloAl

    I would like to ask about how to use the browser version of ffmpeg.wasm.

    &#xA;

    Through my investigation, I know that the following command can be used to output the video metadata to a file in the terminal of windows or mac.

    &#xA;

    ffmpeg -i testvideo.mp4 -f ffmetadata testoutput.txt&#xA;

    &#xA;

    and then I can get this matadata like this :&#xA;enter image description here

    &#xA;

    I want to parse the metadata of the video through the browser, and then print the metadata to the Google console (or output to a file). At present, I know that the browser version of ffmpeg.wasm can achieve this function, but I have looked at its examples, which does not involve this part of the content. (https://github.com/ffmpegwasm/ffmpeg.wasm/blob/master/examples/browser/image2video.html)

    &#xA;

    But I want to print it to the console of Google Chrome through the browser version(usage:brower) of ffmpeg.wasm (https://github.com/ffmpegwasm/ffmpeg.wasm).&#xA;So I want to ask you how to achieve this, thank you.

    &#xA;

  • FLAC created using libavformat/avcodec doesn't contain meta information

    20 février 2024, par Brad Mitchell

    I have a bit of code where I needed to convert PCM16LE to a FLAC which is simple enough. I've managed to do this, however, the generated FLAC file does not contain the duration of the file.

    &#xA;

    i.e. ffmpeg -i on a file showing the details :

    &#xA;

    Input #0, flac, from &#x27;test.linear_l.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf57.25.100&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0: Audio: flac, 16000 Hz, stereo, s16&#xA;

    &#xA;

    The code I'm using to convert from PCM 16 consists of the following calls :

    &#xA;

    AVFormatContext* ofmt_ctx = NULL;&#xA;avformat_alloc_output_context2(&amp;ofmt_ctx, nullptr, nullptr, outputFile);&#xA;if (!ofmt_ctx)&#xA;{&#xA;ERROR("Unable to create output context for file: " &lt;&lt; outputFile);&#xA;return ERROR;&#xA;}&#xA;&#xA;// FLAC code&#xA;AVCodec* encoder = avcodec_find_encoder(AV_CODEC_ID_FLAC);&#xA;if (!encoder)&#xA;{&#xA;avformat_free_context(ofmt_ctx);&#xA;ERROR("FLAC encoder not found for file: " &lt;&lt; outputFile);&#xA;return ERROR;&#xA;}&#xA;&#xA;AVStream* flacStream = avformat_new_stream(ofmt_ctx, encoder);&#xA;if (!flacStream)&#xA;{&#xA;avformat_free_context(ofmt_ctx);&#xA;ERROR("Could not create new flac stream for file: " &lt;&lt; outputFile);&#xA;return ERROR;&#xA;}&#xA;&#xA;AVCodecContext* enc_ctx = flacStream->codec;&#xA;enc_ctx->sample_fmt = AV_SAMPLE_FMT_S16;&#xA;enc_ctx->sample_rate = sampleRate;&#xA;enc_ctx->channels = theMaxChannels;&#xA;enc_ctx->bit_rate = 0;&#xA;&#xA;flacStream->time_base.den = enc_ctx->sample_rate;&#xA;flacStream->time_base.num = 1;&#xA;&#xA;if (avcodec_open2(enc_ctx, encoder, nullptr) &lt; 0)&#xA;{&#xA;avformat_free_context(ofmt_ctx);&#xA;ERROR("Could not open codec context for file: " &lt;&lt; outputFile);&#xA;return ERROR;&#xA;}&#xA;&#xA;if (ofmt_ctx->oformat->flags &amp; AVFMT_GLOBALHEADER)&#xA;enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;&#xA;&#xA;&#xA;if (avio_open(&amp;ofmt_ctx->pb, outputFile, AVIO_FLAG_WRITE) &lt; 0)&#xA;{&#xA;avformat_free_context(ofmt_ctx);&#xA;ERROR("Could not open FLAC output file: " &lt;&lt; outputFile);&#xA;return ERROR;&#xA;}&#xA;&#xA;if (avformat_write_header(ofmt_ctx, nullptr) &lt; 0)&#xA;{&#xA;avformat_free_context(ofmt_ctx);&#xA;ERROR("Could not write FLAC file header for file: " &lt;&lt; outputFile);&#xA;return ERROR;&#xA;}&#xA;&#xA;AVPacket pkt;&#xA;av_init_packet(&amp;pkt);&#xA;pkt.data = NULL;&#xA;pkt.size = 0;&#xA;&#xA;AVFrame* frame = av_frame_alloc();&#xA;frame->nb_samples = enc_ctx->frame_size;&#xA;frame->format = enc_ctx->sample_fmt;&#xA;frame->channel_layout = enc_ctx->channel_layout;&#xA;&#xA;int buffer_size = av_samples_get_buffer_size(NULL, enc_ctx->channels, enc_ctx->frame_size, enc_ctx->sample_fmt, 0);&#xA;if (buffer_size &lt; 0)&#xA;{&#xA;avformat_free_context(ofmt_ctx);&#xA;ERROR("Could not get sample buffer size");&#xA;return ERROR;&#xA;}&#xA;uint16_t* samples = (uint16_t*)av_malloc(buffer_size);&#xA;if (!samples)&#xA;{&#xA;avformat_free_context(ofmt_ctx);&#xA;ERROR("Could not allocate " &lt;&lt; buffer_size &lt;&lt; " bytes for samples buffer");&#xA;return ERROR;&#xA;}&#xA;&#xA;int ret = 0;&#xA;&#xA;/* setup the data pointers in the AVFrame */&#xA;ret = avcodec_fill_audio_frame(frame, enc_ctx->channels, enc_ctx->sample_fmt, (const uint8_t*)samples, buffer_size, 0);```&#xA;

    &#xA;

    For each block of RAW PCM16 LE data :

    &#xA;

    int got_output = 0;&#xA;frame->pts = pts;&#xA;pts&#x2B;= (bytesRead/2);&#xA;ret = avcodec_encode_audio2(enc_ctx, &amp;pkt, frame, &amp;got_output);&#xA;if (got_output) &#xA;{&#xA;av_interleaved_write_frame(ofmt_ctx, &amp;pkt);&#xA;av_packet_unref(&amp;pkt);&#xA;}```&#xA;

    &#xA;

    Then finish off :

    &#xA;

    av_write_trailer(ofmt_ctx);&#xA;for (i = 0; i &lt; ofmt_ctx->nb_streams; i&#x2B;&#x2B;)&#xA;{&#xA;avcodec_close(ofmt_ctx->streams[i]->codec);&#xA;}&#xA;if (ofmt_ctx &amp;&amp; !(ofmt_ctx->oformat->flags &amp; AVFMT_NOFILE))&#xA;avio_closep(&amp;ofmt_ctx->pb);&#xA;avformat_free_context(ofmt_ctx);   &#xA;av_freep(&amp;samples);&#xA;av_frame_free(&amp;frame);&#xA;

    &#xA;

    I'm sure I'm just missing something simple. I've tried looking at examples and doco but there isn't anything explicitly about encoding to a flac file etc in this case unless I'm missing it.

    &#xA;