Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (106)

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

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (10008)

  • 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

    


  • Errno32 during MoviePy-FFMPEG write_videofile

    5 mars 2023, par Krest

    During write_videofile i get Errno32 inside Errno32

    


    def creating_video(files, title):
    fragments = []
    for file in files:
        print(file)
        clip = VideoFileClip(file).subclip()
        fragments.append(clip)
    video = moviepy.editor.concatenate_videoclips(fragments)
    video.write_videofile(f"{title}.mp4")
    return None


video_fragments = preparing_videos(title)
creating_video(video_fragments[0], video_fragments[1])


    


    files is list containing paths to mp4 files making up final video

    


    Current FFMPEG version - 5.1.2

    


    Current MoviePy version - 1.0.3

    


    I added FFMPEG to Path instead of using ImageIO-FFMPEG bundled with moviepy.
Checked different versions of FFMPEG
Checked app at linux system which generated .mp3 and mp.4 files but at the end after merging them the final file was broken.
Tried installing moviepy with pipx
On windows app doesnt even render chunks error :

    


    chunk:   0%|          | 0/11098 [00:00<?, ?it/s, now=None]Traceback (most recent call last):
    self.proc.stdin.write(frames_array.tobytes())
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

OSError: [Errno 32] Broken pipe

MoviePy error: FFMPEG encountered the following error while writing file titleTEMP_MPY_wvf_snd.mp3:
b'titleTEMP_MPY_wvf_snd.mp3: Invalid argument\r\n'


    


  • ffmpeg - produces corrupted file

    1er mai 2015, par pomegranate

    I have a mp4 file that I need to convert to avi to run a matlab script on. This script strips the file of any audio, so then I have to merge it back with the audio and then reconvert the avi to mp4. I’m doing this in a number of steps, and am uncertain at which point I’m screwing the commands up... basically, the final mp4 file I create it corrupted and cannot be played in quicktime (though it does work in VLC).

    Here are the steps I am taking :

    1) ffmpeg -i original.mp4 -acodec copy -vcodec copy original.avi
      This converts mp4 to avi.
    2) ffmpeg -i original.mp4 -acodec copy original.aac
      This gets the audio from the mp4.
    3) Run matlab script, which produces new-no-sound.avi
    4) ffmpeg -i new-no-sound.avi -i original.aac -c:v copy -c:a aac -strict experimental new-with-sound.avi
      This merges the old audio with the new avi file
    5) ffmpeg -i new-no-sound.avi -c:v libx264 -crf 19 -preset slow -c:a libfaac -b:a 192k -ac 2 final-version.mp4
      This converts the new merged file to mp4.

    Here’s the ffmpeg -i from the original.mp4 :

     Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf54.29.104
    Duration: 00:00:01.77, start: 0.000000, bitrate: 9920 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 9978 kb/s, 59.94 fps, 59.94 tbr, 2997 tbn, 2997 tbc (default)
    Metadata:
     handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 52 kb/s (default)
    Metadata:
     handler_name    : SoundHandler

    And here is it for new-no-sound.avi :

    Input #0, avi, from 'new-no-sound.avi':
    Duration: 00:00:02.12, start: 0.000000, bitrate: 1325789 kb/s
    Stream #0:0: Video: rawvideo, bgr24, 1280x720, 1336298 kb/s, 59.94 fps, 59.94 tbr, 59.94 tbn, 59.94 tbc

    Finally, here it is for final-version.mp4

    Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.48.100
    Duration: 00:00:02.21, start: 0.023220, bitrate: 2117 kb/s
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 1280x720, 2108 kb/s, 59.94 fps, 59.94 tbr, 11988 tbn, 119.88 tbc (default)
    Metadata:
     handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 43 kb/s (default)
    Metadata:
     handler_name    : SoundHandler

    Any advice for where I might be going wrong ?