Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (112)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

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

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (6935)

  • My (FFMPEG issue ) RTMP server(freebsd) wont let me hear video when I play a huge file over the server itself :/

    19 avril 2021, par Engi Gang

    Hey my name is Alisha from Norway im trying to get my RTMP server working the thing is that it works just fine but I just cant stream over it with ffmpeg I can stream to it on OBS and it works fine, but I am trying to a website where people could watch old public domain movies from the 1950 some of the films are actually pretty big lol.... anyways I detailed bellow more

    


    rm -rf /mnt/hls/loool && ffmpeg -re -i "$file" -c:v libx264 -c:a aac -b:v 300k -b:a 95k -f flv -flvflags no_duration_filesize rtmp ://lambright.xyz:1935/live/loool

    


    any work around I literally cant play the audio :( I can only hear (my source file is an MKV and 3gb )

    


    Note I had a smaller mp4 file and it did played the audio, the video isnt even playable in chrome but on VLC it is, but only a small file worked fine... its fine when I stream from my pc, but whats the point I am trying to set up my vintage 1950 serverbox :') trying to build a nice website where users could watch neat and decent old movies that are public domain if you wonder :/

    


    Another note when I am trying to play it on my iphone safari browser it does actually play parts but audio is super corrupted like you hear the audio sometimes :((

    


    rtmp {
    server {
        listen 1935; # Listen on standard RTMP port
        chunk_size 4000;

        application live {
            allow play all;
            live on;
            record off;
            hls on;
            hls_nested on;
            hls_path /mnt/hls/;
            hls_fragment 2s;
        }
        
    }
}


    


  • mov and mp4 files to play in browser

    5 novembre 2016, par Pranav Unde

    Currently I am playing with html5 video tag and database video files. I have couple of records in database that contains mov & mp4 files. HTML5 video tag supports mp4 but what about mov files ? I am trying to use external libraries but it not helps .. might be my implementation is wrong ...

    Can we get any library that converts mov to mp4 or browser that support ONLINE rather than saving it anywhere ... ?

    Also can I get any code snippet for handbrake source code implementation so that I can try for it.

  • voice_client.play doesn't continue loop (Discord) (Solved)

    19 mars 2023, par Razurio

    SOLVED see end

    


    songs = asyncio.Queue(maxsize=0)
currently_playing = False


@client.command()
async def play(ctx, url):
    global songs
    global currently_playing
    if currently_playing:
        with yt_dlp.YoutubeDL({"format": "bestaudio", "outtmpl": "Queue_Download/%(title)s.%(ext)s"}) as ydl:
            info = ydl.extract_info(url, download=True)
            filename = ydl.prepare_filename(info)
            await songs.put({"file": filename, "info": video_info(url)})
            # print("test 1")
    else:
        with yt_dlp.YoutubeDL({"format": "bestaudio", "outtmpl": "Queue_Download/%(title)s.%(ext)s"}) as ydl:
            info = ydl.extract_info(url, download=True)
            filename = ydl.prepare_filename(info)
            await songs.put({"file": filename, "info": video_info(url)})
            # print("test 2")
        asyncio.create_task(queue(ctx))



async def queue(ctx):
    global songs
    global currently_playing
    currently_playing = True
    while True:
        if songs.empty():
            currently_playing = False
            await ctx.reply("Queue is now empty")
            await ctx.voice_client.disconnect()  # disconnect from voice channel when queue is empty
            break
        else:    
            song = await songs.get()
            filename = song["file"]
            voice_channel = ctx.author.voice.channel
            if not ctx.voice_client:  # check if bot is not already connected to a voice channel
                await voice_channel.connect()

            await ctx.reply('playing')
            await ctx.voice_client.play(discord.FFmpegPCMAudio(filename))

@client.command()
async def stop(ctx):
    global songs
    await ctx.voice_client.disconnect()
    await empty_queue(songs)
    await ctx.reply('Stopped')

async def empty_queue(songs):
    while not songs.empty():
        songs.get_nowait()


    


    I have problems with the "await ctx.voice_client.play(discord.FFmpegPCMAudio(filename))" which doesn't continue after finishing.

    


    I know you can use a after= parameter in voice_client.play() but I didn't manage to get it to work to recursivly call queue()

    


    async def play_next(ctx):
global songs
global currently_playing
if songs.empty():
    currently_playing = False
    await ctx.reply("Queue is now empty")
    await ctx.voice_client.disconnect()  # disconnect from voice channel when queue is empty
else:    
    song = await songs.get()
    filename = song["file"]
    voice_channel = ctx.author.voice.channel
    if not ctx.voice_client:  # check if bot is not already connected to a voice channel
        await voice_channel.connect()

    def after(error):
        if error:
            print(f'Error in after callback: {error}')
        asyncio.create_task(play_next(ctx))

    await ctx.reply('playing')
    ctx.voice_client.play(discord.FFmpegPCMAudio(filename), after=after)


    


    I tried using the after parameter like like but I just get an error in line 116, in after asyncio.create_task(play_next(ctx)) "no running event loop" ... "Calling the after function failed"

    


    EDIT

    


    async def play_next(ctx):
global loop
global songs
global currently_playing
global tasks
loop = asyncio.get_event_loop()
if songs.empty():
    currently_playing = False
    await ctx.reply("Queue is now empty")
    await ctx.voice_client.disconnect()  # disconnect from voice channel when queue is empty
else:
    
    song = await songs.get()
    filename = song["file"]
    voice_channel = ctx.author.voice.channel
    if not ctx.voice_client:  # check if bot is not already connected to a voice channel
        await voice_channel.connect()
    def after(error):
        if error:
            print("er")
        loop.create_task(queue(ctx))

    await ctx.reply('playing')
    ctx.voice_client.play(discord.FFmpegPCMAudio(filename), after=after)


    


    using loop = asyncio.get_event_loop() and loop.create_task(queue(ctx)) made it finally work
took inspiration from this post