Saturday, April 20, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 18027  / 2 Years ago, thu, march 31, 2022, 10:30:33

Trying to capture screen to video file encoded with lossless x264:



vic@vic-X202E ~/Desktop » ffmpeg -f x11grab -r 15 -s 1366x768 -i :0.0 -sameq -vcodec libx264 -preset:v ultrafast test.mkv
ffmpeg version 0.8.4-6:0.8.4-0ubuntu0.12.10.1, Copyright (c) 2000-2012 the Libav developers
built on Nov 6 2012 16:51:11 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[x11grab @ 0xc2bf60] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1366 height: 768
[x11grab @ 0xc2bf60] shared memory extension found
[x11grab @ 0xc2bf60] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':
Duration: N/A, start: 1357648973.267658, bitrate: 503562 kb/s
Stream #0.0: Video: rawvideo, bgra, 1366x768, 503562 kb/s, 15 tbr, 1000k tbn, 15 tbc
Unrecognized option 'preset:v'
Failed to set value 'ultrafast' for option 'preset:v'


Another try:



vic@vic-X202E ~/Desktop » ffmpeg -f x11grab -r 15 -s 1366x768 -i :0.0 -sameq -vcodec libx264 -preset ultrafast test.mkv  
ffmpeg version 0.8.4-6:0.8.4-0ubuntu0.12.10.1, Copyright (c) 2000-2012 the Libav developers
built on Nov 6 2012 16:51:11 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[x11grab @ 0x2482f60] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1366 height: 768
[x11grab @ 0x2482f60] shared memory extension found
[x11grab @ 0x2482f60] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':
Duration: N/A, start: 1357648985.325860, bitrate: 503562 kb/s
Stream #0.0: Video: rawvideo, bgra, 1366x768, 503562 kb/s, 15 tbr, 1000k tbn, 15 tbc
Unrecognized option 'preset'
Failed to set value 'ultrafast' for option 'preset'
vic@vic-X202E ~/Desktop »


Something broken? Using Kubuntu 12.10.


More From » ffmpeg

 Answers
7

Please don't use the same_quant option. It doesn't achieve what you think it does.



Now, to achieve lossless compression, you need to specify a constant quality of 0 with -crf 0.



avconv -f x11grab -r 15 -s 1366x768 -i :0.0 
-c:v libx264 -preset ultrafast -crf 0
test.mkv


See the x264 encoding guide for more options. If you don't have x264, you need libavcodec-extra.






Note that FFmpeg and Libav should treat this command the same. The problem with your system is that your FFmpeg version is terribly outdated. You should compile it yourself or download a static build from the homepage. Both would include x264.


[#33307] Thursday, March 31, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
panshow

Total Points: 454
Total Questions: 98
Total Answers: 122

Location: Philippines
Member since Sat, Jul 11, 2020
4 Years ago
;