Re: VERY simple guide to grab desktop with FFMPEG
Thanks for opening a topic like this! :D
It's just what I need. To bad it doesn't work for me.
I start the script and it crashes (I think it's the pulse part because I have a identical script that works but the only difference is that instead of pulse it's hw:0,0).
I would like to have a working script that records the desktop, microphone and desktop sounds at the same time.
Can someone help?
Re: VERY simple guide to grab desktop with FFMPEG
Is it possible to record desktop, mic, desktop sound and webcam?
EDIT: and how do I know ffmpeg is recording and how to make it record?
Re: VERY simple guide to grab desktop with FFMPEG
Hi! Can I stream my desktop live via udp in ffmpeg? Any help would be greatly apeciated!
Re: VERY simple guide to grab desktop with FFMPEG
A good start might be:
Code:
ffmpeg -framerate ntsc -video_size 640x480 -f x11grab -i :0.0 -vcodec libx264 -crf 26 -preset fast -f mpegts udp://<hostname>:<port>
Re: VERY simple guide to grab desktop with FFMPEG
I'm running into a problem where I can't capture more than 2048 pixels of my screen. My screen width is 2560x1600. Is there any way to downscale the resolution before I record/stream it live?
For option "-s 2560x1600', I get the error "swScaler: Compile time max width is 2048 change VOF/VOFW and recompile".
Re: VERY simple guide to grab desktop with FFMPEG
Please include your ffmpeg command and the complete console output.
Re: VERY simple guide to grab desktop with FFMPEG
ffmpeg -f x11grab -s woxga -r 20 -i :0.0 -f mpegts udp://192.168.4.111:1234
FFmpeg version SVN-r15261, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm -std=c99 -fno-math-errno --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-optimizations --disable-stripping
libavutil 49.10. 0 / 49.10. 0
libavcodec 51.71. 0 / 51.71. 0
libavformat 52.22. 1 / 52.22. 1
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 1. 0 / 0. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Feb 4 2009 19:41:05, gcc: 4.1.2 20071124 (Red Hat 4.1.2-42)
[x11grab @ 0x191521b0]device: :0.0 -> display: :0.0 x: 0 y: 0 width: 2560 height: 1600
[x11grab @ 0x191521b0]shared memory extension found
Input #0, x11grab, from ':0.0':
Duration: N/A, start: 1380813980.541533, bitrate: -2147483 kb/s
Stream #0.0: Video: rawvideo, rgb32, 2560x1600, -2147483 kb/s, 20.00 tb(r)
swScaler: Compile time max width is 2048 change VOF/VOFW and recompile
Cannot get resampling context
When I change the resolution, (example 1280x800 half of screen), I only get the upper right quadrant. I just want to know how I can resample the whole screen to a lower resolution.
Re: VERY simple guide to grab desktop with FFMPEG
Quote:
Originally Posted by
Jay_Kemper
Code:
FFmpeg version SVN-r15261, Copyright (c) 2000-2008 Fabrice Bellard, et al.
Wow, this is absolutely ancient. Where did you find this? What is your distro?
There have been at least 41582 updates to ffmpeg since your graybeard version. Not to be blunt, but you're wasting your time (and mine) using this.
Please use the code tag.
Re: VERY simple guide to grab desktop with FFMPEG
Turns out that the source code needs to be downloaded and built. The version available from their git repo seems to handle higher resolutions. In their compilation instructions, they do miss some required package that need to be installed.
From the original ffmpeg installed from the distribution repo
$ ffmpeg
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
$ git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
$ yum remove ffmpeg
$ cd ffmpeg
$ ./configure --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
It may say that some options aren't valid, just delete them and try again. You might also get
Xext not found
Open up your package manager and search for xext and install the dev packages. Same for Xfiles.
$ make
....
$ make install
$ ffmpeg -f x11grab -s 2560x1600 -r 20 -i :0.0 -s 1280x800 -f mpegts udp://192.168.0.1:1234
Re: Simple guide to grab desktop with FFMPEG