Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (18)

  • D’autres logiciels intéressants

    12 avril 2011, par

    On ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
    La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
    On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
    Videopress
    Site Internet : (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

Sur d’autres sites (4649)

  • Extracting frames every second of all videos in folder

    20 octobre 2023, par Sparkiepandas

    I am trying to extract a frame every second of a video, while having multiple videos in a folder. I got it working for 1 video like this, but I think I am messing up my loop for all videos. Below is the code for 1 video that works.

    



    import cv2
pathOut = r"C:/Users/Me/Out/"
vidcap = cv2.VideoCapture(r'C:\Me\Desktop\test.mp4');
count = 0
success = True
while success:
    success,image = vidcap.read()
    print('read a new frame:',success)
    if count%30 == 0 :
         cv2.imwrite(pathOut + 'frame%d.jpg'%count,image)
    count+=1


    



    With the loop for all videos I made it up like this.

    



    import os
import cv2
pathOut = r"C:/Users/Me/Out/"
count = 0
success = True
counter = 1
listing = os.listdir(r'C:/Users/Me/videos/train')
for vid in listing:
    vid = r"C:/Users/Me/videos/train/"+vid
    cap = cv2.VideoCapture(vid)
    count = 0
    counter += 1
    while success:
        success,image = cap.read()
        print('read a new frame:',success)
        if count%30 == 0 :
             cv2.imwrite(pathOut + 'frame%d.jpg'%count,image)
        count+=1


    



    My vid loop does not seems to work because it is only taking one video. Then it states false, probably because there are no frames left, but I do not know how to push it forward to the next video. I think I need to do some minor adjustment, does anybody have any idea what exactly ?

    


  • How to trim and merge using Fluent FFMpeg ?

    29 juillet 2016, par John D.

    Here’s what I want to do with fluent-ffmpeg :

    I have 3 input files. An intro, main, and outro video. I wish to merge the three, while trimming the main video. Here is my code :

    var ffmpegCommand = ffmpeg();
    ffmpegCommand.addInput(introVideo);
    ffmpegCommand.addInput(mainVideo).seekInput(20).duration(3);
    ffmpegCommand.addInput(outroVideo);
    ffmpegCommand.on('error', function(err, stdout, stderr){
     console.log("FAILED!\n\t"+err+"\n\t"+stdout+"\n\t"+stderr);
    });
    ffmpegCommand.on('end', function(){
     console.log('COMPLETE!');
    });
    ffmpegCommand.on('start', function(commandLine) {
     console.log('Spawned Ffmpeg with command: ' + commandLine);
    });
    ffmpegCommand.mergeToFile('final.mp4', './vid_files/tmp');

    The program executes fine, but when I ffplay final.mp4, the result is that introVideo plays then the video appears to freeze. According to the fluent-ffmpeg documentation, it states "Each of these [Input options] methods apply on the last input added". So I can’t figure out why that syntax doesn’t seem to work...

    How can I trim the main video to send to mergeToFile ?

    Note that this works fine if I don’t have .seekinput(20).duration(3) on the second addInput.

    Oh, here’s the outputted commandLine value :

    ffmpeg -i ./vid_files/intro.mp4 -ss 20 -i ./vid_files/main.mp4 -i ./vid_files/outro.mp4 -y -filter_complex concat=n=3:v=1:a=1 -t 3 final.mp4
  • ffmpeg timelapse resets PTS on frame size change

    19 avril 2024, par Ral

    I have 601 sequential images, they change size and aspect ratio on frame 36 and 485, creating 3 distinct sizes of images in the set.

    


    I want to create a timelapse and shave off the first 200 frames and only show the remaining 401, but if I do a trim filter on the input, the filter treats each of the 3 sections of different sized frames as separate 'streams' with their own reset PTS, all of which start at the exact same time. This means the final output of the below commmand is only 249 frames long instead of 401.

    


    How can I fix this so I just get the final 401 frames ?

    


    ffmpeg \
-framerate 60 \
-i "./%07d.jpg" \
-filter_complex "
 [0]scale=1000:1000[in1];
 [in1]trim=start_frame=200[in2];
 [in2]setpts=PTS-STARTPTS
 " \
-r 60 -y trimmed.webm


    


    Filters like setpts=N/(60*TB) or setpts=PTS-SETPTS after the scale to try and fix the frame times also seem to change nothing.

    


    If I remove the trim and pts reset, the timelapse exports all 601 perfectly.
If I remove the pts reset and leave the trim, it exports 449 frames starting on frame 0.

    


    There's no errors or warning associated with the problem, other than the debug states the input reaches EOF on frame 449. (which is 485-36, the two section lengths, for some reason)

    


    I understand pre-processing the image sizes is a way to fix this, but I'd like to understand why this isn't possible in one command.

    


    version 6.0-6ubuntu1, but also happens on 6.1 and 5.1.

    


    Even if I whittle it down to the bare minimum, it still incorrectly exports 450 frames :

    


    ffmpeg -i "./%07d.jpg" -filter setpts=PTS-STARTPTS -y tpad.webm