Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

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

Autres articles (35)

  • 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

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (6183)

  • Audio Lag Issue in Long-term FFmpeg Live Streaming with x11grab and Pulse

    8 juillet 2024, par Dhairya Verma

    I am currently working on a live streaming project where I use FFmpeg with x11grab and PulseAudio to stream headlessly from a Linux server to an RTMP endpoint. While the setup generally works well, I am encountering an issue where the audio begins to lag behind the video after approximately two days of continuous streaming.

    


    "-hwaccel", "cuda",

"-f", "x11grab",

"-s", "1920x1080",

"-draw_mouse", "0",

"-thread_queue_size", "1024",

"-i", ":1",

"-f", "pulse",

"-r", "60",

"-thread_queue_size", "1024",

"-i", "VirtualSink.monitor",

"-c:v", "h264_nvenc",

"-preset:v", "hq",

"-b:v", "2500k",

"-maxrate", "2500k",

"-bufsize", "10000k",

"-vf", "fps=60,crop=1280:720:320:180,format=yuv420p",

"-g", "60",

"-c:a", "aac",

"-af", "adelay=900|900",

"-b:a", "128k",

"-ar", "44100",

"-fps_mode", "cfr",

"-async", "1",

"-f", "flv",

'RTMP_LINK',


    


    After two days of streaming, the audio noticeably lags behind the video. I have tried adjusting various settings and buffers, but the issue persists.

    


    Could anyone please provide any insights or suggestions on how to address this issue ?

    


  • FFMPEG - Alsa buffer xrun (ALSA_BUFFER_SIZE_MAX overflow)

    21 décembre 2014, par Heikki

    My goal is to use ffmpeg to record audio and video from my webcam simultaneously, and to send it to my loopback address, so that I can open the resulting multiplex of video and audio on vlc player.

    MY ATTEMPT :

    • First of all, I have to execute mptsconfig.py, a python code that generates the required information tables (it can be downloaded via http://www.avalpa.com/assets/freesoft/opencaster/OpenCaster-tutorials.3.2.2.tgz, and can be found in Tutorials > mpts) :

      chmod 777 mptsconfig.py

      ./mptsconfig.py

    • After that, I open vlc player, and go to Media > Open Network Stream, where I type the loopback address and port 1234 : udp ://@127.0.0.1:1234. I am now able to receive incoming data from my own computer.

    • Finally, I use the following bash script (bash script.sh) :

      #!/bin/bash
      # Removing previous FIFOs

      rm webcam.mp2
      rm webcam.pes
      rm webcam.ts

      rm audio.mp2
      rm audio.pes
      rm audio.ts

      rm wmux.ts
      rm wfinal.ts


      # Creating new FIFOs
      mkfifo webcam.mp2
      mkfifo webcam.pes
      mkfifo webcam.ts

      mkfifo audio.mp2
      mkfifo audio.pes
      mkfifo audio.ts

      mkfifo wmux.ts
      mkfifo wfinal.ts




      ### 1. WEBCAM VIDEO

      # Recording webcam video
      ffmpeg -an -f video4linux2 -s pal -r 25 -i /dev/video0 -vcodec mpeg2video -f mpeg2video -s pal -b:v 1000k -minrate:v 1000k -maxrate:v 1000k -bufsize 1835008 -y webcam.mp2 &

      # Converting mp2 video Elementary Stream to Packetised Elementary Stream
      esvideompeg2pes webcam.mp2 > webcam.pes &

      # Converting video ES to Transport Stream
      pesvideo2ts 2064 25 112 3450000 0 webcam.pes > webcam.ts &




      ### 2. WEBCAM AUDIO

      # Recording webcam audio (in my case, my webcam microphone is tagged as "hardware card #2"; the number associated to one's webcam mic can be found executing *arecord -l* in bash)
      ffmpeg -f alsa -ac 1 -ar 48000 -i hw:2 -preset ultrafast -y audio.mp2 &

      # Converting mp2 audio Elementary Stream to Packetised Elementary Stream
      esaudio2pes audio.mp2 1152 48000 384 -1 3600 > audio.pes &

      # Converting audio ES to Transport Stream
      pesaudio2ts 2068 1152 48000 384 -1 audio.pes  > audio.ts &




      ### 3. MULTIPLEXING AUDIO & VIDEO

      # Video, audio & PAT, PMT, SDT & NIT Tables Multiplex
      tscbrmuxer b:3450000 webcam.ts b:188000 audio.ts b:3008 mptspat.ts b:3008 mptspmt1.ts b:1500 mptssdt.ts b:1400 mptsnit.ts > wmux.ts &

      # tssstamp (it solves PCR problems)
      tsstamp wmux.ts 3646916 > wfinal.ts &




      ### 4. SENDING THE FINAL MULTIPLEX

      # Sending TS via udp to loopback address
      tsudpsend wfinal.ts 127.0.0.1 1234 3646916

    I can see and hear the output on vlc player, however, I get a bash error concerning ALSA’s buffer overflow (ALSA buffer xrun.). Moreover, the output isn’t played smoothly : the audio is played back with constant interruptions, as it happens with the video.

    MY ATTEMPTS TO SOLVE THE ISSUE :

    • I’ve been trying to figure out how to solve this problem. I’ve tried
      to follow the same steps as explained here
      https://bbs.archlinux.org/viewtopic.php?id=171477, without any luck.

    • I’ve tried to increase the size of the ALSA buffer, but I don’t have
      in my computer any of the directories containing alsa-audio.h. Even
      if I create the paths and file by myself, and edit the buffer size,
      it won’t work.

    • After that, I created .asoundrc and followed the same steps as
      listed in http://www.alsa-project.org/main/index.php/Asoundrc,
      without any success

    • Lastly, I tried to use Qjack, and changed some parameters concerning buffer size from my webcam’s mic. It didn’t work as well.

    I don’t know what to do anymore. Does anyone know what I could do in order to solve this problem ?

    I’m running Ubuntu 14.04, and using the following software :

    1. GNU bash v4.3.11(1)-release (x86_64-pc-linux-gnu)
    2. opencaster (MPEG2 transport stream data generator and packet manipulator ; opencaster 3.2.2+dfs- 1)
    3. ffmpeg version 1.2.6-7:1.2.6-1 trusty1
    4. VLC media player (vlc 2.1.4-0ubuntu14.04.1)
    5. QjackCtl (qjackctl 0.3.10-2)
  • ffmpeg on rasbian to rtmd server - no output

    5 mai 2020, par TwoSeven

    I have set up a nginx-rtmd server on a raspberry pi and am using it to output to obs. I can successfully stream from my GoPro 7 and pick up the output on VLC on my phone.

    



    I have set up a pi camera on another rpi and using raspivd I can see the camera video in a window on a small touch display attached to it.

    



    I have set up ffmpeg with h264/aac support and piped the output of raspivid into it. Apart from a warning saying cur_dts is invalid, ffmpeg appears to be running (the output says 100k frames so far).

    



    The issue is that I get no output in VLC (just a spinning icon) when I try and connect to the nginx-rtmp server. I do still get the video window on the rpi screen (which is unexpected).

    



    The command I am using is

    



    raspivid -o - -t 0 -w 1920 -h 1080 -fps 25 -b 4000000 -g 50 | ./ffmpeg -loglevel debug -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://<address>/<app>/<fname>&#xA;</fname></app></address>

    &#xA;&#xA;

    does anyone have any pointers as to what might be incorrect. I am not so familiar with ffmpeg other than a cursory understanding of the parameters and what it does.

    &#xA;&#xA;

    Regards.

    &#xA;