Recherche avancée

Médias (91)

Autres articles (73)

  • 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" (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (9568)

  • ffmpeg for merging vfr videos

    20 avril 2021, par Rupsha Chaudhuri

    I'm trying to generate a timelapse with images taken roughly at 10 Hz and for about an hour. Maintaining the relative timestamps is important. So I've split the images into roughly 1 min chunks and I generated 60 small videos in parallel (I've handled the duration for the boundary images). After that I stitch the videos. However when I look at the final contiguous video I realize that at the chunk boundaries after stitching the video either has an extra frame or falls behind the images.. the timestamps don't line up.

    


    The smaller videos are variable frame rate, so I convert them to mpeg-ts before applying the concat protocol to merge them.

    


    

    

    Generate small video:
ffmpeg -f concat -safe 0 -i input.txt -vsync vfr -pix_fmt yuv420p output.mp4

Convert to mpeg-ts
ffmpeg -i output.mp4 -c copy -bsf h264_mp4toannexb output.ts

Merge multiple small mpeg-ts videos
ffmpeg -i input.txt -c copy final_output.mp4

    


    


    



  • I'm running a process in Java and am getting stuck when I wait for it to finish

    31 juillet 2020, par nottAbott

    I have a Java program that is supposed to make copies of segments of a video and then stitch them back together, using ffmpeg. My "snip" method, the one that makes the segment files, has a problem, it gets stuck when I call "process.waitfor()". When I take it out, the videos load partly, but cannot be accessed until I close the program. When I try to delete them, while the program is running, it says that they cannot be deleted because they are in use. Could anyone lead me in the right direction ? Here is the method :

    


    //snips out all the clips from the main video
public void snip() throws IOException, InterruptedException {
    
    for(int i = 0; i < snippets.size(); i++) {
        //Future reference: https://stackoverflow.com/questions/9885643/ffmpeg-executed-from-javas-processbuilder-does-not-return-under-windows-7/9885717#9885717
        //Example: ffmpeg -i 20sec.mp4 -ss 0:0:1 -to 0:0:5 -c copy foobar.mp4
        String newFile = "foobar" + String.valueOf(i) + ".mp4";
        ProcessBuilder processBuilder = new ProcessBuilder("ffmpeg", "-i", videoName, "-ss",
                snippets.get(i).getStartTime(), "-to", snippets.get(i).getEndTime(), newFile);
        
        //I tried this first and then added in the process/process.waitfor below
        //processBuilder.start();
        
        Process process = processBuilder.start();
        process.waitFor();
        
        System.out.println("Snip " + i + "\n");
        
        //add to the formatted list of files to be concat later
        if(i == snippets.size() - 1) {
            stitchFiles += newFile + "\"";
        }
        
        else {
            stitchFiles += newFile + "|";
        }
    }
}


    


  • FFMPEG width not divisible by 2 (639x360)

    5 octobre 2020, par yasgur99

    I am using python wrapper command of ffmepeg. I followed the tutorial from here for a "Production ready HLS" : https://docs.peer5.com/guides/production-ready-hls-vod/

    


    This is my code :

    


     subprocess.call(['ffmpeg', '-y', '-i', download_path,
                     '-vf', 'scale=w=640:h=360:force_original_aspect_ratio=decrease', \
                     '-c:a', 'aac', '-ar', '48000', '-c:v', 'h264', \
                     '-profile:v', 'main', '-crf', '20', '-sc_threshold', '0', \
                     '-g', '48', '-keyint_min', '48', '-hls_time', '4', \
                     '-hls_playlist_type', 'vod',  '-b:v', '800k', \
                     '-maxrate', '856k', '-bufsize', '1200k', '-b:a', '96k', \
                     '-hls_segment_filename', upload_path + \
                     '/360p_%03d.ts', upload_path + '/360p.m3u8', \
                     '-vf', 'scale=w=842:h=480:force_original_aspect_ratio=decrease', \
                     '-c:a', 'aac', '-ar', '48000', '-c:v', 'h264', \
                     '-profile:v', 'main', '-crf', '20', '-sc_threshold', '0', \
                     '-g', '48', '-keyint_min', '48', '-hls_time', '4', \
                     '-hls_playlist_type', 'vod', '-b:v', '1400k', \
                     '-maxrate', '1498k', '-bufsize', '2100k', '-b:a', '128k', \
                     '-hls_segment_filename', upload_path + \
                     '/480p_%03d.ts', upload_path + '/480p.m3u8', \
                     '-vf', 'scale=w=1280:h=720:force_original_aspect_ratio=decrease', \
                     '-c:a', 'aac', '-ar', '48000', '-c:v', 'h264', \
                     '-profile:v', 'main', '-crf', '20', '-sc_threshold', '0', \
                     '-g', '48', '-keyint_min', '48', '-hls_time', '4', \
                     '-hls_playlist_type', 'vod', '-b:v', '2800k', \
                     '-maxrate', '2996k', '-bufsize', '4200k', '-b:a', '128k', \
                     '-hls_segment_filename', upload_path + \
                     '/720p_%03d.ts', upload_path + '/720p.m3u8', \
                     '-vf', 'scale=w=1920:h=1080:force_original_aspect_ratio=decrease', \
                     '-c:a', 'aac', '-ar', '48000', '-c:v', 'h264', \
                     '-profile:v', 'main', '-crf', '20', '-sc_threshold', '0', \
                     '-g', '48', '-keyint_min', '48', '-hls_time', '4', \
                     '-hls_playlist_type', 'vod', '-b:v', '5000k', \
                     '-maxrate', '5350k', '-bufsize', '7500k', '-b:a', '192k', \
                     '-hls_segment_filename', upload_path + '/1080p_%03d.ts', upload_path + '/1080p.m3u8'])


    


    And getting this output

    


    [libx264 @ 0x7fb95500c800] width not divisible by 2 (639x360)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height


    


    Any ideas of whats going wrong ?