Recherche avancée

Médias (0)

Mot : - Tags -/tags

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

Autres articles (82)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (12306)

  • lavc/vaapi_encode : Enable block level bitrate control

    8 mars 2024, par Fei Wang
    lavc/vaapi_encode : Enable block level bitrate control
    

    Signed-off-by : Fei Wang <fei.w.wang@intel.com>

    • [DH] doc/encoders.texi
    • [DH] libavcodec/vaapi_encode.c
    • [DH] libavcodec/vaapi_encode.h
  • lavc/qsv : add support for decoding & encoding 12bit content

    6 octobre 2022, par Fei Wang
    lavc/qsv : add support for decoding & encoding 12bit content
    

    AV_PIX_FMT_P012, AV_PIX_FMT_Y212 and AV_PIX_FMT_XV36 are used in
    FFmpeg and MFX_FOURCC_P016, MFX_FOURCC_Y216, and MFX_FOURCC_Y416 are used
    in the SDK

    Signed-off-by : Fei Wang <fei.w.wang@intel.com>
    Signed-off-by : Wenbin Chen <wenbin.chen@intel.com>
    Signed-off-by : Haihao Xiang <haihao.xiang@intel.com>

    • [DH] libavcodec/qsv.c
    • [DH] libavcodec/qsvdec.c
    • [DH] libavcodec/qsvenc_hevc.c
  • How do I run two indefinite loops simultaneously, while also changing variables within them ?

    11 octobre 2016, par Nyalmo

    I’m trying to write a script in Python that records a stream of an IP camera in realtime. It only keeps about a minute worth of recording, constantly overwriting the same files. Whenever an external sensor is triggered I want a variable to be set (event variable) which merges the recording with an extra 30 seconds it records after the sensor is triggered. The combined 90 seconds are then saved as the date and time for later review.

    The idea was to have 2 indefinite while loops, the first containing both the real time recording and the event. The second one would constantly read input and activate the ’event’ function. Initially I though I could just have a software version of the hardware interrupt I’ve learned before, though after some research it seems that’s only for exceptions. I’m currently using TkInter, simulating the external input with keypresses.

    When I tried it out the input wouldn’t cause the event to be triggered. So my question is : How do I run the two indefinite loops simultaneously, while also having the input loop change variables in the main loop so that the ’event’ can actually occur in real-time ?

    Since I’m using ffmpeg to record the stream, once the command is called to record it can’t be stopped, but I want the event variable to be changed as soon as possible.

    I’ve looked at several similar questions regarding multiple loops, and have tried multiprocessing(though this only seems to be used for performance, which is not that important here), making two separate files(not sure how to have them work together) and lastly, threads. None of these seem to work in my situation as I can’t get them running in the way that I want.

    Here is my latest attempt, using threads :

    i = 0
    event = False
    aboutToQuit = False
    someVar = 'Event Deactivated'
    lastVar = False

    def process(frame):
       print "Thread"
       i = 0    
       frame = frame
       frame.bind("<space>", switch)
       frame.bind("<escape>", exit)
       frame.pack()
       frame.focus_set()

    def switch(eventl):
       print(['Activating','Deactivating'][event])
       event = eventl
       event = not(event)

    def exit(eventl):
       print'Exiting Application'
       global aboutToQuit
       #aboutToQuit = True
       root.destroy()

    print("the imported file is", tkinter.__file__)
    def GetTime(): #function opens a script which saves the final merged file as date and time.
       time = datetime.datetime.now()
       subprocess.call("./GetTime.sh", shell = True)
       return (time)

    def main(root):
       global event, aboutToQuit, someVar,lastVar      
       while (not aboutToQuit):
           root.update() # always process new events

           if event == False:
               someVar = 'Event Deactivated'
               subprocess.call(Last30S_Command) #records last 30 seconds overwriting itself.
               print "Merge now"
               subprocess.call(Merge_Command) #merges last 30 seconds with the old 30 seconds      
               print "Shift now"
               subprocess.call(Shift_Command) #copies the last30s recording to the old 30 seconds, overwriting it.
               if lastVar == True: #Triggers only when lastVar state changes
                   print someVar
                   lastVar = False
               time.sleep(.1)

           if event == True:
                someVar = 'Event Activated'
               print"Record Event"
               subprocess.call(EventRecord_Command) #records 30 seconds after event is triggered.
               print"EventMerge Now"
               subprocess.call(EventMerge_Command) # merges the 1 minute recording of Merge_Command with 30 seconds of EventRecord_Command
               if lastVar == False:
                   print someVar
                   lastVar = True
               time.sleep(.1)
               GetTime() #Saves 90 seconds of EventMerge_Command as date and time.
               subprocess.call(EventShift_Command) #Copies EventRecord file to the old 30 second recording, overwriting it

           if aboutToQuit:
              break


    if __name__ == "__main__":
       root = Tk()
       frame = Frame(root, width=100, height=100)  
    #   maintthread = threading.Thread(target=main(root))
    #   inputthread = threading.Thread(target=process(frame))
    #   inputthread.daemon = True
    #   inputthread.start()
    #   maintthread.daemon = True
    #   maintthread.start()
    #   maintthread.join()
       Process(target=process(frame)).start()
       Process(target=main(root)).start()
       print "MainLoop"
    </escape></space>