Recherche avancée

Médias (91)

Autres articles (80)

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

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

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

  • path issues with FFMPEG Bash script to concat and encode across multiple subfolders

    27 décembre 2022, par NoobCoder

    I'm trying to write a bash script for Mac OSx Terminal to compress a series of GoPro .MP4 videos from the SDcard directly into a smaller .MP4s on a local network server. The GoPro saves .MP4s in the 100GOPRO folder on the card. After filming, I will through that folder and manually put .MP4s from each game into subfolders within the 100GOPRO folder, named A1, A2, A3, etc.

    


    Folder structure

    


    /GoPro/DCIM/100GOPRO/
               -------/A1/
                       -----GX01xxx1.mp4
                       -----GX01xxx2.mp4
               -------/A2/
                       -----GX01xxx3.mp4
                       -----GX01xxx4.mp4
                       -----GX01xxx5.mp4
                       -----GX01xxx6.mp4


    


    ...etc

    


    I would like then like to run a script from the 100GOPRO folder that will do these steps :

    


      

    1. Within each subfolder, auto-create a file.txt with the names of the subfolder's .MP4s in the format to concat the files (each line has "file 'GX01xxx3.mp4'")
    2. 


    3. Pass that subfolder's file.txt as the input to ffmpeg to reencode and save to a network folder with the name A1.mp4 or A2.mp4
    4. 


    5. Repeat for each subfolder and quit.
    6. 


    


    I'm getting hung up on the dynamic path to the subfolder's file.txt. My code just creates a file.txt in the 100GOPRO folder, and appends all the subfolder contents into that single long combined text file. The output then would create a correct first MP4, but second MP4 contains folder 1 and 2, then 3 contains 1, 2, and 3, etc.

    


    Here's the script I ran :

    


    #!/bin/bash
for f in A*/*.mp4 ; do
echo file \'$f\' >> list.txt ;
done && ffmpeg -f concat -safe 0 -i list.txt /Volume/Server/Videos/A$f.mp4 && rm list.txt


    


    Clearly, failing in how that path for echo to save in the subfolder A*, how to call that subfolder's file.txt as the input for ffmpeg, and how to name the output after the folder.

    


    Thanks for any help you can offer.

    


  • FFmpeg : use absolute path in "metadata=print:file="

    27 octobre 2022, par Axel Herrmann

    I'm using FFmpeg to extract frames of a video and therefore I want to print the metadata of the video to a text file first (to get the scene\ value of each frame).

    


    This already works for me with something like :

    


    ffmpeg -i input.mp4 -vf "select='gte(scene,0)',metadata=print:file=scenescores.txt" -an -f null -


    


    Because I'm using all this inside of a Java application I want to pass an absolute path (of an temp directory) to print:file= instead of the currently relative one which will write it to the root directory of the project.

    


    But when I try to specify an absolute path like D:\scenescores.txt I get the following error :

    


    [metadata @ 00000203282ff0c0] Unable to parse option value "scenescores.txt" as boolean
[metadata @ 00000203282ff0c0] Error setting option direct to value scenescores.txt.
[Parsed_metadata_1 @ 00000203269bdf00] Error applying options to the filter.
[AVFilterGraph @ 0000020328020840] Error initializing filter 'metadata' with args 'print:file=D:\scenescores.txt'


    


    Is there any way to achieve printing to an absolute path ? Am I missing some escape rules or something ?

    


  • Image path with wildcard not working when launching FFmpeg as process

    26 mai 2015, par Léon Pelletier

    In an Xamarin Android project, I’m launching FFmpeg as a process. Thus, I’m sending my parameters in a array that looks like :
    "-i", "img%d.png" ... etc

    When converting from an MP4 to images, it handles the wildcard properly. But when doing the reverse process, it complains about the img%d.png file being missing.

    Does it complains about the real file (img0.png) being missing, or is it trying to really find a file named img%d.png ?

       public Clip ConvertImagesToVideo(string imagePattern, string outPath, ShellCallback sc)
       {
           List<string> cmd = new List<string>();

           // ffmpeg -f image2 -i ffmpeg_temp/%05d.png -b 512 video2.mpg

           cmd.Add(_ffmpegBin); // ffmpeg

           cmd.Add("-f");
           cmd.Add("image2");
           cmd.Add("-i");
           cmd.Add(imagePattern);

           cmd.Add("-b");
           cmd.Add("512");

           Clip mediaOut = new Clip ();

           File fileOut = new File(outPath);

           mediaOut.path = fileOut.CanonicalPath;

           cmd.Add(mediaOut.path);

           execFFMPEG(cmd, sc);

           return mediaOut;
       }
    </string></string>

    The process is executed like so :

       private int execProcess(IList<string> cmds, ShellCallback sc, File fileExec)
       {
           ProcessBuilder pb = new ProcessBuilder(cmds);
           pb.Directory(fileExec);

           var cmdlog = new Java.Lang.StringBuilder();

           foreach (string cmd in cmds)
           {
               cmdlog.Append(cmd);
               cmdlog.Append(' ');
           }

           sc.ShellOut(cmdlog.ToString());

           pb.RedirectErrorStream (true);

           Process process = pb.Start();

           StreamGobbler errorGobbler = new StreamGobbler(this, process.ErrorStream, "ERROR", sc);

           StreamGobbler outputGobbler = new StreamGobbler(this, process.InputStream, "OUTPUT", sc);

           errorGobbler.run();
           outputGobbler.run();

           int exitVal = process.WaitFor();

           sc.ProcessComplete(exitVal);

           return exitVal;

       }
    </string>

    Note that I haven’t switched my code from Java.Lang to System yet so it stinks a bit. But all calls are working except this call with a wildcard. So I feel it may have to do with how Java processes are handling working directory, maybe.