You are not logged in.

#1 2016-10-01 00:45:43

amca01
Member
Registered: 2008-12-28
Posts: 57

Screencasting codecs? Current file is huge

In an attempt to make some screencasts, I'm experimenting with vokoscreen, which is a GUI to ffmpeg.  A test screencast, of size 1021x823, at 25fps for 7 min 21 sec, comes in at 147Mb. 

The only video codecs available through vokoscreen are mpeg4 and libx264.  I know very little about media production (as is perhaps obvious!) so I'm just after advice about software, tools, codecs which will enable me to make screencasts whose file sizes aren't too massive. 

I've had a hunt about, of course, but there doesn't seem to be much in one place, and which is up to date.

Thanks,
-A.

Offline

#2 2016-10-01 03:50:38

mpan
Member
Registered: 2012-08-01
Posts: 1,208
Website

Re: Screencasting codecs? Current file is huge

333kbps is quite low bitrate for a video of such resolution. Also 18MiB for 7 minutes is close to nothing. A typical YouTube video of that type is at best at this range, often 2–4× of that (even for lower resolutions!). So I don’t really see a reason for trying to decrease it further. However if you want, few tips are below.

Right now I took a video of my screen and the sample is 8.2MiB for 34s with lossless x264 1028×1024, 25fps, yuv444, ultrafast preset — this is 2Mbps. However, with veryslow preset, CRF 18, tuned for animation and no bounds on bitrate I get 306kib/s — and CRF 18 is close to lossless. At CRF 24 quality gets unacceptable for me, with some noise around color areas and the gain is not amazing: the result is at 230kbps. CRF of 36 gives 130kbps, but the quality is bad… yes still everything is clearly readable. CRF 42 gives 93kbps… but the content is not readable anymore. So, obviously, you may got below 200–150kbps with a screencast if you may sacrifice a bit of quality.

You can decrease the size futher by not using 25fps. For screencasts 20fps is still fine, and for some even less than that. However, don’t expect miracles.

For some situations setting -tune to stillimage instead of animation may be profitable — in some screencasts not much happens on the screen, so stillimage will give better results for them.

Finally, consider if cropping or scaling isn’t acceptable solution. File size is a quadratic function of image scale, so 1.5× smaller image will give you 2.25× smaller file on the expense of detail.

I believe that you’ll get a better answer if you ask the question via channels dedicated to video editing.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2016-10-01 08:11:41

ChemBro
Member
Registered: 2008-10-22
Posts: 703

Re: Screencasting codecs? Current file is huge

Alternative software: SimpleScreenRecorder (SSR), Open Broadcaster Software (OBS).

Offline

#4 2016-10-03 23:08:05

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: Screencasting codecs? Current file is huge

I mostly do 2 steps for screencasting. Recording lossless and then compress to what i like (h264/yuv420 or yuv444). I prefer 60fps.
These are my settings. Take what you need.

ffmpeg -y -thread_queue_size 512 -video_size 1920x1080 -framerate 60 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i cloop -c:v libx264rgb -preset veryfast -qp 0 -pix_fmt rgb24 -c:a copy output.mkv

cloop is an ALSA loopback device (~/.asoundrc):

pcm.ploop {
  type plug
  slave.pcm "hw:Loopback,0,0"
}

pcm.cloop {
  type plug
  slave.pcm "hw:Loopback,1,0"
}

Final encoding is something like that:

## -ss = start time
## -to = end time
ffmpeg -y -i output.mkv -ss 00:24 -to 02:11 -c:v libx264 -preset veryslow -crf 20 -c:a opus -b:a 128k screencapture-opus20-yuv444.mkv

sys2064

Offline

Board footer

Powered by FluxBB