Skip to content

Instantly share code, notes, and snippets.

@Marlinc
Created October 13, 2012 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marlinc/fe200d5bd0d8c1cb39e8 to your computer and use it in GitHub Desktop.
Save Marlinc/fe200d5bd0d8c1cb39e8 to your computer and use it in GitHub Desktop.

ffmpeg -f x11grab -r 30 -s 1300x774 -i :0.0+1505,163 -vcodec libx264 -s 1300x774 -b 250k -minrate 250k -maxrate 250k -bufsize 1835k -f flv hoi.flv

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:52:09 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.
[x11grab @ 0x11369c0] device: :0.0+1505,163 -> display: :0.0 x: 1505 y: 163 width: 1300 height: 774
[x11grab @ 0x11369c0] shared memory extension  found
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (MIT-SHM)
  Minor opcode of failed request:  4 (X_ShmGetImage)
  Serial number of failed request:  11
  Current serial number in output stream:  11

ffmpeg -f x11grab -r 30 -s 1300x744 -i :0.0+1505,163 -vcodec libx264 -s 1300x744 -b 250k -minrate 250k -maxrate 250k -bufsize 1835k -f flv rtmp://live.justin.tv/app/live_____________________

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:52:09 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.
[x11grab @ 0x111b9c0] device: :0.0+1505,163 -> display: :0.0 x: 1505 y: 163 width: 1300 height: 744
[x11grab @ 0x111b9c0] shared memory extension  found
[x11grab @ 0x111b9c0] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0+1505,163':
  Duration: N/A, start: 1350121221.595180, bitrate: 928512 kb/s
    Stream #0.0: Video: rawvideo, bgra, 1300x744, 928512 kb/s, 30 tbr, 1000k tbn, 30 tbc
Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0x112c980] w:1300 h:744 pixfmt:bgra
[avsink @ 0x1116480] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x1116b80] w:1300 h:744 fmt:bgra -> w:1300 h:744 fmt:yuv420p flags:0x4
[libx264 @ 0x1128100] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x1128100] profile Main, level 3.2
[libx264 @ 0x1128100] 264 - core 120 r2151 a3f4407 - 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=0x1:0x111 me=hex subme=7 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=-2 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=cbr mbtree=1 bitrate=250 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=250 vbv_bufsize=1835 nal_hrd=none ip_ratio=1.25 aq=1:1.00
Output #0, flv, to 'rtmp://live.justin.tv/app/live_____________________':
  Metadata:
    encoder         : Lavf53.21.0
    Stream #0.0: Video: libx264, yuv420p, 1300x744, q=-1--1, 250 kb/s, 1k tbn, 30 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
^Cframe=   19 fps= 10 q=41.0 Lsize=      79kB time=2.73 bitrate= 236.8kbits/s    /s    
video:78kB audio:0kB global headers:0kB muxing overhead 0.812512%
frame I:1     Avg QP:39.71  size: 29589
[libx264 @ 0x1128100] frame P:8     Avg QP:39.49  size:  6091
[libx264 @ 0x1128100] frame B:10    Avg QP:43.10  size:   116
[libx264 @ 0x1128100] consecutive B-frames: 26.3% 10.5%  0.0% 63.2%
[libx264 @ 0x1128100] mb I  I16..4: 54.3%  0.0% 45.7%
[libx264 @ 0x1128100] mb P  I16..4:  5.5%  0.0%  5.6%  P16..4:  2.3%  0.7%  0.3%  0.0%  0.0%    skip:85.5%
[libx264 @ 0x1128100] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  2.1%  0.0%  0.0%  direct: 0.0%  skip:97.8%  L0:30.1% L1:69.9% BI: 0.0%
[libx264 @ 0x1128100] coded y,uvDC,uvAC intra: 36.5% 31.5% 23.9% inter: 0.5% 0.2% 0.1%
[libx264 @ 0x1128100] i16 v,h,dc,p: 63% 35%  2%  0%
[libx264 @ 0x1128100] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41% 24% 16%  2%  4%  4%  3%  3%  4%
[libx264 @ 0x1128100] i8c dc,h,v,p: 76% 19%  5%  0%
[libx264 @ 0x1128100] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x1128100] ref P L0: 74.5%  6.6% 17.1%  1.7%
[libx264 @ 0x1128100] ref B L0: 13.4% 86.6%
[libx264 @ 0x1128100] kb/s:224.41
Received signal 2: terminating.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment