Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (56)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (7918)

  • Anomalie #3843 : Augmenter la taille du cache par défaut (image)

    23 août 2017, par Julien -

    Les jobs de l’invalideur tournent en effet...
    Est-on sûr qu’il n’y ait plus de scripts limitant la taille du cache qui soient appelés ?
    Faut-il ouvrir un autre ticket pour faire un peu de ménage sur ce thème (job, ui et doc) ?

    Références :

  • Anomalie #3984 (Nouveau) : Atténuer l’impact des styles de spip.css

    14 août 2017, par tetue tetue

    La dernière version de spip.css (vue sur demo.spip.net ) comporte des styles gênants à plusieurs égard :

    • des styles très marqués graphiquement, notamment sur les éléments de code (fond noir, bordure, arrondi…), qui relèvent d’une personnalisation et devraient être distribués dans un thème ou dans un exemple de fichier de personnalisation
    • des incohérences :
    • les citations perdent leurs guillemets lorsqu’elles ne portent pas .spip : il faudrait styler blockquote et non pas seulement blockquote.spip
    • les blocs de code ont des couleurs, formes et taille de texte différents sans raison
    • relativement à la base Tiny Typo, les alignements verticaux ne sont pas réguliers (c’est nettement moins gênant que les points précédent, mais on perd le bénéfice de Tiny Typo).

    Voici donc le fichier spip.css que je conseille avec Tiny Typo :
    https://zone.spip.org/trac/spip-zone/browser/_plugins_/tinytypo/branches/v1/css/spip.css

  • C# FFMPEG : Code bugs out and stops producing media files

    24 mai 2020, par Hamez

    I've made a joke program in C# that uses ffmpeg to edit videos with different effects such as stuttering. I've finished 3 effects so far and each of them work on their own but as soon as I put one after another e.g.  fx.CrashStutter(0, 2); fx.CrashBeep(2, 2); fx.Wow(4, 2);
The code breaks and no longer produces photo/video files but once I stop debugging the file it was supposed to be processing appears. I've used a system where it loops over trying to execute a command to create a text file as a marker for when ffmpeg is done processing a file. The debug console also repeatedly says "The process tried to write to a nonexistent pipe."

    



    Here's the code for all 3 effects :

    



     public void Wow(double start, double duration)
        {
            if (fxstart == true)
            {
                //MessageBox.Show("WowFX Duration" + duration);
                string folderName = ("W_s" + start);
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("mkdir " + folderName);
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("cd " + folderName);
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("ffmpeg -ss " + start + " -t " + (duration / 6) + " -i " + source + " a.mp4");
                //wait until a.mp4 appears
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\a.txt") == false)
                {
                    /*aha got a live one!*/FXcmd.StandardInput.WriteLine(" echo a > a.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("ffmpeg -i a.mp4 -vf reverse -af areverse b.mp4");
                //wait until b.mp4 appears
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\b.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo b > b.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("ffmpeg -ss " + start + " -t " + (duration / 3) + " -i " + source + " c.mp4");
                //wait until c.mp4 appears
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\c.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo c > c.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("ffmpeg -i c.mp4 -vf reverse -af areverse d.mp4");
                //wait until d.mp4 appears
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\d.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo d > d.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                string[] concatList = { "file 'a.mp4'", "file 'b.mp4'", "file 'c.mp4'", "file 'd.mp4'" };
                //FXcmd.StandardInput.Write("del a.txt, b.txt, c.txt, d.txt");
                //System.Threading.Thread.Sleep(1000);
                System.IO.File.WriteAllLines(("FxSource(Temporary)\\" + folderName + "\\concatList.txt"), concatList);
                System.Threading.Thread.Sleep(1500);
                FXcmd.StandardInput.WriteLine("ffmpeg -f concat -i concatList.txt -c copy " + folderName + ".mp4");
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\" + "1.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo 1 > 1.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("copy " + folderName + ".mp4 ..");
                while (File.Exists("FxSource(Temporary)\\" + folderName + ".mp4") == false)
                {
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("cd ..");
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("cls");
                FXcmd.StandardInput.Flush();
            }
        }
        public void CrashStutter(int start, int duration)
        {
            if (fxstart == true)
            {
                string folderName = ("Cs_s" + start);
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("mkdir " + folderName);
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("cd " + folderName);
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("ffmpeg -ss " + start + " -t 0.1" + " -i " + source + " a.mp4");
                System.Threading.Thread.Sleep(100);
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\a.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo a > a.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("ffmpeg -stream_loop "+10*duration+" -i a.mp4 "+folderName+".mp4");
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\" + "1.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo 1 > 1.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("copy " + folderName + ".mp4 ..");
                while (File.Exists("FxSource(Temporary)\\" + folderName + ".mp4") == false)
                {
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("cd ..");
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("cls");
                FXcmd.StandardInput.Flush();
            }
        }
        public void CrashBeep(int start, int duration)
        {
            //this effect cannot last longer than 7 seconds
            double contrast = 25;
            double red = 0.75;
            if (fxstart == true)
            {
                string folderName = ("Cb_s" + start);
                FXcmd.StandardInput.WriteLine("mkdir " + folderName);
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("cd " + folderName);
                System.Threading.Thread.Sleep(100);
                /*gets stuck*/FXcmd.StandardInput.WriteLine("ffmpeg -i "+source+ " -vf fps=1 a.jpg");
                System.Threading.Thread.Sleep(100);
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\a.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo a > a.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("ffmpeg -i a.jpg -vf eq=contrast="+contrast+" b.jpg");
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\b.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo b > b.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("ffmpeg -i b.jpg -vf colorbalance=rm=" + red + " c.jpg");
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\c.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo > c.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("ffmpeg -loop 1 -i c.jpg -c:v libx264 -t "+ duration +" -pix_fmt yuv420p -vf scale=1920:1080 d.mp4");
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\d.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo d > d.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("cd ..");
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("copy beep.mp3 "+folderName+"/beep.mp3");
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("cd "+folderName);
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("ffmpeg -i beep.mp3 -ss 0 -t " + duration + " e.mp3");
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\e.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo e > e.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("ffmpeg -i d.mp4 -i e.mp3 -c copy -map 0:v:0 -map 1:a:0 " + folderName + ".mp4");
                while (File.Exists("FxSource(Temporary)\\" + folderName + "\\" + "1.txt") == false)
                {
                    FXcmd.StandardInput.WriteLine(" echo 1 > 1.txt");
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("copy " + folderName + ".mp4 ..");
                while (File.Exists("FxSource(Temporary)\\" + folderName + ".mp4") == false)
                {
                    System.Threading.Thread.Sleep(1500);
                }
                FXcmd.StandardInput.WriteLine("cd ..");
                System.Threading.Thread.Sleep(100);
                FXcmd.StandardInput.WriteLine("cls");
                FXcmd.StandardInput.Flush();
            }
        }


    



    Any suggestions ? Thanks !