Hey guys, so I'm trying to do some screen recording on Xubuntu Linux 20.04 using a new laptop I bought. I'm trying to set this up as simple as possible, which in my case is setting the following command up as a simple alias:
However, I get the following message in response:Code:ffmpeg -video_size 1920x1080 -framerate 24 -f x11grab -c:v h264_nvenc -qp 0 ~/Desktop/video.mp4
Is there a different window manager I should be specifying on XFCE? If I type the following command:Code:[NULL @ 0x5601c0bee900] Requested output format 'x11grab' is not a suitable output format
x11grab is listed as a decoder, so it's definitely present. Using that "-f x11grab" argument is what the ffmpeg documentation says to do. Anyone got any bright ideas?Code:ffmpeg -formats
+ Reply to Thread
Results 1 to 12 of 12
-
-
Your missing an input parameter. FFmpeg needs the display number of the screen you want to capture.This should work.
Code:ffmpeg -video_size 1920x1080 -framerate 24 -f x11grab -i :0.0 -c:v h264_nvenc -qp 0 ~/Desktop/video.mp4
-
-
try ffmpeg -f x11grab -r 30 -i :0.0+x,y -f flv rtmp://url?
- https://superuser.com/questions/709866/ffmpeg-x11grab-a-single-window -
-
have you tried these ?? - https://trac.ffmpeg.org/wiki/Capture/Desktop
-
-
for this error - [NULL @ 0x5601c0bee900] Requested output format 'x11grab' is not a suitable output format
in your first post, try this fix - https://rubenerd.com/recording-screens-with-ffmpeg/ -
Heeey I've actually made "progress", so this is the current command I'm running:
Code:ffmpeg -framerate 24 -f x11grab -i :0.0 -c:v h264_nvenc -qp 20 ~/Desktop/video.mp4
I don't see any bad parameters, does anyone else? Or is my syntax wrong yet again? -
for this - Cannot load libcuda.so.1, Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bite_rate, rate, width or height
see here - https://stackoverflow.com/questions/13877031/error-while-opening-encoder-for-output-st...ect-parameters -
I'm not trying to record audio at the moment and there's no audio stream present anyway, so that doesn't have an effect. Here's the full output:
Code:master@lemonNITRO:~ $ ffmpeg -video_size 1920x1080 -framerate 24 -f x11grab -i :0.0 -acodec copy -c:v h264_nvenc -qp 20 ~/Desktop/recording.mp4 ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 [x11grab @ 0x55f63c141840] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, x11grab, from ':0.0': Duration: N/A, start: 1642797024.636254, bitrate: N/A Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 24 fps, 1000k tbr, 1000k tbn, 1000k tbc File '/home/master/Desktop/recording.mp4' already exists. Overwrite ? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc)) Press [q] to stop, [?] for help [h264_nvenc @ 0x55f63c14fc40] Cannot load libcuda.so.1 Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed!
EDIT: Also, bgr0 pixel format?Last edited by CursedLemon; 21st Jan 2022 at 14:54.
-
Just tested recording with:
Code:ffmpeg -video_size 1920x1080 -framerate 24 -f x11grab -i :0.0 -c:v libx264 -crf 20 ~/Desktop/recording.mp4
EDIT: IT DOESN'TLast edited by CursedLemon; 21st Jan 2022 at 15:21.
Similar Threads
-
[LINUX] can ffmpeg (or any othe linux command) genere an ANIMATED waveform
By Jintor_Universe in forum ProgrammingReplies: 5Last Post: 28th Oct 2021, 19:29 -
FFMPEG fails when downloading youtube video
By SuperNova15 in forum Video Streaming DownloadingReplies: 0Last Post: 25th Sep 2020, 07:42 -
screen capture video and audio through headphones with ffmpeg on Linux
By xyzo in forum LinuxReplies: 2Last Post: 24th May 2019, 13:33 -
how to extract lossless audio from an MKV file - ffmpeg fails
By batemanj in forum Newbie / General discussionsReplies: 2Last Post: 17th Apr 2019, 07:50 -
ffmpeg Creating slideshow from images fails
By Budman1 in forum Video ConversionReplies: 1Last Post: 19th Feb 2018, 03:44