Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (80)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • 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 (...)

Sur d’autres sites (9293)

  • Discord bot leaving voice channel immediately after joining

    17 janvier 2018, par Forb

    I am building a bot for my discord server to play the audio YouTube videos as I haven’t found a reliable bot online.

    The bot connects to my voice channel after I type the !play url command but immediately leaves even if the URL is valid.

    My code is below :

    [Command("play", RunMode = RunMode.Async)]
    public async Task play(string url) {
       IVoiceChannel channel = (Context.User as IVoiceState).VoiceChannel;
       IAudioClient client = await channel.ConnectAsync();

       var output = CreateStream(url).StandardOutput.BaseStream;
       var stream = client.CreatePCMStream(AudioApplication.Music, 128 * 1024);
       output.CopyToAsync(stream);
       stream.FlushAsync().ConfigureAwait(false);
    }

    private Process CreateStream(string url) {
       Process currentsong = new Process();

       currentsong.StartInfo = new ProcessStartInfo {
           FileName = "cmd.exe",
           Arguments = $"/C youtube-dl -o - {url} | ffmpeg -i pipe:0 -ac 2 -f s16le -ar 48000 pipe:1",
           UseShellExecute = false,
           RedirectStandardOutput = true,
           CreateNoWindow = true
       };

       currentsong.Start();
       return currentsong;
    }

    I have tried using just ffmpeg with a file on my PC which was hard coded in, but I had the same result and the bot left the voice channel as soon as it connected.

    I did verify that both ffmpeg and youtube-dl were working by running the commands in a cmd window and they both ran fine.

  • FFmpeg only reading one channel

    29 août 2017, par AbstractDissonance

    Trying to read a stereo wav file and ffmpeg is only reading one channel. ffprobe returns 2 channels.

    I have used -ac 2 and then added -channel_layout stereo but all return 1 channel(or basically filling half the buffer I created).

    Basically the output size of ffmpeg is about half the wav file size.

    What I would like is for it to return every channel in

    Channel1_sample1, channel2_sample1, ..., ChannelN_sample1, channel1_sample2, etc...

    But, in reality, I’d rather just have it work with stereo ;) I’m giving it plenty large enough buffer to read to, so that isn’t the problem either.

    Here is the output

    ffprobe.exe -hide_banner -v quiet -print_format flat -show_streams -i temp.wav
    streams.stream.0.index=0
    streams.stream.0.codec_name="pcm_s16le"
    streams.stream.0.codec_long_name="PCM signed 16-bit little-endian"
    streams.stream.0.profile="unknown"
    streams.stream.0.codec_type="audio"
    streams.stream.0.codec_time_base="1/44100"
    streams.stream.0.codec_tag_string="[1][0][0][0]"
    streams.stream.0.codec_tag="0x0001"
    streams.stream.0.sample_fmt="s16"
    streams.stream.0.sample_rate="44100"
    streams.stream.0.channels=2
    streams.stream.0.channel_layout="unknown"
    streams.stream.0.bits_per_sample=16
    streams.stream.0.id="N/A"
    streams.stream.0.r_frame_rate="0/0"
    streams.stream.0.avg_frame_rate="0/0"
    streams.stream.0.time_base="1/44100"
    streams.stream.0.start_pts="N/A"
    streams.stream.0.start_time="N/A"
    streams.stream.0.duration_ts=14200200
    streams.stream.0.duration="322.000000"
    streams.stream.0.bit_rate="1411200"
    streams.stream.0.max_bit_rate="N/A"
    streams.stream.0.bits_per_raw_sample="N/A"
    streams.stream.0.nb_frames="N/A"
    streams.stream.0.nb_read_frames="N/A"
    streams.stream.0.nb_read_packets="N/A"
    streams.stream.0.disposition.default=0
    streams.stream.0.disposition.dub=0
    streams.stream.0.disposition.original=0
    streams.stream.0.disposition.comment=0
    streams.stream.0.disposition.lyrics=0
    streams.stream.0.disposition.karaoke=0
    streams.stream.0.disposition.forced=0
    streams.stream.0.disposition.hearing_impaired=0
    streams.stream.0.disposition.visual_impaired=0
    streams.stream.0.disposition.clean_effects=0
    streams.stream.0.disposition.attached_pic=0
    streams.stream.0.disposition.timed_thumbnails=0
    ffmpeg.exe -i temp.wav -loglevel quiet -f s16le -ac 2 -channel_layout stereo -

    temp.wav is just a standard stereo wav file.

  • Discord bot leaving voice channel immediatly after joining

    24 juillet 2017, par Forb

    I am building a bot for my discord server to play the audio YouTube videos as I haven’t found a reliable bot online.

    The bot connects to my voice channel after I type the !play url command but immediately leaves even if the URL is valid.

    My code is below :

    [Command("play", RunMode = RunMode.Async)]
    public async Task play(string url) {
       IVoiceChannel channel = (Context.User as IVoiceState).VoiceChannel;
       IAudioClient client = await channel.ConnectAsync();

       var output = CreateStream(url).StandardOutput.BaseStream;
       var stream = client.CreatePCMStream(AudioApplication.Music, 128 * 1024);
       output.CopyToAsync(stream);
       stream.FlushAsync().ConfigureAwait(false);
    }

    private Process CreateStream(string url) {
       Process currentsong = new Process();

       currentsong.StartInfo = new ProcessStartInfo {
           FileName = "cmd.exe",
           Arguments = $"/C youtube-dl -o - {url} | ffmpeg -i pipe:0 -ac 2 -f s16le -ar 48000 pipe:1",
           UseShellExecute = false,
           RedirectStandardOutput = true,
           CreateNoWindow = true
       };

       currentsong.Start();
       return currentsong;
    }

    I have tried using just ffmpeg with a file on my PC which was hard coded in, but I had the same result and the bot left the voice channel as soon as it connected.

    I did verify that both ffmpeg and youtube-dl were working by running the commands in a cmd window and they both ran fine.