Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (38)

  • 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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

Sur d’autres sites (7487)

  • Prevent output in error log when ffmpeg job is initiated via PHP's shell_exec()

    19 janvier 2016, par Jake

    I’m getting the entire output of the ffmpeg command printed to my server’s error.log — but as far as I can tell, the jobs complete successfully with no error.

    Is there any way to suppress the output ? I have seen people append stuff like >/dev/null 2>/dev/null & to their command, however that forces the command to return immediately and the job runs in the background. Unfortunately, I need the job to run in the foreground, because I need to do stuff with the output once the job is done.

    Here’s the command I am running...

    shell_exec('ffmpeg -i input.mp4 -f mp4 -c:v libx264 -preset slow -crf 24 -s 1280x720 -c:a libfdk_aac -profile:a aac_he -ar 22050 -b:a 64k -movflags +faststart output-1280x720.mp4');

    Here’s the output I am seeing...

    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] ffmpeg version N-77432-gc0f67e1 Copyright (c) 2000-2015 the FFmpeg developers
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   built with gcc 4.4.5 (Debian 4.4.5-8)
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   configuration: --prefix=/usr --enable-nonfree --enable-libfreetype --enable-gpl --enable-libx264 --enable-x11grab --enable-zlib --enable-libvpx --enable-libtheora --enable-libvorbis --enable-libfdk-aac --enable-libmp3lame --enable-libopus
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   libavutil      55. 11.100 / 55. 11.100
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   libavcodec     57. 19.100 / 57. 19.100
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   libavformat    57. 20.100 / 57. 20.100
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   libavdevice    57.  0.100 / 57.  0.100
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   libavfilter     6. 21.100 /  6. 21.100
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   libswscale      4.  0.100 /  4.  0.100
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   libswresample   2.  0.101 /  2.  0.101
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   libpostproc    54.  0.100 / 54.  0.100
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test-video.mp4':
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   Metadata:
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     major_brand     : mp42
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     minor_version   : 0
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     compatible_brands: mp42mp41
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     creation_time   : 2015-07-14 22:13:20
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   Duration: 00:00:10.51, start: 0.000000, bitrate: 17178 kb/s
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 17170 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     Metadata:
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]       creation_time   : 2015-07-14 22:13:20
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]       handler_name    : Alias Data Handler
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]       encoder         : AVC Coding
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (test-video-480p.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] Codec AVOption profile () specified for output file #0 (test-video-480p.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] [libx264 @ 0x4518ea0] using SAR=1280/1281
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] [libx264 @ 0x4518ea0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] [libx264 @ 0x4518ea0] profile High, level 3.0
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] [libx264 @ 0x4518ea0] 264 - core 120 r2151 a3f4407 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=24.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] Output #0, mp4, to 'test-video-480p.mp4':
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   Metadata:
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     major_brand     : mp42
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     minor_version   : 0
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     compatible_brands: mp42mp41
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     encoder         : Lavf57.20.100
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 854x480 [SAR 1280:1281 DAR 16:9], q=-1--1, 23.98 fps, 24k tbn, 23.98 tbc (default)
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     Metadata:
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]       creation_time   : 2015-07-14 22:13:20
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]       handler_name    : Alias Data Handler
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]       encoder         : Lavc57.19.100 libx264
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]     Side data:
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]       unknown side data type 10 (24 bytes)
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] Stream mapping:
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX]   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    [Tue Jan 19 17:10:59 2016] [error] [client XXX.XXX.XXX.XXX] Press [q] to stop, [?] for help
    [Tue Jan 19 17:11:00 2016] [error] [client XXX.XXX.XXX.XXX] frame=   24 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    \r
    [Tue Jan 19 17:11:00 2016] [error] [client XXX.XXX.XXX.XXX] frame=   53 fps= 51 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    \r
    [Tue Jan 19 17:11:02 2016] [error] [client XXX.XXX.XXX.XXX] frame=   62 fps= 25 q=29.0 size=      75kB time=00:00:00.00 bitrate=N/A speed=   0x    \r
    [Tue Jan 19 17:11:02 2016] [error] [client XXX.XXX.XXX.XXX] frame=   68 fps= 20 q=29.0 size=      90kB time=00:00:00.25 bitrate=2946.8kbits/s speed=0.0745x    \r
    [Tue Jan 19 17:11:03 2016] [error] [client XXX.XXX.XXX.XXX] frame=   74 fps= 18 q=29.0 size=     103kB time=00:00:00.50 bitrate=1689.9kbits/s speed=0.12x    \r
    [Tue Jan 19 17:11:04 2016] [error] [client XXX.XXX.XXX.XXX] frame=   80 fps= 16 q=29.0 size=     115kB time=00:00:00.75 bitrate=1258.5kbits/s speed=0.148x    \r
    [Tue Jan 19 17:11:05 2016] [error] [client XXX.XXX.XXX.XXX] frame=   86 fps= 15 q=29.0 size=     128kB time=00:00:01.00 bitrate=1049.4kbits/s speed=0.175x    \r
    [Tue Jan 19 17:11:05 2016] [error] [client XXX.XXX.XXX.XXX] frame=   92 fps= 15 q=29.0 size=     140kB time=00:00:01.25 bitrate= 917.2kbits/s speed=0.201x    \r
    [Tue Jan 19 17:11:06 2016] [error] [client XXX.XXX.XXX.XXX] frame=   94 fps= 14 q=29.0 size=     146kB time=00:00:01.33 bitrate= 895.4kbits/s speed=0.196x    \r
    [Tue Jan 19 17:11:07 2016] [error] [client XXX.XXX.XXX.XXX] frame=  100 fps= 13 q=29.0 size=     158kB time=00:00:01.58 bitrate= 816.6kbits/s speed=0.211x    \r
  • FFMPEG parameter -sseof position is not “cutting” as expected

    9 mai 2020, par Vitalii

    I have a regular recording of the desktop screen, indefinite in time. I want to keep in memory, only the last 30 seconds. My command looks like this, where I try to cut the video of the last 30 seconds, using -sizeof -30. But the entire length of the video is saved.
    
avfoundation -i '1' it's my macbook screen

    



    ffmpeg -rtbufsize 300M -sseof -30 -f avfoundation -i '1' -c:v libx264 -preset ultrafast -tune zerolatency -crf 25 ~/Desktop/output.mkv


    



    System Macos 10.15
    
ffmpeg version 4.2.2

    



    My full log

    



    ffmpeg -rtbufsize 300M -sseof -30  -f avfoundation -i '1' -c:v libx264 -preset ultrafast -tune zerolatency -crf 25 ~/Desktop/output.mkv
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.59)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[AVFoundation input device @ 0x7fec8551cec0] Configuration of video device failed, falling back to default.
[avfoundation @ 0x7fec8600a200] Selected pixel format (yuv420p) is not supported by the input device.
[avfoundation @ 0x7fec8600a200] Supported pixel formats:
[avfoundation @ 0x7fec8600a200]   uyvy422
[avfoundation @ 0x7fec8600a200]   yuyv422
[avfoundation @ 0x7fec8600a200]   nv12
[avfoundation @ 0x7fec8600a200]   0rgb
[avfoundation @ 0x7fec8600a200]   bgr0
[avfoundation @ 0x7fec8600a200] Overriding selected pixel format to use uyvy422 instead.
[avfoundation @ 0x7fec8600a200] Stream #0: not enough frames to estimate rate; consider increasing probesize
Cannot use -sseof, duration of 1 not known
Input #0, avfoundation, from '1':
  Duration: N/A, start: 107388.118500, bitrate: N/A
    Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 2560x1600, 1000k tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x7fec869bee00] MB rate (16000000000) > level limit (16711680)
[libx264 @ 0x7fec869bee00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fec869bee00] profile High 4:2:2, level 6.2, 4:2:2 8-bit
[libx264 @ 0x7fec869bee00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, matroska, to '/Users/vitalii-artec3d/Desktop/output.mkv':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p, 2560x1600, q=-1--1, 1000k fps, 1k tbn, 1000k tbc
    Metadata:
      encoder         : Lavc58.54.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=  322 fps= 30 q=19.0 Lsize=     947kB time=00:00:10.80 bitrate= 718.0kbits/s speed=0.998x    
video:943kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.382723%
[libx264 @ 0x7fec869bee00] frame I:2     Avg QP:19.00  size:465715
[libx264 @ 0x7fec869bee00] frame P:320   Avg QP:19.30  size:   105
[libx264 @ 0x7fec869bee00] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x7fec869bee00] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.1%  0.0%  0.0%  0.0%  0.0%    skip:99.9%
[libx264 @ 0x7fec869bee00] coded y,uvDC,uvAC intra: 36.9% 24.9% 21.0% inter: 0.0% 0.1% 0.0%
[libx264 @ 0x7fec869bee00] i16 v,h,dc,p: 66% 28%  4%  2%
[libx264 @ 0x7fec869bee00] i8c dc,h,v,p: 70% 16% 12%  1%
[libx264 @ 0x7fec869bee00] kb/s:23977740.00


    


  • Record sound with ffmpeg on ubuntu 12.04 [closed]

    27 juin 2012, par vzybilly

    I have been working for a few days on trying to get ffmpeg to record sound, a short list of what I've tried :

    #Crappy screen grab
    #ffmpeg -f x11grab -s "1366x768" -r "24" -i :0.0 -f mp4 ./out
    #awesome screen grab, grabbing sound but non out.
    #ffmpeg -f x11grab -s "1366x768" -r "24" -i :0.0 -f alsa -ac 2 -i pulse -vcodec libx264 -s "1366x768" -acodec libmp3lame -ab 128k -threads 0 -f mp4 ~/Desktop/vid
    #audio test, no audio in file.
    #ffmpeg -f alsa -ac 2 -i pulse -acodec libmp3lame -ab 128k -threads 0 -f mp3 ./test.mp3
    #awesome screen grab.
    #ffmpeg -f x11grab -s "1366x768" -r "24" -i :0.0 -threads 0 -sameq -an -f mp4 ~/Desktop/vid[/CODE]I'm running ubuntu 12.04 from beta(ish)

    it would be awesome if someone could help me get this to work all in one line or (the way i'm going) multiple instances of ffmpeg (screen grab, microphone, program)

    I have also tried the pavucontrol with doing the monitoring of when recording audio, but that does not help either.

    Thanks for all of your help, vzybilly 

    EDIT :
    This one crashed.

    $ ffmpeg -f alsa -ac 2 -i plughw:0,0 -f x11grab -r 100 -s 1366x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -threads 3 testVid.mkv
    ffmpeg version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
     built on Jun 12 2012 16:37:58 with gcc 4.6.3
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    [alsa @ 0x8fce240] capture with some ALSA plugins, especially dsnoop, may hang.
    [alsa @ 0x8fce240] Estimating duration from bitrate, this may be inaccurate
    Input #0, alsa, from 'plughw:0,0':
     Duration: N/A, start: 433.999945, bitrate: N/A
       Stream #0.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    [x11grab @ 0x8fde820] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1366 height: 768
    [x11grab @ 0x8fde820] shared memory extension  found
    [x11grab @ 0x8fde820] Estimating duration from bitrate, this may be inaccurate
    Input #1, x11grab, from ':0.0':
     Duration: N/A, start: 1340805516.368518, bitrate: N/A
       Stream #1.0: Video: rawvideo, bgra, 1366x768, -2147483 kb/s, 100 tbr, 1000k tbn, 100 tbc
    File 'testVid.mkv' already exists. Overwrite ? [y/N] y
    Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p'
    [buffer @ 0x8fde700] w:1366 h:768 pixfmt:bgra
    [avsink @ 0x8fcdf20] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
    [scale @ 0x8ff3ce0] w:1366 h:768 fmt:bgra -> w:1366 h:768 fmt:yuv420p flags:0x4
    [libx264 @ 0x8fdd920] lookaheadless mb-tree requires intra refresh or infinite keyint
    [libx264 @ 0x8fdd920] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
    [libx264 @ 0x8fdd920] profile Constrained Baseline, level 4.2
    [libx264 @ 0x8fdd920] 264 - core 120 r2151 a3f4407 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=0
    Output #0, matroska, to 'archinstall4.mkv':
     Metadata:
       encoder         : Lavf53.21.0
       Stream #0.0: Video: libx264, yuv420p, 1366x768, q=-1--1, 1k tbn, 100 tbc
       Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Stream mapping:
     Stream #1.0 -> #0.0
     Stream #0.0 -> #0.1
    Press ctrl-c to stop encoding
    [alsa @ 0x8fce240] ALSA buffer xrun.
    [matroska @ 0x8fcd980] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 213 >= 213
    av_interleaved_write_frame(): Invalid argument

    Any thoughts ?

    EDIT & ANSWER :
    Got it all working with a script :

    #!/bin/bash
    #vzybilly
    #these are temp files
    aud="aud.mp3"
    vid="vid.mp4"
    #grab audio & pid
    ffmpeg -f alsa -ac 2 -i plughw:0,0 $aud &
    audPID=$!
    #grab screen & pid
    ffmpeg -f x11grab -s "1366x768" -r "24" -i :0.0 -threads 0 -sameq -an -f mp4 $vid &
    vidPID=$!
    #wait, till name given (that means stop)
    read -p "Stop by giving an Output video name?" out
    #stop audio and video with pids
    kill -n 2 $audPID
    kill -n 2 $vidPID
    echo "$out"
    #combine to the target output file
    ffmpeg -i $aud -i $vid -acodec copy -vcodec copy "$out"
    #purge the temp files
    rm $aud
    rm $vid