Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (46)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (3868)

  • FFmpeg C demo generates "Could not update timestamps for skipped samples" warning

    14 juillet 2024, par aabiji

    When I run my demo code I get these warnings when testing it on a webm video :

    


    [opus @ 0x5ec0fc1b4580] Could not update timestamps for skipped samples.
[opus @ 0x5ec0fc1b4580] Could not update timestamps for discarded samples.


    


    But it's not limited to webm, I also get this warning when running with a mp4 :

    


    [aac @ 0x61326fb83700] Could not update timestamps for skipped samples.


    


    I know I'm getting warnings because ffmpeg must be skipping packets, but I have no idea why. Why are we skipping packets (and if that's not the problem, what is) and how can we fix the problem ?

    


    Here's my code for context :

    


    #include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;&#xA;int main()&#xA;{&#xA;    int ret = 0;&#xA;&#xA;    const AVCodec* codec;&#xA;    AVFormatContext* fmt_ctx = avformat_alloc_context();&#xA;&#xA;    const char* file2 = "/home/aabiji/Videos/sync-test.webm";&#xA;    if ((ret = avformat_open_input(&amp;fmt_ctx, file2, NULL, NULL)) &lt; 0) {&#xA;        av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t open input file\n");&#xA;        return -1;&#xA;    }&#xA;&#xA;    ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &amp;codec, 0);&#xA;    if (ret &lt; 0) {&#xA;        av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t find a media stream\n");&#xA;        return -1;&#xA;    }&#xA;&#xA;    int stream_index = ret;&#xA;    AVStream* media = fmt_ctx->streams[stream_index];&#xA;&#xA;    AVCodecContext* codec_context = avcodec_alloc_context3(codec);&#xA;    if (avcodec_parameters_to_context(codec_context, media->codecpar) &lt; 0) {&#xA;        return -1;&#xA;    }&#xA;&#xA;    if ((ret = avcodec_open2(codec_context, codec, NULL)) &lt; 0) {&#xA;        av_log(NULL, AV_LOG_ERROR, "Couldn&#x27;t open media decoder\n");&#xA;        return -1;&#xA;    }&#xA;&#xA;    AVPacket* packet = av_packet_alloc();&#xA;    AVFrame* frame = av_frame_alloc();&#xA;&#xA;    while ((ret = av_read_frame(fmt_ctx, packet)) >= 0) {&#xA;        if (packet->stream_index != stream_index) {&#xA;            continue;&#xA;        }&#xA;&#xA;        ret = avcodec_send_packet(codec_context, packet);&#xA;        if (ret &lt; 0) {&#xA;            break; // Error&#xA;        }&#xA;&#xA;        while (ret >= 0) {&#xA;            ret = avcodec_receive_frame(codec_context, frame);&#xA;            if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN)) {&#xA;                break;&#xA;            } else if (ret &lt; 0) {&#xA;                fprintf(stderr, "Error during decoding\n");&#xA;                break;&#xA;            }&#xA;            av_frame_unref(frame);&#xA;        }&#xA;&#xA;        av_packet_unref(packet);&#xA;    }&#xA;&#xA;    avcodec_flush_buffers(codec_context);&#xA;&#xA;    av_packet_unref(packet);&#xA;    av_frame_free(&amp;frame);&#xA;    av_packet_free(&amp;packet);&#xA;    avcodec_free_context(&amp;codec_context);&#xA;    avformat_close_input(&amp;fmt_ctx);&#xA;    return 0;&#xA;}&#xA;

    &#xA;

  • Class "FFMpeg\FFMpeg" not found

    16 août 2024, par Saeed Eisakhani

    I installed ffmpeg on xampp by COMPOSER. I installed FFMPEG on windows before.&#xA;enter image description here

    &#xA;

    Then with the command composer require php-ffmpeg/php-ffmpeg installed php-ffmpeg&#xA;enter image description here

    &#xA;

    I use code below (from php-ffmpeg github) for a test but this does not work

    &#xA;

    &lt;?php&#xA;&#xA;require &#x27;../../phpMyAdmin/vendor/autoload.php&#x27;;&#xA;&#xA;$ffmpeg = FFMpeg\FFMpeg::create(); // line 5 that error referees to &#xA;$video = $ffmpeg->open(&#x27;video.mpg&#x27;);&#xA;$video&#xA;    ->filters()&#xA;    ->resize(new FFMpeg\Coordinate\Dimension(320, 240))&#xA;    ->synchronize();&#xA;$video&#xA;    ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(10))&#xA;    ->save(&#x27;frame.jpg&#x27;);&#xA;$video&#xA;    ->save(new FFMpeg\Format\Video\X264(), &#x27;export-x264.mp4&#x27;)&#xA;    ->save(new FFMpeg\Format\Video\WMV(), &#x27;export-wmv.wmv&#x27;)&#xA;    ->save(new FFMpeg\Format\Video\WebM(), &#x27;export-webm.webm&#x27;);&#xA;&#xA;?>&#xA;

    &#xA;

    This is the error I encounter.&#xA;enter image description here

    &#xA;

    I read many and many similar questions but almost all of them suggest require &#x27;../../phpMyAdmin/vendor/autoload.php&#x27;; that I have it in my code.

    &#xA;

  • Why does OpenAI Whisper return "None" ?

    29 septembre 2024, par SHDDSFFDSDSAF

    I'm trying to transcribe an MP3 file using OpenAI’s Whisper model, but the transcriptions.create() method consistently returns None. I’ve tried different MP3 files, converted them to WAV, updated the OpenAI library, and added error handling, but I still can’t figure out the issue.

    &#xA;

    Here’s my code :

    &#xA;

    from openai import OpenAI&#xA;&#xA;client = OpenAI(&#xA;    api_key="MYAPIKEY"&#xA;)&#xA;&#xA;audio_file = open("speech.mp3", "rb")&#xA;transcript = client.audio.transcriptions.create(&#xA;    file=audio_file,&#xA;    model="whisper-1",&#xA;    response_format="verbose_json",&#xA;    timestamp_granularities=["segment"]&#xA;)&#xA;&#xA;print(transcript)&#xA;

    &#xA;

    I’ve confirmed that :

    &#xA;

      &#xA;
    • The API key is valid.
    • &#xA;

    • I’m using OpenAI Python library version X.X.X.
    • &#xA;

    • I’ve tested both MP3 and WAV formats.
    • &#xA;

    • The MP3 file is valid (checked using ffmpeg).
    • &#xA;

    &#xA;

    The response always returns None without any exceptions. Any ideas on what could be going wrong ?

    &#xA;