Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (41)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (5160)

  • Delete file after discord.FFmpegPCMAudio is done playing

    12 novembre 2023, par Moni

    I want to delete a mp3 file in the same directory after discord.FFmpegPCMAudio is done playing, but i don't know how ! I've searched everywhere before posting here, but with no luck.

    


    @bot.command(name='play')
async def play(ctx, url):
 global current_audio_file
 voice_client = ctx.guild.voice_client

 if voice_client.is_connected():
    if ctx.author.voice and ctx.author.voice.channel == voice_client.channel:
        try:
            server = ctx.guild
            voice_channel = server.voice_client

            async with ctx.typing():
                if "youtube" or "youtu" in url:
                    result, title = await download_youtube_audio(url)
                    result_b = bytes(result, "utf-8")
                    audio_file_name = codecs.decode(result_b, 'charmap')

                    audio_file, title2 = find_file(audio_file_name, 2)
                elif "spotify" in url:
                    result = await download_spotify_audio(url)
                    result_b = bytes(result, "utf-8")
                    audio_file_name = codecs.decode(result_b, 'charmap')

                    audio_file, title = find_file(audio_file_name, 1)

                if result:
                    if "ERROR" not in result:
                        await ctx.send(f'**Now playing:** {title}')

                        if not voice_channel.is_playing():
                            voice_channel.on_audio_end = lambda e: asyncio.create_task(delete_file(audio_file))

                            voice_channel.play(discord.FFmpegPCMAudio(executable="ffmpeg.exe", source=audio_file))
                            current_audio_file = audio_file
                        else:
                            await ctx.send("Another song is playing right now!")
                    else:
                        print(f"An error occurred while trying to download the audio. Error: {result}")
                        send_error(ctx, Exception(result))
                else:
                    await ctx.send("An error occurred while trying to download the audio.")
        except Exception as e:
            print(f"An error occurred: {e}")
            send_error(ctx, e)
            await ctx.send("An error occurred while trying to play the audio.")
    else:
        await ctx.send("You are not in the same voice channel as the bot.")
else:
    await ctx.send("The bot is not connected to a voice channel.")

def delete_file(filename: str):
if os.path.exists(filename):
    os.remove(filename)
    print(f"Deleted {filename}")


    


    If anyone knows how to do it, please help me out.

    


  • FFMPEG MP3 file size much larger than expected on Windows 10

    8 avril 2018, par The Gora

    I’ve been using FFMPEG on Windows to :

    1. Convert iTunes M4A files to MP3s (with a bit rate of 128k) ; and
    2. Create 30 sec sample MP3s of the above MP3s (same bit rate).

    When I run FFMEG on a Windows 7 64 bit machine, the size of the MP3s (both for 1. & 2.) is in line with the rough calculation of :

    (Audio length in seconds) X (Bit rate)

    For example, a 4 minute audio yields an approx. 3.7MB MP3 file ; a 30 second sample MP3 is approx. 470KB.

    However when I run the same FFMPEG binary (copied from the Windows 7 machine) on a Windows 10 64 bit machine, all of the MP3s (both for 1. and for 2.) are inflated by approx 5MB. I’m using the same batch file on both machines to execute FFMEG with the required parameters, so pretty confident the difference is not down to user error.

    My questions are :

    1. Why is there this apparent 5MB overhead on Windows 10 ? and more importantly ;
    2. What can I do to remove this ?

    The large file size is a problem as the sample MP3s are to be put on a website for people to listen to a snippet of the song, and the webpage with multiple tags takes a long time to load completely (several minutes).

    Here is the version and lib info :

    ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 7.2.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100

    And here are the command lines I’m using :

    1. ffmpeg -i input.m4a -id3v2_version 3 -b:a 128k -output.mp3
    2. ffmpeg -i input.m4a -ss 30 -t 30 -af "afade=in:st=30:d=5,afade=out:st=55:d=5" -id3v2_version 3 -b:a 128k -output.mp3
  • create video editor error stream specifier [on hold]

    25 mai 2018, par Oussama

    I am a beginner in ffmpeg, and I started by creating a video editor, but I encountered an error while executing an ffmpeg command :

    ’Stream specifier’ ’ in filtergraph description .... matches no streams’

    Here is the command :

    ’ffmpeg -y -i icone1.jpg -i icone2.jpg -i icone3.jpg -i icone4.jpg -loop 1 -framerate 24 -t 5 -i image1.jpg -loop 1 -framerate 24 -t 5 -i image2.jpg -i song.mp3 -filter_complex " color=black@0:1365x701,format=yuva444p[c0] ; color=black@0:1365x701,format=yuva444p[c1] ; [c0][4]scale2ref[ct0][mv0] ; [c1][5]scale2ref[ct1][mv1] ; [ct0]setsar=1,split=2[t00][t01] ; [ct1]setsar=1,split=1[t10] ; [t00]drawtext=fontfile=’arial’:text=’azaazzaza’:fontcolor=red:fontsize=30[tfi00] ; [t01]drawtext=fontfile=’arial’:text=’drtgfh’:fontcolor=red:fontsize=30[tfi01] ; [t10]drawtext=fontfile=’arial’:text=’uygfdsdsqds’:fontcolor=blue:fontsize=30[tfi10] ; [mv0][tfi00]overlay=x=55.0000:y=12.0000:shortest=1[mv0] ; [mv0][tfi01]overlay=x=55.0000:y=12.0000:shortest=1[mv0] ; [mv1][tfi10]overlay=x=55.0000:y=55.0000:shortest=1[mv1] ; [0]scale=500:500,setsar=sar=1[img0] ; [1]scale=500:500,setsar=sar=1[img1] ; [2]scale=40:50,setsar=sar=1[img2] ; [3]scale=500:500,setsar=sar=1[img3] ; [mv0][img0]overlay=20.0000:20.0000[mv01] ; [mv01][img1]overlay=12.0000:12.0000[mv02] ; [mv1][img2]overlay=20.0000:12.0000[mv12] ; [mv12][img3]overlay=55.0000:12.0000[mv13] ; [mv02]scale=1280:720,setsar=sar=1[fram0] ; [mv13]scale=1280:720,setsar=sar=1[fram1] ; [5]atrim=duration=10[a1] ; [fram0][fram1]concat=n=2:v=1:a=0[all]" -map [all] -map [a1] video-8.mp4’