Recherche avancée

Médias (0)

Mot : - Tags -/tags

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (72)

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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (8954)

  • 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