Recherche avancée

Médias (91)

Autres articles (10)

  • 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 (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

Sur d’autres sites (2506)

  • How can I set up ALSA on VDS ?

    30 novembre 2014, par user2794729

    Greetings to everyone.

    I’m trying to convert SWF to MP4 using dump-gnash and ffmpeg.

    But the problem is the dump-gnash won’t create raw video without ALSA set up properly.

    Here is a part of dump-gnash log :

    ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
    Killed

    I readed about ALSA and learned is’t a sound card handler tool.

    But I don’t have any sound cards on my VDS. Then there is a question : how can i set up ALSA on VDS and make it work ?

  • 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)
  • How can I capture simple video input with audio from a capture device

    17 décembre 2020, par Geoff Sweet

    I'm using ffmpeg on Arch linux and trying to convert some old video to digital. The setup is pretty straightforward and if I connect to the capture device with VLC I get the video and audio just fine. So now I want to capture that with ffmpeg and write it to a file so I can edit it and clean it up. I'm only so-so familiar with ffmpeg and I've been digging through the man pages and here is where I am at.

    


    This command captures perfect audio, but no video :

    


    ffmpeg -f alsa -ac 2 -i front:CARD=Capture,DEV=0 out.mpeg


    


    This command captures perfect video ;

    


    ffmpeg -f video4linux2 -i /dev/video0 out.mpeg


    


    captures the video signal great, but with no audio. So combining them together should give me :

    


    ffmpeg -y -f alsa -ac 2 -i front:CARD=Capture,DEV=0 -f video4linux2 -i /dev/video0 out.mpeg


    


    But that command kinda falls on it's face. I get the audio, but no video :

    


    ffmpeg -y -f alsa -ac 2 -i front:CARD=Capture,DEV=0 -f video4linux2 -i /dev/video0 out.mpeg
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-shared --enable-version3
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'front:CARD=Capture,DEV=0':
  Duration: N/A, start: 1608093176.894565, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[video4linux2,v4l2 @ 0x56248fe0ab80] Dequeued v4l2 buffer contains corrupted data (0 bytes).
Input #1, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 0.000000, bitrate: 995328 kb/s
    Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 995328 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo (native) -> mpeg1video (native))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp2 (native))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x56248fe0ab80] Dequeued v4l2 buffer contains corrupted data (0 bytes).
    Last message repeated 30 times
[alsa @ 0x56248fdb3840] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[mpeg @ 0x56248fe0dfc0] VBV buffer size not set, using default size of 230KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 'out.mpeg':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #0:0: Video: mpeg1video, yuv420p(progressive), 1920x1080, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.91.100 mpeg1video
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
    Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
    Metadata:
      encoder         : Lavc58.91.100 mp2
frame=    2 fps=0.0 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=2.0 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=1.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=1.0 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.8 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.7 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.6 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.5 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.4 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.4 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.4 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.3 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.2 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/sframe=    2 fps=0.1 q=3.2 size=       0kB time=01:48:49.26 bitrate=   0.0kbits/s[video4linux2,v4l2 @ 0x56248fe0ab80] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=0 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=2020 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=4061 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=6102 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=8143 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=10184 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=12225 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=14266 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=16307 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=18348 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=20389 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=22430 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=24471 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=26512 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=28553 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=30594 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=32635 size=36451
[mpeg @ 0x56248fe0dfc0] buffer underflow st=0 bufi=34676 size=36451
frame=    2 fps=0.1 q=2.0 Lsize=    1470kB time=01:48:49.30 bitrate=   1.8kbits/s speed= 221x    
video:63kB audio:1388kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.314351%
Exiting normally, received signal 2.


    


    what I would ideally like is just a fairly raw 2ch stereo "dump" of what comes through the capture card.

    


    As always, I super appreciate any advice