Advanced search

Medias (1)

Tag: - Tags -/publicité

Other articles (63)

  • (Dés)Activation de fonctionnalités (plugins)

    18 February 2011, by

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Les autorisations surchargées par les plugins

    27 April 2010, by

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

  • MediaSPIP 0.1 Beta version

    25 April 2011, by

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

On other websites (7208)

  • How to Make Video from Arraylist of images with Music

    6 April 2018, by hardik sojitra

    I am making an app which makes video from selected images which is stored in SD card I have implement the
    group: ’com.github.hiteshsondhi88.libffmpeg’, name: ’FFmpegAndroid’, version: ’0.2.5’ this library and make this classes but it does not work

    Utility.java

    public class Utility {
       private final static String TAG = Utility.class.getName();
       private static Context mContext;
       public Utility(Context context) {
           mContext = context;
       }
       public static String excuteCommand(String command)
       {
           try {
               Log.d(TAG, "execute command : " + command);

               Process process = Runtime.getRuntime().exec(command);

               BufferedReader reader = new BufferedReader(
                       new InputStreamReader(process.getInputStream()));
               int read;
               char[] buffer = new char[4096];
               StringBuffer output = new StringBuffer();
               while ((read = reader.read(buffer)) > 0) {
                   output.append(buffer, 0, read);
               }
               reader.close();
               process.waitFor();
               Log.d(TAG, "command result: " + output.toString());
               return output.toString();
           } catch (IOException e) {
               Log.e(TAG, e.getMessage(), e);
           } catch (InterruptedException e) {
               Log.e(TAG, e.getMessage(), e);
           }
           return "";
       }
       public String getPathOfAppInternalStorage()
       {
           return Environment.getExternalStorageDirectory().getAbsolutePath();
       }
       public void saveFileToAppInternalStorage(InputStream inputStream, String fileName)
       {
           File file = new File(getPathOfAppInternalStorage() + "/" + fileName);
           if (file.exists())
           {
               Log.d(TAG, "SaveRawToAppDir Delete Exsisted File");
               file.delete();
           }
           FileOutputStream outputStream;
           try {
               outputStream = mContext.openFileOutput(fileName, Context.MODE_PRIVATE);
               byte[] buffer = new byte[1024];
               int length;
               while ((length = inputStream.read(buffer)) > 0)
               {
                   outputStream.write(buffer, 0, length);
               }
               outputStream.close();
               inputStream.close();
           } catch (Exception e) {
               Log.e(TAG, e.getMessage(), e);
           }
       }
       public static boolean isFileExsisted(String filePath)
       {
           File file = new File(filePath);
           return file.exists();
       }
       public static void deleteFileAtPath(String filePath)
       {
           File file = new File(filePath);
           file.delete();
       }
    }

    enter image description here

    ffmpegController.java

    package com.example.admin.imagetovideowithnative;

    import android.content.Context;
    import android.util.Log;

    import java.io.ByteArrayInputStream;
    import java.io.InputStream;

    public class FfmpegController {
       private static Context mContext;
       private static Utility mUtility;
       private static String mFfmpegBinaryPath;
       public FfmpegController(Context context) {
           mContext = context;
           mUtility = new Utility(context);
           initFfmpeg();
       }
       private void initFfmpeg()
       {
           mFfmpegBinaryPath = mContext.getApplicationContext().getFilesDir().getAbsolutePath() + "/ffmpeg";
           if (Utility.isFileExsisted(mFfmpegBinaryPath))
               return;
           InputStream inputStream = mContext.getResources().openRawResource(R.raw.ffmpeg);
           mUtility.saveFileToAppInternalStorage(inputStream, "ffmpeg");
           Utility.excuteCommand(CommandHelper.commandChangeFilePermissionForExecuting(mFfmpegBinaryPath));
       }
       public void convertImageToVideo(String inputImgPath)
       {
           Log.e("Image Parth", "inputImgPath - "+inputImgPath);
           if (Utility.isFileExsisted(pathOuputVideo()))
               Utility.deleteFileAtPath(pathOuputVideo());
           saveShellCommandImg2VideoToAppDir(inputImgPath);
           Utility.excuteCommand("sh" + " " + pathShellScriptImg2Video());
       }
       public String pathOuputVideo()
       {
           return mUtility.getPathOfAppInternalStorage() + "/out.mp4";
       }
       private String pathShellScriptImg2Video()
       {
           return mUtility.getPathOfAppInternalStorage() + "/img2video.sh";
       }
       private void saveShellCommandImg2VideoToAppDir(String inputImgPath)
       {
           String command = CommandHelper.commandConvertImgToVideo(mFfmpegBinaryPath, inputImgPath, pathOuputVideo());
           InputStream is = new ByteArrayInputStream(command.getBytes());
           mUtility.saveFileToAppInternalStorage(is, "img2video.sh");
       }
    }

    CommandHelper.java

    package com.example.admin.imagetovideowithnative;

    import android.util.Log;

    public class CommandHelper {
       public static String commandConvertImgToVideo(String ffmpegBinaryPath, String inputImgPath, String outputVideoPath) {
           Log.e("ffmpegBinaryPath", "ffmpegBinaryPath - " + ffmpegBinaryPath);
           Log.e("inputImgPath", "inputImgPath - " + inputImgPath);
           Log.e("outputVideoPath", "outputVideoPath - " + outputVideoPath);

           return ffmpegBinaryPath + " -r 1/1 -i " + inputImgPath + " -c:v libx264 -crf 23 -pix_fmt yuv420p -s 640x480 " + outputVideoPath;
       }

       public static String commandChangeFilePermissionForExecuting(String filePath) {
           return "chmod 777 " + filePath;
       }
    }

    AsynckTask

    class Asynck extends AsyncTask {

           FfmpegController mFfmpegController = new FfmpegController(PhotosActivity.this);
           Utility mUtility = new Utility(PhotosActivity.this);

           @Override
           protected void onPreExecute() {
               super.onPreExecute();
               Log.e("Video Process Start", "======================== Video Process Start ======================================");

           }

           @Override
           protected Void doInBackground(Object... objects) {
               mFfmpegController.convertImageToVideo("");
               return null;
           }

           @Override
           protected void onPostExecute(Void aVoid) {
               super.onPostExecute(aVoid);
               Log.e("Video Process Complete", "======================== Video Process Complete ======================================");
               Log.e("Video Path", "Path - " + mFfmpegController.pathOuputVideo());
               Toast.makeText(PhotosActivity.this, "Video Process Complete", Toast.LENGTH_LONG).show();
           }
       }
  • FFMPEG background music

    12 April 2018, by Muhammad Sanaullah

    I am having a problem adding background music to concat videos, I read online using amerge and loop function can be possible, but i don’t have idea how i can achive that.

    My ffmpeg command, which is working, join video, add watermark, add intro and outro.

    /usr/bin/ffmpeg -i "/home/main/1515b7e4471944edce419f8e24f5c1a8::13.mp4" -i "/home/demo/intro.mp4" -i "/home/main/2b011d97e633049ec3c4605470cd8306::8.mp4" -i "/home/main/5ee6a1869d4f072a796b9d10b1426c2e::14.mp4" -i "/home/main/6a145097d70ce2e95ed65d910f882f98::12.mp4" -i "/home/main/74b95c9f4dfa1a1f966877ded19972a0::10.mp4" -i "/home/main/74b95c9f4dfa1a1f966877ded19972a0::8.mp4" -i "/home/main/82ed61e0a749292e16f3ccab83b61c94::4.mp4" -i "/home/main/834866595d3851712ebbdb414a34b5e8::19.mp4" -i "/home/main/ac89029161cf7da85d93abaa2fa339cc::11.mp4" -i "/home/main/c68e5394ab5028ee2ae57f298430ffba.mp4" -i "/home/main/c6c54226713e5b4f24a985d4f7454658::17.mp4" -i "/home/main/c6c54226713e5b4f24a985d4f7454658::8.mp4" -i "/home/main/da08388ba6e1ccde8874fb2cd46e19ac::11.mp4" -i "/home/main/e35ee0ecf24fce797573c646f3f86619::13.mp4" -i "/home/main/e7619cd3c171ead78db385371e84b3d1::15.mp4" -i "/home/main/e8a0c3954ba0e7e8c51583c680fd993d::15.mp4" -i "/home/main/e8a0c3954ba0e7e8c51583c680fd993d::9.mp4" -i "/home/main/f3f5182bb7867b79b1b59ade1704b016::5.mp4" -i "/home/main/fcb874d27ddf453743cb8a8f1b55e0bd::21.mp4" -i "/home/main/feb7f5bfe15f350a3ff28894226932cd::14.mp4" -i "/home/outro.mp4" -i "/home/watermark.png" -filter_complex "[0:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=13,setpts=PTS-STARTPTS[v10];[v10][22:v]overlay=30:30 [v0];[0:a]aresample=44100,atrim=start=0:end=13,asetpts=PTS-STARTPTS[a0];[1:v]fps=30,scale=1280:720,setsar=1/1,setpts=PTS-STARTPTS[v1];[1:a]aresample=44100[a1];[2:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=8,setpts=PTS-STARTPTS[v20];[v20][22:v]overlay=30:30 [v2];[2:a]aresample=44100,atrim=start=0:end=8,asetpts=PTS-STARTPTS[a2];[3:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=14,setpts=PTS-STARTPTS[v30];[v30][22:v]overlay=30:30 [v3];[3:a]aresample=44100,atrim=start=0:end=14,asetpts=PTS-STARTPTS[a3];[4:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=12,setpts=PTS-STARTPTS[v40];[v40][22:v]overlay=30:30 [v4];[4:a]aresample=44100,atrim=start=0:end=12,asetpts=PTS-STARTPTS[a4];[5:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=10,setpts=PTS-STARTPTS[v50];[v50][22:v]overlay=30:30 [v5];[5:a]aresample=44100,atrim=start=0:end=10,asetpts=PTS-STARTPTS[a5];[6:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=8,setpts=PTS-STARTPTS[v60];[v60][22:v]overlay=30:30 [v6];[6:a]aresample=44100,atrim=start=0:end=8,asetpts=PTS-STARTPTS[a6];[7:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=4,setpts=PTS-STARTPTS[v70];[v70][22:v]overlay=30:30 [v7];[7:a]aresample=44100,atrim=start=0:end=4,asetpts=PTS-STARTPTS[a7];[8:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=19,setpts=PTS-STARTPTS[v80];[v80][22:v]overlay=30:30 [v8];[8:a]aresample=44100,atrim=start=0:end=19,asetpts=PTS-STARTPTS[a8];[9:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=11,setpts=PTS-STARTPTS[v90];[v90][22:v]overlay=30:30 [v9];[9:a]aresample=44100,atrim=start=0:end=11,asetpts=PTS-STARTPTS[a9];[10:v]fps=30,scale=1280:720,setsar=1/1,setpts=PTS-STARTPTS[v100];[v100][22:v]overlay=30:30 [v10];[10:a]aresample=44100[a10];[11:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=17,setpts=PTS-STARTPTS[v110];[v110][22:v]overlay=30:30 [v11];[11:a]aresample=44100,atrim=start=0:end=17,asetpts=PTS-STARTPTS[a11];[12:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=8,setpts=PTS-STARTPTS[v120];[v120][22:v]overlay=30:30 [v12];[12:a]aresample=44100,atrim=start=0:end=8,asetpts=PTS-STARTPTS[a12];[13:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=11,setpts=PTS-STARTPTS[v130];[v130][22:v]overlay=30:30 [v13];[13:a]aresample=44100,atrim=start=0:end=11,asetpts=PTS-STARTPTS[a13];[14:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=13,setpts=PTS-STARTPTS[v140];[v140][22:v]overlay=30:30 [v14];[14:a]aresample=44100,atrim=start=0:end=13,asetpts=PTS-STARTPTS[a14];[15:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=15,setpts=PTS-STARTPTS[v150];[v150][22:v]overlay=30:30 [v15];[15:a]aresample=44100,atrim=start=0:end=15,asetpts=PTS-STARTPTS[a15];[16:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=15,setpts=PTS-STARTPTS[v160];[v160][22:v]overlay=30:30 [v16];[16:a]aresample=44100,atrim=start=0:end=15,asetpts=PTS-STARTPTS[a16];[17:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=9,setpts=PTS-STARTPTS[v170];[v170][22:v]overlay=30:30 [v17];[17:a]aresample=44100,atrim=start=0:end=9,asetpts=PTS-STARTPTS[a17];[18:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=5,setpts=PTS-STARTPTS[v180];[v180][22:v]overlay=30:30 [v18];[18:a]aresample=44100,atrim=start=0:end=5,asetpts=PTS-STARTPTS[a18];[19:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=21,setpts=PTS-STARTPTS[v190];[v190][22:v]overlay=30:30 [v19];[19:a]aresample=44100,atrim=start=0:end=21,asetpts=PTS-STARTPTS[a19];[20:v]fps=30,scale=1280:720,setsar=1/1,trim=start=0:end=14,setpts=PTS-STARTPTS[v200];[v200][22:v]overlay=30:30 [v20];[20:a]aresample=44100,atrim=start=0:end=14,asetpts=PTS-STARTPTS[a20];[21:v]fps=30,scale=1280:720,setsar=1/1,setpts=PTS-STARTPTS[v210];[v210][22:v]overlay=30:30 [v21];[21:a]aresample=44100[a21];[v0] [a0] [v1] [a1] [v2] [a2] [v3] [a3] [v4] [a4] [v5] [a5] [v6] [a6] [v7] [a7] [v8] [a8] [v9] [a9] [v10] [a10] [v11] [a11] [v12] [a12] [v13] [a13] [v14] [a14] [v15] [a15] [v16] [a16] [v17] [a17] [v18] [a18] [v19] [a19] [v20] [a20] [v21] [a21] concat=n=22:v=1:a=1: [v] [a]" -map "[v]" -map "[a]" -preset ultrafast -y -vcodec libx264 -f mp4 -b:v 4500k -aspect 1280/720 -acodec ac3 "/home/final.mp4"
  • Doubts in the development of a music bot for discord, using DSharpPlus and ffmpeg

    21 April 2018, by Vralago

    I have been making a bot for Discord, and recently I thought about adding the music system. Well I even understand how it works but also have some things that I’m not understanding how I should do it (I’m using the DiscordSharpPlus api), for example putting the music on pause (bearing in mind that ffmpeg continues to read the music).

    So I wanted to know if anyone can explain me or tell me how I should do it or how it works, given that it is my first time using ffmpeg and I do not know all the functions of the program.

    If it is necessary, there is the code where the ffmpeg is and the sending of data to the discord.

    public static async Task AddMusicFromYoutube(VoiceNextConnection vnc, CommandContext ctx, string url)
    {
       string fileName = "";

       if (url.ToLower().Contains("youtube.com"))
       {
           fileName = await DownloadFromYouTube(url);
           if (fileName == string.Empty) return;

           await ctx.RespondAsync($"Playing for **Youtube** -> `{url}`");
           await vnc.SendSpeakingAsync(true);

           var ffmpeg_pro = new ProcessStartInfo
           {
               FileName = "Libs/ffmpeg",
               Arguments = $@"-xerror -i ""{fileName}.mp3"" -ac 2 -f s16le -ar 48000 pipe:1",
               RedirectStandardOutput = true,
               UseShellExecute = false
           };
           var ffmpeg = Process.Start(ffmpeg_pro);

           Stream ffout = ffmpeg.StandardOutput.BaseStream;

           using (var ms = new MemoryStream())
           {
               await ffout.CopyToAsync(ms);
               ms.Position = 0;

               var buff = new byte[3840];
               var br = 0;
               while ((br = ms.Read(buff, 0, buff.Length)) > 0)
               {
                   if (br < buff.Length)
                       for (var i = br; i < buff.Length; i++)
                           buff[i] = 0;

                   await vnc.SendAsync(buff, 20); // Send PCM date for discord

                   //tentativa de parar a musica
                   if (Program.IsPuased)
                   {
                       while (Program.IsPuased)
                       {
                       }
                   }
               }

               ms.Close();
           }
           await vnc.SendSpeakingAsync(false);
       }
       else
       {
           await ctx.RespondAsync($"{ctx.Member.Mention}, por agora só aceito link's do Youtube!");
           return;
       }
    }