Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (66)

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

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (4956)

  • FFMPEG Concatenate X video at time from a list.txt

    25 octobre 2019, par Lorenzo Castagnone

    I’m trying to concatenate 3 videos at time from a list.txt, i can concatenate all the videos in the list in a single long video, but i wish to concatenate x videos from the list in a single output, then concatenate the next x videos from the same list in another single output and so on.

    The script i’m developing it’s written in python, it fetches some videos from a server and save them locally in a folder and write my concat.txt, then ffmpeg read the concat.txt and create a single output.mp4

    #this merge all video in concat file in a single output
    os.system("ffmpeg -f concat -i downloaded/concat.txt -safe 1 -r 30 -fflags +genpts -c:a copy downloaded/output.mp4")

    I’m looking for a way to make ffmpeg read the first x row from the concat.txt , concatenate them in output1.mp4, then read the next x row from cancat.txt , concatenate them in output2.mp4 and so on.

    Thank you for your time to help me, i really appreciate that !

    ---EDIT
    Thank to @Tejas for the reply, i solved how to split the concat.txt file, now i’m trying to apply a filter to every clip

    import os
    x = 3 #Number of files you want to concatenate

    #Making directories so that the working directory stays organized
    txtFileName = "./splits/output{}.txt"
    outputFile = "./clip/output{}.mp4"
    postFile = "./media/post{}.mp4"
    os.makedirs(os.path.dirname(txtFileName), exist_ok=True)
    os.makedirs(os.path.dirname(outputFile), exist_ok=True)
    os.makedirs(os.path.dirname(postFile), exist_ok=True)


    #While splitting the files store their path to a list
    listofSplitFiles = []
    with open('./downloaded/concat.txt','r') as concat:
       lines = concat.readlines()
       for i in range(0,lines.__len__()//x):
           with open(txtFileName.format(i+1),'w') as split:
               listofSplitFiles.append(txtFileName.format(i+1))
               for j in range(0,x):
                   if( (i*x)+j < lines.__len__() ):
                       split.write(lines[(i*x)+j])

    #Call ffmpeg on the list
    for i in listofSplitFiles:
       outputBaseName = os.path.basename(i)
       outputFileName = os.path.splitext(outputBaseName)[0]
       postFileName = os.path.splitext(outputBaseName)[0]
       os.system("ffmpeg -f concat -i {} -safe 1 -r 30 -fflags +genpts -c:a copy ./clip/{}.mp4".format(i,outputFileName))
       os.system('''ffmpeg -loglevel error -r 30 -i sfondo/bkg.png -i ./clip/output{}.mp4 -b:v 1M -filter_complex ''' + '''"[1:v]scale=''' + "750" + ''':''' + "1080" + ''' [ovrl], [0:v][ovrl]overlay=(main_w-overlay_w)/2:((main_h-overlay_h)/2)"''' + ''' ./media/{}.mp4''' .format(outputFileName,postFileName))

    Unfortunately i have this error ./clip/{}.mp4: No such file or directory

  • ffmpeg - color-grading video material AND display original source as picture-in-picture, using -filter_complex

    5 octobre 2019, par raven

    this is my first post on this forum, so please be gentle in case I accidentally do trip over any forum rules that I would not know of yet :).

    I would like to apply some color-grading to underwater GoPro footage. To quicker gauge the effect of my color settings (trial-and-error, as of yet), would like to see the original input video stream as a PIP (e.g., scaled down to 50% or even 30%), in the bottom-right corner of the converted output movie.

    I have one input movie that is going to be color graded. The PIP should use the original as an input, just a scaled-down version of it.

    I would like to use ffmpeg’s "-filter_complex" option to do the PIP, but all examples I can find on "-filter_complex" would use two already existing movies. Instead, I would like to make the color-corrected stream an on-the-fly input to "-filter_complex", which then renders the PIP.

    Is that doable, all in one go ?

    Both the individual snippets below work fine, I now would like to combine these and skip the creation of an intermediate color-graded TMP output which then gets combined, with the original, in a final PIP creation process.
    Your help combining these two separate steps into one single "-filter_complex" action is greatly appreciated !

    Thanks in advance,
    raven.

    [existing code snippets (M$ batch files)]

    ::declarations/defines::
    set "INPUT="
    set "TMP="
    set "OUTPUT="
    set "FFMPG="
    set "QU=9" :: quality settings

    set "CONV='"0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1
    0 -1 0:0 -1 0 -1 5 -1 0 -1 0'"" :: sharpening convolution filter

    ::color-grading part::
    %FFMPG% -i %INPUT% -vf convolution=%CONV%,colorbalance=rs=%rs%:gs=%gs%:bs=%bs%:rm=%rm%:gm=%gm%:bm=%bm%:rh=%rh%:gh=%gh%:bh=%bh% -q:v %QU% -codec:v mpeg4 %TMP%

    ::PIP part::
    %FFMPG% -i %TMP% -i %INPUT% -filter_complex "[1]scale=iw/3:ih/3
    [pip]; [0][pip] overlay=main_w-overlay_w-10:main_h-overlay_h-10" -q:v
    %QU% -codec:v mpeg4 %OUTPUT%

    [/existing code]
  • Encoding video for real time streaming

    15 septembre 2019, par lilroo

    Miguel Grinberg’s article video streaming with flask, covers sending multiple JPG formatted images to a client through a multipart response to stream video to the browser.

    After doing some reading, I quickly realized that MJPEG is not a real video format, JPEGs are not optimized for video streaming and MJPEG cannot be streamed to a HTML5 video element.

    for my application (a screen sharing application written in python), I need to be able to encode and stream relatively smooth video (smoother than MJPEG anyway) in semi-realtime to the browser.

    I think what I need to do is encode a video stream using a tool like FFmpeg and then send chunks of that output to a browser using a multipart response - however it doesn’t look like there is a way to get FFmpeg (using python bindings) to write to an in-memory buffer.

    Is ffmpeg up to this task ?

    I appreciate that this question may sound nieve, but I would be thankful for being pointed in the right direction.