Recherche avancée

Médias (1)

Mot : - Tags -/biographie

Autres articles (24)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

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

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (4101)

  • libx264 codex not enabled in ffmpeg ubuntu 18.04

    23 novembre 2022, par Bendemann

    I have some weird codex installation issues with the following docker image.

    


    ARG PYTORCH="1.8.0"
ARG CUDA="11.1"
ARG CUDNN="8"
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel

ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 8.0+PTX"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"

# https://github.com/NVIDIA/nvidia-docker/issues/1632
RUN apt-key del 7fa2af80
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/7fa2af80.pub

RUN apt-get update && apt-get install -y \
        git nano ninja-build p7zip-full imagemagick wget unzip \
        libglib2.0-0 libsm6 libxrender-dev libxext6 libturbojpeg \
        libxrender1 libfontconfig1 freeglut3-dev llvm-6.0-tools curl \
        amqp-tools ffmpeg libx264-dev \
    && apt --fix-broken install \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* \
    # for visualizing
    && wget https://github.com/mmatl/travis_debs/raw/master/xenial/mesa_18.3.3-0.deb \
    && dpkg -i ./mesa_18.3.3-0.deb || true \
    && apt install -f \
    && git clone https://github.com/mmatl/pyopengl.git \
    && pip install ./pyopengl


    


    First of all, libx264 is supposed to be installed by a simple apt-get install ffmpeg in ubuntu 18.04.5. Indeed I see that it is being installed in the installation instructions but for some reason, it's not enabled. This is confirmed when running ffmpeg -codecs | grep 264, which doesn't show libx264 (only h264, libopenh264 are there).

    


    In addition, I also compiled from source, explicitly enabling libx264 during installation. It didn't make a difference.

    


  • 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 : Remove packets based on PTS/DTS

    9 mai 2018, par stevendesu

    I have a video which contains some audio packets beyond the end of the video data :

    $> ffprobe -show_packets video.mp4
    ...
    ...
    ...
    [PACKET]
    codec_type=video
    stream_index=0
    pts=5653648
    pts_time=235.568667
    dts=5653648
    dts_time=235.568667
    duration=1001
    duration_time=0.041708
    convergence_duration=N/A
    convergence_duration_time=N/A
    size=1030
    pos=25233684
    flags=__
    [/PACKET]
    [PACKET]
    codec_type=audio
    stream_index=1
    pts=11310080
    pts_time=235.626667
    dts=11310080
    dts_time=235.626667
    duration=1024
    duration_time=0.021333
    convergence_duration=N/A
    convergence_duration_time=N/A
    size=284
    pos=25234714
    flags=K_
    [/PACKET]
    [PACKET]
    codec_type=audio
    stream_index=1
    pts=11311104
    pts_time=235.648000
    dts=11311104
    dts_time=235.648000
    duration=1024
    duration_time=0.021333
    convergence_duration=N/A
    convergence_duration_time=N/A
    size=285
    pos=25234998
    flags=K_
    [/PACKET]
    [PACKET]
    codec_type=audio
    stream_index=1
    pts=11312128
    pts_time=235.669333
    dts=11312128
    dts_time=235.669333
    duration=992
    duration_time=0.020667
    convergence_duration=N/A
    convergence_duration_time=N/A
    size=290
    pos=25235283
    flags=K_
    [/PACKET]
    $>

    The last video packet in the video has a PTS time of 235.568667 and a duration of 0.041708 - meaning all video data ends at 235.610375. However there are audio packets beginning at 235.626667 and later.

    Is there an easy way to strip these audio packets from the file so that the audio and video end simultaneously ?