Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (80)

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

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (5275)

  • Creating video from list of images using ffmpeg

    13 août 2019, par haseeb

    Summary

    From given code, second function taking UI values and passing to first one. from log, first two lines shows command list and command string.

    What’s irritating me is, if I copied second line from log (dos cmd) and paste it in a cmd prompt, it works successfully and produces video correctly. but running it via gui subprocess, errors out.

    Task Description

    Directory contains thousand of images each after few minutes of a construction project. I need to create a video from data (images) per day basis. I have successfully extracted list of images, etc, and have data.

    utils.py :

    def framesToVideoViaCount(srcFile,outputFile,start,count,rate):
       # ffmpeg -start_number 1 -i test_%04d.png -vframes 100 -vcodec mpeg4 test.mp4
       # "C:\\Users\\lalat\\Desktop\\03008427633\\output_%04d.png"
       # ffmpeg -start_number 50 -i "C:\\Users\\lalat\\Desktop\\03008427633\\output_%04d.png" -vframes 200 -vcodec mpeg4 "C:\\Users\\lalat\\Desktop\\day1.mp4"
       command = [ 'ffmpeg',
                   # '-loglevel', 'fatal',
                   '-r %d' %(rate),
                   '-start_number %d' %(start) ,
                   '-i "%s"' %(srcFile),
                   '-vframes %d' %(count),
                   '-vcodec mpeg4' ]
       # command.append ('fps=%d' % (fps))
       command.append (outputFile)
       print ("COMMAND: " , command)
       print ("DOS CMD: ", ' '.join(command))
       ffmpeg = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE )
       out, err = ffmpeg.communicate()
       if(err) : print('error',err); return None;
       print (out)

    Actual GUI function call in tk gui app :

    def approachByCount(self):
       tdate = datetime(year=int(self.fyear.get()), month=int(self.fmonth.get()), day=int(self.fdate.get()))
       # now = datetime.datetime.now()
       outputName = str(tdate.strftime("%Y%m%d")) + ".txt"
       outputVid = str(tdate.strftime("%Y%m%d")) + ".mp4"
       files = os.listdir(self.userDir)
       selected = []
       for afile in files:
           afile = os.path.join(self.userDir,afile)
           sdate = datetime.fromtimestamp(os.path.getmtime(afile))
           if sdate.date() == tdate.date():
               selected.append(afile)
       # get first file name
       srcfilename = os.path.basename(selected[0])
       srcfilename,ext = srcfilename.split(".")
       filename,pad = srcfilename.split("_")
       srcfilename = os.path.join(self.userDir,filename+"_%0"+str(len(pad))+"d."+ext)
       start = int(pad)
       count = len(selected)
       utils.framesToVideoViaCount(srcfilename,outputVid,start,count,25)

    ERROR log

    COMMAND:  ['ffmpeg', '-r 25', '-start_number 1', '-i "C:\\Users\\lalat\\Desktop\\03008427633\\output_%04d.png"', '-vframes 382', '-vcodec mpeg4', '20190810.mp4']
    DOC CMD:  ffmpeg -r 25 -start_number 1 -i "C:\Users\lalat\Desktop\03008427633\output_%04d.png" -vframes 382 -vcodec mpeg4 20190810.mp4

    error b"ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers\r\n
    built with gcc 8.2.1 (GCC) 20181017\r\n
    configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth\r\n
    libavutil      56. 22.100 / 56. 22.100\r\n
    libavcodec     58. 35.100 / 58. 35.100\r\n
    libavformat    58. 20.100 / 58. 20.100\r\n
    libavdevice    58.  5.100 / 58.  5.100\r\n
    libavfilter     7. 40.101 /  7. 40.101\r\n
    libswscale      5.  3.100 /  5.  3.100\r\n
    libswresample   3.  3.100 /  3.  3.100\r\n
    libpostproc    55.  3.100 / 55.  3.100\r\n
    Unrecognized option 'r 25'.\r\n
    Error splitting the argument list: Option not found\r\n"
  • avformat/utils : Preserve integrity of linked list

    19 août 2019, par Andreas Rheinhardt
    avformat/utils : Preserve integrity of linked list
    

    1. Instead of relying on ff_packet_list_get to get the oldest element in
    an AVPacketList, ff_read_packet used its own ad-hoc code. Said code
    forgot to set the end of the list to NULL if the last element of the
    list has been removed, thereby leaving the list in an inconsistent state.
    2. Furthermore, if the list was not empty, the oldest element of the
    list would always be copied into another packet structure before it was
    known whether the oldest entry of the list would be removed. This makes
    the ownership confusing and potentially copies unnecessarily.

    Both of these issues have been fixed. ff_packet_list_get is used now.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/utils.c
  • 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 &lt; 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