Advertisement
Guest User

Untitled

a guest
Mar 19th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. #----------------------Script ---------------------------------
  2. #Get file name
  3. read -e -p "Enter the path and name of file with out extension e.g. ~/video NOT ~/video.mp4 : " NAME
  4. INFO=$(xwininfo -frame)
  5.  
  6. #get window size
  7. WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' |\
  8. grep -oEe '[0-9]+x[0-9]+')
  9.  
  10. #get window offset
  11. WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' |\
  12. grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/+/,/' )
  13.  
  14. #capture and encode video (luminance chrominance) upscaled twice to avoid subsampling issues due to colorspace conversion
  15.  
  16. ffmpeg -f x11grab -y -r 24 -s $WIN_GEO \
  17. -i :0.0+$WIN_XY -pix_fmt yuv420p -vf scale=w=2*iw:h=2*ih -sws_flags neighbor+full_chroma_inp+full_chroma_int \
  18. -vcodec libx264 -crf 18 $NAME.mp4
  19.  
  20.  
  21. #--------------------------------
  22. ffmpeg version 2.1.4 Copyright (c) 2000-2014 the FFmpeg developers
  23. built on Mar 14 2014 23:46:10 with gcc 4.8 (SUSE Linux)
  24. 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
  25. libavutil 52. 48.101 / 52. 48.101
  26. libavcodec 55. 39.101 / 55. 39.101
  27. libavformat 55. 19.104 / 55. 19.104
  28. libavdevice 55. 5.100 / 55. 5.100
  29. libavfilter 3. 90.100 / 3. 90.100
  30. libavresample 1. 1. 0 / 1. 1. 0
  31. libswscale 2. 5.101 / 2. 5.101
  32. libswresample 0. 17.104 / 0. 17.104
  33. libpostproc 52. 3.100 / 52. 3.100
  34. [x11grab @ 0x15a9680] device: :0.0+263,92 -> display: :0.0 x: 263 y: 92 width: 1672 height: 917
  35. [x11grab @ 0x15a9680] shared memory extension found
  36. X Error of failed request: BadMatch (invalid parameter attributes)
  37. Major opcode of failed request: 131 (MIT-SHM)
  38. Minor opcode of failed request: 4 (X_ShmGetImage)
  39. Serial number of failed request: 11
  40. Current serial number in output stream: 11
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement