Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (80)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (8556)

  • why ffmpeg process successfully terminated with return code of 1 without play anything

    24 juillet 2023, par Exc

    `I tried replacing youtube_dl with yt_dlp and replaced some of the code, the code worked fine but when using the command, the bot doesn't play music but immediately ffmpeg process 15076 successfully terminated with return code of 1

    


    Is there a problem with my code or the ffmpg option or ytdlp option that doesn't support the yt_dlp library ?`

    


     self.YTDL_OPTIONS = {
        'format': 'bestaudio/best',
        'outtmpl': 'F:/DISCORD BOT/Ex/music/%(extractor)s-%(id)s-%(title)s.%(ext)s',
        'restrictfilenames': True,
        'retry_max': 'auto',
        'noplaylist': True,
        'nocheckcertificate': True,
        'ignoreerrors': True,
        'logtostderr': False,
        'quiet': True,
        'no_warnings': True,
        'default_search': 'auto',
        'source_address': '0.0.0.0',
        'postprocessors': [{
            'key': 'FFmpegExtractAudio',
            'preferredcodec': 'mp3',
            'preferredquality': '192',
        }],
        'youtube_api_key': 'api'
    }
self.FFMPEG_OPTIONS = {
         'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5',
         'options': '-vn',
         'executable':r'F:\DISCORD BOT\Ex\ffmpeg\bin\ffmpeg.exe'
         }

    
    @commands.hybrid_command(
        name="play",
        aliases=["p"],
        usage="",
        description="KARAUKENAN.",
         
    )
    @app_commands.describe(
        judul_lagu="link ato judul lagunya"
    )
    async def play(self, ctx, judul_lagu:str):
        await ctx.defer()
        voice_channel = ctx.author.voice
        if not voice_channel or not voice_channel.channel:
            await ctx.send("Join voice channel dulu gblk!")
            return

        voice_channel = voice_channel.channel
        song = self.search_song(judul_lagu)
        if not song:
            await ctx.send("Lagnya tdk ditemukan, coba keword lain.")
            return

        if not self.bot.voice_clients:
            voice_client = await voice_channel.connect()
        else:
            voice_client = self.bot.voice_clients[0]
            if voice_client.channel != voice_channel:
                await voice_client.move_to(voice_channel)

        self.music_queue.append([song, voice_client])
        if not self.is_playing:
            await self.play_music(ctx)
    
    async def play_music(self, ctx):
        self.is_playing = True
        while len(self.music_queue) > 0:
            song = self.music_queue[0][0]
            voice_client = self.music_queue[0][1]
            await ctx.send(f"Playing {song['title']}")

            voice_client.play(discord.FFmpegPCMAudio(song['source'], **self.FFMPEG_OPTIONS), after=lambda e: self.play_next())
            voice_client.is_playing()

            while voice_client.is_playing():
                await asyncio.sleep(1)

            self.music_queue.pop(0)
            self.is_playing = False

        await ctx.send("Queue is empty.")
        voice_client.stop()

    def play_next(self):
        if len(self.music_queue) > 0:
            self.is_playing = False

    def search_song(self, judul_lagu):
        ydl = yt_dlp.YoutubeDL(self.YTDL_OPTIONS)
        with ydl:
            try:
                info = ydl.extract_info(f"ytsearch:{judul_lagu}", download=False)['entries'][0]
                return {'source': info['formats'][0]['url'], 'title': info['title']}
            except Exception:
                return None




    


    when i use /play the bot sucess serch song but immediately terminate does not play any music

    


    2023-04-10 13:06:45 INFO     discord.voice_client Connecting to voice...
2023-04-10 13:06:45 INFO     discord.voice_client Starting voice handshake... (connection attempt 1)
2023-04-10 13:06:46 INFO     discord.voice_client Voice handshake complete. Endpoint found singapore11075.discord.media
2023-04-10 13:06:50 INFO     discord.player ffmpeg process 15076 successfully terminated with return code of 1.


    


    this image whe i use /play

    


  • config : allowMultiple, let 2+ sounds play simultaneously (default : false, only one sound at a time)

    31 décembre 2010, par Scott Schiller

    m demo/360-player/demo-slider-controls.js m demo/360-player/index.html m demo/360-player/script/360player.js config : allowMultiple, let 2+ sounds play simultaneously (default : false, only one sound at a time)

  • Play video files in a row without delay

    13 février 2015, par Ara Deonas

    I am looking for a way to play 2 video in a row without any delay (or
    very tiny delay) when changing files.
    I had 1 mp4 file and with ffmpeg I split it into 2 file and now I want
    to add them in playlist and play them but I don’t want user feel
    changing video but when I test it because of loading file there is a
    delay.
    I think about stream second file into memory before first file end.
    How can I do this ?
    I tested LibVLC and read Play a Video from MemoryStream, Using FFMpeg but still no luck.
    PS : Any library in any language is good for me.

    EDIT : I added a demo that play second file after first one but there is a delay beetwen changing.How can I minimize this ?(for example feeding VLC from memory and load second file into memory).
    EDIT : Files are small (less than 5mb).

    unit Unit1;

    {$mode objfpc}{$H+}

    interface

    uses
     Classes, SysUtils, FileUtil, PasLibVlcPlayerUnit, Forms, Controls, Graphics,LCLIntf,LCLType,
     Dialogs, ExtCtrls, StdCtrls, PasLibVlcPlayer, PasLibVlcUnit, PasLibVlcClassUnit;

    type

     { TForm1 }

     TForm1 = class(TForm)
       Button2: TButton;
       Panel2: TPanel;
       procedure Button1Click(Sender: TObject);
       procedure Button2Click(Sender: TObject);
       procedure FormCreate(Sender: TObject);
     private
       function GetVlcInstance(): TPasLibVlc;
       procedure WmMediaPlayerEndReached(var m: TVlcMessage); message WM_MEDIA_PLAYER_END_REACHED;
     public
       FVLC: TPasLibVlc;
       media_t_ptr:libvlc_media_t_ptr;
       media_t_ptr2:libvlc_media_t_ptr;
       FVideoOutput: TVideoOutput;
       FAudioOutput: TAudioOutput;
       p_mi: libvlc_media_player_t_ptr;
       p_instance: libvlc_instance_t_ptr;
       p_mi_ev_mgr: libvlc_event_manager_t_ptr;
       property VLC: TPasLibVlc read GetVlcInstance;

     end;

    var
     Form1: TForm1;

    procedure lib_vlc_player_event_hdlr(p_event: libvlc_event_t_ptr; Data: Pointer); cdecl;

    implementation

    procedure lib_vlc_player_event_hdlr(p_event: libvlc_event_t_ptr; Data: Pointer); cdecl;
    var
     Form: TForm1;
    begin
     if (Data = nil) then
       exit;
     Form := TForm1(Data);
     if not Assigned(Form) then
       exit;
     case p_event^.event_type of
       libvlc_MediaPlayerEndReached:
         PostMessage(Form.Handle, WM_MEDIA_PLAYER_END_REACHED, WPARAM(0), LPARAM(0));
     end;
    end;

    {$R *.lfm}

    { TForm1 }

    procedure TForm1.Button1Click(Sender: TObject);
    begin

    end;

    procedure TForm1.Button2Click(Sender: TObject);
    var
     mrl: string;
    begin
     mrl := 'C:\ffmpeg\bin\tmp\OUTPUT0.mp4';

    media_t_ptr:=libvlc_media_new_path(VLC.Handle, PAnsiChar(UTF8Encode(mrl)));
     p_instance := VLC.Handle;
     p_mi := libvlc_media_player_new(p_instance);
     p_mi_ev_mgr := libvlc_media_player_event_manager(p_mi);
     libvlc_event_attach(p_mi_ev_mgr, libvlc_MediaPlayerEndReached, @lib_vlc_player_event_hdlr, SELF);
     libvlc_media_player_set_media(p_mi, media_t_ptr);
     libvlc_media_release(media_t_ptr);
     libvlc_media_player_set_display_window(p_mi, Panel2.Handle);
     libvlc_media_player_play(p_mi);

      mrl := 'C:\ffmpeg\bin\tmp\OUTPUT1.mp4';

     media_t_ptr2:=libvlc_media_new_path(VLC.Handle, PAnsiChar(UTF8Encode(mrl)));
    end;

    procedure TForm1.FormCreate(Sender: TObject);
    begin
     Button2.Click;
    end;

    function TForm1.GetVlcInstance: TPasLibVlc;
    begin
     if not Assigned(FVLC) then
     begin
       FVLC := TPasLibVlc.Create;
     end;
     Result := FVLC;
    end;

    procedure TForm1.WmMediaPlayerEndReached(var m: TVlcMessage);
    begin
     libvlc_media_player_set_media(p_mi, media_t_ptr2);
     libvlc_media_player_play(p_mi);
    end;

    end.