Recherche avancée

Médias (1)

Mot : - Tags -/university

Autres articles (43)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

Sur d’autres sites (13295)

  • opencv-python initial rtmp stream(cv2.VideoCapture(rtmp_url)), it takes a long time

    2 décembre 2022, par yang bai

    Question

    


      

    1. When read the stream from camera or video(with '-re' arg), the opencv initial will takes a long time about 10-30s.
    2. 


    3. And the latency is about 2-3s, any optimzation suggestion ?
    4. 


    


    Enviroment

    


    os : ubuntu 18.04

    


    rtmp serve : nginx + nginx-rtmp-module (default configuration)

    


    stream source : use camera

    


    Code

    


    push code :

    


    cap = cv2.VideoCapture(0)
fps = int(cap.get(cv2.CAP_PROP_FPS))
width = int(cap.get(cv2.CAP_PROP_WIDTH))
height = int(cap.get(cv2.CAP_PROP_HEIGHT))

rtmp_url = 'xxxx'

command = ['ffmpeg',
           '-re',
           '-y',
           '-flags', 'low_delay',
           '-f', 'rawvideo',
           '-vcodec', 'rawvideo',
           '-pix_fmt', 'bgr24',
           '-s', ''.format(width, height),
           '-r', str(fps),
           '-i', '-',
           '-c:v', 'libx264',
           '-pix_fmt', 'yuv420p',
           '-preset', 'ultrfast',
           '-f', 'flv',
           rtmp_url]

p = sp.Popen(command, stdin=sp.PIPE)
while cap.isOpened():
  ret, frame = cap.read()
  if ret:
    p.stdin.write(frame.tostring())
  else:
    break


    


    read code

    


    cap = cv2.VideoCapture(rtmp_url) # this code line will takes long time
...


    


    try to change the nginx conf 'chunk_size', but make no difference.

    


    and try to push in Windows : ffmpeg -f dshow -i video="Integrated Webcam" -s 640*480 -r 15 -vcodec libx264 -preset:v ultrafast -tune:v zerolatency -acodec libfaac -f flv rtmp://192.168.0.199:1935 rtmp_url again, no effect. only reduce a little latency.

    


  • Gitlab CI - Combine two docker images into a single stage

    12 mars 2024, par seal.r00t

    I have this gitlab-ci.yaml file. Using this file I execute my k6.io load test from pipeline. Now I need to execute some FFmpeg commands during the run stage, and my question is how do I make the FFmpeg tool available to the run stage. Do I need to grab the image that has FFmpeg and add it next to grafa/k6 or something else ?

    


    default:
  tags:
    - default

workflow:
  name: "$PIPELINE_NAME"

stages:
  - lint
  - setup
  - run
  - teardown

lint:js:
  stage: lint
  image:
    name: tmknom/prettier
    entrypoint:
      - ""
  rules:
    - if: '$CI_PIPELINE_SOURCE == "push"'
      when: always
    - if: '$CI_PIPELINE_SOURCE == "schedule"'
      when: always
  script:
    - prettier --check '**/*.js'

setup:
  stage: setup
  image: alpine
  rules:
    - if: '$CI_PIPELINE_SOURCE == "web"'
      when: always
    - if: '$CI_PIPELINE_SOURCE == "schedule"'
      when: always
  script:
    - echo 'set up!'

run:
  stage: run
  environment:
    name: run
  image:
    name: grafana/k6:latest
    entrypoint: [ "" ]
  artifacts:
    when: always
    paths:
      - summaries/
  rules:
    - if: '$CI_PIPELINE_SOURCE == "web"'
      when: always  # Prevent pipeline run for push event
    - if: '$CI_PIPELINE_SOURCE == "schedule"'
      when: always
  script:
    - ./run.sh

teardown:
  stage: teardown
  image: alpine
  rules:
    - if: '$CI_PIPELINE_SOURCE == "web"'
      when: always
    - if: '$CI_PIPELINE_SOURCE == "schedule"'
      when: always
  script:
    - echo 'tear down!'


    


    I tried adding two name tags under the run stage for using two images but it didn't work and returned a syntax error.

    


    run:
  stage: run
  environment:
    name: run
  image:
    name: grafana/k6:latest
    name: linuxserver/ffmpeg


    


  • Get middle line from the output of a command

    14 décembre 2022, par Kishore T

    The following command list the duration of I-frames present in a video file.

    


    ffprobe -i ./test.mp4 -v quiet -skip_frame nokey -select_streams v:0 -of flat -show_entries frame=pkt_pts_time | awk -F'=' '{gsub(/"/, "", $NF); print $NF}'


    


    I'm trying to get the duration of I-frame that is in middle. The output of the above command will be like

    


    0.066667
2.066667
4.066667
9.066667
14.066667
19.066667
24.066667


    


    How do I get the middle value ? Here, I would like to get 9.066667 as the result. If the number of lines is even (say I've 2 values), I need to get the 1st value.

    


    I tried using wc to get the number of lines and sed to print the middle line. But, this straightforward solution required me to run the command twice. I tried piping the command, but I didn't find any solution for storing the value in a variable (from the wc command) and using the same in another command (sed command) while retaining the piped output.