Recherche avancée

Médias (0)

Mot : - Tags -/xmp

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

Autres articles (53)

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

  • 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

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (4161)

  • FFmpeg Encoding opencv image to H264 video low frame rate

    26 juillet 2022, par lâm nguyễn

    I am trying to create h264 video from webcam image. My problem is when I read images from camera and send to ffmpeg by PIPE, I get to low framerate.

    


    My code :

    


    import cv2
import numpy as np
import subprocess as sp
import shlex
                         # 50 frames, resolution 1280x720, and 25 fps
width, height, n_frames, fps = 1280, 720, 50, 30  
cameraObj = cv2.VideoCapture(0)
cameraObj.set(3, 1280)
cameraObj.set(4, 720)
output_filename = 'video.mp4'

sh = shlex.split(f'./ffmpeg -y -s {width}x{height} -pixel_format bgr24 -f rawvideo '
                 f'-r {fps} -i pipe: -vcodec cedrus264 '
                 f'-pix_fmt nv12 {output_filename}') # ffmpeg command with pipe: input

process = sp.Popen((sh), stdin=sp.PIPE)

lstImage = []

for i in range(0,200): #  read 200 images save to lstImage
    ret, img = cameraObj.read()
    lstImage.append(img.tobytes())

for img in lstImage:

    process.stdin.write(img) #send each image to ffmpeg

process.stdin.close()
process.wait()
process.terminate()


    


    Result :

    


    ffmpeg version git-2015-01-22-f86a076 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 17 2016 12:24:21 with gcc 4.8 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.3)
  configuration: --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 --enable-vdpau --enable-libx264 --enable-libmp3lame --enable-libpulse --enable-libv4l2 --enable-cedrus264
  libavutil      54.  6.100 / 54.  6.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  2.100 / 56.  2.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.102 /  5.  0.102
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, rawvideo, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: 442368 kb/s
    Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 1280x720, 442368 kb/s, 20 tbr, 20 tbn, 20 tbc
[VDPAU SUNXI] VE version 0x1680 opened.
Output #0, mp4, to 'video.mp4':
  Metadata:
    encoder         : Lavf56.2.100
    Stream #0:0: Video: h264 (cedrus264) ([33][0][0][0] / 0x0021), nv12, 1280x720, q=2-31, 200 kb/s, 20 fps, 10240 tbn, 20 tbc
    Metadata:
      encoder         : Lavc56.0.101 cedrus264
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (cedrus264))
frame=  200 fps=6.3 q=30.0 Lsize=     760kB time=00:00:10.00 bitrate= 622.8kbits/s
video:759kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.200271%


    


    Frame rate just is 6.3 fps.

    


    However when FFMPEG input is webcam device(/dev/video0) by command :

    


    sudo ./ffmpeg -f v4l2 -channel 0 -video_size 1280x720 -i /dev/video0 -pix_fmt nv12 -r 30 -b:v 64k -c:v cedrus264 test.mp4


    


    frame rate easy reach to 30 fps

    


    Why is there this difference ?

    


  • How to access an image file using FFmpeg in a React Native (Android) project ?

    9 septembre 2021, par Asp1re

    I made an app where I want to create a video from a png using FFmpeg in React Native but I'm stuck at my image file path part. FFmpeg uses the file system of the android so I can't really use paths like ./assets/img.png. I need an absolute path - can't use require('img.png')

    


    Here is my FFmpeg code :

    


    ffmpeg -loop 1 -i img.png -t 10 -r 1 -c:v libx264 output.mp4


    


    How can I reach the res or assets folder on an android ? Is there a way to bundle it into my app so on my android I can access it through an absolute path somehow ?

    


    I searched a lot of questions similar to this and most of the answers are the use of require('img.png') but this doesn't work for me because the way FFmpeg works. Is there a way to access my image file with FFmpeg in a React Native Android project ?

    


  • How to access an image file using FFmpeg in a React Native (Android) / Expo project ?

    14 septembre 2021, par Asp1re

    I made an app where I want to create a video from a png using FFmpeg in React Native but I'm stuck at my image file path part. FFmpeg uses the file system of the android so I can't really use paths like ./assets/img.png. I need an absolute path - can't use require('img.png')

    


    Here is my FFmpeg code :

    


    ffmpeg -loop 1 -i img.png -t 10 -r 1 -c:v libx264 output.mp4


    


    How can I reach the res or assets folder on an android ? Is there a way to bundle it into my app so on my android I can access it through an absolute path somehow ?

    


    I searched a lot of questions similar to this and most of the answers are the use of require('img.png') but this doesn't work for me because the way FFmpeg works. Is there a way to access my image file with FFmpeg in a React Native Android project ?