Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (86)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (17301)

  • Python threading - multiple ffmpeg percentage

    2 février 2015, par speedyrazor

    I am running 2 ffmpeg jobs simultaneously and trying to read the log files to print out the running percentage completed. This works perfectly when just running one instance, but if I try to start a second then I get this error :

     File "/Users/kev/Desktop/Python/Standards_Converter_Server_V1.0.py", line 2569, in getProgress
       self.infile.flush()
    AttributeError: 'str' object has no attribute 'flush'

    Here is the crux of my code, not sure why it’s not working :

    if jobID == 1:
       self.logFilePath = "//LinkToSomeFile.log"
    elif jobID == 2:
       self.logFilePath = "//LinkToSomeOtherFile.log"

    threading.Thread(target=self.getProgress, args=(the_running_pane, jobID, slotNumber, self.logFilePath, self.duration, self.countNumber, self.countFile)).start()

    def getProgress(self, the_running_pane, jobID, slotNumber, logFilePath, duration, countNumber, countFile):
       self.logFilePath = logFilePath
       if os.path.isfile(self.logFilePath):
           self.logPath = self.logFilePath
           self.infile = codecs.open(self.logPath, encoding='utf8')
       else:
           raise ValueError("%s isn't a file!" % file_path)
       a = str(countNumber)
       b = str(countFile)
       lastSize = 0
       lastLineIndex = 0
       while not self.completed:
           fileSize = os.path.getsize(self.logPath)
           if fileSize > lastSize:
               lines2 = self.infile.readlines()
               newLines = 0
               for line222 in lines2[lastLineIndex:]:
                   newLines += 1
                   if "No more output streams to write to, finishing." in line222:
                       return
                   if ("size=" and "time=" and "bitrate=" in line222):
                       findMe = re.findall('time=[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9[0-9].', line222)
                       findMe = findMe[0]
                       runningTime = findMe[5:]
                       processRunning = a + " of " + b + "-"
                       currentStatus = (processRunning + "%s" % self.percentage(runningTime, self.secondsDuration) + "%" + " - %s" % duration)
                       if slotNumber == 1:
                           self.params["process1Percentage"] = currentStatus
                       elif slotNumber == 2:
                           self.params["process2Percentage"] = currentStatus
                       lastLineIndex += newLines
           lastSize = fileSize
           self.infile.flush()
           self.infile.seek(0)

    def percentage(self, part, secondsDuration):
       self.ftr1 = [3600,60,1]
       part = part.replace('.', ':')
       secondsPart = sum([a*b for a,b in zip(self.ftr1, map(int,part.split(':')))])
       percentage = str(100 * float(secondsPart)/float(secondsDuration))
       percentage = percentage.split('.')[0]
       if int(percentage) < 10:
           percentage = " " + percentage
       else:
           percentage = " " + percentage
       return percentage

    I am trying to get the currentStatus value into self.params["process1Percentage"] and self.params["process2Percentage"]

  • FFMPEG eats all the memory

    19 mai 2021, par Abhinandan Chakraborty

    Probably one of the most cliche question but here is the problem : So I have a Ubuntu Server running as an isolated machine only to handle FFMPEG jobs. It has 4 vCPU, 4GB RAM, 80GB storage. I am currently using this script to convert a video into HLS playlist : https://gist.github.com/maitrungduc1410/9c640c61a7871390843af00ae1d8758e This works fine for all video including 4K recorded from iPhone. However, I am trying to add watermark so I changed the line 106 of this script

    


    from :

    


    cmd+=" ${static_params} -vf scale=w=${widthParam}:h=${heightParam}"


    


    to :

    


    cmd+=" ${static_params} -filter_complex [1]colorchannelmixer=aa=0.5,scale=iw*0.1:-1[wm];[0][wm]overlay=W-w-5:H-h-5[out];[out]scale=w=${widthParam}:h=${heightParam}[final] -map [final]"


    


    Now this works flawlessly in videos from Youtube or other sources but as soon as I am trying to use 4K videos from iPhone, the RAM usage grows from 250MB to 3.8GB in less than minute and crashes the entire process. So I looked out for some similar question :

    


      

    1. FFmpeg Concat Filter High Memory Usage
    2. 


    3. https://github.com/jitsi/jibri/issues/269
    4. 


    5. https://superuser.com/questions/1509906/reduce-ffmpeg-memory-usage-when-joining-videos
    6. 


    7. ffmpeg amerge Error while filtering : Cannot allocate memory
    8. 


    


    I understand that FFMPEG requires high amount of memory consumption but I am unsure what's the exact way to process video without holding the stream in the memory but instead release any memory allocation in real-time. Even if we decide to work without watermark, It still hangs around 1.8GB RAM for processing 5 seconds 4K video and this create a risk of what if our user upload rather longer video than it will eventually crash down the server. I have thought about ulimit but this does seem like restricting FFMPEG instead of writing an improved command. Let me know how I can tackle this problem. Thanks

    


  • When rTorrent finishes, run FFmpeg and convert audio track in mkv to ac-3 5.1

    11 septembre 2021, par miniHessel

    What is the best approach for this ? I saw the following answer, is that still a valid approach ? If so, how do you execute that when a torrent finishes ? I mostly want to convert dts-hd either 5.1 or 7.1. Sometimes also Atmos.