Recherche avancée

Médias (91)

Autres articles (74)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (4221)

  • I faced ffmpeg error in my project run time

    3 juillet 2023, par Jesy J
    Runtime error: can't load audio from file: 'ffmpeg' not found. Please install 
'ffmpeg' in your system to use non- wav audio file format and make sure 'ffprobe' 
is in your path


    


    I configure ffmpeg in my system but still I face this error.

    


    This is my code :

    


    !pip install gradio
!pip install SpeechRecognition
!pip install pydub
!pip install openai

import gradio as gr
import speech_recognition as sr
from pydub import AudioSegment
import openai

# Set up OpenAI API
openai.api_key = [MASKED]

# Function to convert text to speech using OpenAI's API
def text_to_speech(text, language):
    response = openai.Completion.create(
        engine="davinci",
        prompt=f"Translate the following English text into {language}: \"{text}\"",
        max_tokens=100,
        temperature=0.8,
        top_p=1.0,
        frequency_penalty=0.0,
        presence_penalty=0.0,
        stop=None,
        n=1,
        log_level="info"
    )
    return response.choices[0].text.strip()

# Function to recognize speech from audio
def speech_to_text(audio):
    recognizer = sr.Recognizer()
    with sr.AudioFile(audio) as source:
        audio_data = recognizer.record(source)
    return recognizer.recognize_google(audio_data)

# Function to convert audio to desired language
def convert_language(audio, target_language):
    recognized_text = speech_to_text(audio)
    translated_text = text_to_speech(recognized_text, target_language)
    return translated_text

# Function to process user input and generate output
def process_audio(input_audio, target_language):
    converted_text = convert_language(input_audio.name, target_language)
    return gr.outputs.Audio(converted_text, type="filepath")

# Set up Gradio interface
audio_input = gr.inputs.Audio(source="microphone")

language_input = gr.inputs.Dropdown(choices=["English", "French", "German"])  # Add more languages as needed

output_audio = gr.outputs.Audio(type="filepath", label="Output Audio")

title = "Multilingual AI Voice Assistant"

description = "Upload an audio file and select the target language for translation."

gr.Interface(fn=process_audio, inputs=[audio_input, language_input], outputs=output_audio, title=title, description=description).launch()


    


  • FFMPEG on Android with libmp3lame

    2 septembre 2014, par M4tho

    I’ build an app for android to convert videos to audio.
    Im using ffmpeg for the process. (Im using the precompiled version from here)

    At the moment its only possible to convert to *.wav and not to *.mp3.

    So im asking u if anybody can provide me a compiled version supporting the libmp3lame-library ?

    Or can anybody explane to me how to compile it myself.
    Ive tried to, but im getting some errors all the time and i dont know how to handle them.

    Ive tried to compile it myself with this setup :

    • Ubuntu x64
    • Android NDK-r10
    • ffmpeg SourceCode from Feb-02-2014
    • libmp3lame-dev

    following this tutorial
    of course ive added
    —enable-libmp3lame to the ./configuration

    thanks anyways
    and sorry for the bad english

  • ffmpeg acts weird at reencoding my videos

    6 novembre 2022, par average

    i have download multiple videos from yt-dlp (option :

    


    yt-dlp --no-flat-playlist --audio-quality 0 --embed-thumbnail --embed-metadata --write-thumbnail --embed-subs --sub-langs all --embed-chapters --playlist-items xx playlist_url_goes_here


    


    result in a bunch of video which encode in mkv and thumbnail in png (after preprocessing from webp/jpg)

    


    my goal was to actually remove the embed thumbnail in mkv and replace it with png.

    


    example of my video data when still in mkv format :

    


    Input #0, matroska,webm, from 'ANIMACIÓN | kirby vs marx [U4g0vusRpEA].mkv':
  Metadata:
    title           : ANIMACIÓN | kirby vs marx
    PURL            : https://www.youtube.com/watch?v=U4g0vusRpEA
    COMMENT         : https://www.youtube.com/watch?v=U4g0vusRpEA
    ARTIST          : Los 5 heroes
    DATE            : 20200908
    DESCRIPTION     : kirby tendrá que enfrentarse a marx luego de que se negara a buscarle comida cuando marx estaba hambriento. Esto ocasiona que marx intente comer todo lo comestible que ve. ¿Podrá kirby detener a marx?
    SYNOPSIS        : kirby tendrá que enfrentarse a marx luego de que se negara a buscarle comida cuando marx estaba hambriento. Esto ocasiona que marx intente comer todo lo comestible que ve. ¿Podrá kirby detener a marx?
    ENCODER         : Lavf59.27.100
  Duration: 00:09:12.62, start: -0.007000, bitrate: 746 kb/s
  Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1920x1080, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn (default)
    Metadata:
      DURATION        : 00:09:12.621000000
  Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:09:12.621000000
  Stream #0:2(eng): Subtitle: webvtt
    Metadata:
      title           : English
      HANDLER_NAME    : English
      DURATION        : 00:08:29.168000000
  Stream #0:3: Attachment: none
    Metadata:
      filename        : cover.webp
      mimetype        : image/webp


    


    (depend on the video it will be have subtitle or chapters)

    


    i went to ffmpeg and bulk-convert them using the command

    


    for f in *.mkv; do 
ffmpeg -i "$f" -i "${f%.*}.png" -threads 2 -movflags use_metadata_tags -map_chapters 0 -map 0:V -map 0:a -map 0:s? -map 0:d? -scodec mov_text -map 1 -c:v:1 png -disposition:v:1 attached_pic "${f%.*}.mp4"; 
done


    


    but when i tried to run it for the video above,

    


      

    1. during ffmpeg convertion the input was likely same to my expectation
    2. 


    


    Output #0, mp4, to 'ANIMACIÓN | kirby vs marx [U4g0vusRpEA].mp4':
  Metadata:
    title           : ANIMACIÓN | kirby vs marx
    PURL            : https://www.youtube.com/watch?v=U4g0vusRpEA
    COMMENT         : https://www.youtube.com/watch?v=U4g0vusRpEA
    ARTIST          : Los 5 heroes
    DATE            : 20200908
    DESCRIPTION     : kirby tendrá que enfrentarse a marx luego de que se negara a buscarle comida cuando marx estaba hambriento. Esto ocasiona que marx intente comer todo lo comestible que ve. ¿Podrá kirby detener a marx?
    SYNOPSIS        : kirby tendrá que enfrentarse a marx luego de que se negara a buscarle comida cuando marx estaba hambriento. Esto ocasiona que marx intente comer todo lo comestible que ve. ¿Podrá kirby detener a marx?
    encoder         : Lavf59.27.100
  Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 12800 tbn (default)
    Metadata:
      DURATION        : 00:09:12.621000000
      encoder         : Lavc59.37.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      DURATION        : 00:09:12.621000000
      encoder         : Lavc59.37.100 aac
  Stream #0:2(eng): Subtitle: mov_text (tx3g / 0x67337874)
    Metadata:
      title           : English
      HANDLER_NAME    : English
      DURATION        : 00:08:29.168000000
      encoder         : Lavc59.37.100 mov_text
  Stream #0:3: Video: png (mp4v / 0x7634706D), rgb24(pc, progressive), 480x360, q=2-31, 200 kb/s, 25 fps, 12800 tbn (attached pic)
    Metadata:
      encoder         : Lavc59.37.100 png


    


      

    1. but when i use ffmpeg to check it again result in missing metadatas in video-audio-subtitles streams
(ffmpeg also add its custom metadata in which is not good) and the output video did not have the new thumbnail i want to embed (or even old thumbnail in webp)
    2. 


    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ANIMACIÓN | kirby vs marx [U4g0vusRpEA].mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : ANIMACIÓN | kirby vs marx
    PURL            : https://www.youtube.com/watch?v=U4g0vusRpEA
    COMMENT         : https://www.youtube.com/watch?v=U4g0vusRpEA
    ARTIST          : Los 5 heroes
    DATE            : 20200908
    DESCRIPTION     : kirby tendrá que enfrentarse a marx luego de que se negara a buscarle comida cuando marx estaba hambriento. Esto ocasiona que marx intente comer todo lo comestible que ve. ¿Podrá kirby detener a marx?
    SYNOPSIS        : kirby tendrá que enfrentarse a marx luego de que se negara a buscarle comida cuando marx estaba hambriento. Esto ocasiona que marx intente comer todo lo comestible que ve. ¿Podrá kirby detener a marx?
    encoder         : Lavf59.27.100
  Duration: 00:09:12.64, start: 0.000000, bitrate: 1261 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1138 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc59.37.100 libx264
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 116 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
  Stream #0:2[0x3](eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
    Metadata:
      handler_name    : English


    


    so what i have gone wrong with my code and how to fix it ?
.