Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (80)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

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

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (10028)

  • Anomalie #3064 : recherche nom rubrique avec quote pas pris en compte

    2 novembre 2013, par b b

    Testé sur SPIP 3.0.12 svn 20909 sur une base MySQL, je ne reproduis pas.

    Par contre je reproduis sur contrib.spip.net.

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

    


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