How to grab the desktop in the webm format
Hi! Nice to meet you. First of all, let me introduce myself to this group: my name is Alexandre. I am a 44 y. o. man who work in the central library of the "Health Sciences Center" of the UFRJ (Federal University of Rio de Janeiro). At home, I only use Linux to all the tasks. Sometimes, I like to record the desktop, as you can see in the link below: http://lugarparaler.com/conheca-o-retext.html I always use "Simple Screen Record" to do this, but in the last days I've heard, for the very first time, about the webm format (and the webp for pics). And then I've googled trying to find a way to grab my desktop and save it directly in this format. I've found out the FFMPEG website and read the documentation. I've made some tests in the terminal, and I was very happy to discover I can grab my desktop with very good sound and video using the following command line: # ffmpeg -video_size 1600x900 -framerate 30 -f x11grab -i :0.0 -f alsa -ac 2 -i hw:0 -c:v libx264 -qp 0 -preset ultrafast capture.mkv The above command is a mix of several "copy and paste" from pieces of text from the FFMEPG website, and I am not sure if I really understand what all the options do, to be honest... let's say I was lucky... But I really can't understand how to save the video in the webm format. If I change the "capture.mkv" for "capture.webm", I get an error message in the terminal. Could anybody please send me a command line to grab my desktop and save it in the webm format? I'm sorry if I'm making an obvious question... and sorry for my english too... Thanks in advance. Alexandre.
Alexandre Almeida <lugarparaler <at> selodigital.net> writes:
But I really can't understand how to save the video in the webm format. If I change the "capture.mkv" for "capture.webm", I get an error message in the terminal.
Command line and complete, uncut console output missing. Carl Eugen
Hi, Carl ! I will paste the console output for you: ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.3.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --en able-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --ena ble-ladspa --enable-libass --enable-libbluray --enable-libdcadec --enable-libfreetype -- enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libm p3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enab le-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvor bis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-netcdf --enable-shared --enable-version3 --enable-x11grab libavutil 55. 17.103 / 55. 17.103 libavcodec 57. 24.102 / 57. 24.102 libavformat 57. 25.100 / 57. 25.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 31.100 / 6. 31.100 libavresample 3. 0. 0 / 3. 0. 0 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 Input #0, x11grab, from ':0.0': Duration: N/A, start: 1464468959.871402, bitrate: N/A Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1600x900, 30 fps, 30 tbr, 10 00k tbn, 30 tbc Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, alsa, from 'hw:0': Duration: N/A, start: 1464468959.974821, bitrate: 1536 kb/s Stream #1:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s No pixel format specified, yuv444p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players. [libx264 @ 0x55f90b8d6060] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 [libx264 @ 0x55f90b8d6060] profile High 4:4:4 Predictive, level 4.0, 4:4:4 8-bit [libx264 @ 0x55f90b8d6060] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyl eft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=3 lookahead_threads=1 slic ed_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0 [libopus @ 0x55f90b8d6fc0] No bit rate set. Defaulting to 96000 bps. Output #0, webm, to 'capture20.webm': Metadata: encoder : Lavf57.25.100 Stream #0:0: Video: h264 (libx264), yuv444p, 1600x900, q=-1--1, 30 fps, 1k tbn, 30 t bc Metadata: encoder : Lavc57.24.102 libx264 Side data: unknown side data type 10 (24 bytes) Stream #0:1: Audio: opus (libopus), 48000 Hz, stereo, s16, 96 kb/s Metadata: encoder : Lavc57.24.102 libopus Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Stream #1:0 -> #0:1 (pcm_s16le (native) -> opus (libopus)) Press [q] to stop, [?] for help [x11grab @ 0x55f90b8bcb80] Thread message queue blocking; consider raising the thread_qu eue_size option (current value: 8) [alsa @ 0x55f90b8c4280] Thread message queue blocking; consider raising the thread_queue _size option (current value: 8) [webm @ 0x55f90b8d4b40] Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtit les are supported for WebM. av_interleaved_write_frame(): Invalid argument [webm @ 0x55f90b8d4b40] Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtit les are supported for WebM. Error writing trailer of capture20.webm: Invalid argumentframe= 5 fps=0.0 q=-1.0 Lsiz e= 1kB time=00:00:00.46 bitrate= 14.2kbits/s dup=0 drop=3 speed=1.06x video:871kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [libx264 @ 0x55f90b8d6060] frame I:1 Avg QP: 0.00 size:315281 [libx264 @ 0x55f90b8d6060] frame P:4 Avg QP: 0.00 size:144086 [libx264 @ 0x55f90b8d6060] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x55f90b8d6060] mb P I16..4: 60.5% 0.0% 0.0% P16..4: 0.4% 0.0% 0.0% 0 .0% 0.0% skip:39.1% [libx264 @ 0x55f90b8d6060] coded y,u,v intra: 16.3% 15.4% 14.9% inter: 0.5% 0.5% 0.5% [libx264 @ 0x55f90b8d6060] i16 v,h,dc,p: 84% 16% 0% 0% [libx264 @ 0x55f90b8d6060] kb/s:15284.96 Conversion failed! On Sat, May 28, 2016 at 5:51 PM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Alexandre Almeida <lugarparaler <at> selodigital.net> writes:
But I really can't understand how to save the video in the webm format. If I change the "capture.mkv" for "capture.webm", I get an error message in the terminal.
Command line and complete, uncut console output missing.
Carl Eugen
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Alexandre Almeida <lugarparaler <at> selodigital.net> writes:
I will paste the console output for you:
If you need help here, please provide the command line you tested together with the complete, uncut console output. Please remember not to top-post here. Carl Eugen
I am really sorry... The moderator of this mailing list can delete my messages, no problem. Alexandre. On Sat, May 28, 2016 at 6:01 PM, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Alexandre Almeida <lugarparaler <at> selodigital.net> writes:
I will paste the console output for you:
If you need help here, please provide the command line you tested together with the complete, uncut console output.
Please remember not to top-post here.
Carl Eugen
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
2016-05-28 22:59 GMT+02:00 Alexandre Almeida <lugarparaler@selodigital.net>:
Output #0, webm, to 'capture20.webm': Metadata: encoder : Lavf57.25.100 Stream #0:0: Video: h264 (libx264), yuv444p, 1600x900, q=-1--1, 30 fps, 1k tbn, 30 t bc Metadata: encoder : Lavc57.24.102 libx264 Side data: unknown side data type 10 (24 bytes) Stream #0:1: Audio: opus (libopus), 48000 Hz, stereo, s16, 96 kb/s Metadata: encoder : Lavc57.24.102 libopus Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Stream #1:0 -> #0:1 (pcm_s16le (native) -> opus (libopus)) Press [q] to stop, [?] for help [x11grab @ 0x55f90b8bcb80] Thread message queue blocking; consider raising the thread_qu eue_size option (current value: 8) [alsa @ 0x55f90b8c4280] Thread message queue blocking; consider raising the thread_queue _size option (current value: 8) [webm @ 0x55f90b8d4b40] Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtit les are supported for WebM.
Since you did not provide any command line, we can only guess, but it looks like you never specified which codec to use for the video stream. Doing so will most likely help. Note that VP9 encoding is sort of slow, I have no idea how ffmpeg will behave if the input gets too far ahead from the output.
Cley Faye <cleyfaye <at> gmail.com> writes:
it looks like you never specified which codec to use for the video stream.
On the contrary, the problem is that an unsupported codec is specified.
Doing so will most likely help.
Note that VP9 encoding is sort of slow
This is correct, vp9 encoding will most likely not work in real-time. Carl Eugen
participants (3)
-
Alexandre Almeida -
Carl Eugen Hoyos -
Cley Faye