Recherche avancée

Médias (0)

Mot : - Tags -/serveur

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

Autres articles (69)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

Sur d’autres sites (1860)

  • Discord bot returning odd error message and not playing sound

    26 février 2020, par Ravenr_

    I am attempting to create a function of my discord bot that will join your voice channel then play something from youtube as specified in the command

    i.e. $play <youtube link="link"></youtube>

    The problem is that my bot joins the voice channel but doesn’t play any sound and outputs an error to the console that I dont know how to fix

    My Code :

    const ytdl = require("ytdl-core");
    module.exports = {
       name: 'play',
       description: 'initiates music methods of the bot',
       execute(msg, args){
           var servers = {};

           function play(connection, msg){
               var server = servers[msg.guild.id];

               server.dispatcher = connection.playStream(ytdl(server.queue[0], {filter: "audioonly"}));
               server.queue.shift();

               server.dispatcher.on("end", function(){
                   if(server.queue[0]){
                       play(connection, msg);
                   }else{
                       connection.disconnect();
                   }
               });


           }
           if(!args[1]){
               return msg.channel.send("you need to provide a link");
           }
           if(!msg.member.voiceChannel){
               return msg.channel.send("You must be in a voice channel to use this feature");
           }
           if(!servers[msg.guild.id]) servers[msg.guild.id] = {
               queue: []
           }
           var server = servers[msg.guild.id];
           server.queue.push(args[1]);
           if(!msg.guild.voiceConnection) msg.member.voiceChannel.join().then(function(connection){
               play(connection, msg);
           })
       }
    }

    The Error :

    2020-02-26T16:31:59.458215+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of Object
    2020-02-26T16:31:59.458223+00:00 app[worker.1]:     at validateString (internal/validators.js:117:11)
    2020-02-26T16:31:59.458224+00:00 app[worker.1]:     at normalizeSpawnArguments (child_process.js:406:3)
    2020-02-26T16:31:59.458224+00:00 app[worker.1]:     at Object.spawn (child_process.js:542:16)
    2020-02-26T16:31:59.458225+00:00 app[worker.1]:     at new FfmpegProcess (/app/node_modules/prism-media/src/transcoders/ffmpeg/FfmpegProcess.js:14:33)
    2020-02-26T16:31:59.458225+00:00 app[worker.1]:     at FfmpegTranscoder.transcode (/app/node_modules/prism-media/src/transcoders/ffmpeg/Ffmpeg.js:34:18)
    2020-02-26T16:31:59.458226+00:00 app[worker.1]:     at MediaTranscoder.transcode (/app/node_modules/prism-media/src/transcoders/MediaTranscoder.js:27:31)
    2020-02-26T16:31:59.458226+00:00 app[worker.1]:     at Prism.transcode (/app/node_modules/prism-media/src/Prism.js:13:28)
    2020-02-26T16:31:59.458227+00:00 app[worker.1]:     at AudioPlayer.playUnknownStream (/app/node_modules/discord.js/src/client/voice/player/AudioPlayer.js:97:35)
    2020-02-26T16:31:59.458231+00:00 app[worker.1]:     at VoiceConnection.playStream (/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:478:24)
    2020-02-26T16:31:59.458232+00:00 app[worker.1]:     at play (/app/commands/play.js:11:44)

    for reference these are the links I tested it with 1 & 2

    I’m not sure how to make queue[0] a string, which is what I assume the problem is.

    I was thinking of using a toString() i.e. server.queue[0].toString() but I think that will just return the memory address.

    If anyone can help me know what the issue is or how to fix it, that would be great.

  • Removing one audio track from a movie results in audio desync when copying, but not when reencoding --- why ?

    18 avril 2020, par chsk

    I'm trying to remove a superfluous audio track from a movie file. Specifically, this movie on archive.org has the original audio as track 2, and what appears to be a slavic (Russian ?) voiceover in track 1. I'd like to get rid of the latter.

    &#xA;&#xA;

    I found this question that suggested I should do the following :

    &#xA;&#xA;

    ffmpeg -i Benjam&#xED;n\ d&#xFA;fa.avi -map 0 -map -0:a:0 -c copy Benjam&#xED;n\ d&#xFA;fa\ \(a&#xF0;eins\ &#xED;slenskt\ tal\).avi

    &#xA;&#xA;

    But this doesn't work : after removing the first audio track, audio and video are not in sync in the resulting file anymore (when played in VLC). Now, I was able to overcome this problem by also reencoding the remaining audio track along the way, using

    &#xA;&#xA;

    ffmpeg -i Benjam&#xED;n\ d&#xFA;fa.avi -map 0 -map -0:a:0 -c:v copy Benjam&#xED;n\ d&#xFA;fa\ \(a&#xF0;eins\ &#xED;slenskt\ tal\).avi

    &#xA;&#xA;

    But while this works, I'd like to understand why copying the audio track instead does not. I suppose it's a somewhat philosophical question --- consider it a matter of intellectual curiosity, combined with an aversion to needless lossy re-encoding.

    &#xA;&#xA;

    So if anyone can explain this to me, I'd very grateful. Thanks !

    &#xA;&#xA;

    EDIT : as per Gyan's request, here's ffmpeg's output for the first command :

    &#xA;&#xA;

    ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 9.1.1 (GCC) 20190807&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Input #0, avi, from &#x27;Benjam├&#xA1;n d├║fa.avi&#x27;:&#xA;  Metadata:&#xA;    encoder         : VirtualDubModRus 1.5.10.2 (build 2542/release)&#xA;    IAS1            : Islenska&#xA;  Duration: 01:27:37.00, start: 0.000000, bitrate: 1313 kb/s&#xA;    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 kb/s&#xA;    Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s&#xA;Output #0, avi, to &#x27;b.avi&#x27;:&#xA;  Metadata:&#xA;    IAS1            : Islenska&#xA;    ISFT            : Lavf58.29.100&#xA;    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], q=2-31, 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;  Stream #0:2 -> #0:1 (copy)&#xA;Press [q] to stop, [?] for help&#xA;[avi @ 0000000002bf00c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly&#xA;frame=131425 fps=7616 q=-1.0 Lsize=  718952kB time=01:27:37.00 bitrate=1120.3kbits/s speed= 305x&#xA;video:628523kB audio:82141kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.166227%&#xA;

    &#xA;&#xA;

    And also for the second, for comparison :

    &#xA;&#xA;

    ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers&#xA;  built with gcc 9.1.1 (GCC) 20190807&#xA;  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt&#xA;  libavutil      56. 31.100 / 56. 31.100&#xA;  libavcodec     58. 54.100 / 58. 54.100&#xA;  libavformat    58. 29.100 / 58. 29.100&#xA;  libavdevice    58.  8.100 / 58.  8.100&#xA;  libavfilter     7. 57.100 /  7. 57.100&#xA;  libswscale      5.  5.100 /  5.  5.100&#xA;  libswresample   3.  5.100 /  3.  5.100&#xA;  libpostproc    55.  5.100 / 55.  5.100&#xA;Input #0, avi, from &#x27;Benjam├&#xA1;n d├║fa.avi&#x27;:&#xA;  Metadata:&#xA;    encoder         : VirtualDubModRus 1.5.10.2 (build 2542/release)&#xA;    IAS1            : Islenska&#xA;  Duration: 01:27:37.00, start: 0.000000, bitrate: 1313 kb/s&#xA;    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 kb/s&#xA;    Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;  Stream #0:2 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))&#xA;Press [q] to stop, [?] for help&#xA;Output #0, avi, to &#x27;b2.avi&#x27;:&#xA;  Metadata:&#xA;    IAS1            : Islenska&#xA;    ISFT            : Lavf58.29.100&#xA;    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], q=2-31, 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;    Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp&#xA;    Metadata:&#xA;      encoder         : Lavc58.54.100 libmp3lame&#xA;[avi @ 00000000004b7440] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly&#xA;frame=131425 fps=1090 q=-1.0 Lsize=  718952kB time=01:27:37.00 bitrate=1120.3kbits/s speed=43.6x&#xA;video:628523kB audio:82141kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.166233%&#xA;

    &#xA;

  • Exoplayer FFMPEG issue. Video froze on the first frame after adding Exoplayer FFMPEG extension

    13 mai 2020, par Aravind

    I am working on adding Exoplayer and it works fine. But some of the videos were playing without audio, it plays fine in VLC medial player. So I was suggested to add Exoplayer FFMPEG. I added Exoplayer FFMPEG extension and I modified the code as below,

    &#xA;&#xA;

    val videoTrackSelectionFactory: TrackSelection.Factory = AdaptiveTrackSelection.Factory(BANDWIDTH_METER)&#xA;val trackSelector: TrackSelector = DefaultTrackSelector(videoTrackSelectionFactory)&#xA;&#xA;val renderersFactory: RenderersFactory = DefaultRenderersFactory(mContext, null, EXTENSION_RENDERER_MODE_PREFER)&#xA;mPlayer = ExoPlayerFactory.newSimpleInstance(mContext, renderersFactory, trackSelector)&#xA;mediaSource = mMediaSourceUri?.let { createLeafMediaSource(it) }!!&#xA;mPlayer.prepare(mediaSource)&#xA;

    &#xA;&#xA;

    After I modified the video stuck with the first frame and it keeps on loading. I checked the log and I didn't see any error.

    &#xA;&#xA;

    Code Sample

    &#xA;&#xA;

    Can anyone help me with this ? Thanks in advance !

    &#xA;