Recherche avancée

Médias (1)

Mot : - Tags -/3GS

Autres articles (76)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (12570)

  • Accurate progress update using FFmpeg

    16 mai 2019, par ClassA

    I’m currently showing the progress inside onProgress, as shown below :

    @Override
       public void onProgress(String message) {

           Pattern pattern = Pattern.compile("time=([\\d\\w:]{8}[\\w.][\\d]+)");

           if (message.contains("speed")) {
               Matcher matcher = pattern.matcher(message);

               if (matcher.find()) {
                   String tempTime = String.valueOf(matcher.group(1));
                   String[] arrayTime = tempTime.split("[:|.]");

                   long currentTime = TimeUnit.HOURS.toMillis(Long.parseLong(arrayTime[0]))
                               + TimeUnit.MINUTES.toMillis(Long.parseLong(arrayTime[1]))
                               + TimeUnit.SECONDS.toMillis(Long.parseLong(arrayTime[2]))
                               + Long.parseLong(arrayTime[3]);

                   //Length of video in milliseconds
                   long timeToExportInMillis = rightThumbTimeRef - leftThumbTimeRef;

                   //Calculate percentage
                   long percent = 100 * currentTime / timeToExportInMillis;

                   //Set percentage to TextView
                   percentText.setText(percent + " %");

               }
           }
       }

    The problem I have is that the progress gets updated like this :

    0 - 9 - 17 - 30 - 38 etc. (till 100)

    I would like to show the progress without skipping values, like :

    0 - 1 - 2 - 3 - 4 etc. (till 100)


    I’m not even sure if this is possible because the update of currentTime (above) depends on FFmpeg’s progress output, any advice would be appreciated.

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

    


  • lavf/gif : Add an option max_gif_delay to limit the frame duration.

    29 mars 2015, par Carl Eugen Hoyos
    lavf/gif : Add an option max_gif_delay to limit the frame duration.
    

    Allows playback for the sample from ticket #4369 in less than 18 hours.

    • [DH] doc/demuxers.texi
    • [DH] libavformat/gifdec.c