Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (16)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (3409)

  • FFMPEG with moviepy

    5 novembre 2023, par Shenhav Mor

    I'm working on something that concatenate videos and adds some titles on through moviepy.

    


    As I saw on the web and on my on pc moviepy works on the CPU and takes a lot of time to save(render) a movie. Is there a way to improve the speed by running the writing of moviepy on GPU ? Like using FFmpeg or something like this ?

    


    I didn't find an answer to that on the web, so I hope that some of you can help me.
I tried using thread=4 and thread=16 but they are still very very slow and didn't change much.

    


    My CPU is very strong (i7 10700k), but still, rendering on moviepy takes me for a compilation with a total of 8 minutes 40 seconds, which is a lot.

    


    Any ideas ?Thanks !
the code doesnt realy matter but :

    


    def Edit_Clips(self):

    clips = []

    time=0.0
    for i,filename in enumerate(os.listdir(self.path)):
        if filename.endswith(".mp4"):
            tempVideo=VideoFileClip(self.path + "\\" + filename)

            txt = TextClip(txt=self.arrNames[i], font='Amiri-regular',
                           color='white', fontsize=70)
            txt_col = txt.on_color(size=(tempVideo.w + txt.w, txt.h - 10),
                                   color=(0, 0, 0), pos=(6, 'center'), col_opacity=0.6)

            w, h = moviesize = tempVideo.size
            txt_mov = txt_col.set_pos(lambda t: (max(w / 30, int(w - 0.5 * w * t)),
                                                 max(5 * h / 6, int(100 * t))))

            sub=txt_mov.subclip(time,time+4)
            time = time + tempVideo.duration

            final=CompositeVideoClip([tempVideo,sub])

            clips.append(final)

    video = concatenate_videoclips(clips, method='compose')
    print("after")
    video.write_videofile(self.targetPath+"\\"+'test.mp4',threads=16,audio_fps=44100,codec = 'libx264')


    


  • How to convert 7sec Video to Gif Android

    21 août 2014, par Donnie Ibiyemi

    Am making an app that convert shot video clips to Gif. i was wondering if there was a libary that directly converts videos to gifs on the Fly on Android.

    I’ve tried to extract all the frames of the video and encode them into a gif but am only getting the the first frame of the video. my code is below :

            public static final int GIF_DELAY_BETWEEN_FRAMES = 100;  
            public static final float SPEED_RATIO = 1.1f;

            Uri videoFileUri=Uri.parse(mOutputFile.toString());
           FFmpegMediaMetadataRetriever retriever = new FFmpegMediaMetadataRetriever();
           retriever.setDataSource(mOutputFile.getAbsolutePath());
            rev = new ArrayList<bitmap>();
           MediaPlayer mp = MediaPlayer.create(RecorderActivity.this, videoFileUri);
            int millis = mp.getDuration();
            for(int i=1000000;itest.gif");
               outStream.write(generateGIF());
               outStream.close();
            }catch(Exception e){
               e.printStackTrace();
            }


           public byte[] generateGIF() {
           ByteArrayOutputStream bos = new ByteArrayOutputStream();
           AnimatedGifEncoder encoder = new AnimatedGifEncoder();
           encoder.setDelay((int)(GIF_DELAY_BETWEEN_FRAMES * (1 / SPEED_RATIO)));
           encoder.start(bos);
           for (Bitmap bitmap : rev) {
               encoder.addFrame(bitmap);
           }
           encoder.finish();
           return bos.toByteArray();
        }
    </bitmap>

    Please help me guys...thanks

  • How to automate ffmpeg to split and merge parts of video, and keep the audio in sync ?

    9 décembre 2024, par Tree

    I have a Python script that automates trimming a large video (2 hours) into smaller segments and then concatenating them without re-encoding, to keep the process fast. The script runs these ffmpeg commands :

    &#xA;

    import subprocess&#xA;&#xA;# Extract chunks&#xA;segments = [(0, 300), (300, 600), (600, 900)]  # example segments in seconds&#xA;for i, (start, length) in enumerate(segments):&#xA;    subprocess.run([&#xA;        "ffmpeg", "-i", "input.mp4", "-ss", str(start), "-t", str(length),&#xA;        "-c", "copy", "-reset_timestamps", "1", "-y", f"chunk_{i}.mp4"&#xA;    ], check=True)&#xA;&#xA;# Create concat list&#xA;with open("list.txt", "w") as f:&#xA;    for i in range(len(segments)):&#xA;        f.write(f"file &#x27;chunk_{i}.mp4&#x27;\n")&#xA;&#xA;# Concatenate&#xA;subprocess.run([&#xA;    "ffmpeg", "-f", "concat", "-safe", "0",&#xA;    "-i", "list.txt", "-c", "copy", "-y", "merged_output.mp4"&#xA;], check=True)&#xA;

    &#xA;

    All chunks come from the same source video, with identical codecs, resolution, and bitrate. Despite this, the final merged_output.mp4 sometimes has audio out of sync—especially after the first chunk.

    &#xA;

    I’ve tried using -ss before -i to cut on keyframes, but the issue persists.

    &#xA;

    Question : How can I ensure correct A/V sync in the final concatenated video when programmatically segmenting and merging via ffmpeg without fully re-encoding ? Is there a way to adjust the ffmpeg commands or process to avoid audio desynchronization ?

    &#xA;