You are not logged in.

#1 2010-06-29 19:17:26

Wyrm88
Member
Registered: 2010-05-05
Posts: 53

[SOLVED]ffmpeg + alsa + .mkv = fail

Hi, I'm using arch with kde, and am trying to make a screencast of my desktop. I gave up on recordmydesktop, xvidcap and istanbul, and am at the moment trying with ffmpeg. Here is my terminal output (I used this tutorial):

[wyrm88@nbabic ~]$ ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 30 -s 1440x900 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output1.mkv
FFmpeg version SVN-r23792, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jun 26 2010 14:49:29 with gcc 4.5.0 20100610 (prerelease)
  configuration: --prefix=/usr --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-pthreads --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-version3 --enable-nonfree --enable-runtime-cpudetect --disable-debug
  libavutil     50.19. 0 / 50.19. 0
  libavcodec    52.78. 0 / 52.78. 0
  libavformat   52.71. 0 / 52.71. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.20. 0 /  1.20. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[alsa @ 0x97cf510] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'hw:0,0':                                                                                                       
  Duration: N/A, start: 2510.999940, bitrate: N/A
    Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[x11grab @ 0x97d8e90] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1440 height: 900
[x11grab @ 0x97d8e90] shared memory extension  found
[x11grab @ 0x97d8e90] Estimating duration from bitrate, this may be inaccurate
Input #1, x11grab, from ':0.0':                                                                                                      
  Duration: N/A, start: 1277838916.826934, bitrate: 1244160 kb/s
    Stream #1.0: Video: rawvideo, bgra, 1440x900, 1244160 kb/s, 30 tbr, 1000k tbn, 30 tbc
[ffmpeg_output @ 0x980c9a0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x980cd10] w:1440 h:900 fmt:bgra -> w:1440 h:900 fmt:yuv420p flags:0x4
[libx264 @ 0x97e66b0] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x97e66b0] profile High 4:4:4 Predictive, level 4.0
[libx264 @ 0x97e66b0] 64 - core 98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=0 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
Output #0, matroska, to 'output1.mkv':
  Metadata:
    encoder         : Lavf52.71.0
    Stream #0.0: Video: libx264, yuv420p, 1440x900, q=10-51, 200 kb/s, 1k tbn, 30 tbc
    Stream #0.1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Stream mapping:
  Stream #1.0 -> #0.0
  Stream #0.0 -> #0.1
Press [q] to stop encoding
[alsa @ 0x97cf510] ALSA buffer xrun.
[matroska @ 0x97e5520] st:1 error, non monotone timestamps 343 >= 343its/s                                                           
av_interleaved_write_frame(): Operation not permitted

I tried running this command as root, but nothing changes.

Last edited by Wyrm88 (2010-06-29 22:00:16)

Offline

#2 2010-06-29 20:20:39

Wyrm88
Member
Registered: 2010-05-05
Posts: 53

Re: [SOLVED]ffmpeg + alsa + .mkv = fail

Hmm, I did a little google-ing and got here. It says to minimize xrun with using jack, but I can't get any sound with jack (tried with qjackctl, got everything for jack installed).

Offline

#3 2010-06-29 20:44:11

gpunkt
Member
From: terminated.
Registered: 2010-05-17
Posts: 54

Re: [SOLVED]ffmpeg + alsa + .mkv = fail

have you set up qjackctl? for nearly all applications you open you need to connect  if you want sound.

Offline

#4 2010-06-29 21:03:38

Wyrm88
Member
Registered: 2010-05-05
Posts: 53

Re: [SOLVED]ffmpeg + alsa + .mkv = fail

I uploaded a short clip showing that qjackctl is working. Here is my output of "jackd -d alsa", which I'm not sure but I think it's not complete. When i want to turn mpd on it can't find alsa.

Offline

#5 2010-06-29 21:59:58

Wyrm88
Member
Registered: 2010-05-05
Posts: 53

Re: [SOLVED]ffmpeg + alsa + .mkv = fail

Installed pulseaudio, started it and succesfully recorded sound with recordmydesktop big_smile.

Offline

Board footer

Powered by FluxBB