Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (21)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

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

Sur d’autres sites (4617)

  • Discord Music Bot No Playback Issue

    6 août 2021, par Kusunoki

    I'm trying to configure a discord music bot and my code is working (Other people have tried my code and it works perfectly on their side) but the problem is whenever the bot joins the voice channel, it doesn't play any music then it will queue the video but not play it then the bot will leave the channel.

    


    The code also works on repl.it and I've tried it several times and it seems to be working fine. I'm running Windows 10 LTSC on my PC.

    


    I've tried reinstalling the packages, trying the node.js v14 and 15, reinstalling ffmpeg and nothing seems to be working.

    


    Code :

    


    module.exports = {
    name: 'play',
    category: 'music',
    description: 'Play music from discord!',
    async execute(message, args, ytdl, ytSearch) {
        const voiceChannel = message.member.voice.channel;

        if (!voiceChannel) return message.channel.send("Connect to a music channel.");
        const userPermissions = voiceChannel.permissionsFor(message.client.user);
        if (!userPermissions.has('CONNECT')) return message.channel.send("You\'re not allowed to play music.");
        if (!userPermissions.has('SPEAK')) return message.channel.send("You\'re not allowed to play music.");

        const connection = await voiceChannel.join();
        const videoFinder = async (query) => {
            const videoResult = await ytSearch(query);
            return (videoResult.videos.length > 1) ? videoResult.videos[1] : null;
        }
        const video = await videoFinder(args.join(' '));
        if (video){
            const stream = ytdl(video.url, {filter: 'audioonly'});
            connection.play(stream, {seek: 0, volume: 1})
            .on('finish', () =>{
                voiceChannel.leave();
                console.error
            });

            await message.channel.send(`Now Playing: **${video.title}**.`);
        } else {
            message.channel.send('No results found.');
        }
    }
}


    


  • Android FFMpeg guardian project IOException : Permission Denied

    30 décembre 2016, par sector11

    I have cloned compiled ffmpeg binary from here https://github.com/guardianproject/android-ffmpeg and using in android project reference from here https://github.com/guardianproject/android-ffmpeg-java

    But i am not able to get -version command output as it is saying Caused by: java.io.IOException: Permission denied

    Error Logs as follow :

    Permission changed now
    12-30 02:30:20.083 3765-3765/in.ashish29agre.ffmpeg I/System.out: Permission changed now
    12-30 02:30:20.083 3765-3765/in.ashish29agre.ffmpeg I/System.out: Binary path: /data/data/in.ashish29agre.ffmpeg/app_bin/ffmpeg
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg I/TestActivity: Progress: -version
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err: java.io.IOException: Error running exec(). Command: [-version] Working Directory: /data/data/in.ashish29agre.ffmpeg/app_bin Environment: [ANDROID_ROOT=/system, LOOP_MOUNTPOINT=/mnt/obb, ANDROID_BOOTLOGO=1, LD_LIBRARY_PATH=/vendor/lib:/system/lib, EXTERNAL_STORAGE=/storage/sdcard, ANDROID_SOCKET_zygote=9, ANDROID_DATA=/data, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar, ANDROID_PROPERTY_WORKSPACE=8,0, ANDROID_STORAGE=/storage]
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at java.lang.ProcessManager.exec(ProcessManager.java:211)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at java.lang.ProcessBuilder.start(ProcessBuilder.java:195)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at org.ffmpeg.android.FfmpegController.execProcess(FfmpegController.java:137)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at org.ffmpeg.android.FfmpegController.execFFMPEG(FfmpegController.java:101)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at org.ffmpeg.android.FfmpegController.execFFMPEG(FfmpegController.java:111)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at in.ashish29agre.ffmpeg.TestActivity.onResume(TestActivity.java:37)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1192)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.app.Activity.performResume(Activity.java:5310)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2778)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2817)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.app.ActivityThread.access$800(ActivityThread.java:135)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.os.Looper.loop(Looper.java:136)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5017)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at java.lang.reflect.Method.invokeNative(Native Method)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at java.lang.reflect.Method.invoke(Method.java:515)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at dalvik.system.NativeStart.main(Native Method)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err: Caused by: java.io.IOException: Permission denied
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at java.lang.ProcessManager.exec(Native Method)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:     at java.lang.ProcessManager.exec(ProcessManager.java:209)
    12-30 02:30:20.093 3765-3765/in.ashish29agre.ffmpeg W/System.err:   ... 20 more

    My Activity code is as follows :

    @Override
       protected void onResume() {
           super.onResume();
           File fileTmp = getCacheDir();
           File fileAppRoot = new File(getApplicationInfo().dataDir);
           List<string> commands = new ArrayList&lt;>();
           commands.add("-version");
           try {
               FfmpegController ffmpegController = new FfmpegController(this, fileAppRoot);
               ffmpegController.installBinaries(this, true);
               System.out.println("Binary path: " + ffmpegController.getBinaryPath());

               ffmpegController.execFFMPEG(commands, new ShellUtils.ShellCallback() {
                   @Override
                   public void shellOut(String shellLine) {
                       logger.info("Progress: " + shellLine);

                   }

                   @Override
                   public void processComplete(int exitValue) {
                       logger.info("Process complete");
                   }
               });
           } catch (IOException e) {
               e.printStackTrace();
           } catch (InterruptedException e) {
               e.printStackTrace();
           }
       }
    </string>

    Just to make sure that i added permission of reading and writing external storage in manifest here is AndroidManifest.xml

    &lt;?xml version="1.0" encoding="utf-8"?>
    <manifest package="in.test.ffmpeg">

       
       

       <application>
           <activity>
               
                   <action></action>

                   <category></category>
               
           </activity>
       </application>

    </manifest>
  • avcodec/pthread_slice : Don't use static variable, fix race

    28 novembre 2020, par Andreas Rheinhardt
    avcodec/pthread_slice : Don't use static variable, fix race
    

    ff_slice_thread_init() uses a static variable to hold a function
    pointer, although the value of said pointer needn't be saved between
    different runs of this function at all.

    The reason for this being so is probably that said pointer points to
    a static function (if used) ; but storage class specifiers like "static"
    are not part of the type of an object and so including it in the pointer
    declaration is wrong (anyway, "static" means different things in both
    contexts : for the function declaration it affects linkage, for the
    variable storage duration).

    Using a static variable here can lead to races, e.g. when initializing
    VP9 (for which said function pointer was added) and H.264 with slice
    threading. The latter has the FF_CODEC_CAP_INIT_THREADSAFE flag set and
    is therefore unaffected by the lock guarding initializations of
    decoders.

    Reviewed-by : Anton Khirnov <anton@khirnov.net>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/pthread_slice.c