Recherche avancée

Médias (91)

Autres articles (9)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (2827)

  • Select song sample rate

    22 avril 2022, par Clamarc

    I have a folder with several mp3's and I needed to separate (copy) all the 4800 hz sample rate files to another folder.

    


    I have a folder "General Audios" and I created another one called "Audios 48000 sample rate"

    


    I'm running the ffprobe command that returns the sample rate value of each song.. but when I try to save the value in a string to be able to use the IF and copy only the ones with 48000 hz, I get a message that the command is a command input ? what is wrong ?

    


    md "C:\Users\%username%\Desktop\Áudios 48000 sample rate"

cd /d "C:\Users\%username%\Desktop\Áudios Gerais"

for %%F IN (*) do (
   ffprobe -i "%%F" -v error -show_entries stream=sample_rate ˆ
       -of default=noprint_wrappers=1:nokey=1 set %%S if %%S==48000 ˆ
          "C:\Users\%username%\Desktop\Áudios 48000 sample rate\%%F"
   )

pause


    


    EDITED :
I have no more code, this is the only one, I run the ffprobe command in a folder and I select the ones that have 48000Hz to copy to another folder, that's all !?!?

    


  • discord.py music bot can't play next song

    6 décembre 2020, par bork

    I'm making a discord music bot using ffmpeg and youtube-dl. I have a premade playlist of urls that would play the list of songs once a user chooses it.
    
this is my code for playing the audio

    


    ydl_opts = {
            'format': 'bestaudio', 
            'noplaylist':'True',
            'youtube_include_dash_manifest': False
            }
FFMPEG_OPTIONS = {
            'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
            'options': '-vn'
            }

songs = url[playlist]
dur_min = 0
pre_dur_sec = 0
with YoutubeDL(ydl_opts) as ydl:
    for i in songs:
        info = ydl.extract_info(i, download = False)
        dur = info['duration']
        playlist_songs.append(info)

playlist_songs_copy = playlist_songs.copy()
for i in playlist_songs_copy:
    info = playlist_songs.pop(0)
    URL = info['formats'][0]['url']
    player = FFmpegPCMAudio(URL, **FFMPEG_OPTIONS)
    q.append(player)
    q_playlist.append(playlist)

if not voice.is_playing():
    source = q.pop(0)  
    playlist = q_playlist.pop(0)
    dur_min = duration_min.pop(0)
    dur_sec = duration_sec.pop(0)  
    voice.play(source, after = lambda e: play_next(ctx, source))      
    voice.is_playing()
    await ctx.send(f'```nim\n*Now Playing:*\nplaylist {playlist}: {name[playlist]}\n\n{content[playlist]}\n\ntotal duration: {dur_min}:{dur_sec}```')


    


    and this is my code for playing the next song

    


    def play_next(ctx, source):
    voice = get(client.voice_clients, guild = ctx.guild)
    if len(q) >= 1:
        try:
            del combine_q[0]
            source = q.pop(0)
            playlist = q_playlist.pop(0)
            dur_min = duration_min.pop(0)
            dur_sec = duration_sec.pop(0)

        except:
            pass

        voice.play(source, after = lambda e: play_next(ctx, source))
        try:
            asyncio.run_coroutine_threadsafe(ctx.send(f'```nim\n*Now Playing:*\nplaylist {playlist}: {name[playlist]}\n\n{content[playlist]}\n\ntotal duration: {dur_min}:{dur_sec}```'), client.loop)
        
        except:
            asyncio.run_coroutine_threadsafe(ctx.send('```nim\nPlaying the next song...```'), client.loop)
        
    else:
        time.sleep(30) 
        if not voice.is_playing():
            asyncio.run_coroutine_threadsafe(voice.disconnect(), client.loop)
            asyncio.run_coroutine_threadsafe(ctx.send("```nim\nNo more songs in queue.```"),client.loop)
            voice.is_paused()


    


    Up till today, it's been working fine. But I was using the bot just now and instead of playing the song and sending the message "Playing the next song..." as usual, it just stopped and spammed the message for about 30 times before it disconnected. When I checked the logs, it showed
socket.send() raised exception
, which was also spammed in the terminal. When I tried making the bot reconnect, it joined my voice channel but didn't respond to any commands and would keep making the discord "connecting" noise. It wouldn't even leave with my .leave command unless I completely turned it off via the script.

    


    The same connecting problem would continue even after I reran the script and would only stop after I restarted my VS Code which is really odd...

    


    After some testing I found out that as of now, the bot is only able to play two songs before breaking. I really need help as this just happened randomly and I'm unable to find anything online about the problem.

    


  • swscale : fix ring buffer size when scaling slices of a frame

    9 juin 2016, par Pedro Arthur
    swscale : fix ring buffer size when scaling slices of a frame
    

    The ring buffer size should be able to store input lines
    when there is not enough lines to output a single line.

    • [DH] libswscale/slice.c
    • [DH] libswscale/swscale.c