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 (62)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

Sur d’autres sites (7232)

  • Problem updating drawtext with file using ffmpeg [duplicate]

    17 novembre 2020, par drmobbins

    I have a shell script that runs to combine a 24/7 AAC audio stream with a 720p HD picture/background and streams that output live to YouTube. This is for an internet radio station. The script works perfectly except for the drawtext option. The drawtext option references a file that is updated every 15 seconds (using Python and Cron) with the correct song metadata (from the radio automation suite) and is supposed to print the contents of the metadata file to the screen. This happens one time when the ffmpeg command is run in the script, but doesn't update after a song change.

    


    I would assume that since the metadata file is changing every 15 seconds on the server that it would update the song details in the output video that could be seen on YouTube...but it doesn't.

    


    #!/bin/bash

#Quality settings
VBR="1500k"
FPS="30"
QUAL="ultrafast"
AUDIO_ENCODER="aac"

#Youtube settings
YOUTUBE_URL=" rtmp://a.rtmp.youtube.com/live2"
YOUTUBE_KEY="xxxx-xxxx-xxxx-xxxx-xxxx"

#Sources
VIDEO_SOURCE="bg720p.jpg"
AUDIO_SOURCE="http://stream.url"

#Metadata settings
TRACK_METADATA=$(cat metadata.txt)

ffmpeg \
 -loop 1 \
 -re \
 -framerate $FPS \
 -i "$VIDEO_SOURCE" \
 -thread_queue_size 512 \
 -i "$AUDIO_SOURCE" \
 -vf "drawtext=fontfile=OpenSans-Light.ttf:text=$TRACK_METADATA:x=10:y=680:fontsize=20:fontcolor=white" \
 -c:v libx264 -tune stillimage -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS *2)) -b:v $VBR \
 -c:a $AUDIO_ENCODER -threads 6 -ar 44100 -b:a 64k -bufsize 512k -pix_fmt yuv420p \
 -f flv $YOUTUBE_URL/$YOUTUBE_KEY


    


    What am I missing that will make the output continually check for file changes and use drawtext to display the contents. Thanks in advance !

    


  • Discord bot cannot play youtube video for more than 60sec

    18 octobre 2020, par Antoine Weber

    A few weeks back I started a discord bot as a side project for fun.
Since yesterday i've been trying to allow my bot to search youtube videos and play them in voice channels (mostly for songs).

    


    The bot correctly searches youtube with the query and finds the youtube video, starts playing it, but for some reason, after 60 sec (no matter of the video, always the same time), the bot suddenly provides no more audio, and then gets stuck somewhere (not a single error message, but the bots just stops responding).

    


    Here are the code snippets :

    


    # first two words are activation keywords for the bot, then its the youtube query
query = ' '.join(message.message.content.split()[2:])
youtube = build("youtube", "v3", developerKey=yt_token)
search_response = youtube.search().list(q=query, part="id,snippet", maxResults=5).execute()
video_id = search_response['items'][0]['id']['videoId']
video_url = "https://www.youtube.com/watch?v=" + video_id

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
     ydl.download([video_url])
await play_audio(message, 'song.mp3')


    


    (I delete the song.mp3 after playing)

    


    my ydl options are

    


    ydl_opts = {
    "postprocessors":[{
        "key": "FFmpegExtractAudio", # download audio only
        "preferredcodec": "mp3", # other acceptable types "wav" etc.
        "preferredquality": "192" # 192kbps audio
    }],
    "format": "bestaudio/best",
    "outtmpl": "song.mp3"
}


    


    and also my play_audio function is

    


    async def play_audio(message, audio_name):
        channel = message.message.author.voice.channel
        vc = await channel.connect()
        time.sleep(0.5)
        vc.play(discord.FFmpegPCMAudio(audio_name))
        while vc.is_playing():
            time.sleep(1)
        vc.stop()
        await vc.disconnect()


    


    I know the time.sleep() call is blocking but I don't really core for now.

    


    Any one had this issue ? For short videos (less than 60sec), everything works fine. Maybe an ffmpeg option ?

    


  • What is the most efficient way to convert wav audio string to an ogg file without writing it to disk ?

    1er janvier 2023, par Saurabh Kumar Karn

    My final objective is to use TTS to get some Indic text converted into audio and pass that audio to a messaging system that accepts mp3 and ogg. Ogg is preferred.

    


    I am on Ubuntu and my flow for getting audio string is something like this.

    


      

    1. Text in Indic language is passed to an API
    2. 


    3. API returns a json with a key value called audioContent. audioString = response.json()['audio'][0]['audioContent']
    4. 


    5. The decoded string is arrived by using this decode_string = base64.b64decode(dat)
    6. 


    


    I am currently converting it to mp3 and as you can see I am writing the wave file first and then converting it into an mp3.

    


    wav_file = open("output.wav", "wb")
decode_string = base64.b64decode(audioString)
wav_file.write(decode_string)

# Convert this to mp3 file
print('mp3file')
song = AudioSegment.from_wav("output.wav")
song.export("temp.mp3", format="mp3")


    


    Is there a way to convert audioString directly to ogg file without doing the io ?

    


    I've tried torchaudio and pyffmpeg to load audioString and do the conversion but it doesn't seem to be working.