> > 2018-09-25 1:14 GMT+02:00, Rafael Mancini <[email protected]>: > > > I'm trying to generate a WebM video with alpha for a HTML5 template. > > Already tried different compression settings and I'm still getting poor > > quality results for complex videos with lots of animated objects. > > > > The Input video is made in After Effects. Its a short 8 seconds video. > I'm > > using a PNG sequence with alpha, 24fps in Full HD. > > > > I'm using the following command line: > > > > ffmpeg -r 24 -i "InputFileName_%04d.png" -r 24 -b:v 10000k -bufsize > 10000k > > -force_key_frames expr:gte(t,n_forced*1) OutputFileName.webm > > Complete, uncut console output missing. > (Did you confirm that this output format actually helps you? > Afair, not many applications can read it.) > > The second "-r" is not a good idea, please try first without > "-force_key_frames", > you can still add it later, and please try with constant quality instead of > bitrate first. > > Carl Eugen >
So, after altering the command line I got a much better result with this: *ffmpeg -r 24 -i "input 1920x1080.mov" -c:v libvpx-vp9 -crf 30 -b:v 0 "output 1920x1080.webm"* The quality is a lot better, but still not exactly what I wanted... very close, but not quiet. The file size is good: 4.4MB. This is very usefull to generate videos for HTM5 with alpha channel, so you can create interaction layers on top of any template. I wish I could set the -crf value to 20. That's where I got a very good result, but the file gets too big: +30MB. Below is the complete output. Any ideas on how to increase quality and decrease file size? *ffmpeg version N-92043-g0f36ad514c Copyright (c) 2000-2018 the FFmpeg developers* * built with gcc 8.2.1 (GCC) 20180813* * configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth* * libavutil 56. 19.101 / 56. 19.101* * libavcodec 58. 31.100 / 58. 31.100* * libavformat 58. 18.102 / 58. 18.102* * libavdevice 58. 4.104 / 58. 4.104* * libavfilter 7. 32.100 / 7. 32.100* * libswscale 5. 2.100 / 5. 2.100* * libswresample 3. 2.100 / 3. 2.100* * libpostproc 55. 2.100 / 55. 2.100* *Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input 1920x1080.mov':* * Metadata:* * major_brand : qt* * minor_version : 537199360* * compatible_brands: qt* * creation_time : 2018-09-27T18:58:25.000000Z* * Duration: 00:00:08.04, start: 0.000000, bitrate: 731670 kb/s* * Stream #0:0(eng): Video: qtrle (rle / 0x20656C72), bgra(progressive), 1920x1080, 730627 kb/s, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24 tbn, 24 tbc (default)* * Metadata:* * creation_time : 2018-09-27T18:58:25.000000Z* * handler_name : Apple Video Media Handler* * encoder : Animation* * timecode : 00:00:00:00* * Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)* * Metadata:* * creation_time : 2018-09-27T18:58:25.000000Z* * handler_name : Time Code Media Handler* * timecode : 00:00:00:00* *Stream mapping:* * Stream #0:0 -> #0:0 (qtrle (native) -> vp9 (libvpx-vp9))* *Press [q] to stop, [?] for help* *[libvpx-vp9 @ 00000155dfeccec0] v1.7.0-825-g7b925825a* *Output #0, webm, to 'output 1920x1080.webm':* * Metadata:* * major_brand : qt* * minor_version : 537199360* * compatible_brands: qt* * encoder : Lavf58.18.102* * Stream #0:0(eng): Video: vp9 (libvpx-vp9), yuva420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 24 fps, 1k tbn, 24 tbc (default)* * Metadata:* * creation_time : 2018-09-27T18:58:25.000000Z* * handler_name : Apple Video Media Handler* * timecode : 00:00:00:00* * encoder : Lavc58.31.100 libvpx-vp9* * Side data:* * cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1* *frame= 193 fps=1.8 q=0.0 Lsize= 4480kB time=00:00:08.00 bitrate=4586.9kbits/s speed=0.0758x* *video:1756kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 155.090347%* _______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
