Recherche avancée

Médias (91)

Autres articles (72)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • 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

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

Sur d’autres sites (8353)

  • Python : How to use ffmpeg to read videos(video file or rtsp) and display them using OpenCV ?

    22 août 2019, par ToughMind

    I know that if we want to read video file or USB camera or rtsp stream, we can use cv2.VideoCapture.
    But for some reason, I want to use ffmpeg to do the thing and process obtained images using opencv. So the pseudocode would be :

    import cv2
    import ffmpeg

    videoFile = 'XXX.mp4'

    video = ffmpeg.XXX(videoFile)

    while True:
       frame = video.read() # this read() function is made up by me
       frameCV = ffmpeg2cv(frame) # this ffmpeg2cv() function is made up by me

       cv2.imshow('frame', frameCV)

    I have searched a something like https://github.com/kkroening/ffmpeg-python. But I still not know how to do this. I think ffmpeg is too hard and there are few online docs unlike opencv. So please help.

  • How to use Python (For example, ffmpeg or moviePy) to split large video to display on multiple screen [on hold]

    27 juillet 2019, par Chen Clarence

    I am trying to find resources to split a very long (1080*15360) video into 8 1080p videos of the same time length. Is there anything that could achieve this, or even better allows control over each pixel(use a function to cover part of my video with a black circle). Right now I have to brute force it, such as the following, but I’m sure there are much more efficient methods. Thanks in advance !

    cap=cv2.VideoCapture('sample.avi')
    #inputs & check for error
    numberOfScreens=8
    screenArrangement=(1,8)
    if (numberOfScreens!=(screenArrangement[0]*screenArrangement[1])):
       raise ValueError('The screen arrangement does not match the number of scrrens')
       exit(0)


    currentFrame=0
    originalFrames=[]
    while(True):
       #reading frames
       ret,frame=cap.read()
       if not ret:
           break
       height, width, layers = frame.shape
       unitHeight=(int)(height/screenArrangement[0])   #reduce this to outside loop
       unitWidth=(int)(width/screenArrangement[1])
       #cutting frames into desired size
       for i in range(screenArrangement[0]):
           for j in range(screenArrangement[1]):
               try:
                   if not os.path.exists('Screen'+str(i*screenArrangement[0]+j+1)):
                       os.makedirs('Screen'+str(i*screenArrangement[0]+j+1))
                       print('creating directory '+'Screen'+str(i*screenArrangement[0]+j+1))
               except OSError:
                   print ("Error Creating Directory")
               name='./Screen'+str(i*screenArrangement[0]+j+1)+'/frame'+str(currentFrame)+'.png'
               cropImg = frame[(i*unitHeight):((i+1)*unitHeight), (j*unitWidth):((j+1)*unitWidth)]
               print('creating'+name)
               #saving cropeed frames
               cv2.imwrite(name, cropImg,[cv2.IMWRITE_PNG_COMPRESSION, 0])
       currentFrame+=1
    Frames=currentFrame

    #setting up the writer object
    fourcc = cv2.VideoWriter_fourcc(*'XVID')
    writer=cv2.VideoWriter('Screen1.avi', fourcc, 30, (unitWidth, unitHeight), True)
    #write the video
    for i in range(Frames):
       img=cv2.imread('./Screen1/frame'+str(i)+'.png')
       writer.write(img)
    writer.release()
    cap.release()
    cv2.destroyAllWindows()
  • avcodec/dvbsub : add support for Display Definition Segment to DVB Subtitle encoder

    13 juillet 2019, par Jernej Fijacko
    avcodec/dvbsub : add support for Display Definition Segment to DVB Subtitle encoder
    

    Current version of dvbsub encoder doesn't support HD DVB subtitles. The high
    resolution bitmaps are muxed into the stream but without the DDS (display definition
    segment) the players asume that the DVB subtitles are in SD (720x576) resolution
    which causes them to either render the subtitles too large and misplaced or don't
    render them at all. By including the DDS as defined in section 7.7.1 of ETSI EN 300
    743 (V1.3.1) this problem is fixed.

    7.2.1 Display definition segment The display definition for a subtitle service may
    be defined by the display definition segment if present in the stream. Absence of a
    DDS implies that the stream is coded in accordance with EN 300 743 (V1.2.1) [5] and
    that a display width of 720 pixels and a display height of 576 lines may be assumed.

    https://www.etsi.org/deliver/etsi_en/300700_300799/300743/01.03.01_60/en_300743v010301p.pdf

    Signed-off-by : Jernej Fijacko <mikrohard@gmail.com>
    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] libavcodec/dvbsub.c