Recherche avancée

Médias (1)

Mot : - Tags -/portrait

Autres articles (48)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

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

  • Input seeking for frame at specified timestamp with Py-AV

    9 décembre 2019, par neonScarecrow

    I have a project already using Py-AV and am trying to replicate a specific ffmpeg command. The goal is to get a frame roughly around the specified timestamp.

    Here’s the ffmpeg commmand :
    https://trac.ffmpeg.org/wiki/Seeking

    ffmpeg -ss 14 -i https://some_url.mp4 -frames:v 1 frame_at_14_seconds.jpg

    Here’s my code :

       #return one frame around 14 seconds into the movie
       target_sec = 14
       container = av.open('https://some_url.mp4', 'r')
       container.streams.video[0].thread_type = 'AUTO'
       video_stream = next(s for s in container.streams if s.type == 'video')
       time_base = float(video_stream.time_base)
       target_timestamp = int(target_sec / time_base) + video_stream.start_time
       video_stream.seek(target_timestamp)
       for frame in container.decode(video_stream):
           frame.to_image().save('frame_at_14_seconds.jpg')
           break

    Additionally, I have found any documentation about this, but does anyone know if either command (ffmpeg/av.open) is downloading the entire file to a tmp file behind the scenes. I’m looking for a less memory-intensive way to read a frame for every second in an up to 60 second video.

  • getting a `InValid URL` when I send a voice message

    9 septembre 2023, par Ammad

    When I try to send voice messages I always get invalid url error with. I am using whisper to convert the audio to text but for some reason I cannot seem to pass the file to the whisper. It worked when I used this in java script but not in typescript for some reason

    


    async function createFile(path: string): Promise<file> {&#xA;  const response = await fetch(path);&#xA;  const data = await response.blob();&#xA;  &#xA;  // Extract file name from the path&#xA;  const fileName = path.split(&#x27;/&#x27;).pop() || &#x27;unknown&#x27;;&#xA;  &#xA;  // Extract file extension and determine MIME type&#xA;  const fileExtension = fileName.split(&#x27;.&#x27;).pop()?.toLowerCase() || &#x27;&#x27;;&#xA;  const mimeTypes: Record = {&#xA;    &#x27;mp3&#x27;: &#x27;audio/mpeg&#x27;,&#xA;    // Add more mappings as needed&#xA;  };&#xA;  const fileType = mimeTypes[fileExtension] || &#x27;application/octet-stream&#x27;;&#xA;  &#xA;  const metadata = {&#xA;    type: fileType&#xA;  };&#xA;  &#xA;  return new File([data], fileName, metadata);&#xA;}&#xA;&#xA;async function sendAudioForTranscription(file_path:string) {&#xA;  try {&#xA;    &#xA;    // const audioData = fs.createReadStream(file_path);&#xA;    const audioFile = await createFile(file_path)&#xA;&#xA;    const response = await openai.createTranscription(audioFile, "whisper-1");&#xA;    const transcribed = response.data.text;&#xA;&#xA;    return transcribed;&#xA;  } catch (error) {&#xA;    console.error("Error transcribing the audio:", error);&#xA;    return null;&#xA;  }&#xA;}&#xA;</file>

    &#xA;

    I am new to this so any help would be appreciated. This is the error

    &#xA;

    Error transcribing the audio: TypeError: Failed to parse URL from src\audio_files\false_xxxxxxxxx8@c.us_B161BC6FA04DB01B8B31F5E0F83EDAD5.mp3&#xA;    at Object.fetch (node:internal/deps/undici/undici:11576:11)&#xA;    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {&#xA;  [cause]: TypeError [ERR_INVALID_URL]: Invalid URL&#xA;      at new NodeError (node:internal/errors:405:5)&#xA;      at new URL (node:internal/url:778:13)&#xA;      at new Request (node:internal/deps/undici/undici:7132:25)&#xA;      at fetch2 (node:internal/deps/undici/undici:10715:25)&#xA;      at Object.fetch (node:internal/deps/undici/undici:11574:18)&#xA;      at fetch (node:internal/process/pre_execution:270:25)&#xA;      at C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:28:32&#xA;      at C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:8:71&#xA;      at new Promise (<anonymous>)&#xA;      at __awaiter (C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:4:12)&#xA;      at createFile (C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:27:12)&#xA;      at Object.<anonymous> (C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:49:37)&#xA;      at Generator.next (<anonymous>)&#xA;      at C:\Users\Ammad Ali\Documents\Documents\alex-whatsapp-bot\build\openai\transcript.js:8:71&#xA;      at new Promise (<anonymous>) {&#xA;    input: &#x27;src\\audio_files\\false_xxxxxxxxx8@c.us_B161BC6FA04DB01B8B31F5E0F83EDAD5.mp3&#x27;,&#xA;    code: &#x27;ERR_INVALID_URL&#x27;&#xA;  }&#xA;}&#xA;</anonymous></anonymous></anonymous></anonymous>

    &#xA;

    To get a response back in voice message

    &#xA;

  • Anomalie #4425 (Nouveau) : Des bots chinois comptabilisés dans les statistiques

    21 janvier 2020

    Bonjour,

    Je reporte ici un message trouvé sur la liste user.

    Le fichier /ecrire/inc_version.php inclut un certain nombre de bots à ne pas comptabiliser. Je suggère d’ajouter une liste de bots chinois et russes :
    Mb2345Browser
    LieBaoFast
    zh-CN
    MicroMessenger
    zh_CN
    Kinza

    Ces bots explosent littéralement mes stats avec des dizaines de milliers de visites comptabilisées.

    J’ai fait l’ajout manuellement mais la prochaine mise-à-jour de SPIP les effacera.

    Merci

    Guilain

    Au passage, je suggère de faire comme avec : https://zone.spip.net/trac/spip-zone/browser/spip-zone/_core_/plugins/statistiques/engines-list.txt
    Donc, une liste qui soit maintenue dans un fichier texte, facile à mettre à jour.