Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #----------------------Script ---------------------------------
- #Get file name
- read -e -p "Enter the path and name of file with out extension e.g. ~/video NOT ~/video.mp4 : " NAME
- INFO=$(xwininfo -frame)
- #get window size
- WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' |\
- grep -oEe '[0-9]+x[0-9]+')
- #get window offset
- WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' |\
- grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/+/,/' )
- #capture and encode video (luminance chrominance) upscaled twice to avoid subsampling issues due to colorspace conversion
- ffmpeg -f x11grab -y -r 24 -s $WIN_GEO \
- -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 \
- -vcodec libx264 -crf 18 $NAME.mp4
- #--------------------------------
- ffmpeg version 2.1.4 Copyright (c) 2000-2014 the FFmpeg developers
- built on Mar 14 2014 23:46:10 with gcc 4.8 (SUSE Linux)
- 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
- libavutil 52. 48.101 / 52. 48.101
- libavcodec 55. 39.101 / 55. 39.101
- libavformat 55. 19.104 / 55. 19.104
- libavdevice 55. 5.100 / 55. 5.100
- libavfilter 3. 90.100 / 3. 90.100
- libavresample 1. 1. 0 / 1. 1. 0
- libswscale 2. 5.101 / 2. 5.101
- libswresample 0. 17.104 / 0. 17.104
- libpostproc 52. 3.100 / 52. 3.100
- [x11grab @ 0x15a9680] device: :0.0+263,92 -> display: :0.0 x: 263 y: 92 width: 1672 height: 917
- [x11grab @ 0x15a9680] shared memory extension found
- X Error of failed request: BadMatch (invalid parameter attributes)
- Major opcode of failed request: 131 (MIT-SHM)
- Minor opcode of failed request: 4 (X_ShmGetImage)
- Serial number of failed request: 11
- Current serial number in output stream: 11
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement