Recherche avancée

Médias (1)

Mot : - Tags -/illustrator

Autres articles (88)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

Sur d’autres sites (13772)

  • 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 :

    


    import subprocess

# Extract chunks
segments = [(0, 300), (300, 600), (600, 900)]  # example segments in seconds
for i, (start, length) in enumerate(segments):
    subprocess.run([
        "ffmpeg", "-i", "input.mp4", "-ss", str(start), "-t", str(length),
        "-c", "copy", "-reset_timestamps", "1", "-y", f"chunk_{i}.mp4"
    ], check=True)

# Create concat list
with open("list.txt", "w") as f:
    for i in range(len(segments)):
        f.write(f"file 'chunk_{i}.mp4'\n")

# Concatenate
subprocess.run([
    "ffmpeg", "-f", "concat", "-safe", "0",
    "-i", "list.txt", "-c", "copy", "-y", "merged_output.mp4"
], check=True)


    


    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.

    


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

    


    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 ?

    


  • 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

  • FFMPEG with moviepy

    5 novembre 2023, par Shenhav Mor

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

    &#xA;

    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 ?

    &#xA;

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

    &#xA;

    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.

    &#xA;

    Any ideas ?Thanks !&#xA;the code doesnt realy matter but :

    &#xA;

    def Edit_Clips(self):&#xA;&#xA;    clips = []&#xA;&#xA;    time=0.0&#xA;    for i,filename in enumerate(os.listdir(self.path)):&#xA;        if filename.endswith(".mp4"):&#xA;            tempVideo=VideoFileClip(self.path &#x2B; "\\" &#x2B; filename)&#xA;&#xA;            txt = TextClip(txt=self.arrNames[i], font=&#x27;Amiri-regular&#x27;,&#xA;                           color=&#x27;white&#x27;, fontsize=70)&#xA;            txt_col = txt.on_color(size=(tempVideo.w &#x2B; txt.w, txt.h - 10),&#xA;                                   color=(0, 0, 0), pos=(6, &#x27;center&#x27;), col_opacity=0.6)&#xA;&#xA;            w, h = moviesize = tempVideo.size&#xA;            txt_mov = txt_col.set_pos(lambda t: (max(w / 30, int(w - 0.5 * w * t)),&#xA;                                                 max(5 * h / 6, int(100 * t))))&#xA;&#xA;            sub=txt_mov.subclip(time,time&#x2B;4)&#xA;            time = time &#x2B; tempVideo.duration&#xA;&#xA;            final=CompositeVideoClip([tempVideo,sub])&#xA;&#xA;            clips.append(final)&#xA;&#xA;    video = concatenate_videoclips(clips, method=&#x27;compose&#x27;)&#xA;    print("after")&#xA;    video.write_videofile(self.targetPath&#x2B;"\\"&#x2B;&#x27;test.mp4&#x27;,threads=16,audio_fps=44100,codec = &#x27;libx264&#x27;)&#xA;

    &#xA;