Recherche avancée

Médias (91)

Autres articles (79)

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (11638)

  • Discord FFMPEG audio wont play from yt-dlp

    19 mars 2023, par user21236822

    My question is this : Why isn't my bot playing audio ?

    


    I want the bot to join, play audio from queue, then disconnect without downloading an mp3 file.

    


    I tried using youtube-dl, but I switched to the yt-dlp library after getting errors I couldn't fix.
I am running on Windows 10 locally. All my libraries are up to date.

    


    Here are my ydl_opts and FFMPEG_OPTS :

    


    ydl_opts = {
    'format': 'bestaudio/best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
    }],
}

FFMPEG_OPTIONS = {
    'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
    'options': '-vn'
} 


    


    Here is where I believe the problem is.

    


    async def play():
    print("Play Called")
    musicPlay()
    # Get message object from initial request
    message = ytLinkQue.get()
    print(f"Message object recieved: {message}")
    voiceChannel = message.author.voice.channel
    vc = await voiceChannel.connect()
    songsPlayed = 0
    
    while not ytLinkQue.empty():
        # Get current song
        currentSong = ytLinkQue.get()[0]
        print(f"Current song: {currentSong}")

        # Get song from Youtube
        with yt_dlp.YoutubeDL(ydl_opts) as ydl:
            # song = ydl.download(currentSong)
            info = ydl.extract_info(currentSong, download=False)
            song = info['formats'][0]['url']

        # Play Song
        vc.play(discord.FFmpegPCMAudio(song, **FFMPEG_OPTIONS), after=lambda e: print('Song done'))

        # Wait until the song has finished playing
        while vc.is_playing():
            print("playing rn")
            await asyncio.sleep(1)
    
    await vc.disconnect()
    musicStop()


    


    When play() is called, here is the output in terminal with my annotations as **** text **** :

    


    >python main.py&#xA;2023-02-17 15:21:09 INFO     discord.client logging in using static token&#xA;2023-02-17 15:21:10 INFO     discord.gateway Shard ID None has connected to Gateway (Session ID: 60b9fce14faa5daa4aed9eb6db01a74d).&#xA;Max que: 50&#xA;Text Channel: 828698708123451434&#xA;Testing Bot#4591 is ready.&#xA;Passing message object&#xA;**** play() funciton is called ****&#xA;Play Called&#xA;Message object recieved: <message channel="<TextChannel" position="7" nsfw="False" news="False"> type= author=<member discriminator="&#x27;0199&#x27;" bot="False" nick="&#x27;Fragnk7?&#x27;" guild="<Guild" chunked="True">> flags=<messageflags value="0">>&#xA;2023-02-17 15:21:16 INFO     discord.voice_client Connecting to voice...&#xA;2023-02-17 15:21:16 INFO     discord.voice_client Starting voice handshake... (connection attempt 1)&#xA;2023-02-17 15:21:17 INFO     discord.voice_client Voice handshake complete. Endpoint found seattle2004.discord.media&#xA;Current song: https://www.youtube.com/watch?v=vcAp4nmTZCA&#xA;[youtube] Extracting URL: https://www.youtube.com/watch?v=vcAp4nmTZCA &#xA;[youtube] vcAp4nmTZCA: Downloading webpage &#xA;[youtube] vcAp4nmTZCA: Downloading android player API JSON &#xA;**** Does not play any audio ****&#xA;Playing rn&#xA;Song done&#xA;2023-02-17 15:21:18 INFO     discord.player ffmpeg process 20700 successfully terminated with return code of 1.&#xA;2023-02-17 15:21:19 INFO     discord.voice_client The voice handshake is being terminated for Channel ID 400178308467392513 (Guild ID 261601676941721602)&#xA;2023-02-17 15:21:19 INFO     discord.voice_client Disconnecting from voice normally, close code 1000.&#xA;</messageflags></member></message>

    &#xA;

    On Discord's end, the bot successfully connects then disconnects after 2 second.

    &#xA;

    Note : I've only included code I think is relevant. Please let me know if I should add anything else to the post, otherwise, here is the github for the project. Code is in main.py.&#xA;https://github.com/LukeLeimbach/wallMomentMusic

    &#xA;

    Thank you in advance !

    &#xA;

    I've applied the advice from these posts but it still will not play audio :

    &#xA;

    -https://stackoverflow.com/questions/45770016/how-do-i-make-my-discord-bot-play-audio-from-youtube

    &#xA;

    -https://stackoverflow.com/questions/66070749/how-to-fix-discord-music-bot-that-stops-playing-before-the-song-is-actually-over?newreg=c70dd786cf5844e490045494223c0381

    &#xA;

    -https://stackoverflow.com/questions/57688808/playing-music-with-a-bot-from-youtube-without-downloading-the-file

    &#xA;

  • concat two videos with same format

    24 mars 2023, par ttb

    I'm trying to concat two videos that have very similar formats :

    &#xA;

    Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv), 1920x1080 [SAR 1:1 DAR 16:9], 1141 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 224 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;

    &#xA;

    and

    &#xA;

      Stream #0:0(und): Video: hevc (hev1 / 0x31766568), yuv420p10le(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 24k tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-03-24T21:10:17.000000Z&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : Lavc60.6.101 libx265&#xA;    Side data:&#xA;      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A&#xA;  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 341 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-03-24T21:10:17.000000Z&#xA;      handler_name    : Surround&#xA;      vendor_id       : [0][0][0][0]&#xA;

    &#xA;

    But the video ends up freezing when played. Not sure what's wrong, I matched everything ?

    &#xA;

  • FFMPEG color key filter applied, output to a transparent HEVC mov file, speed is different

    2 mars 2023, par Patrick Vellia

    I have an original recording that has the following ffprobe output :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;test.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp41&#xA;    minor_version   : 538120216&#xA;    compatible_brands: mp41&#xA;    creation_time   : 2023-02-28T19:06:41.000000Z&#xA;    firmware        : H21.01.01.50.00&#xA;  Duration: 00:00:08.15, start: 0.000000, bitrate: 60160 kb/s&#xA;  Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 59891 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 119.88 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-02-28T19:06:41.000000Z&#xA;      handler_name    : GoPro H.265&#xA;      vendor_id       : [0][0][0][0]&#xA;      encoder         : GoPro H.265 encoder&#xA;      timecode        : 19:05:32:105&#xA;  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-02-28T19:06:41.000000Z&#xA;      handler_name    : GoPro AAC  &#xA;      vendor_id       : [0][0][0][0]&#xA;      timecode        : 19:05:32:105&#xA;  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-02-28T19:06:41.000000Z&#xA;      handler_name    : GoPro TCD  &#xA;      timecode        : 19:05:32:105&#xA;  Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 76 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2023-02-28T19:06:41.000000Z&#xA;      handler_name    : GoPro MET  &#xA;Unsupported codec with id 0 for input stream 2&#xA;Unsupported codec with id 100359 for input stream 3&#xA;

    &#xA;

    This video is chroma keyed, so I ran the following command the key out the green and export it to a HEVC mov container (the Apple HEVC supports alpha channel via the videotoolbox codec) :

    &#xA;

    ffmpeg -i test.mp4 -vf colorkey=0x00b140:0.3:0.1 -vcodec hevc_videotoolbox -alpha_quality 0.5 -tag:v hvc1 output1.mov&#xA;

    &#xA;

    which results in this ffprobe :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;output1.mov&#x27;:&#xA;  Metadata:&#xA;    major_brand     : qt  &#xA;    minor_version   : 512&#xA;    compatible_brands: qt  &#xA;    encoder         : Lavf58.76.100&#xA;  Duration: 00:00:08.15, start: 0.000000, bitrate: 366946 kb/s&#xA;  Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, gbr/bt709/bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 367188 kb/s, 119.88 fps, 119.88 tbr, 120k tbn, 120k tbc (default)&#xA;    Metadata:&#xA;      handler_name    : GoPro H.265&#xA;      vendor_id       : FFMP&#xA;      encoder         : Lavc58.134.100 hevc_videotoolbo&#xA;      timecode        : 19:05:32:105&#xA;  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 118 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : GoPro AAC  &#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s&#xA;    Metadata:&#xA;      handler_name    : GoPro H.265&#xA;      timecode        : 19:05:32:105&#xA;Unsupported codec with id 0 for input stream 2&#xA;

    &#xA;

    When the play the original video inside a web browser, it will play normally. As in, the video doesn't play in slo-mo but at "normal speed" which is what I actually want. User can slow it down and still have the frames necessary to keep the clarity when desired.

    &#xA;

    However, when I play the second video, it is unnaturally slow even at 2x the speed.

    &#xA;

    The only difference I can see above is that the export didn't include the second data stream (input 3).

    &#xA;

    This was recorded on a GoPro Hero 10. I am using FFMPEG 4.6.

    &#xA;

    Any help would be appreciated to fine tune the command.

    &#xA;