Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (60)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

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

  • How can i combine a 1 video file (flv) with image file using ffmpeg ?

    6 mars 2016, par user6964

    I have the following question. I need to combine 1 video (.Flv) to an image (png or jpg) generating a new video (.Flv) and then combine it with another video (.Flv). The flow should be as follows :

    First, combine a video image where the video should play normally until the last second and then the image should appear.

    Second, combining the resulting video with another video.

    I tried to do the first step with the following command :

    ffmpeg-i-loop_input movie_1.flv picture.png-i-acodec copy-shortest movie_output.flv

    But the result is that the image is displayed over video.

    Then try connecting 2 flv videos with the following command :

    ffmpeg-i-i movie_2.flv output_final.flv movie_output.flv

    But only shows 1 video in "output_final.flv".

    Can you tell me I’m doing wrong in my command ?

    Thank you.

  • How to convert video file to audio file by using FFMPEG ?

    15 janvier 2020, par Aamir Naseer

    I’m making video to audio converter app but need help to convert video to audio using ffmpeg. I checked many answers and websites but their answers are not easy to understand and I’m confused with command that is used to convert. What is the proper command to convert video to audio and is I’m executing the command in right way ?

    public class VideoConvertActivity extends AppCompatActivity {

       private VideoView videoView;
       private Button convertButton;
       private String filePath;
       private FFmpeg ffmpeg;


       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_video_convert);

           videoView = findViewById(R.id.videoviewID);
           convertButton = findViewById(R.id.convertbuttonID);

           ffmpeg = FFmpeg.getInstance(VideoConvertActivity.this);

    // in variable video i'm getting the path of video path from previous activity through intent and that video will have to convert to audio file
           Intent extras = getIntent();
           final String video = extras.getStringExtra("video");

           videoView.setVideoPath(video);
           videoView.start();

           convertButton.setOnClickListener(new View.OnClickListener() {
               @Override
               public void onClick(View v) {

                   try {

                       File moviesDir = Environment.getExternalStoragePublicDirectory(
                               Environment.DIRECTORY_MUSIC
                       );

                       String filePrefix = "convert_audio";
                       String fileExtn = ".mp3";
                       File dest = new File(moviesDir, filePrefix + fileExtn);

                       int fileNo = 0;
                       while (dest.exists()) {
                           fileNo++;
                           dest = new File(moviesDir, filePrefix + fileNo + fileExtn);
                       }
                       filePath = dest.getAbsolutePath();

                       // to execute "ffmpeg -version" command you just need to pass "-version"
                       String[] command = {"-y", "-i", video, "-vn", "-ar", "44100", "-ac", "2", "-b:a", "256k", "-f", "mp3", filePath};
                       ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {

                           @Override
                           public void onStart() {
                               Toast.makeText(VideoConvertActivity.this,"Started",Toast.LENGTH_LONG).show();
                           }

                           @Override
                           public void onProgress(String message) {
                               Toast.makeText(VideoConvertActivity.this,"Progress",Toast.LENGTH_LONG).show();
                           }

                           @Override
                           public void onFailure(String message) {
                               Toast.makeText(VideoConvertActivity.this,"Failed",Toast.LENGTH_LONG).show();
                           }

                           @Override
                           public void onSuccess(String message) {
                               Toast.makeText(VideoConvertActivity.this,"Succeed",Toast.LENGTH_LONG).show();
                           }

                           @Override
                           public void onFinish() {
                               Toast.makeText(VideoConvertActivity.this,"Finished",Toast.LENGTH_LONG).show();
                           }
                       });
                   } catch (FFmpegCommandAlreadyRunningException e) {
                       // Handle if FFmpeg is already running
                   }

                    Toast.makeText(VideoConvertActivity.this,"Converted Successfully",Toast.LENGTH_SHORT).show();

               }
           });

       }

    }
  • Invalid argument error in writing video file using moviepy and ffmpeg

    28 janvier 2024, par Kresreb

    I have this code that used to work fine and now isn't. I have this error :

    


        Traceback (most recent call last):&#xA;  File "D:\videos\tiktoks\faitsasavoir\bot\mre.py", line 18, in <module>&#xA;    clip_final.write_videofile(f"rendus_finaux/output.mp4", fps=24)&#xA;  File "", line 2, in write_videofile&#xA;  File "C:\Users\Brice\AppData\Local\Programs\Python\Python39\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration&#xA;    return f(clip, *a, **k)&#xA;  File "", line 2, in write_videofile&#xA;  File "C:\Users\Brice\AppData\Local\Programs\Python\Python39\lib\site-packages\moviepy\decorators.py", line 135, in use_clip_fps_by_default&#xA;    return f(clip, *new_a, **new_kw)&#xA;  File "", line 2, in write_videofile&#xA;  File "C:\Users\Brice\AppData\Local\Programs\Python\Python39\lib\site-packages\moviepy\decorators.py", line 22, in convert_masks_to_RGB&#xA;    return f(clip, *a, **k)&#xA;  File "C:\Users\Brice\AppData\Local\Programs\Python\Python39\lib\site-packages\moviepy\video\VideoClip.py", line 300, in write_videofile&#xA;    ffmpeg_write_video(self, filename, fps, codec,&#xA;  File "C:\Users\Brice\AppData\Local\Programs\Python\Python39\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 228, in ffmpeg_write_video&#xA;    writer.write_frame(frame)&#xA;  File "C:\Users\Brice\AppData\Local\Programs\Python\Python39\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 180, in write_frame&#xA;    raise IOError(error)&#xA;OSError: [Errno 22] Invalid argument&#xA;&#xA;MoviePy error: FFMPEG encountered the following error while writing file rendus_finaux/output.mp4:&#xA;&#xA; b&#x27;rendus_finaux/output.mp4: No such file or directory\r\n&#x27;&#xA;</module>

    &#xA;

    It tried different versions of moviepy, Python and reinstalling ffmpeg etc, but couldn't solve it. My main idea is that is a version problem, but i can't find out.

    &#xA;

    I recreated the error with this mre, it's just a code to make a video from multiple images. Thank you for your help.

    &#xA;

    from moviepy.editor import ImageClip, CompositeVideoClip, concatenate_videoclips&#xA;    &#xA;    DURATION_PER_IMAGE = 5&#xA;    &#xA;    images = ["D:/videos/image1.png","D:/videos/image1.jpg"]&#xA;    &#xA;    clips = []&#xA;    for image in images:&#xA;        #Main image&#xA;        clip = ImageClip(image).set_duration(DURATION_PER_IMAGE).resize(width=1080)&#xA;        clip = clip.resize(lambda t : 1&#x2B;0.02*t)&#xA;    &#xA;        #Create clip composite&#xA;        clip_composite = CompositeVideoClip([clip.set_position("center")], size=(1080,1920))&#xA;        clips.append(clip_composite) # Add created clip to the list of clips&#xA;    &#xA;    clip_final = concatenate_videoclips(clips)&#xA;    clip_final.write_videofile(f"rendus_finaux/output.mp4", fps=24)&#xA;

    &#xA;