You are not logged in.

#1 2014-03-06 17:56:10

spiritech
Member
Registered: 2013-11-27
Posts: 63

ffmpeg record screencast without encoding on the fly.

does anyone know how which option to use to allow encoding after the initial recording, like recordmydesktop does? or is it even possible?

so far i have tried -preset ultrafast or -codec:v rawvideo.

this is the code from https://trac.ffmpeg.org/wiki/How%20to%2 … h%20FFmpeg

ffmpeg -f x11grab -s 1024x768 -r24 -i :0.0 -vcodec libx264 -crf 0 -preset ultrafast output.flv

it states

If you have a slow computer, it will not be smart to grab and encode your video at the same time, because slow CPU will not be able to do this. In that case, first grab all you need and save it as uncompressed video/audio and when you finish the grabbing process then start converting it to whatever you need:

however this is not the case as the final result is a flv that is already encoded. i have looked on forums and googled this question without any satisfactory results. it does not matter which solution i use that i have found so far, they always encode the video as it is being recorded. so any help appreciated.

spiritech

Last edited by spiritech (2014-03-06 18:00:02)

Offline

#2 2014-03-06 20:45:05

teckk
Member
Registered: 2013-02-21
Posts: 519

Re: ffmpeg record screencast without encoding on the fly.

Use your own parameters.

If you want sound add something like:

ffmpeg -f alsa -i hw:0,0 -c:a pcm_s16le

The file will be huge.

ffmpeg -f x11grab -r 24 -s 1024x768 -i :0.0 -c:v rawvideo -pix_fmt yuv420p output.avi

Depending on what you are doing, lower fps, lower bitrate, easier it will be.
Something like this should work on a lesser machine.

ffmpeg -f x11grab -r 14 -s 1024x768 -i :0.0 -c:v libx264 -b:v 500k output2.avi

Offline

#3 2014-03-06 21:16:26

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: ffmpeg record screencast without encoding on the fly.

spiritech wrote:
ffmpeg -f x11grab -s 1024x768 -r24 -i :0.0 -vcodec libx264 -crf 0 -preset ultrafast output.flv

(…)
however this is not the case as the final result is a flv that is already encoded.

It is encoded in x264 since that is what you asked for. However -crf 0 means “lossless” (or almost), so you can then re-encode the resulting file as you want.

Offline

Board footer

Powered by FluxBB