Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (85)

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

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (11753)

  • Combining 2 FFMPEG Commands

    11 juillet 2020, par John Doe

    I'm trying to combine 2 ffmpeg commands, one which creates the video, and another which adds a simple fade to the beginning of the created video. Here's what I have :

    


    ffmpeg -y -stream_loop -1 -i "video.mp4" -stream_loop -1 -i "music.mp3" -i "audio.mp3" -filter_complex "[1:a]volume=0.1[a1];[2:a]adelay=5000|5000,apad=pad_dur=10[a2];[a1][a2]amerge=inputs=2,afade=in:st=0:d=5[audio]" -map "0:v" -map "[audio]" -c:v libx264 -c:a aac -ac 2 -ar 22050 -preset veryfast -shortest "output.mp4"

ffmpeg -y -i "output.mp4" -filter_complex "[0:v]fade=in:0:d=5" -c:a copy -preset veryfast -movflags faststart -fflags genpts "done.mp4"


    


    The two commands work perfectly fine, however the second one takes about the same amount of time to process as the first, and I feel it should be relatively easy to do the fade-in during the first encode. For my skillset atleast, I was wrong. Please could someone with more experience lend a helping hand ?

    


    Thanks.

    


  • faster way to downmix 5.1 videos to stereo ?

    22 octobre 2020, par alex hansen

    I have a hand full of movies that are all in 5.1 audio, i need there to be one audio track that is only in stereo. i have found a few suggestions as to how to do this but some dont work for me and others are way too slow.

    


    the one i found that works the fastest is this :

    


    ffmpeg -y -i "input" -map 0:v -c:v copy -map 0:a:0? -c:a:0 copy -map 0:a:0? -c:a:1 aac -ac 2 -metadata:s:a:1 title="Eng 2.0 Stereo" -map 0:a:1? -c:a:2 copy -map 0:a:2? -c:a:3 copy -map 0:a:3? -c:a:4 copy -map 0:a:4? -c:a:5 copy -map 0:a:5? -c:a:6 copy -map 0:a:6? -c:a:7 copy -map 0:s? -c:s copy "output"   


    


    sadly i do not remember where it came from.

    


    the problem with this being that it creates a separate audio track, and for my purposes this does not work.

    


    doing just the standard -ac 2 works but is way to slow, i estimated to take over 40 hours to go through all my movies.

    


    edit :
a bit of extra information to throw in here

    


      

    • all the movies are mp4's
    • 


    • all except 2 movies are 5.1 audio (there is 1 7.1 and 1 mono. i dont really care about them tho)
    • 


    • the command i posted runs at about a 40x speed while just doing -ac 4 runs at 2x speed
    • 


    


  • Read, process and save video and audio with FFMPEG

    3 mai 2017, par sysseon

    I want to open a video resource with ffmpeg on Python, get the read frames from the pipe, modify them (e.g. put the timestamp with OpenCV) and write the result to an output video file. I also want to save the audio source with no changes.

    My code (with no audio and two processes) :

    import subprocess as sp
    import numpy as np
    # import time
    # import cv2

    FFMPEG_BIN = "C:/ffmpeg/bin/ffmpeg.exe"
    INPUT_VID = 'input.avi'
    res = [320, 240]

    command_in = [FFMPEG_BIN,
                 '-y',  # (optional) overwrite output file if it exists
                 '-i', INPUT_VID,
                 '-f', 'image2pipe',  # image2pipe or rawvideo?
                 '-pix_fmt', 'bgr24',
                 '-vcodec', 'rawvideo',
                 '-']

    command_out = [FFMPEG_BIN,
                  '-y',  # (optional) overwrite output file if it exists
                  '-f', 'rawvideo',
                  '-vcodec', 'rawvideo',
                  '-s', '320x240',
                  '-pix_fmt', 'bgr24',
                  '-r', '25',
                  '-i', '-',
                  # '-i', INPUT_VID,    # Audio
                  '-vcodec', 'mpeg4',
                  'output.mp4']

    pipe_in = sp.Popen(command_in, stdout=sp.PIPE, stderr=sp.PIPE)
    pipe_out = sp.Popen(command_out, stdin=sp.PIPE, stderr=sp.PIPE)

    while True:
       # Read 320*240*3 bytes (= 1 frame)
       raw_image = pipe_in.stdout.read(res[0] * res[1] * 3)
       # Transform the byte read into a numpy array
       image = np.fromstring(raw_image, dtype=np.uint8)
       image = image.reshape((res[1], res[0], 3))
       # Draw some text in the image
       # draw_text(image)

       # Show the image with OpenCV (not working, gray image, why?)
       # cv2.imshow("VIDEO", image)

       # Write image to output process
       pipe_out.stdin.write(image.tostring())

    print 'done'
    pipe_in.kill()
    pipe_out.kill()
    1. Could it be done with just a process ? (Read the input from a file,
      put it in the input pipe, get the image, process it, and put it in
      the output pipe to be saved into a video file)
    2. How can I save the audio ? In this example, I could use ’-i
      INPUT_VID’ in the second process to get the audio channel, but my
      source will be a RTSP, and I don’t want to create a connection for
      each process. Could I put video+audio in the pipe and rescue and
      separate it with numpy ? How ?
    3. I use a loop to process the frames and wait until I get an error.
      How can I check if all frames are already read ?
    4. Not important, but if I try to show the images with OpenCV
      (cv2.imshow(...)), I only see a gray screen. Why ?