What is the proper way to make webms?

what is the proper way to make webms?

Attached: how to make kpop webm.webm (1366x768, 1.52M)

Other urls found in this thread:

github.com/Cephel/Jow
is3.Jow
xmedia-recode.de/en/screenshots.html
blog.webmproject.org/2010/05/inside-webm-technology-vp8-alternate.html
danbooru.donmai.us/posts?page=4&tags=tama
wiki.installgentoo.com/index.php/WebM
wiki.installgentoo.com/index.php/WebM#2-pass_encoding
ffmpeg.org/ffmpeg.html#Video-Options
twitter.com/NSFWRedditVideo

ffmpeg

takes too long to make a webm using the terminal

write your own script using ffmpeg with full specs.

use the lua for mpv if you are too much of a retard

github.com/Cephel/Jow Forums-webm-maker

you posted it

webm for retards

doing it with raw ffmpeg is pretty painful

post yours

Attached: 1466156898492.webm (1528x900, 2.79M)

enjoyed that, thanks

this isn't webm for retards

is3.Jow Forums.org/wsg/1529570306901.webm

>it's hard to exchange the options to the command that is already ready to go in your history
how are you even using a computer?

>.bat
>barebones ffmpeg commands
No.

webm4retards

FFMpeg. Constrained quality 2-pass encoding usually yields the best results.

fag

this shit sucks because it has to index every video you put in, so if you want a 10s clip from a 2 hour video it takes forever to cache it

ffmpeg -i input.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis output.webm

xmedia-recode.de/en/screenshots.html

quite versatile, only slightly buggy. also works well-ish under wine.

this

Attached: [바닐라코] 태연, MLBB를 입다! 투 키세스 듀얼 틴트 4.webm (1920x1080, 1.72M)

For winfags:
Drag&drop your files onto this .bat once you tweaked the in and out points

ffmpeg.exe -i %1 -c:v libvpx -crf 4 -ss 00:55:35.000 -to 00:56:55.000 -vf scale=720:-1 -an -b:v 300K -fs 3M -pass 1 -y %1.webm
ffmpeg.exe -i %1 -c:v libvpx -crf 4 -ss 00:55:35.000 -to 00:56:55.000 -vf scale=720:-1 -an -b:v 300K -fs 3M -pass 2 -y %1.webm

Put the -ss option before the input.

How do I make them on a Mac?

why, tripsdude?

>takes too long
I'm pretty sure that ffmpeg runs as fast if not faster than some gui tools. I doubt that their core (if it's not ffmpeg in the first place) is that much more efficient that a short encode will be noticably faster.

-ss position (input/output)

When used as an input option (before -i), seeks in this input file to position. Note that in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position. When transcoding and -accurate_seek is enabled (the default), this extra segment between the seek point and position will be decoded and discarded. When doing stream copy or when -noaccurate_seek is used, it will be preserved.

When used as an output option (before an output url), decodes but discards input until the timestamps reach position.

position must be a time duration specification, see (ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual.

>10s clip from a 2 hour video
just use ffmpeg you fucking retard
if you feed ffmpeg first the start point before the input it jumps straight to it and you dont need to wait for it.

ffmpeg -ss 1:59:50 -i shitfuckfile.mp4 -t 10 outputthefuckshitfile.mp4

you fucking mental abortion

oh crap
good catch
corrected, thanks

here is the full .bat with comments

REM -ss is the start position in number of seconds, or in hh:mm:ss[.xxx] format. You can get it using your video player (Ctrl-G in MPC-HC).
REM -to is the end position.
REM -crf values can go from 4 to 63. Lower values mean better quality.
REM -b:v is the maximum allowed bitrate. Higher means better quality
REM -vf scale=640:-1 sets the width to 640px. The height will be calculated automatically according to the aspect ratio of the input.
REM -an disables audio. Jow Forums will reject your files if they contain audio streams.

ffmpeg.exe -ss 00:55:35.000 -to 00:56:55.000 -i %1 -c:v libvpx -crf 4 -vf scale=720:-1 -an -b:v 300K -fs 3M -pass 1 -y %1.webm
ffmpeg.exe -ss 00:55:35.000 -to 00:56:55.000 -i %1 -c:v libvpx -crf 4 -vf scale=720:-1 -an -b:v 300K -fs 3M -pass 2 -y %1.webm

Who says he didn't know that already? It's still an argument against using webm for retards.

handbrake

ffmpeg -hide_banner -i input.mp4 -c:v libvpx -crf 10 -qmax 50 -b:v calculated_bitrate -slices 8 -deadline good -cpu-used 5 -an -pass 1 -f webm /dev/null
ffmpeg -hide_banner -i input.mp4 -c:v libvpx -crf 10 -qmax 50 -b:v calculated_bitrate -slices 8 -deadline good -cpu-used 0 -tune ssim -auto-alt-ref 1 -lag-in-frames 25 -arnr-maxframes 5 -arnr-strength 3 -an -pass 2 output.webm
calculated_bitrate = file_size_limit_in_MB * 8 * 1000 / length_in_sec

For webms without audio and a somewhat decent bitrate (otherwise switch to single pass).

...

Git good nigga

What's hide_banner parameter for? Also what's your experience with the -arnr stuff? I use auto-alt-ref but leave the arnr stuff with their default values.

Is there any way to use FFMpeg expressions to divide filesize limit by video duration and set that as a parameter for bitrate? That would allow for fully automated scripts.

-hide_banner hides the configuration options of ffmpeg. Run ffmpeg and ffmpeg -hide_banner without any additional options and you'll see the difference. Just a personal preference of mine.

I played around with the -arnr stuff some time ago. I started with -arnr-maxframes 5 -arnr-strength 3 after reading this article blog.webmproject.org/2010/05/inside-webm-technology-vp8-alternate.html (pic related). Usually I increase -arnr-maxframes to 15, as I think it produces a better looking result. -arnr-strength 3 on the other hand is the maximum for me. 4-6 produced some weird effects near edges with my test videos.

As for the calculation question: What platform are you using? With bash and ffprobe you could do it like this:
file_size=3
length=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "input.mp4")
bitrate=$(bc

I use Windows. Thinking in retrospect, for a truly hands free encoding, only calculating bitrate is not nearly enough. You'd have to scale more difficult videos to keep a decent quality while respecting bitrate constraints.

How would I make a webm out of multiple images? Webm4retards doesn't have this functionality as far as I know. Am I meant to create a gif like its the stone age or something?

This is what I used to create vid related:

ffmpeg -framerate 1.26 -i %%03d.jpg -c:v libvpx -crf 4 -an -b:v 7750K -fs 3M -pass 1 -y out.webm
ffmpeg -framerate 1.26 -i %%03d.jpg -c:v libvpx -crf 4 -an -b:v 7750K -fs 3M -pass 2 -y out.webm


imperfect but works.

Images were named 001.jpg

woopsie

Attached: out.webm (927x388, 3M)

I'm deeply ashamed to ask, but how does it know what directories the images are in? Is it some default?

Oh, there's a bunch of stuff you could add. Automatic downscaling, bitrate adjustment if the file is too large, cycling through bitrate modes, etc. My current webm script has about 600 lines, but most people won't need such extensive features.

image2 demuxer.
ffmpeg -framerate x -pattern_type glob -i "path/to/folder/*.jpg" ...
-pattern_type glob will take all pictures in the folder sorted by name and combine them with the frame rate x. For Windows you need to use -pattern_type sequence, as glob isn't available.
ffmpeg -framerate x -pattern_type sequence -i "path\to\folder\%05d.png" ...
%05d.png specifies the sequence.
%05d.png: 00001.png, 00002.png, ...
%03d.jpg: 001.jpg, 002.jpg, ...
%d.tiff: 1.jpg, 2.jpg, ...
Add the -start_number option, if your sequence doesn't start at 1. Also be careful, that there aren't any missing pictures to break the sequence (e.g. ... , 0067.png, 0069.png, ... will only combine the pictures 1-67, as the missing 0068.png breaks the sequence).

argh.
in this case, the images were in ffmpeg's directory (which sits in my file conversion toolkit directory)

I suppose passing full paths as a prefix to the file name patterns should work

nice
updating the comments in my script, thanks

Well, I finally got it working but can't get it to accept 2 passes in the windows cmd, well whatever, I don't think it's a very good way to do this regardless since you can't control the timings very well short of adding more in between images.

This also helped me to understand, so thank you.

pic related is what I made, kind of tempted to make better in between frames/effects but it's a very crude way of doing things...I wish I could use photoshop's animation UI for things like this

Attached: ou2t.webm (1448x2048, 1.01M)

Thinking about it, I could just double the regular frames since I can't "halve" the in between frames to shorten them, if there's only 1 in between.

By making mp4s

Webms are shit and have no hardware acceleration

I didn't even know webm/VP8 allows transparency. Neat.

mkv is the superior container.
Although you are right, that the lack of hardware accelerated encoding for VP8/VP9 sucks.

post source images

Attached: tiny witch.jpg (61x48, 853)

this

does that calculation allow you to maximize quality of video according to the maximum size allowed?

xmedia recode then

it's an ffmpeg front end

only thing you need to know is bitrate = (max size in MB) x 1024 x 8 / (time in seconds)
and max bitrate is twice that

subtract your audio bitrate (it's fixed, amongst a list of choices on the audio tab) if you want to include sound


I also recommend 2-pass variable bitrate, tune SSIM, and quality best.

Attached: XMedia-Recode-OGV-005.png (1024x742, 20K)

danbooru.donmai.us/posts?page=4&tags=tama

Basically, but it's no exact business. You might need to adjust it after your first try.

>quality best
-quality good -cpu-used 0 gives almost identical results, but is a lot faster.

i just tried a crf of 10 and calculated bitrate of 400 for a 4mb video of around 80 secs and i got a 2mb video with audio only lol

you can use avidemux to split the video beforehand losslessly

Care to post the whole command exactly as you used it?

>not having a drag and drop script
Pleb

ffmpeg -i input.avi -ss 01:10:37.0 -to 01:11:48.0 -c:v libvpx -crf 30 -b:v 500k -c:a libvorbis -vf scale=640:-1 output.webm
i want to keep the audio

i cut in final cut pro x, then use an automator workflow to encode to webm

oh i changed those parameters now
but before i used crf 10 and -b:v 400

At the very very basic level I suggest you all use this for 90% of web bums:

ffmpeg -i input -an -c:v libvpx -b:v 0 -crf 50 -qmin 30 -quality good -threads 4 output

Attached: pussynigga.jpg (550x549, 153K)

Attached: linux.jpg (480x451, 54K)

what? tons of shit accelerates vp8/9

I just do them in premiere at work

Axiom

Attached: blue.webm (1080x1920, 1.56M)

CRF doesn't work with a bitrate in VP8 m8, must specify -b:v 0 for functional CRF. Only way to fine tune it is to modify qmin/qmax parameters.

The command in general is ok. I think it has something to do with the avi file. I also got a heavily corrupted webm, when I tried the same command with an avi file. A workaround that worked for me:
ffmpeg -fflags +genpts -i input.avi -c copy input.mkv
Then use the mkv as input instead.

I only know about VAAPI. But that doesn't support NIVDIA GPUs, does it?

Of course it does. With -b:v 0 you activate constant quality mode.

That's just what I said...

VP8s CRF with a bitrate is basically broken, devs gave up on it and fixed that shit in VP9.

nvidia uses vdpau

Bullshit.
>-crf 10 -qmax 50 -b:v 1M
-crf 10 specifies the target quality for each frame
-qmax 50 the minimum quality for each frame
-b:v 1M the maximum bitrate

Try it out. You'll notice, how -b:v will constraint the used bitrate (unless the bitrate to reach qmax 50 is higher than the one specified).

But VDPAU doesn't support VP9. At least I didn't find any info on it.

It will ignore the bitrate and/or cuts the video short. Try -qmax 20 and a -b:v 200k and get fucked.

Because qmax 20 is pretty high and will definitely require more than the maximum 200kbps. qmax will override b:v in such a case, as you would expect with a minimum quality setting.
>cuts the video short
What?

>Because qmax 20 is pretty high and will definitely require more than the maximum 200kbps. qmax will override b:v in such a case, as you would expect with a minimum quality setting.
Right but beside that retarded feature if CRF has to obey the -b:v it turns itself into a mutated vbr monster.

>>cuts the video short
>What?
Yeah it's fucking broken m8, it does that shit. Devs basically told everyone to go fuck themselves when people complained about it and moved onto VP9 because jewgle sponsors it.

What's retarded about a minimum quality setting? And yes, it's a kind of VBR encoding. Instead of specifying the average bitrate you specify the maximum bitrate. It's great, when you have to stay within a file size limit.

M8, I've made a few hundred webms with VP8 and never experienced ffmpeg cutting one of them short, unless I specified the -fs option.

then it uses nvdec

Guess they fixed that at least. Anyway if you're going to target a specific file size limit just divide max file size by seconds, use that as a bitrate, and do a 2-pass like a normal human being.

ie:
2 min video: 2,800kB/120= ~185k VBR
1 min video: 2,800kB/60= ~375k VBR

1. Check to see if the video is already available as webm
2. ffmpeg

wiki.installgentoo.com/index.php/WebM

I'm talking about encoding, not decoding.

Or, you know, I calculate it and use it with crf and qmax.

>based
>Amazon

I guess this is going to be a tangerine vs tangelo kind of argument. The reason I recommend 2 pass vbr encoding is because VP8 optimizes the CRF parameters to best suit your file size limit constraints. But if you think you can do a better job then go ham, senpai. I'll just stick to using normal CRF and 2-pass vbr for web bums.

Attached: tumblr_m5dna2m50f1qcxbquo1_500.png (500x375, 179K)

Is this the best possible quality for 33sec?
ffmpeg -i u.webm -an -vf scale=720:405 -c:v libvpx -crf 10 -b:v 900K -c:a libvorbis output.webm

Attached: Dragon.webm (720x405, 2.99M)

Not even close. ~700k bitrate if you want to stay under 3MB though ~900k is good if you want under 4MB

wiki.installgentoo.com/index.php/WebM#2-pass_encoding

>Is this the best possible quality for 33sec
Dumb question
depends entirely on the content
- complexity of each image
- how many similarities between images (keep the background, only encode the moving parts)
etc

Attached: 084.png (600x512, 298K)

See the ffmpeg documentation about ff preset files.
You can apply them to any format input.
ffmpeg.org/ffmpeg.html#Video-Options
section 5.12.1
" if you select the video codec with -vcodec libvpx and use -vpre 1080p, then it will search for the file libvpx-1080p.ffpreset. "
My ffmpeg build provides
/usr/share/ffmpeg/libvpx-1080p.ffpreset
/usr/share/ffmpeg/libvpx-1080p50_60.ffpreset
/usr/share/ffmpeg/libvpx-360p.ffpreset
/usr/share/ffmpeg/libvpx-720p.ffpreset
/usr/share/ffmpeg/libvpx-720p50_60.ffpreset

noice, I should have stayed with ffmpeg longer before I moved tk staxrip and megui.

Attached: Screenshot_20180621-113835.jpg (1080x1920, 206K)

>no webm or advanced options
ffmpeg through termux is better

Attached: Screenshot_2018-06-21-13-42-15.png (720x1280, 155K)

that webm was taken from Amazon. Sometimes Amazon have videos or people modeling rather than just having pictures.

Attached: 91v77+KHD2S.webm (720x940, 733K)

test

Attached: test.webm (1280x712, 2.82M)

swimoutlet.com

Attached: enjoy.gif (245x240, 499K)

webm for retards

ffmpeg is fucking shit, and only autists would use the terminal or CMD to create webms

>read through thread
>nobody has suggested Webm for Retard
>freetards and autismos recommending the terminal

Attached: 1502558321856.jpg (1300x1188, 136K)

WebM for Retards is a GUI frontend for FFMpeg, you imbecile.

that's why it's better, you /v/tard