Advertisement
Guest User

Untitled

a guest
Mar 12th, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.96 KB | None | 0 0
  1. --------------------------------- Shell script (recordwindow.sh)
  2. #!/bin/sh
  3.  
  4. read -e -p "Enter the path and name of file without extension e.g. ~/video NOT ~/video.mp4: " NAME
  5. INFO=$(xwininfo -frame)
  6.  
  7. # Get the window size for capture
  8. WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' |\
  9. grep -oEe '[0-9]+x[0-9]+')
  10.  
  11. # Get the WIndow Offset
  12. WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' |\
  13. grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/+/,/' )
  14.  
  15. #Capture frames
  16. ffmpeg -f x11grab -y -r 24 -s $WIN_GEO -i :0.0+$WIN_XY -vcodec libx264 -b:v 1000k -p $NAME.mp4
  17.  
  18. --------------------------------------------
  19. #FFMPEG output
  20.  
  21. aiena@linux-hofs:~/SCRIPTS> ./recordwindow.sh
  22. Enter the path and name of file with out extension e.g. ~/video NOT ~/video.avi : /home/aiena/test1
  23. ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  24. built on Feb 12 2014 20:11:32 with gcc 4.8 (SUSE Linux)
  25. configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -fPIC -I/usr/include/gsm' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc --enable-gnutls
  26. libavutil 52. 48.101 / 52. 48.101
  27. libavcodec 55. 39.101 / 55. 39.101
  28. libavformat 55. 19.104 / 55. 19.104
  29. libavdevice 55. 5.100 / 55. 5.100
  30. libavfilter 3. 90.100 / 3. 90.100
  31. libavresample 1. 1. 0 / 1. 1. 0
  32. libswscale 2. 5.101 / 2. 5.101
  33. libswresample 0. 17.104 / 0. 17.104
  34. libpostproc 52. 3.100 / 52. 3.100
  35. [x11grab @ 0x7655e0] device: :0.0+0,0 -> display: :0.0 x: 0 y: 0 width: 1366 height: 741
  36. [x11grab @ 0x7655e0] shared memory extension found
  37. Input #0, x11grab, from ':0.0+0,0':
  38. Duration: N/A, start: 1394635276.199644, bitrate: 777374 kb/s
  39. Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1366x741, 777374 kb/s, 24 tbr, 1000k tbn, 24 tbc
  40. [swscaler @ 0x74f180] deprecated pixel format used, make sure you did set range correctly
  41. No pixel format specified, yuv444p for H.264 encoding chosen.
  42. Use -pix_fmt yuv420p for compatibility with outdated media players.
  43. [libx264 @ 0x784580] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
  44. [libx264 @ 0x784580] profile High 4:4:4 Predictive, level 3.2, 4:4:4 8-bit
  45. [libx264 @ 0x784580] 64 - core 135 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 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=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0
  46. Output #0, mp4, to '/home/aiena/test1.mp4':
  47. Metadata:
  48. encoder : Lavf55.19.104
  49. Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 1366x741, q=-1--1, 1000 kb/s, 12288 tbn, 24 tbc
  50. Stream mapping:
  51. Stream #0:0 -> #0:0 (rawvideo -> libx264)
  52. Press [q] to stop, [?] for help
  53. [swscaler @ 0x74f180] Warning: data is not aligned! This can lead to a speedloss
  54. frame= 209 fps= 24 q=-1.0 Lsize= 534kB time=00:00:08.70 bitrate= 502.1kbits/s
  55. video:532kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.297453%
  56. [libx264 @ 0x784580] frame I:2 Avg QP: 0.00 size: 70438
  57. [libx264 @ 0x784580] frame P:207 Avg QP: 0.00 size: 1949
  58. [libx264 @ 0x784580] mb I I16..4: 86.3% 1.1% 12.6%
  59. [libx264 @ 0x784580] mb P I16..4: 0.8% 0.1% 0.2% P16..4: 0.1% 0.1% 0.0% 0.0% 0.0% skip:98.8%
  60. [libx264 @ 0x784580] 8x8 transform intra:3.7% inter:30.3%
  61. [libx264 @ 0x784580] coded y,u,v intra: 16.2% 8.4% 8.6% inter: 0.1% 0.1% 0.1%
  62. [libx264 @ 0x784580] i16 v,h,dc,p: 64% 36% 0% 0%
  63. [libx264 @ 0x784580] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 47% 32% 21% 0% 0% 0% 0% 0% 0%
  64. [libx264 @ 0x784580] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 53% 30% 7% 2% 2% 1% 1% 2% 2%
  65. [libx264 @ 0x784580] Weighted P-Frames: Y:0.0% UV:0.0%
  66. [libx264 @ 0x784580] ref P L0: 82.6% 10.8% 5.5% 1.1%
  67. [libx264 @ 0x784580] kb/s:500.12
  68. Received signal 2: terminating.
  69.  
  70. aiena@linux-hofs:~/SCRIPTS>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement