Some comments are german but I guess the commands speak for themselveCode:# Auflösung für Screencapture wählen" RES=$(zenity --text="Aufnahmeauflösung auswählen" --list --title "Auflösung:" --column "Bildschirmauflösung:" "1920x1080" "1360x768" "1280x960" "1024x768" "960x600" "960x540" "640x480" --height=220) # Gewählte Bildschirmauflösung setzen xrandr -s $RES # Aufnahmenamen generieren TIME_STAMP=$(date +day%j-%Hh%Mmin) CAPTURE_NAME="gamerec-$TIME_STAMP-huffyuv-$RES.avi" echo $CAPTURE_NAME # Aufnahme per ffmpeg starten ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 25 -s $RES -i :0.0+nomouse -acodec pcm_s16le -vcodec huffyuv -sameq $CAPTURE_NAME
Xubuntu 12.04 x64 // AMD E-350 (2x1.6 GHz) // 8 GB DDR3 RAM // GeForce 9500GT (1GB) with passive cooling
Unfortunately, I still don' get the expected output (see attachment). What could be wrong?
Which codec do support the features described by verb3k?Code:ffmpeg -f x11grab -r 15 -s 768x512 -i :0.0+810,55 -sameq -vcodec huffyuv /tmp/ffmpeg-tests/out.avi
Last edited by M759; April 7th, 2011 at 08:33 PM. Reason: Bye QUOTE :p
Hm, strange...for me this works fine. Even when capturing games with OpenGL acceleration.
Unfortunately your screenshot does reveal nothing to me.
BTW: No need always to do full-quotes.
Edit: Yes, much better readable without full-quotes
I see your issue now but this is not the usual behaveiour. I would suspect any other issues. Did you disable any desktop effects ?
As pointed out: This works perfectly for me during capturing games up to 800x600 at 30 fps without any visual impact in 1:1 quality.
Last edited by HolgerB; April 7th, 2011 at 09:00 PM.
Xubuntu 12.04 x64 // AMD E-350 (2x1.6 GHz) // 8 GB DDR3 RAM // GeForce 9500GT (1GB) with passive cooling
I've disabled desktop effects. My screen resolution is 1600x900.
Can you record my screenshot using my supplied command, and tell me whether your results equal mine, in order to determine whether the issue is caused by ffmpeg, or my configuration/files?
Shure I can try your commandline. What would you like me to capture ?
Didn´t the ffmpeg output reveal any issues ? BTW: What about audio ?
Do you set your audio codec ?
And for huffyuv -sameq is not needed since the codec is lossless in general.
Xubuntu 12.04 x64 // AMD E-350 (2x1.6 GHz) // 8 GB DDR3 RAM // GeForce 9500GT (1GB) with passive cooling
This picture. Attach a snapshot of your screen capture to your next reply.Code:ffmpeg -f x11grab -r 15 -s 768x512 -i :0.0+810,55 -vcodec libx264 -vpre lossless_ultrafast -threads 0 /tmp/ffmpeg-tests/out.mkv
I'm back to recordMyDesktop
I found the cause of the throw-away of all frames after fram ~3200. I mounted my /tmp to the RAM, allowing a maximum virtual disk space of 2 GB. After about 3.2k frames, my /tmp was full, denying any attempt to store more data.
Hi verb3k!
First of all, thanks for the great tutorial! It has been of great help!
I followed the instructions as listed by FakeOutdoorsman here to complete the installation without any errors. However, when I try to use the command in Step 1:
I get the following output:Code:ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1024x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
I believe the problem is with the line in red. My understanding is that CRF (Constant Rate-Factor) is a single-pass encoding scheme and somewhere (probably in the preset file) 2pass is being specified. I looked at the preset file in ~/ffmpeg/ffpresets/libx264-lossless_ultrafast.ffpreset for any such specification but couldn't find any. Neither could I find a specification for CRF (-crf).Code:ffmpeg version git-N-30357-gb2a6f25, Copyright (c) 2000-2011 the FFmpeg developers built on May 28 2011 13:44:51 with gcc 4.5.2 configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libvpx libavutil 51. 3. 0 / 51. 3. 0 libavcodec 53. 6. 1 / 53. 6. 1 libavformat 53. 2. 0 / 53. 2. 0 libavdevice 53. 1. 0 / 53. 1. 0 libavfilter 2. 11. 0 / 2. 11. 0 libswscale 0. 14. 0 / 0. 14. 0 libpostproc 51. 2. 0 / 51. 2. 0 [alsa @ 0x9635b40] capture with some ALSA plugins, especially dsnoop, may hang. [alsa @ 0x9635b40] Estimating duration from bitrate, this may be inaccurate Input #0, alsa, from 'pulse': Duration: N/A, start: 1306618191.989985, bitrate: N/A Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s [x11grab @ 0x9626920] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1024 height: 768 [x11grab @ 0x9626920] shared memory extension found [x11grab @ 0x9626920] Estimating duration from bitrate, this may be inaccurate Input #1, x11grab, from ':0.0': Duration: N/A, start: 1306618192.390409, bitrate: 754974 kb/s Stream #1.0: Video: rawvideo, bgra, 1024x768, 754974 kb/s, 30 tbr, 1000k tbn, 30 tbc Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p' File 'output.mkv' already exists. Overwrite ? [y/N] y [buffer @ 0x9633f60] w:1024 h:768 pixfmt:bgra tb:1/1000000 sar:0/1 sws_param: [ffsink @ 0x96374c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out' [scale @ 0x96367c0] w:1024 h:768 fmt:bgra -> w:1024 h:768 fmt:yuv420p flags:0x4 [libx264 @ 0x9634700] --psnr used with psy on: results will be invalid! [libx264 @ 0x9634700] --tune psnr should be used if attempting to benchmark psnr! [libx264 @ 0x9634700] interlace + weightp is not implemented [libx264 @ 0x9634700] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 [libx264 @ 0x9634700] constant rate-factor is incompatible with 2pass. Output #0, matroska, to 'output.mkv': Stream #0.0: Video: libx264, yuv420p, 1024x768, q=0-69, pass 1, pass 2, 200 kb/s, 90k tbn, 30 tbc Stream #0.1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, pass 1, pass 2, 1411 kb/s Stream mapping: Stream #1.0 -> #0.0 Stream #0.0 -> #0.1 Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Any pointer to what I could do to sort this out?
By the way, I tried
andCode:-preset slower
instead ofCode:-preset slow
which seemed to work fine. However, I'm not satisfied with the video quality resulting from these options and am not to keen on using them.Code:-vpre lossless_ultrafast // and other lossless presets.
Could this be an issue with the hardware? The relevant system specs are listed below:
OS: Ubuntu 11.04 (32-bit)
RAM: 4GB
GPU: ATI Radeon HD 5730 (has been an issue with Unity in Ubuntu 11.04)
I also tried re-installing all the components, which wasn't of any help.
Any directions on where I should look are appreciated.
Thank you for your time!
Last edited by varunvats; May 29th, 2011 at 02:14 AM.
Well, the best video quality that I could get was with these options:
The output:Code:ffmpeg -f x11grab -s 1366x768 -r 30 -i :0.0 -vcodec libx264 out.mkv
Again, this is only video, no audio.Code:ffmpeg version git-N-30357-gb2a6f25, Copyright (c) 2000-2011 the FFmpeg developers built on May 28 2011 13:44:51 with gcc 4.5.2 configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libvpx libavutil 51. 3. 0 / 51. 3. 0 libavcodec 53. 6. 1 / 53. 6. 1 libavformat 53. 2. 0 / 53. 2. 0 libavdevice 53. 1. 0 / 53. 1. 0 libavfilter 2. 11. 0 / 2. 11. 0 libswscale 0. 14. 0 / 0. 14. 0 libpostproc 51. 2. 0 / 51. 2. 0 [x11grab @ 0xab51b40] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1366 height: 768 [x11grab @ 0xab51b40] shared memory extension found [x11grab @ 0xab51b40] Estimating duration from bitrate, this may be inaccurate Input #0, x11grab, from ':0.0': Duration: N/A, start: 1306628110.928816, bitrate: 1007124 kb/s Stream #0.0: Video: rawvideo, bgra, 1366x768, 1007124 kb/s, 30 tbr, 1000k tbn, 30 tbc Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p' [buffer @ 0xab5eac0] w:1366 h:768 pixfmt:bgra tb:1/1000000 sar:0/1 sws_param: [ffsink @ 0xab5eb20] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out' [scale @ 0xab42040] w:1366 h:768 fmt:bgra -> w:1366 h:768 fmt:yuv420p flags:0x4 [libx264 @ 0xab444e0] Default settings detected, using medium profile [libx264 @ 0xab444e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 [libx264 @ 0xab444e0] profile High, level 3.2 [libx264 @ 0xab444e0] 264 - core 115 r1995 c1e60b9 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 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=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, matroska, to 'out.mkv': Metadata: encoder : Lavf53.2.0 Stream #0.0: Video: libx264, yuv420p, 1366x768, q=2-31, 200 kb/s, 1k tbn, 30 tbc Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop, [?] for help frame= 80 fps= 16 q=27.0 Lsize= 206kB time=3.90 bitrate= 431.6kbits/s its/s video:204kB audio:0kB global headers:0kB muxing overhead 0.506686% frame I:1 Avg QP:18.76 size: 66434 [libx264 @ 0xab444e0] frame P:21 Avg QP:22.86 size: 6545 [libx264 @ 0xab444e0] frame B:58 Avg QP:28.54 size: 83 [libx264 @ 0xab444e0] consecutive B-frames: 2.5% 2.5% 0.0% 95.0% [libx264 @ 0xab444e0] mb I I16..4: 71.6% 3.7% 24.7% [libx264 @ 0xab444e0] mb P I16..4: 0.3% 0.0% 1.4% P16..4: 1.6% 0.1% 0.1% 0.0% 0.0% skip:96.6% [libx264 @ 0xab444e0] mb B I16..4: 0.1% 0.0% 0.0% B16..8: 0.9% 0.0% 0.0% direct: 0.0% skip:99.0% L0:37.9% L1:62.1% BI: 0.0% [libx264 @ 0xab444e0] 8x8 transform intra:2.9% inter:35.2% [libx264 @ 0xab444e0] coded y,uvDC,uvAC intra: 30.6% 36.8% 34.2% inter: 0.1% 0.2% 0.1% [libx264 @ 0xab444e0] i16 v,h,dc,p: 66% 34% 0% 0% [libx264 @ 0xab444e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 54% 26% 1% 1% 2% 2% 1% 2% [libx264 @ 0xab444e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 33% 17% 2% 3% 4% 4% 3% 5% [libx264 @ 0xab444e0] i8c dc,h,v,p: 63% 18% 17% 2% [libx264 @ 0xab444e0] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0xab444e0] ref P L0: 68.0% 6.2% 24.1% 1.8% [libx264 @ 0xab444e0] ref B L0: 64.4% 32.8% 2.8% [libx264 @ 0xab444e0] ref B L1: 92.0% 8.0% [libx264 @ 0xab444e0] kb/s:410.54
One thing that intrigued me was even though I set the fps to 30, the output shows it was changed to 16! Any reason why that could be happening? Something to do with the line "Default settings detected, using medium profile"?
Thanks!
Bookmarks