FFMPEG TUTORIAL FOR /G/TARDS - /g/ (#105627706) [Archived: 939 hours ago]

Anonymous
6/18/2025, 6:36:00 AM No.105627706
ffmpeg_thumb.jpg
ffmpeg_thumb.jpg
md5: efc8c9005fa2805d02a2c312003d8fce🔍
For those who didn't get the memo, 4chen added VP9 support like a few years ago. It's a video codec that's 30 to 50% more efficient than H264. Autists can push it further but I saved this from a thread about a year ago and it seems to work good enough and more importantly improves multi-threading. There's a lot of FUD surrounding VP9 but the truth is as long as you're using it from ffmpeg and know some of the custom parameters optimizing it for personal use instead of streaming, you'll get good results. It's obviously not going to be as fast as x264 and if you're like me with a sandy bridge i3-2330M laptop you're probably going to be discouraged from the 10 FPS or less encoding speed. Despite that I still think it would benefit us all if we started using VP9 because even if you don't give a fuck about smaller video sizes VP9 would allow us to start posting full HD content instead of the usual DVD quality dogshit. If AV1 got adopted here we'd get 30% better compression efficiency over VP9 and posting content beyond full HD video resolution would become possible but instead we got hacked due outdated software and probably will soon again. It is what it is I guess.

Anyway seeing how many people here keep asking about how to use ffmpeg I decided to make a webm visually instructing those less tech literate on what they're supposed to do from scratch including the creation of the following simple windows script. If you think this will help others please share, subscribe, like, upvote, give thoughts and prayer, die for israel, and don't forget to hit that bell :^).

ffmpeg -i in.mp4 ^
-c:v libvpx-vp9 ^
-b:v 0 -crf 30 -g 300 ^
-cpu-used 4 -lag-in-frames 25 -aq-mode 2 ^
-tile-columns 1 -row-mt 1 -enable-tpl 1 ^
-an out.webm

REM -profile:v 2 -pix_fmt yuv420p10le
Replies: >>105627734 >>105627818 >>105627941 >>105632810 >>105633260 >>105633411 >>105633837 >>105634648 >>105639484 >>105640353 >>105640584 >>105643691 >>105643955 >>105645664
Anonymous
6/18/2025, 6:41:33 AM No.105627734
>>105627706 (OP)
>-crf 30 -g 300 ^
>-cpu-used 4 -lag-in-frames 25 -aq-mode 2 ^
>-tile-columns 1 -row-mt 1 -enable-tpl 1 ^
>-an out.webm
>REM -profile:v 2 -pix_fmt yuv420p10le
Trash. Also use your tripcode faggot. No else uses those settings and runs such a shitty pc.

The real tutorial is to download handbrake, make a basic bitch profile and use multi pass encoding.
Replies: >>105627901 >>105633246
Anonymous
6/18/2025, 6:49:18 AM No.105627780
>file extensions hidden
>thinks "die for israel" is a real thing
the absolute state of libtards
Anonymous
6/18/2025, 6:54:22 AM No.105627807
Somewhat related. My old thinkpad needs to use profile=fast in mpv config now. It wasn’t like this before. I feel they ruined video playing on linux on purpose.
Replies: >>105633627 >>105633928 >>105636098
Anonymous
6/18/2025, 6:56:21 AM No.105627818
>>105627706 (OP)
Here are some cropping tidbits I just found.
## ffmpeg
#--trim
-ss 00:05:20 -t 00:10:00
#--scale
-vf scale=-1:720
#--crop
-vf "crop=hor_x:vert_y:len_x:len_y"
#----crop bottom right corner
-vf "crop=in_w/2:in_h/2:in_w/2:in_h/2"
#----crop the top and bottom (where len=amount to trim from one edge)
-vf "crop=in_w:in_h-len*2"

#--colorspace
-pix_fmt yuv/a/420/440/442/444p10/12
Replies: >>105627882 >>105627901
Anonymous
6/18/2025, 6:57:30 AM No.105627828
>no 2-pass
lol, lmao
Replies: >>105627901
Anonymous
6/18/2025, 7:06:50 AM No.105627882
>>105627818
>Here are some cropping tidbits I just found.
Anon.....
https://ffmpeg.org/ffmpeg-all.html
Replies: >>105627901 >>105630066
Anonymous
6/18/2025, 7:10:10 AM No.105627901
foxy_thumb.jpg
foxy_thumb.jpg
md5: 11616aaf71a073405d7db673a7d49c55🔍
>>105627734
It's not mine and I've found handbrake doesn't do as good of a job compared to this ffmpeg script. The original thread used a CRF of 40 which is too low quality, 30 is more balanced imho. Also I intentionally jammed that REM in there because I'm on the fence about using 10-bit for VP9. On the one hand you get better compression efficiency but on the other hand it tanks FPS and some devices might not be able to decode it.

>>105627818
>>105627882
Cool, I'm kinda new to ffmpeg. I still do most of this through vegas pro right now lol.

>>105627828
Usually not worth the increased encode time for a 10% reduction in file size.
Replies: >>105627922 >>105643358
Anonymous
6/18/2025, 7:13:46 AM No.105627922
>>105627901
>Cool, I'm kinda new to ffmpeg.
No shit.
Anonymous
6/18/2025, 7:16:52 AM No.105627941
>>105627706 (OP)
>schizo webm
winget install ffmpeg
Now fuck off
Replies: >>105627970
Anonymous
6/18/2025, 7:22:09 AM No.105627970
pute
pute
md5: b73f66cc1f54423131b4fddc28202d28🔍
>>105627941
Doesn't work on my puter unfortunately so it probably doesn't work on other computers as well. shizo webm has worked on pretty much every windows computer I come across, even windows 7 ones (with some modifications ofc).
Anonymous
6/18/2025, 8:26:49 AM No.105628346
>he believed the wiki
Anonymous
6/18/2025, 1:45:15 PM No.105630066
>>105627882
Okay. So you basically need a degree in ffmpeg to run the damn thing?
Where can we find one of these people that basically spends all their time learning about video encoding so we can replace apps that do it with a user friendly interface?
Replies: >>105631991 >>105633162 >>105643846
Anonymous
6/18/2025, 6:07:13 PM No.105631991
>>105630066
Can you make a script to automate all of this but you need to git gud in powershell desu.
Anonymous
6/18/2025, 7:51:41 PM No.105632810
>>105627706 (OP)
Based "trying to ameliorate the general state of affairs" thread. You have my support, OP.
Anonymous
6/18/2025, 8:33:14 PM No.105633162
>>105630066
WebM for Retards
https://gitgud.io/nixx/WebMConverter#webm-for-retards-build-status
Replies: >>105633258 >>105633281 >>105634648
Anonymous
6/18/2025, 8:40:57 PM No.105633246
>>105627734
Handbrake is even worse
Replies: >>105633281
Anonymous
6/18/2025, 8:41:38 PM No.105633258
1_5cTSvqwKlZKBPhyk3snlBg
1_5cTSvqwKlZKBPhyk3snlBg
md5: baacd300c65ba72948871883525f647d🔍
>>105633162
Doesn't work. Downloaded it, tried to run it but it asked me to install avisynth. Installed avisynth, still doesn't work. You would think a program aimed at literal drooling retards would have this thing included with it...

If people can't follow my BRAIN DEAD SIMPLE webm to install ffmpeg then they really should just install handbrake desu. It's DOGSHIT since it will be missing all the important parameters that gives it good compression for personal use instead of streaming but it should still be like 20% better than H264...
Replies: >>105633281 >>105633296
Anonymous
6/18/2025, 8:41:45 PM No.105633260
>>105627706 (OP)
Or you can just ask ChatGPT/Gemini/Deepseek to make a GUI for compressing videos to multiple different formats.

>ChatGPT made a simple python GUI script for using ffmpeg to compress to x264/x265 with GPU acceleration, I could expand it to do more but I can't be arsed since local compression from one simple script is all I needed
Replies: >>105633278
Anonymous
6/18/2025, 8:42:54 PM No.105633278
1750017736874164_waifu2x_photo_noise2
1750017736874164_waifu2x_photo_noise2
md5: d0ea75bac75c4002b729646b0a9ad7e0🔍
>>105633260
LOL, that's probably worse than just using handbrake

>GPU acceleration
LOOOOOOOOOOOOOOL you best be trolling
Replies: >>105633319
Anonymous
6/18/2025, 8:43:12 PM No.105633281
>>105633162
>>105633246
>>105633258
I mostly use avixemux anyway
Anonymous
6/18/2025, 8:44:12 PM No.105633296
>>105633258
You didn't install the correct avisynth version, the one that the instructions tell you to download. Less complaining, more reading, retard
Replies: >>105633355
Anonymous
6/18/2025, 8:45:20 PM No.105633319
>>105633278
Anon I'm not desperate to save individual bytes compared to waiting eons for CPU compression which is supposedly slightly better. I have it so that when I want to save videos from my phone locally they don't take up 10x the space.
I'll admit I didn't run tests on the numbers, if GPU is significantly worse I'll add a toggle
Replies: >>105633355
Anonymous
6/18/2025, 8:49:08 PM No.105633355
Ik923d9 (1)
Ik923d9 (1)
md5: a09d6d9d180a4f33cf05bc8eb09598c9🔍
>>105633296
I literally did and rebooted my PC. Piece of shit thing doesn't fucking work.

>>105633319
kek shut the fuck up you fag, go drink some fag light or whatever it is that fags do. We're literally working with just a few fucking MB of storage space for full HD content here not GBs.
Replies: >>105633400
Anonymous
6/18/2025, 8:53:15 PM No.105633400
>>105633355
>can't install webm for retards
>calls others fags

Lmao
Replies: >>105633446
Anonymous
6/18/2025, 8:54:04 PM No.105633411
>>105627706 (OP)
This is a bot post
Replies: >>105633446
Anonymous
6/18/2025, 8:57:08 PM No.105633446
>>105633411
Unfortunately no. I'm trapped here on this wretched website full of retards like >>105633400 that refuse to admit that software meant to be used by actual retards is in fact not suitable to be used by actual retards but he's too proud to admit it.

Anyway I worked hard on that webm man, it took like 5 minutes out of my life. Behind the scenes I had to delete ffmpeg and unlist C:\ from the path thing in windows and then do it all over again to show these retards how it's done.
Anonymous
6/18/2025, 9:15:50 PM No.105633627
>>105627807
Try a older kernel, linux 6.x made a mess for older computers.
Anonymous
6/18/2025, 9:16:40 PM No.105633638
1750105067150z
1750105067150z
md5: 389c58323c622176fd9fb5d190cfc12d🔍
>webm
Usecase?
4cuck supports mp4 now.
Replies: >>105633678
Anonymous
6/18/2025, 9:21:23 PM No.105633678
>>105633638
mp4 doesn't support VP9, only the ancient H264. You know that thing that's preventing us from posting high quality full HD webms? Both are good for separate reasons but practically speaking H264 is limited to DVD dogshit quality here desu senpai.

H264 would have been good enough 10 years ago when I was still using 800 x 600 res CRT monitors. The only benefit it really has here is that more ULTRA RETARDS can upload content.
Replies: >>105633698 >>105633823
Anonymous
6/18/2025, 9:23:20 PM No.105633698
>>105633678
Wait doesn't 4cuck support HEVC?
Replies: >>105633854 >>105633865
Anonymous
6/18/2025, 9:38:01 PM No.105633823
>>105633678
VP9 is practically googles web turd, that's only supported by webm, mkv containers

MP4 supports AV1 and H264 (SStP) can do 4k.
Replies: >>105633854 >>105633957
Anonymous
6/18/2025, 9:39:42 PM No.105633837
>>105627706 (OP)
Wtf why are your fonts so fucked up turn on cleartype or whatever this wangblows shit is called
Replies: >>105633863
Anonymous
6/18/2025, 9:40:36 PM No.105633854
>>105633698
Why would it when it already supports VP9? That's like saying we should support every flavor of JPG like JPG XR, JPG 2000, JPG XS, JPG XL, JPG everything else.

>>105633823
Yeah but like I said in the OP, instead of 4chan supporting AV1 we got hacked instead because typing in "update apt" or whatever is like REALLY REALLY hard or something for the 4chan dev team.
Replies: >>105633870
Anonymous
6/18/2025, 9:41:45 PM No.105633863
>>105633837
No, it feels retro. Apple can tongue my anus.
Replies: >>105633899
Anonymous
6/18/2025, 9:41:57 PM No.105633865
>>105633698
It doesn't support av1 either. Have no fucking idea why. Sharty was right for hacking this shithole
Anonymous
6/18/2025, 9:42:20 PM No.105633870
>>105633854
Thy are using freebsd
Anonymous
6/18/2025, 9:44:48 PM No.105633899
>>105633863
>it feels retro
it's not bitmap font you nigger it's highly aliased truetype font
Replies: >>105633942
Anonymous
6/18/2025, 9:47:28 PM No.105633928
>>105627807
VLC is less resource hungry.
Anonymous
6/18/2025, 9:48:35 PM No.105633942
>>105633899
That's why I said it FEELS retro. I don't want literal fucking pixel art font man. I'm a shameless poser but a comfy one at that.
Anonymous
6/18/2025, 9:50:41 PM No.105633957
>>105633823
You can use VP9 on mp4 too.
Replies: >>105633978
Anonymous
6/18/2025, 9:51:55 PM No.105633978
>>105633957
You can't because that's 4chan's shitty solution to upping security here. I'm not joking.
Anonymous
6/18/2025, 10:24:25 PM No.105634303
in_thumb.jpg
in_thumb.jpg
md5: 7e70edf53ae08b48e3fbae0606d70872🔍
Here's a full HD test file to play with for anyone who's having trouble finding things to convert. You can calculate SSIM like this:

ffmpeg.exe -i out.webm -i in.mp4 -lavfi ssim=stats_file=ssim_logfile.txt -f null -
Replies: >>105634655
Anonymous
6/18/2025, 10:32:49 PM No.105634369
You could just search the archives for non-dogshit params
Anonymous
6/18/2025, 10:33:19 PM No.105634375
out_thumb.jpg
out_thumb.jpg
md5: 7b012c63a18d06d079364c015263c67f🔍
This is the output VP9 encode which is kind of surprising considering this is using -cpu_used 4 which is basically the "fast" encoding preset of VP9. Yet it still rapes H264 as expected, about half the bitrate with only a minor hit to quality.

[Parsed_ssim_0 @ 000001dc1aad8c40] SSIM Y:0.987075 (18.885791) U:0.996881 (25.059198) V:0.995616 (23.581360) All:0.990133 (20.058130)

>An SSM score of 0.99 in video analysis typically refers to a Structural Similarity Index (SSIM) score. This score indicates a very high degree of structural similarity between two videos.
>SSIM: SSIM is a metric used to assess the perceived quality of a video by comparing it to a reference video. Unlike simple pixel-by-pixel comparisons, SSIM considers factors like luminance, contrast, and structural information, aiming to mimic how the human visual system perceives quality.
>Interpretation of 0.99: A score of 0.99 indicates that the two videos are extremely similar in terms of their structural characteristics. This is considered "very close". It suggests that the videos are likely very difficult, if not impossible, to distinguish from each other visually.

I'll encode using slower presets next but they'll probably only reduce file size by like 10% probably.
Anonymous
6/18/2025, 10:48:26 PM No.105634511
cpu 3_thumb.jpg
cpu 3_thumb.jpg
md5: 5ab9b20162495989b4aa33a535f4ec39🔍
-cpu_used 3

SSIM Y:0.987148 (18.910403) U:0.996899 (25.085590) V:0.995649 (23.613942)
All:0.990190 (20.083425)

2.21MB instead of 2.26MB. Barely made a dent.
Anonymous
6/18/2025, 10:57:21 PM No.105634597
cpu2_thumb.jpg
cpu2_thumb.jpg
md5: 9fb3fc1772eb2660fca4f27939af84d6🔍
cpu_used 2

SSIM Y:0.987228 (18.937346) U:0.996942 (25.145630) V:0.995698 (23.663692)
All:0.990259 (20.113788)

2.18MB instead of 2.26MB. Meh
Anonymous
6/18/2025, 11:04:09 PM No.105634648
>>105627706 (OP)
these settings are wrong
1. why the fuck would you encode with CRF for 4chan? you need to use a bitrate target so you end up under 4chan's size limit for sure
2. if you don't use 2-pass encoding with VP9 then it deactivates a bunch of quality features
https://trac.ffmpeg.org/wiki/Encode/VP9#twopass
>Two-pass is the recommended encoding method for libvpx-vp9 as some quality-enhancing encoder features are only available in 2-pass mode.

>>105633162
>7 year old ffmpeg GUI
yeah anon this will definitely give good quality
Replies: >>105634690 >>105634849 >>105635033
Anonymous
6/18/2025, 11:05:18 PM No.105634655
>>105634303
>test input file
>4MB
>visible compression artifacts
this is not how you test encoders
you need to start from a file that actually looks good
Replies: >>105634690
Anonymous
6/18/2025, 11:09:39 PM No.105634690
>>105634648
>1. why the fuck would you encode with CRF for 4chan? you need to use a bitrate target so you end up under 4chan's size limit for sure
This targets consistent quality not consistent file size. bitrate target is also less efficient than CRF unless you do 2 pass.

>2. if you don't use 2-pass encoding with VP9 then it deactivates a bunch of quality features
Yeah but it's only like a 10% file size reduction. At least with my limited testing anyway. 40% better compression efficiency vs H264 instead of 50% better compression efficiency doesn't seem like that big of a deal in my opinion.

>>105634655
Best I could do, if you find anything better please share it fren but it has to upload here to others can easily download it ofc.
Anonymous
6/18/2025, 11:12:38 PM No.105634718
cpu1_thumb.jpg
cpu1_thumb.jpg
md5: b62b65670e67d0f491a24ac4fb0ff2d6🔍
cpu_used 1

SSIM Y:0.987487 (19.026516) U:0.996974 (25.191496) V:0.995756 (23.722204)
All:0.990447 (20.198419)

2.09MB instead of 2.26MB. 7% file size reduction I think, not bad if you have the CPU horsepower for it.
Anonymous
6/18/2025, 11:28:25 PM No.105634849
>>105634648
>oh no the gui is 2 years old
oh yeah? how old is your terminal?
Anonymous
6/18/2025, 11:30:54 PM No.105634868
Someone posted this recently, I used it succesfully for a webm I just couldn't seem to get under the filesize limit with my personal script (stolen from an anon), worked ok.
https://github.com/chameleon-ai/webm-for-4chan
Replies: >>105634904
Anonymous
6/18/2025, 11:32:24 PM No.105634886
cpu0_thumb.jpg
cpu0_thumb.jpg
md5: d45d6b37d07dc57d60b780131dd9e977🔍
cpu_used 0

SSIM Y:0.987460 (19.017170) U:0.997000 (25.228561) V:0.995787 (23.754292) All:0.990438 (20.194567)

1.98MB instead of 2.26MB. HUH well that's interesting I got a 12% file size reduction. That doesn't really make any sense since everyone claims that 0 is a placebo setting compared to 1. Maybe something changed in the libvpx encoder recently? It's SLOW AS BALLS as expected thoughbeit.

I'll try to post another higher quality H264 MP4 in full HD quality at 4MB. Wish me luck, it's like trying to find a needle in a haystack lol.
Anonymous
6/18/2025, 11:33:56 PM No.105634904
>>105634868
Not very tard friendly imho.
Replies: >>105634985
Anonymous
6/18/2025, 11:41:06 PM No.105634985
>>105634904
You say that like it's a bad thing.
Replies: >>105635002
Anonymous
6/18/2025, 11:42:45 PM No.105635002
>>105634985
You autists just absolutely can't imagine yourself in the shoes of someone else, can you?
Replies: >>105635022
Anonymous
6/18/2025, 11:45:18 PM No.105635022
>>105635002
But I did eat breakfast this morning? In all seriousness, I don't even look at retard friendly software for most things, they've let me down too often.
Anonymous
6/18/2025, 11:46:51 PM No.105635033
sj watching james get fired_thumb.jpg
sj watching james get fired_thumb.jpg
md5: 86a6dd4d20ec9947767fc6150cc80b3a🔍
>>105634648
boram is also equally out of date and it works fine
i prefer it to webm for retards as it gets closer to the filesize limits without truncating the video at all
https://github.com/Kagami/boram
Replies: >>105635063
Anonymous
6/18/2025, 11:49:59 PM No.105635063
whip beta crab_thumb.jpg
whip beta crab_thumb.jpg
md5: a1b4d0fcc02fd9fb9eccac49f6ec34e4🔍
>>105635033
actually heres a slightly newer one within the new cap, most of my webms are from the 3mb vp8 era
Replies: >>105635087
Anonymous
6/18/2025, 11:51:53 PM No.105635087
2025-02-21 03-37_thumb.jpg
2025-02-21 03-37_thumb.jpg
md5: e599d5bf37695d4310066007ff86e0a5🔍
>>105635063
Anonymous
6/19/2025, 2:01:17 AM No.105636098
>>105627807
mpv changed the defaults to use higher quality scalers and shit because most people are using a device made in the last decade. profile=fast is more like the previous default.
Anonymous
6/19/2025, 8:49:14 AM No.105638369
I thought they had finally added AV1
Replies: >>105638541
Anonymous
6/19/2025, 9:18:49 AM No.105638541
>>105638369
Nah, we need to get hacked like at least 2 more times for that.
Anonymous
6/19/2025, 11:55:07 AM No.105639387
1732173749464593_thumb.jpg
1732173749464593_thumb.jpg
md5: 8bae7f69bd86ba1627ce07aa9dda7c10🔍
Is there something specific for each CPU to optimize VP9?
I have i5-6500.
Replies: >>105643325
Anonymous
6/19/2025, 12:11:50 PM No.105639484
>>105627706 (OP)
This thread inspired me to make my own tutorial in here but for a different topic. Thanks
Replies: >>105644104
Anonymous
6/19/2025, 2:37:19 PM No.105640353
>>105627706 (OP)
Guys, if I want to download an entire youtube channel (podcast) in the highest quality available, and have it output the files in 102_%ytidnum_title.mp4 103_%ytidnum_title.mp4
104_%ytidnum_title.mp4

What should I be looking at? I have the hd space for it. The channel has about 750 2hr long videos. Is there a script or gui app that will allow me to clone an entire channel, pull the episode number and output the filenames in a specific format like pull the episode name and put it up front, title, and youtubeid variable at the end for search? If not, I can always edit the file names later, but anything that can allow me to use a login or my yt cookies? What kind of download delay should I be looking at to prevent an ip ban from youtube?

Anyone ever rip an entire youtube channel with 500+ yt videos?
Replies: >>105647650
Anonymous
6/19/2025, 3:06:43 PM No.105640584
>>105627706 (OP)
how the fuck did your linker find libraries when you moved it to C:\?
does ffmpeg for windows only depend on basic shipped stuff like vcruntime?
Anonymous
6/19/2025, 4:49:07 PM No.105641230
Why can't anyone just make a simple gui app for this ffmpeg shit?
Replies: >>105642836 >>105643193
Anonymous
6/19/2025, 8:07:27 PM No.105642802
1744015357691009
1744015357691009
md5: 13131b7c9cbd947efd34de8654c2c119🔍
Please excuse the shitty AI slop
Why doesn't this work correctly when trying to target specific bitrate to achieve certain file size?
I'm not sure what's going wrong.
vp8_scale() {
scale=${3:-1}
iw=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of csv=p=0 "$1")
ih=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of csv=p=0 "$1")

ow=$(echo "$iw * $scale" | bc | awk '{print int($1+0.5)}')
oh=$(echo "$ih * $scale" | bc | awk '{print int($1+0.5)}')
ow=$(( (ow / 2) * 2 ))
oh=$(( (oh / 2) * 2 ))

duration=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$1")
base_bitrate_kbps=$(echo "scale=0; 0.95 * (2^25) / 1000 / $duration" | bc -l | awk '{print int($1+0.5)}')
orig_pixels=$((iw * ih))
out_pixels=$((ow * oh))
pixel_ratio_inv=$(echo "$orig_pixels / $out_pixels" | bc -l)
adjusted_bitrate_kbps=$(echo "$base_bitrate_kbps * $pixel_ratio_inv" | bc -l | awk '{print int($1+0.5)}')
max_bitrate_kbps=$(echo "scale=0; 0.95 * (2^25) / 1000 / $duration" | bc -l | awk '{print int($1+0.5)}')

[ "$adjusted_bitrate_kbps" -gt "$max_bitrate_kbps" ] && adjusted_bitrate_kbps=$max_bitrate_kbps

echo " Input resolution: ${iw}x${ih}"
echo " Output resolution: ${ow}x${oh}"
echo " Target bitrate: ${adjusted_bitrate_kbps}k"

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -vaapi_device /dev/dri/renderD128 \
-i "$1" \
-vf "format=nv12,hwupload,scale_vaapi=w=${ow}:h=${oh}" \
-c:v vp8_vaapi \
-b:v "${adjusted_bitrate_kbps}k" \
-g 300 \
-quality 1 \
-an \
"$2.webm"
}
The function should target the 4 MB file size but it doesn't do that.
Is this a problem with logic? or limitation of hardware accelerated encoding?
Replies: >>105643210
Anonymous
6/19/2025, 8:10:12 PM No.105642836
>>105641230
handbrake
>erm why does the scary cli tool exist then lol it's not 1980 gramps!!!
scripts and automation
Anonymous
6/19/2025, 8:45:38 PM No.105643193
Reel+vs+Rotary+Cut+Grass
Reel+vs+Rotary+Cut+Grass
md5: 7a805942a14a2c2d849bb3104992934c🔍
>>105641230
Scripting is much faster/easier in the long term. Think of it like mowing a lawn with a manual reel mower instead of a regular gas/battery powered lawn mower. Sure the latter will cut grass faster but it's going to rip it up instead of neatly cutting it and when you run out of gas/battery charge you're fucked.
Anonymous
6/19/2025, 8:47:21 PM No.105643210
>>105642802
>hardware accelerated
kys ss2
Replies: >>105643497
Anonymous
6/19/2025, 8:59:01 PM No.105643325
9fra859d0y041
9fra859d0y041
md5: 76f10f9c5b36ef90fd34de62ddbc110a🔍
>>105639387
Not really, encoding VP9 video will probably never be as good as encoding AV1 video since the latter got a metric fuckton of AVX2 assembly code. If you look at CPU benchmarks you'll notice even a modern 7600X which should be encoding a 2013 video a codec at like 60 FPS is dragging it's feet at less than 30 FPS.

https://openbenchmarking.org/test/pts/vpxenc

You could try MOAR tile columns but it's going to negatively affect quality.
Replies: >>105643523
Anonymous
6/19/2025, 9:03:10 PM No.105643358
>>105627901
>Usually not worth the increased encode time for a 10% reduction in file size.
brother, we take our shitposts all the way to the upload limit
Anonymous
6/19/2025, 9:19:01 PM No.105643497
>>105643210
Rude.
Anonymous
6/19/2025, 9:23:14 PM No.105643523
1738804086218080
1738804086218080
md5: 69dd88968534f685fdda9e5804abfeee🔍
>>105643325
Thanks man
I'm using this
ffmpeg -i <INPUT> -c:v libvpx-vp9 -b:v <BITRATE> -row-mt 1 -cpu-used 4 -tile-columns 1 -pix_fmt yuv420p -crf 30 -g 350 -pass 1 -an -f null /dev/null
ffmpeg -i <INPUT> -c:v libvpx-vp9 -b:v <BITRATE> -row-mt 1 -cpu-used 4 -tile-columns 1 -pix_fmt yuv420p -crf 30 -g 350 -pass 2 -an <OUTPUT>
Anything I can do to improve it?
Replies: >>105643571 >>105643615
Anonymous
6/19/2025, 9:28:10 PM No.105643571
>>105643523
No clue desu. You benchmark this to OPs params but then again that's optimized for a single CRF pass so there might be missing params for the 2 pass version. I know x264 has b frames but no idea how you enable something like that on VP9.

Also try 2 tile columns instead of 1 to see if that helps increase FPS but also keep an eye on quality I guess. Maybe 2 won't o as much damage as 3 maybe.
Replies: >>105643836
Anonymous
6/19/2025, 9:33:05 PM No.105643615
>>105643523
I found this from plebbit, take with a grain of salt.

-auto-alt-ref 1

Activates alternate reference frames. Alternate reference frames are 'invisible' frames, never shown to the user, but which are used as a reference when creating the final frames. This allows the encoder to be a lot more efficient, so always use it. It is the default in the standalone vpxenc libvpx-vp9 encoder as of libvpx 1.9.0 and 1.10.0. -auto-alt-ref 6 can also be used, but this is a -profile 2 thing, so if your HW doesn't support 10-bit HW decoding, it won't work.
Replies: >>105643836
Anonymous
6/19/2025, 9:42:20 PM No.105643691
ppg bubbles annoyed
ppg bubbles annoyed
md5: bb253fd048f9aff2f1ed1af67eb27c6e🔍
>>105627706 (OP)
>has portable executable and script
>puts executable in C:\ instead of next to the script
>adds C:\ to PATH....
this bothers me slightly
Replies: >>105643740
Anonymous
6/19/2025, 9:49:10 PM No.105643740
>>105643691
Tards (including OP) don't know how to make scripts that run on a timer and auto search for new videos yet but at least this introduces them to the idea that you can run ffmpeg from anywhere on windows without having to copy/paste the executable everytime.

At least they're not using handbrake. 90% of the encodes here are grade A dogshit because of that alone.
Replies: >>105643793 >>105644075 >>105647771
Anonymous
6/19/2025, 9:52:34 PM No.105643793
>>105643740
I may be wrong but I thought you don't need to add C:\ to PATH, it's there by default no?
Or was that older Windows?
Replies: >>105643856 >>105643986
Anonymous
6/19/2025, 9:55:03 PM No.105643813
https://wiki.installgentoo.com/wiki/WebM
Anonymous
6/19/2025, 9:57:20 PM No.105643836
Needless to say the two pass get the file size better than the single pass
>>105643571
Well, my two pass give me about 8 frames the same as the OP parmas
Tried increasing the tiles, and nothing changed
Not the quality or the speed.
>>105643615
>-auto-alt-ref 1
Tried it didn't do much, maybe it got 0.5 frame faster?
Keep in mind this is i5-6500 so not the strongest thing.
However what I found that really helped was using -pix_fmt yuv420p instead, I get 16 frames.
Which was the only real thing that changed speed for me.
Replies: >>105643880
Anonymous
6/19/2025, 9:58:04 PM No.105643846
>>105630066
>Okay. So you basically need a degree in ffmpeg to run the damn thing?
not at all, it all depends onhow complex you want or need to make it. It can be as simple as
ffmpeg -i file.mp4 -an file.webm -hide_banner or add -c:v vp9 to specify vp9.
It's only complicated if you either need or want it to be.
Most users will save complex filter graphs they've used and liked for later.
Anonymous
6/19/2025, 9:59:05 PM No.105643856
>>105643793
Not traditionally and I'm not even sure why this works desu. Normally you'd move the executables to a separate folder inside system32 or something like that because they have the highest "security clearance" or whatever fo function well in those timer scripts (also placed in system32).

Maybe microshart figured out most people would fuck this up so badly that they just made the whole contents of the drive linkable...
Anonymous
6/19/2025, 10:00:44 PM No.105643880
>>105643836
>However what I found that really helped was using -pix_fmt yuv420p instead, I get 16 frames.
>Which was the only real thing that changed speed for me.
Your source video is 10-bit? You should probably let VP9 keep it 10-bit desu. Unless compatibility is a concern.
Replies: >>105643894
Anonymous
6/19/2025, 10:02:29 PM No.105643894
>>105643880
>Your source video is 10-bit? You should probably let VP9 keep it 10-bit desu. Unless compatibility is a concern.
I tried both ways.
encoding to 8-bit was faster regardless of source.
Replies: >>105643912
Anonymous
6/19/2025, 10:04:09 PM No.105643912
>>105643894
wtf
Replies: >>105644144
Anonymous
6/19/2025, 10:08:27 PM No.105643955
>>105627706 (OP)
Is there a gui app that will show me encoding information of a video like encoding, bitrate, audio encoding and bitrate, etc?
Replies: >>105643995 >>105644104 >>105647723
Anonymous
6/19/2025, 10:12:10 PM No.105643986
>>105643793
%PATH% management on Windows is a fucking nightmare because every folder with an exe effectively becomes a bin folder and Windows jumps through hoops to make using symlin--reparse points as painfully useless as possible.
I don't even thing they have reflinks / hardlinks on winshit.
Replies: >>105645978
Anonymous
6/19/2025, 10:13:15 PM No.105643995
>>105643955
handbrake is basically the closest thing to an ffmpeg gui you'll get.
Anonymous
6/19/2025, 10:21:02 PM No.105644075
>>105643740
>Tards (including OP) don't know how to make scripts that run on a timer and auto search for new videos
>timer
>for FS events

just use FindFirstChangeNotification. sure you'll need to do a full scan in some cases due to the shit guarantees OS has with these, but it's pretty infrequent. why the fuck would you have a timer?
Anonymous
6/19/2025, 10:21:45 PM No.105644084
Is there anyway to get windows movie & tv player to play vp9 encodeded vidya files from ffmpeg?
Anonymous
6/19/2025, 10:24:26 PM No.105644104
1708067873465_thumb.jpg
1708067873465_thumb.jpg
md5: d161310eab3ebe8108f0fc59a7a1f606🔍
>>105639484
OP here: if you want to trick people into thinking that you have a higher IQ than you actually do record your tutorial at 20FPS and when you load it in a video editor speed it up to 60FPS. Also you don't even have to install OBS or whatever to do a simple screen capture anymore. If you pause my webm in the first second you can see the ffmpeg screen capture params.

>>105643955
I just use mpc-hc but exifviewer might be better suited for that.
Anonymous
6/19/2025, 10:26:50 PM No.105644144
1742357771620391_thumb.jpg
1742357771620391_thumb.jpg
md5: fa33c118b18af8b8adf13a064c1107ae🔍
>>105643912
yeah.
The fastest I have is -cpu-used 2 -auto-alt-ref 1 -threads 4, with vp8 and I get like 30 frames.
With two passes, I can hit pretty good file size with good quality.
Anonymous
6/20/2025, 1:09:29 AM No.105645664
>>105627706 (OP)
Why the fuck isn't there a GUI to do this. I am a linux user, and I'm not scared of the command line, but I am not going to spend fucking 20 minutes figuring it out every time I want a webm.

Why can't I just import a video file into a GUI, and drag the part I want to clip and then not have to know any of these commands, just pick >VP9 >the amount of compression:cpu ratio I want etc.

ffmpeg fucking sucks. I'm not gonna waste my life typing these long ass commands.
Replies: >>105645846
Anonymous
6/20/2025, 1:34:00 AM No.105645846
866b6c70b7a733a4bc2552bb8ef31ec3
866b6c70b7a733a4bc2552bb8ef31ec3
md5: e88e408082a112a8bcf83fe8eb8b0bf7🔍
>>105645664
AFAIK it's because google never intended for VP9 to be used by ordinary people, it was just going to be a video streaming codec for commercial websites that performed as well as HEVC but didn't require the royalty kike taxes to use it. So basically you kinda have to use ffmpeg if you want good results with VP9 because of the SEKRIT parameters that enhance it for personal use and not just streaming.

GUIs won't dissect these special parameters and show them to users since it would make things too confusing for them. This is just the tip of the iceberg desu, there's more shit you have to deal with when you want to compressmax with a 2-pass ABR encode (ie ARNRs). AV1 addresses all of these problems but until 4chan gets hacked 2 more times we probably won't get support for it anytime soon.
Replies: >>105645964 >>105647796
Anonymous
6/20/2025, 1:49:43 AM No.105645964
>>105645846
Of course its because of some loicensing hogwash. Totally unsurprised. I want every last person who defends copyright or intellectual property shot.
Anonymous
6/20/2025, 1:52:48 AM No.105645978
>>105643986
>I don't even thing they have reflinks / hardlinks on winshit.
yes they do
Anonymous
6/20/2025, 4:40:27 AM No.105647129
Screenshot_20250619-223919_Chrome
Screenshot_20250619-223919_Chrome
md5: 2286062b1be3298fb6a45e5e338f9991🔍
Did anyone else notice they disabled feedback for features?
Anonymous
6/20/2025, 5:48:41 AM No.105647650
>>105640353
see >>105610064
just change the output template to suit your needs
Anonymous
6/20/2025, 6:00:17 AM No.105647723
>>105643955
Literally any media player?
Anonymous
6/20/2025, 6:07:57 AM No.105647771
>>105643740
>At least they're not using handbrake. 90% of the encodes here are grade A dogshit because of that alone.
handbrake users beat the shit out of tinker tranny script users 99% of the time lmao. This thread is a perfect proof of that as you're still bickering about shitty solutions to a solved problem.
Replies: >>105647796
Anonymous
6/20/2025, 6:12:30 AM No.105647796
>>105647771
see >>105645846

By default VP9 is DOGSHIT for non-streaming purposes because it wasn't meant for us goys but websites.