Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

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

Autres articles (28)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (6075)

  • What does it mean for avcodec_find_decoder() to return 0 ? [duplicate]

    11 février 2019, par Lucas Zanella

    This question already has an answer here :

    This part of my code

    m_pAVCodec = avcodec_find_decoder(AV_CODEC_ID_H264);

    is returning 0, which means it failed to find the codec.

    What does it mean for ffmpeg to not find a codec ? Is it something related with my system ? I need somehow to install the h264 codec ?

    I’m using Ubuntu

    UPDATE :

    By doing
    avcodec_register_all() ;

    before, it works. It’s kinda strange because av_register_all() was deprecated long ago and won’t even compile.

    What more needs to be registered ?

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

    


    Here’s my code :

    


    from openai import OpenAI

client = OpenAI(
    api_key="MYAPIKEY"
)

audio_file = open("speech.mp3", "rb")
transcript = client.audio.transcriptions.create(
    file=audio_file,
    model="whisper-1",
    response_format="verbose_json",
    timestamp_granularities=["segment"]
)

print(transcript)


    


    I’ve confirmed that :

    


      

    • The API key is valid.
    • 


    • I’m using OpenAI Python library version X.X.X.
    • 


    • I’ve tested both MP3 and WAV formats.
    • 


    • The MP3 file is valid (checked using ffmpeg).
    • 


    


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

    


  • ffmpeg + play video loop

    3 septembre 2013, par Javier Ramírez

    Does anyone know how to make a video using ffmpeg + Opengl play continuously ?. Because this is only played once

    tiempo = glfwGetTime();
    duracion = 1.0/25.0; // 1 second / 25 fps

    while(1){

    ...        

     if(glfwGetTime() > tiempo + duracion){
       if(av_read_frame(pFormatCtx,&packet) >= 0){
         if(packet.stream_index == 0){
           avcodec_decode_video2(pCodecCtx,pFrame,&frameFin,&packet);
           if(frameFin)sws_scale(img_convert_ctx,pFrame->data,pFrame->linesize,0,pCodecCtx->height,pFrameRGB->data,pFrameRGB->linesize);
         }
         av_free_packet(&packet);
       }
       tiempo += duracion;
     }

    ...

    }

    I know av_read_frame function (...) returns 0 if the end of file. But how do I make the function again returns a value other than zero ? o How I can I make the video is constantly repeated ?