Recherche avancée

Médias (1)

Mot : - Tags -/remix

Autres articles (39)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (7408)

  • js MediaRecorder + ffmpeg [Solved]

    19 mai 2021, par Dmitry

    Solved

    


    UPD :

    


    --------------------------------------
    
If you dislike my question, or my answer below, please, tell why. Where am I going wrong ?
    
--------------------------------------

    


    Help me, please. I record a video with javascript using MediaRecorder and then I store it on my server.

    


    The VLC player plays the video well, but a browser has difficult to play it. A video recorded on IOS loads up to 2 minutes before the browser starts playing it(looks like the browser loads the video completely before playing it). A video from android doesn't contain the timeline, but starts much faster.

    


    The video from android I fixed by fast re-encoding ffmpeg -i without_timeline.webm -c copy fixed.webm it works well.

    


    I tried to fix the video from IOS with the similar command ffmpeg -i long_started.mp4 -c copy fixed.mp4, but the result is worse.

    


    There are a lot of errors

    


    Non-monotonous DTS in output stream 0:0 ;

    


    Non-monotonous DTS in output stream 0:1 ;

    


    The new video is rotated, has freezes, repeats and wrong time.

    


    I've spent a week, but without success.

    


  • Why can I not change the number of frames (nframes) in a gganimate animation ? SOLVED

    26 décembre 2022, par Gekin

    I have produced an animation per gganimate and rendered it per ffmpeg. It works just fine, but only, if I do not change the number of frames. If I do set the number of frames, I get this error message :

    


    nframes and fps adjusted to match transition
Error parsing framerate 8,4.                           
Error: Rendering with ffmpeg failed


    


    I produced the gganim MonthlyAveragePrecipitationMap the following way :

    


    options(scipen = 999, OutDec  =  ",")

MonthlyAveragePrecipitationMap = ggplot(MonthlyAverageExtremePrecipitation) + 
  geom_path(data = map_data("world","Germany"),
            aes(x = long, y = lat, group = group)) +
  coord_fixed(xlim = c(6,15),
              ylim = c(47,55)) + 
  geom_point(aes(x=lon, y=lat, 
                 colour = ShareOfExtremePrecipitationEvents,
                 group = MonthOfYear),
             size = 3) + 
  scale_color_gradient(low="blue", high="yellow") + 
  xlab("Longitude (degree)") +
  ylab("Latitude (degree)") + 
  theme_bw() +
  transition_manual(frames = MonthOfYear) + 
  labs(title = '{unique(MonthlyAverageExtremePrecipitation$MonthOfYear)[as.integer(frame)]}', 
       color = paste0("Share of Extreme Precipitation Events \namong all Precipitation Events")) 


    


    I call the animation the following way :

    


    animate(MonthlyAveragePrecipitationMap,
        nframes = 300,
        renderer =
          ffmpeg_renderer(
            format = "auto",
            ffmpeg = NULL,
            options = list(pix_fmt = "yuv420p")))



    


    I used this exact code just a few days ago and it worked fine.

    


    Has someone had similar experiences ?
Thanks in advance.

    


    EDIT : Problem solved.

    


      

    • Problem : Changing the decimal seperator from . to , per options(dec=",")
    • 


    • Solution : Changing the decimal seperator locally within the axis scaling per function.
    • 


    


  • 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