Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Screencapture mit ffmpeg
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
OCmylife
n00b
n00b


Joined: 07 Apr 2012
Posts: 27
Location: Bocholt

PostPosted: Tue Feb 26, 2013 9:36 pm    Post subject: Screencapture mit ffmpeg Reply with quote

Halli Hallo.
Ich wollte jetzt so langsam mal anfangen How-tos und reviews auf youtube zu erstellen und war auf der Suche nach einem gescheiten Screen-capture programm inkl Sound. Nach einigem testen mit recordmydesktop bin ich dann auf ffmpeg gestoßen, welches zumindest das Bild nicht verzerrt. Nur mit dem Ton haut es noch nicht so ganz hin. Er wird zwar aufgenommen, allerdings verschluckt Pulseaudio ne Menge:

Von 4 Mal 1-2-3-4 bleibt noch einmal 1-2-3 übrig. Da kann was nicht. Beim Laptop(KDE) kann ich auf Pulseaudio auch nicht verzichten, da ich über alsa-only gar keinen Sound bekomme. Beim HTPC(Gnome 3.6) ist es wenn ich mich recht erinner eine Abhängigkeit von Gnome

Hier der log:

Code:

ocmylife@gentoo-htpc ~ $ ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1920*1080 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 -threads 0 test.mkv
ffmpeg version 1.0.4 Copyright (c) 2000-2012 the FFmpeg developers
  built on Feb 24 2013 21:47:38 with gcc 4.6.3 (Gentoo 4.6.3 p1.11, pie-0.5.2)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe' --extra-cflags='-march=native -O2 -pipe' --extra-cxxflags='-march=native -O2 -pipe' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --disable-network --disable-vaapi --disable-vdpau --disable-runtime-cpudetect --enable-libmp3lame --enable-libvo-aacenc --enable-libx264 --enable-libxvid --disable-indev=v4l2 --disable-indev=oss --disable-indev=jack --enable-x11grab --enable-libpulse --disable-outdev=oss --enable-libfreetype --enable-libvorbis --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-avx --disable-mmxext --disable-ssse3 --disable-vis --disable-neon --cpu=host --enable-hardcoded-tables
  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 59.100 / 54. 59.100
  libavformat    54. 29.104 / 54. 29.104
  libavdevice    54.  2.101 / 54.  2.101
  libavfilter     3. 17.100 /  3. 17.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[alsa @ 0x6331b0] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, alsa, from 'pulse':
  Duration: N/A, start: 1361914096.110773, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[x11grab @ 0x633b60] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1920 height: 1080
[x11grab @ 0x633b60] shared memory extension found
[x11grab @ 0x633b60] Estimating duration from bitrate, this may be inaccurate
Input #1, x11grab, from ':0.0':
  Duration: N/A, start: 1361914096.167252, bitrate: 1990656 kb/s
    Stream #1:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 1990656 kb/s, 30 tbr, 1000k tbn, 30 tbc
File 'test.mkv' already exists. Overwrite ? [y/N] y
using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x6600c0] profile High 4:4:4 Predictive, level 4.0, 4:4:4 8-bit
[libx264 @ 0x6600c0] 64 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0: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=6 lookahead_threads=1 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=cqp mbtree=0 qp=0
Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf54.29.104
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv444p, 1920x1080, q=-1--1, 1k tbn, 30 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo -> libx264)
  Stream #0:0 -> #0:1 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
frame=   12 fps=0.0 q=0.0 size=     801kB time=00:00:00.16 bitrate=39273.2kbits/frame=   24 fps= 22 q=0.0 size=    1249kB time=00:00:00.56 bitrate=18039.9kbits/frame=   36 fps= 23 q=0.0 size=    1633kB time=00:00:00.96 bitrate=13830.8kbits/frame=   48 fps= 23 q=0.0 size=    2017kB time=00:00:01.36 bitrate=12084.9kbits/frame=   60 fps= 23 q=0.0 size=    2401kB time=00:00:01.76 bitrate=11129.5kbits/frame=   72 fps= 23 q=0.0 size=    2657kB time=00:00:02.16 bitrate=10042.9kbits/frame=   84 fps= 23 q=0.0 size=    3105kB time=00:00:02.56 bitrate=9907.7kbits/sframe=   96 fps= 23 q=0.0 size=    3457kB time=00:00:02.96 bitrate=9543.8kbits/sframe=  109 fps= 23 q=0.0 size=    3809kB time=00:00:03.40 bitrate=9176.5kbits/sframe=  122 fps= 23 q=0.0 size=    4193kB time=00:00:03.83 bitrate=8960.6kbits/sframe=  135 fps= 23 q=0.0 size=    4577kB time=00:00:04.26 bitrate=8786.4kbits/sframe=  147 fps= 23 q=0.0 size=    4929kB time=00:00:04.66 bitrate=8651.2kbits/sframe=  159 fps= 23 q=0.0 size=    5286kB time=00:00:05.06 bitrate=8545.8kbits/sframe=  172 fps= 23 q=0.0 size=    5606kB time=00:00:05.50 bitrate=8349.6kbits/sframe=  174 fps= 23 q=32525.0 Lsize=    5923kB time=00:00:05.80 bitrate=8365.8kbits/s   
video:4859kB audio:1034kB subtitle:0 global headers:0kB muxing overhead 0.510775%
[libx264 @ 0x6600c0] frame I:1     Avg QP: 0.00  size:531150
[libx264 @ 0x6600c0] frame P:173   Avg QP: 0.00  size: 25690
[libx264 @ 0x6600c0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x6600c0] mb P  I16..4: 31.5%  0.0%  0.0%  P16..4:  0.6%  0.0%  0.0%  0.0%  0.0%    skip:68.0%
[libx264 @ 0x6600c0] coded y,u,v intra: 3.2% 12.3% 2.1% inter: 0.4% 0.6% 0.3%
[libx264 @ 0x6600c0] i16 v,h,dc,p: 98%  2%  0%  0%
[libx264 @ 0x6600c0] kb/s:6862.77
 


Vielleicht hat jemand ja eine glorreiche Idee ;-) Vielen Dank schonmal
OCmylife

Edit: Ich habe die fps jetzt mal von 30 auf 15 runter gestellt. Und mein Text war scheinbar ganz drauf. :-) Falls es trotzdem noch Optimierungsmöglichkeiten gibt, dann sagt Bescheid ;-)
Back to top
View user's profile Send private message
syn0ptik
Apprentice
Apprentice


Joined: 09 Jan 2013
Posts: 267

PostPosted: Wed Feb 27, 2013 8:40 am    Post subject: Reply with quote

Wäre arbeit...
Code:
ffmpeg -f alsa -ac 2 -i hw:0 -f x11grab -r 25 -s 1024*768 -i :1.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 -threads 0 test.mkv
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Sat Mar 02, 2013 2:24 pm    Post subject: Re: Screencapture mit ffmpeg Reply with quote

OCmylife wrote:
Halli Hallo.
Ich wollte jetzt so langsam mal anfangen How-tos und reviews auf youtube zu erstellen und war auf der Suche nach einem gescheiten Screen-capture programm inkl Sound. Nach einigem testen mit recordmydesktop bin ich dann auf ffmpeg gestoßen, welches zumindest das Bild nicht verzerrt.


RecordMyDesktop verzerrt gar nichts, das geschieht beim Upload auf youtube.
Am besten einfach OGV in MP4 wandeln und dann erst hochladen.
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
OCmylife
n00b
n00b


Joined: 07 Apr 2012
Posts: 27
Location: Bocholt

PostPosted: Sun Mar 03, 2013 2:02 am    Post subject: Reply with quote

Mit dem Wort "verzerren" habe ich mich vielleicht falsch ausgedrückt. Ich denke das es das Wort "Artefakte" und "graphical glitches" besser trifft. Und es war egal, ob ich auf dem Laptop mit ner AMD APU und der KDE-oberfläche oder auf dem HTPC mit Intel CPU, Nvidia GPU und Gnome Oberfläche aufgenommen habe. Ich hatte die Videos auch noch nicht hochgeladen, von daher muss das Problem lokal entstehen.
Wirklich glücklich wurde ich bisher noch mit keiner Lösung und habe es aus dem Grund bisher auch noch nicht wieder in Angriff genommen.
Back to top
View user's profile Send private message
root_tux_linux
l33t
l33t


Joined: 21 Dec 2003
Posts: 966

PostPosted: Wed Mar 06, 2013 1:15 pm    Post subject: Reply with quote

OCmylife wrote:
Mit dem Wort "verzerren" habe ich mich vielleicht falsch ausgedrückt. Ich denke das es das Wort "Artefakte" und "graphical glitches" besser trifft. Und es war egal, ob ich auf dem Laptop mit ner AMD APU und der KDE-oberfläche oder auf dem HTPC mit Intel CPU, Nvidia GPU und Gnome Oberfläche aufgenommen habe. Ich hatte die Videos auch noch nicht hochgeladen, von daher muss das Problem lokal entstehen.
Wirklich glücklich wurde ich bisher noch mit keiner Lösung und habe es aus dem Grund bisher auch noch nicht wieder in Angriff genommen.


Sowas hatte ich bisher auch nie z.B. http://www.youtube.com/watch?v=IP9j0MbkkpY (Ja ist zwar Ubuntu, aber nutze auch RecordMyDesktop unter Gentoo und Fedora)
_________________
Intel Core i7 6700K@4.6GHz, Gigabyte GTX 980 Ti G1, Gigabyte Gaming 7, Hyper X Fury 32GB, 2 TB Samsung EVO 840 Basic
ASUS ROG Swift PG348Q Display
ASUS ROG ASUS G771JW Notebook
Back to top
View user's profile Send private message
OCmylife
n00b
n00b


Joined: 07 Apr 2012
Posts: 27
Location: Bocholt

PostPosted: Mon Mar 11, 2013 1:59 pm    Post subject: Reply with quote

Also ich habe auf meinem Laptop eine sehr interessante Entdeckung gemacht mit qt-recordmydesktop:

Wenn ich den ganzen Bildschirm als Fullscreen abgreife, kommt es zu Artefakten. Stelle ich in dem Programm allerdings ein, das ich nur ein Fenster abgreife(selbst wenn besagtes Fenster über den ganzen Screen geht), habe ich keine Bildstörungen. Diese sind sehr gut bei terminals zu sehen. Und ich hatte auch schon ausprobiert, ob es an xterm liegt, indem ich rxvt als default gesetzt habe. Aber leider Fehlanzeige.
Dafür klappt es mit dem Sound jetzt wirklich wunderbar. Einfach "pulse" in recordmydesktop eingetragen und es hört sich super an :-)

Edit: Und doch gleich wieder vergessen. Habe jetzt gerade ein 18 Min Video gemacht, weil ich dachte das jetzt alles passt und schwupps wieder Bildfehler, die ich im normalen Betrieb(und auch beim spielen) nicht habe. Aber ein E450 scheint dafür echt nicht geschaffen zu sein. Werde dann da nochmal mit der Auflösung spielen müssen.

Edit 2: Habe jetzt ein wenig vom Bild abgeschnitten und jetzt waren 15 Min auch kein Problem. Das Video schneide ich aber lieber am HTPC mit dem I5. Ist auf dem Laptop nur am ruckeln. :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum