View Full Version : optimal ffmpeg settings for screencast?
yari
30th July 2008, 22:00
what would be optimal setting for screencasts....one that would typically involve just a windows gui. would the resulting compression rates be economical ? with or without x264 ?
Sharktooth
31st July 2008, 01:09
optimal = best = not allowed here.
Ranguvar
31st July 2008, 01:16
optimal = best = not allowed here.
I disagree... optimal is a perfectly good question. Like if I asked what's optimal for anime. Optimal would probably be more refs, less merange, lower beta deblocking, higher alpha deblocking.
Anyways, OP, I would recommend off the top of my head that more refs will probably help a lot, probably p4x4 blocks will help more than usual, and it might be good to increase alpha deblocking for less mosquito noise and blocks / decrease beta deblocking for better retention of sharp lines. Also, try to keep a high resolution, preferably anamorphic. Other than that, experiment.
Dark Shikari
31st July 2008, 01:24
Anyways, OP, I would recommend off the top of my head that more refs will probably help a lot, probably p4x4 blocks will help more than usual, and it might be good to increase alpha deblocking for less mosquito noise and blocks / decrease beta deblocking for better retention of sharp lines. Also, try to keep a high resolution, preferably anamorphic. Other than that, experiment.I'd say that for screen capture (assuming its mostly basic Windows-style graphics, e.g. menus, buttons, etc):
1. No AQ, since everything is either "line" or "flat color".
2. Subpartitions probably aren't that useful--multiref might be useful.
3. A good motion search is likely very important if you're going to be moving around windows a lot.
4. Trellis is probably a good idea.
yari
31st July 2008, 07:39
thank you,
but i've no idea what those things mean or do....can someone link me to a general guide to all those stuff ?
yari
31st July 2008, 07:50
okay im reading this....its a start http://www.digital-digest.com/articles/x264_options_page2.html
smok3
31st July 2008, 08:36
yari: really depends on what kind of screencats it is, also depends on how pretty do you want it, i did this 'guide' few years ago, using vp6, not pretty, but readable imho (and i didn't bother with settings much);
http://somestuff.org/video_guides/all/flvplayer.php?moviename=movies/audacity_640_480.flv (mute)
a. this was captured with http://camstudio.org/
b. then avisynth for resizing, frame-rate changes
c. vp6 (while today you 'should' use x264 if target is flash)
smok3
31st July 2008, 10:39
i found the original avi clip, re-encoded by today's standards, again didn't bother with cmd much;
http://somestuff.org/flashAVC/flvplayer.php?moviename=movies/audacity-x800y600.mp4
(x264 --pass 1 --bitrate 480 --stats "" --bframes 1 --subme 1 --analyse none --me dia --progress --no-psnr --filter "0,0" --output NUL ""
x264 --pass 2 --bitrate 480 --stats "" --ref 5 --bframes 1 --subme 6 --b-rdo --analyse p8x8,b8x8,i4x4,p4x4 --progress --no-psnr --filter "0,0" --output "" "")
x264 thrown an error about converging the 1st pass curve, but still manages to get throught 2nd pass with incredibly low bitrate of 175 kbps.
poisondeathray
31st July 2008, 14:49
@smok3 -
1) Do you know offhand what x264 settings are compatible with streaming/embedding x264 in .mp4 with Flash Player or JW? Would it be similar to a Quicktime compatible setting?
2) I see you are using the JW media player; do you know of any differences in cmopatibility between JW and Adobe's player?
Sorry for hijacking the thread
Dark Shikari
31st July 2008, 14:51
@smok3 -
1) Do you know offhand what x264 settings are compatible with streaming/embedding x264 in .mp4 with Flash Player or JW? Would it be similar to a Quicktime compatible setting?There's basically no limit from what I've seen. Even totally maxed settings (http://mirror05.x264.nl/Dark/Flash/mof.html) seem to work fine.
2) I see you are using the JW media player; do you know of any differences in cmopatibility between JW and Adobe's player?
Sorry for hijacking the threadAdobe has a player?
smok3
31st July 2008, 14:51
1) (almost) anything goes, compatibility is much better than with quicktime
2) JW is using adobe flash to operate (one layer above the flash that is), what is the question?
Dark Shikari
31st July 2008, 14:51
thank you,
but i've no idea what those things mean or do....can someone link me to a general guide to all those stuff ?Read this page (http://ffmpeg.x264.googlepages.com/mapping) and this page (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/) and this page (http://rob.opendot.cl/index.php/useful-stuff/x264-to-ffmpeg-option-mapping/).
yari
31st July 2008, 21:33
yari: really depends on what kind of screencats it is, also depends on how pretty do you want it, i did this 'guide' few years ago, using vp6, not pretty, but readable imho (and i didn't bother with settings much);
http://somestuff.org/video_guides/all/flvplayer.php?moviename=movies/audacity_640_480.flv (mute)
a. this was captured with http://camstudio.org/
b. then avisynth for resizing, frame-rate changes
c. vp6 (while today you 'should' use x264 if target is flash)
that is sort of the idea....but im wondering whether the resulting storage size is signficantly reduced for such videos ? would it be possible to make the size of the video much bigger and still have "readable" quality ?
thank you.
yari
31st July 2008, 21:34
Read this page (http://ffmpeg.x264.googlepages.com/mapping) and this page (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/) and this page (http://rob.opendot.cl/index.php/useful-stuff/x264-to-ffmpeg-option-mapping/).
thanks!
smok3
31st July 2008, 21:49
would it be possible to make the size of the video much bigger and still have "readable" quality ?
yes (you did see my other link?)
yari
1st August 2008, 03:14
yes (you did see my other link?)
ah i missed that one. thank you.
this is bloody amazing quality! what was the original video size?
i see that 640x480 is around 1.5mb.
i wonder how big the 800 is....
if i were to not use x264 library, how much can i expect?
i did a quick experiment but i found that using x264, although cpu intensive (fan was making lot of noise) and taking longer to encode, it resulted in superioir quality and 20%~30% smaller file size compared to just encoding to flv in ffmpeg. is this like for any type of videos out there ?
Comatose
1st August 2008, 03:19
(my opinion) x264 is the most efficient H.264 encoder right now, and H.264 is the most efficient widely used codec right now, so yes :p
Dark Shikari
1st August 2008, 03:31
ah i missed that one. thank you.
this is bloody amazing quality! what was the original video size?
i see that 640x480 is around 1.5mb.
i wonder how big the 800 is....
if i were to not use x264 library, how much can i expect?
i did a quick experiment but i found that using x264, although cpu intensive (fan was making lot of noise) and taking longer to encode, it resulted in superioir quality and 20%~30% smaller file size compared to just encoding to flv in ffmpeg. is this like for any type of videos out there ?H.264 is already by a wide margin the most efficient format you can encode to with ffmpeg--and x264 is one of the best H.264 encoders out there (if not the best, for many applications)--so expect a rather large advantage from using it ;)
mzso
17th January 2013, 14:59
Is there anything faster than the ultrafast preset?
I tried this:
ffmpeg -f dshow -i video=screen-capture-recorder -acodec copy -vcodec libx264 -preset ultrafast -crf 0 out.mkv
My pc is not the fastest and I prefer to record losslessly with minimal compression, and later convert, and this was a bit too much for my pc too. Or I shouldn't use h264 in this case?
(Of course audio didn't work. Could anyone tell me how to record the sounds too?)
Dark Shikari
17th January 2013, 19:35
What CPU do you have and what resolution are you trying to record? Could you paste the output of ffmpeg?
LoRd_MuldeR
17th January 2013, 20:02
Is there anything faster than the ultrafast preset?
I tried this:
ffmpeg -f dshow -i video=screen-capture-recorder -acodec copy -vcodec libx264 -preset ultrafast -crf 0 out.mkv
My pc is not the fastest and I prefer to record losslessly with minimal compression, and later convert, and this was a bit too much for my pc too. Or I shouldn't use h264 in this case?
(Of course audio didn't work. Could anyone tell me how to record the sounds too?)
If you just want to capture to a lossless intermediate format, you could try huffyuv/ffvhuff. Should be pretty fast.
(Alternatively you might also give Lagarith a try, which should compress a bit better and supports multi-threading)
mzso
17th January 2013, 20:26
What CPU do you have and what resolution are you trying to record? Could you paste the output of ffmpeg?
Well, I'm recording my desktop which is 1920*1200 and I have an e6750.
Nothing ingeresting on the command line, just a lot things like this:
[dshow @ 00000000003bc8e0] real-time buffer 456% full! frame dropped!
Last message repeated 2 times
[dshow @ 00000000003bc8e0] real-time buffer 454% full! frame dropped!
Last message repeated 2 times
[dshow @ 00000000003bc8e0] real-time buffer 456% full! frame dropped!
Last message repeated 2 times
real-time buffer 456% full! frame dropped!time=00:00:35.47 bitrate=11644.1kbits/s
[dshow @ 00000000003bc8e0] real-time buffer 454% full! frame dropped!
If you just want to capture to a lossless intermediate format, you could try huffyuv/ffvhuff. Should be pretty fast.
(Alternatively you might also give Lagarith a try, which should compress a bit better and supports multi-threading)
Thanks for the tipp.
Dark Shikari
17th January 2013, 20:35
Huffyuv is often pretty slow because it doesn't have interframe compression or multithreading.
Well, I'm recording my desktop which is 1920*1200 and I have an e6750.I was mainly just looking to check the framerate, whether x264 was compiled with asm, and so forth (the stuff before all the warnings).
mzso
17th January 2013, 20:51
Huffyuv is often pretty slow because it doesn't have interframe compression or multithreading.
I was mainly just looking to check the framerate, whether x264 was compiled with asm, and so forth (the stuff before all the warnings).
I see:
D:\>ffmpeg -f dshow -i video="screen-capture-recorder":audio="virtual-audio-capturer" -acodec copy -vcodec libx264 -preset ultrafast -crf 0 tesztfile.mkv
ffmpeg version N-48731-g7e5c5fa Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 10 2013 19:52:48 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --en
able-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib --enable-filter=frei0r
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.107 / 54. 59.107
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
[dshow @ 000000000032c8e0] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.1 : 7.1
Input #0, dshow, from 'video=screen-capture-recorder:audio=virtual-audio-capturer':
Duration: N/A, start: 79153.412000, bitrate: 5644 kb/s
Stream #0:0: Video: rawvideo, bgr24, 1920x1200, 30 tbr, 10000k tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le, 44100 Hz, 7.1, s16, 5644 kb/s
[libx264 @ 0000000003bd4960] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0000000003bd4960] profile High 4:4:4 Predictive, level 5.0, 4:4:4 8-bit
[libx264 @ 0000000003bd4960] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 r
ef=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 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 sce
necut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0
Output #0, matroska, to 'tesztfile.mkv':
Metadata:
encoder : Lavf54.59.107
Stream #0:0: Video: h264, yuv444p, 1920x1200, q=-1--1, 1k tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le, 44100 Hz, 7.1, 5644 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> libx264)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[dshow @ 000000000032c8e0] real-time buffer 456% full! frame dropped!
Last message repeated 1 times
Blue_MiSfit
18th January 2013, 10:09
Also, please refrain from committing thread necromancy :)! This thread hadn't been touched in 3.5 years!
Next time, please open a new thread.
royia
20th July 2018, 23:04
@DarkShakiri,
I use FastStone Capture which unfortunately outputs WMV videos.
Yet I could never convert the WMV into h264 (Using x264) with similar quality at the same size.
Could it be WMV has a feature which makes it optimized to Scree Capture?
mzso
21st July 2018, 08:52
@DarkShakiri,
I use FastStone Capture which unfortunately outputs WMV videos.
Yet I could never convert the WMV into h264 (Using x264) with similar quality at the same size.
Could it be WMV has a feature which makes it optimized to Scree Capture?
Converting from a lossy format to another will always degrade quality.
foxyshadis
23rd July 2018, 05:16
@DarkShakiri,
I use FastStone Capture which unfortunately outputs WMV videos.
Yet I could never convert the WMV into h264 (Using x264) with similar quality at the same size.
Could it be WMV has a feature which makes it optimized to Scree Capture?
WMV does indeed have a screen coding codec that's significantly better optimized to regular computer use than general-purpose video codecs. Try lossless mode, which enables transform bypass. x265 exposes --cu-lossless and --tskip, which are part of the base standard, but has not yet implemented Screen Content Coding, which would be closer to what you have now, nor have most decoding chipsets.
Also, DarkShikari is long gone.
royia
8th July 2019, 18:44
WMV does indeed have a screen coding codec that's significantly better optimized to regular computer use than general-purpose video codecs. Try lossless mode, which enables transform bypass.
Hi,
Could you please give me recommended parameters inside VLC convert screen?
Is there any open standard video compression with similar results to WMV for this type of content?
It has amazing results with very low bit rate.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.