[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1709133321682410.gif (2.7 MB, 498x381)
2.7 MB
2.7 MB GIF
I cant get mpv to encode webms
I have this https://github.com/ekisu/mpv-webm
And ffmpeg installed
Other types of files work to encode, like gifs, or av1 or whatever, but when I select the webm options, either one, it says
>first pass failed
Help pls I'm tech illiterate and dont know what I'm doing
>>
File: 1750221360487.webm (2.73 MB, 1280x720)
2.73 MB
2.73 MB WEBM
>>106702271
You're welcome.
>>
>>106702529
I did this up until making that bat file but when I click on it it just opens cmd prompt for a second and then closes and nothing happens
Did you just hack my pc?
>>
>>106702657
Do you have an input file named the following:

in.mp4

It's a very basic dummy script so every video you want to convert to VP9 must have this exact name and extension. IN.mp4, in.mkv, in.mov, or whatever will not work.
>>
>>106702657
Also christ on a stick. PLEASE TELL ME you were at least able to download ffmpeg from the gyan dev website by yourself. You shouldn't need a tutorial for that...
>>
>>106702691
I do not have that
>>106702699
I followed this
Of course I went to the website first, but I didn't know which of them to get
https://youtu.be/eRZRXpzZfM4?si=J1amrxsqdmKjCiQs

The supreme dictator of /g/ told me in an /a/ thread to use handbreak. I'm trying, but I would rather learn how to make webms directly in mpv for the sake of ease. Someone asked me if ffmpeg was installed without webm support. I do not know.
>>
>>106702733
Ok then just change in.mp4 into whatever your input video file is which should be in the same folder your script is in. Once the script works you can focus on more advanced concepts like FOR DO loop in windows. Don't worry about that right now, just get the script to run and produce a desired file.

I'm glad you're taking an interest though anon. Automating all this stuff is pretty rewarding and will let you stop sucking the GUI tit that most normalfags heavily depend on. Shit like handbrake can work if you're IQ is room temperature but having to open/close a GUI all the time especially if you have a lot of video files can make one lose hope and give up.
>>
>>106702755
Gonna be honest
I have no idea what that first paragraph even meant
I have a vp9.bat in my videos folder
Do I just create a file that says in.mp4? Most of my files are mkv files. So it should be in.mkv? I dont even see how I could create that. Does it start as a text document?
Also it sounds like this whole process is going to convert an entire file into a webm... i just want to make clips of anime...
>>
>>106702830
Rename your mkv video file to in.mkv and place it in the video folder where your .bat script is located

Then go in the script and rename in.mp4 to in.mkv and save it.

Now the script will search for a file named in.mkv
>>
>>106702830
>i just want to make clips of anime
Then you need to lookup how to select a timeframe in ffmpeg.

If you're still stuck at this point then I dunno man, maybe try avidemux.
>>
>>106702850
>>106702869
I appreciate your help, but I asked at the start why the specific plugin for MPV wasn't working and you sent me down an entirely different path that has nothing to do with mpv. In mpv I hit shift+w, select the start and stop timestamps, and it's supposed to work when I hit encode. Tons of people make webms this way and that's what I'm trying to do. I dont want to do what youre suggesting because it sounds tedious. Am I expected to drag and drop my files into my video folder every time, run the bat file, find the timeframe separately each time? This is silly
I'm not going to even bother looking up avidemux
Again, thanks for your help, but you really haven't helped me at all so far
Atleast using handbreak worked, but that's gay too because it's a separate program I'd have to use each time
>>
>>106702889
God, I hope you're a woman (without cock and balls) IRL.
>>
>>106702929
>ask for help with a specific thing
>not given help requested
Should have expected nothing less from this shitty board
Go fuck yourself, cunt
>>
>>106702529
>copypasta in the root folder.
Stopped watching here.
>>
>>106702529
>>106702755
>one pass vp9
>renaming the input file

>Automating all this stuff is pretty rewarding and will let you stop sucking the GUI tit that most normalfags heavily depend on. Shit like handbrake can work if you're IQ is room temperature but having to open/close a GUI all the time especially if you have a lot of video files can make one lose hope and give up.

kek, your the dumbest transcoding obsessed cli tranny I've ever seen on /g/. Your script is so shit. it can't do double pass, it cant hit a filesize limit, it can't burn subtitles or trim the video length. You're so shit at this you don't even understand how fucking retarded your advice is. You are the room temp IQ subhuman.
>>
File: bunny.mp4 (2.75 MB, 720x540)
2.75 MB
2.75 MB MP4
>>106702271
To get that script to work you need mpv and ffmpeg

when you go to download mpv at https://mpv.io/installation/ you'll see three versions, test the plugin on all three versions, it should work on all three but if it doesn't then something else is the issue
same thing with ffmpeg, there are two versions, try the other one first
https://ffmpeg.org/download.html#build-windows

right now we are just trying to narrow down the source of your error, if possible try a different video file, and also if possible upload a video that you know doesn't work to catbox.moe so one of us can try. I use that plugin all the time, but I don't often use the webm (aka vp9) encoder, since 4chan accepts .mp4 now you can get away with AVC (h264/AAC) for now
>>
>>106703395
h264 looks like ass, might as well post a GIF
>>
>>106703437
that is why I told him "for now"
as in, until we narrow down his issue
>>
File: 1748293410823196.gif (1.77 MB, 601x296)
1.77 MB
1.77 MB GIF
>>106703395
Holy fuck installing a different version of mpv worked
I used zhongfly and i can encode webms now!
I think I had third link on that page, from nightly, before. There are more folders and stuff in this new one, so I guess I had an "incomplete" version all this time? Thankfully all my previous configs were able to just drag and drop over
I finally was able to make a webm IN mpv thanks to your help
Thank you so much
I will say that the quality is ASS right now. How do I optimize it? It's about a 1m long clip and it starts off okay but the end of it looks very scuffed lol
https://files.catbox.moe/axxqr0.webm
How difficult is it to keep webms under 4 or 6mb while maintaining the highest quality possible? Is that something I can do within the MPV plug in just by messing around with those settings when I hit "o"? Or is it going to be more complicated than that?
Thanks again though, my friend, you were a great help
Please accept this azunyan as payment
>>
>>106702529
>>106702755
see >>106703116
>>
>>106702271
>>106702529
4chan supports mp4 now, there's not need for jewm anymore
>>
>>106704208
>>106703437
>>
>>106703655
>vp8
use vp9, 2pass, slowest preset
>vorbis
use opus, ~64kbps is fine and leaves more bits for video
if that's not enough, downscale to 720p (or even lower)
>>
File: Nichijou.mp4 (3.94 MB, 1920x1080)
3.94 MB
3.94 MB MP4
>>106703437
h264 is fine, it's only slightly worse than vp9 and infinitely better than gif
>>
>>106704756
I dont know what the second meme arrow means
I dont see any of those words in the options
>>
>>106706696
I'm not familiar with that script, I guess it just sucks then and doesn't expose many options
>>
>>106703655
>https://files.catbox.moe/axxqr0.webm
It seems I was mistaken
>Output Format: < WebM >
is vp8, you want to change it to
>Output Format: < WebM (VP9) >
for better quality, it will take longer to encode so be prepared to wait
>How difficult is it to keep webms under 4 or 6mb while maintaining the highest quality possible?
Pretty difficult, different videos will result in different file sizes, since the compression depends on the contents of the video itself
This plugin isn't going to expose all of ffmpeg's options, if you want to maximize quality you'll have to use ffmpeg directly, this plugin is just for quick edits
>Is that something I can do within the MPV plug in just by messing around with those settings
two pass can result in slightly better file sizes/quality but longer encode times
scale height, lower resolution usually looks better at <6MB because of how blocky things get
crf, ranges from 0 - 63, lower means better quality
https://trac.ffmpeg.org/wiki/Encode/VP9#constantq
>>106706696
vorbis and opus are for audio channels, you can ignore it if you are targeting boards without audio webm
>>
>>106706977
So the qrd for not getting too complicated with it is
>use vp9 encode with 2 pass
>increase the crf incrementally until it spits out something approaching but still under 4 or 6mb while looking good
>>
>>106707071
yeah, and consider lowering the resolution too
https://igwiki.lyci.de//wiki/WebM
bookmark this if you wanna start using ffmpeg, it is a good starting point
>>
>>106706977
>two pass can result in slightly better file sizes/quality but longer encode times
vp9 first pass is very fast so it's not much of a downside and basically always worth using
also in vbr mode quality will be a lot more consistent and it will hit the target bitrate a lot more accurately
>crf
you don't want to use crf mode because the filesize is unpredictable and you have to run multiple encodes to get it right, just use vbr mode
or constrained quality mode (target bitrate + crf) if you want to avoid bloating very easy encodes
>>
>>106707207
see >>106706823 or >>106702271
>>
>>106703395
7 seconds long
>>106704786
>12 seconds long
>>106704208
Place the end of the barrel of a gun to the roof of your mouth between the hard and soft palate, and pull the trigger dumb fucking discord tranny.
>>
File: pity bull.jpg (45 KB, 508x356)
45 KB
45 KB JPG
>>106702529
For the love of [DEITY], just install Linux at this point and let a package manager do it right. Putting files in the root is straight up gore.
>>
>>106707375
see >>106703449
If you would read the thread, instead of sperging out about AVC, you would see we already solved OP's issue
>>
>>106703655
example with ffmpeg:
ffmpeg -ss 00:01:24.626 -to 00:02:37.157 -copyts -i '[MiniMTBB] K-ON! the Movie (2011) (BD 1080p) [E5868A46].mkv' -ss 00:01:24.626 -to 00:02:37.157 -map_chapters -1 -map_metadata -1 -map_metadata:s -1 -map 0:v:0 -disposition:v:0 default -vf scale=-2:720:flags=lanczos,subtitles='\[MiniMTBB\] K-ON! the Movie (2011) (BD 1080p) \[E5868A46\].mkv':si=1 -c:v libvpx-vp9 -pix_fmt yuv420p10le -profile:v 2 -row-mt 1 -g 9999 -speed 0 -b:v 623k -pass 1 -f null -

ffmpeg -ss 00:01:24.626 -to 00:02:37.157 -copyts -i '[MiniMTBB] K-ON! the Movie (2011) (BD 1080p) [E5868A46].mkv' -ss 00:01:24.626 -to 00:02:37.157 -map_chapters -1 -map_metadata -1 -map_metadata:s -1 -map 0:v:0 -disposition:v:0 default -vf scale=-2:720:flags=lanczos,subtitles='\[MiniMTBB\] K-ON! the Movie (2011) (BD 1080p) \[E5868A46\].mkv':si=1 -c:v libvpx-vp9 -pix_fmt yuv420p10le -profile:v 2 -row-mt 1 -g 9999 -speed 0 -b:v 623k -pass 2 -map 0:a:0 -disposition:a:0 default -c:a libopus -b:a 64k -y 'K-ON_Movie.webm'

result: >>>/wsg/5981811
>>
File: wudwud dance.webm (3.88 MB, 1000x1000)
3.88 MB
3.88 MB WEBM
>>106707431
even webm for retards encodes anime mostly without flaws, you need something with particles to truly test it.
>>
Fuck yeah, petals.
>>
>>106707431
FUCKING RETARD!!!!!!!!!!!!!!!!!!!
>>
>>106707431
Damn that looks really good
>>
>>106704786
H264 ESPECIALLY at low bitrates is COMPLETE and UTTER DOGSHIT. You know the things hard to avoid with 4 MB file size limits?
>>
File: 1757552025098650m.jpg (115 KB, 1024x968)
115 KB
115 KB JPG
4MB/10 seconds = 3.2 Mbps
4MB/20 seconds = 1.6 Mbps
4MB/30 seconds = 1.1 Mbps
4MB/40 seconds = 800 kbps
4MB/50 seconds = 640 kbps

DESU I think hiro is a fucking retard because I assume his logic was that allowing H264 would allow people to post H264 content from other websites without another lossy encode but it usually never happens because MP4 videos from external sources are 10-20 MB or more because at least those websites understand that without a bloated filesize H264 will just turn into diarrheah.

What's next for his KEIKAKU? MPEG-4?
>>
File: 1728548965069553.jpg (162 KB, 811x811)
162 KB
162 KB JPG
>>106703031
>C:\
>Root folder
>>
File: 20250926_131227.png (168 KB, 720x935)
168 KB
168 KB PNG
>>106707711
Picrel for anyone wondering about the negative SS2 values of H264 in that chart. Keep in mind that it achieved them below 1 Mbps.
>>
>>106708026
Ah yes, indeed. I totally came into the thread of someone asking for help with their quick & dirty editing script, where OP clearly always intended to use VP9 with the intention of learning about the efficiency differences of different codecs. Appreciate it
>>
>>106707527
>>106707541
Truly test what? And yes, anime tends to be relatively easier, but it's still 73 seconds, not just 12 seconds like your examples.

>>106707711
>vp9 at less than 2Mbps supposedly as good as x264 at 10Mbps
>x264 supposedly doesn't nearly reach the same quality ceiling even at very high bitrate
There's obviously something very wrong, either it's some incredibly weird cherry picked video sample or they genuinely fucked up somehow.
For example, x264 version of the K-ON sample from above doesn't look much worse than the vp9 version: https://files.catbox.moe/s5u5rn.mp4
>>
>>106703031
honestly I'm glad Windows is finally locking down C:\. after that retarded C:\inetpub\ CVE, it's clear they're losing control over it and their customers are probably opening their boy pussies up to be buttfucked.
>>
>>106707916
All the world's a VAX
And all the software merely daemons
They have their forks and their exits
And one process in it's time sends many signals
>>
File: H.264-vs-HEVC-1024x309.png (359 KB, 1024x309)
359 KB
359 KB PNG
>>106708180
Nope, SS2 is currently the most state-of-the-art psychovisual metric that's pretty much as good as subjective ratings but you know without having thousands of human participants doing comparisons.

That's the cold hard truth behind H264, it can ONLY compete in bloated filesizes. Once you remove some of the bloat you start to get nasty blocky artefacting because of the macroblock limitations. Subjectively most people will agree that they would rather see "bleeding" or "buttery" artefacting present in dynamic block structure configurations of modern codecs because ultimate it retains more important detail at the cost of some blur.
>>
>>106707916
\ is C's drive root folder, yes. are you retarded perchance?
>>
okay but can someone just give me good handbrake settings to keep my webms under 4mb?
>>
>>106708428
bitrate chart from >>106707908
4MB/10 seconds = 3.2 Mbps
4MB/20 seconds = 1.6 Mbps
4MB/30 seconds = 1.1 Mbps
4MB/40 seconds = 800 kbps
4MB/50 seconds = 640 kbps
>>
File: netflix_results.png (14 KB, 720x162)
14 KB
14 KB PNG
>>106708316
I've done some SSIMULACRA2 benchmarks myself and ultimately it wasn't that different from other metrics. And yes, x264 was worse than vp9, but never even close to this extent. That graph implies like -80% BD rate, that's insane and far more than any other result I've ever seen.
Also SSIMULACRA2 wasn't even made for video but for still images, it vastly underestimates the quality of anything with lots of motion (e.g. Netflix_ToddlerFountain) since motion hides a lot of artifacts. It's worse than VMAF in those instances.
>>
>>106708434
Pardon me, I am retarded. Thank you.
>>
>>106707908
>>106708434
Are you guys too stupid for basic bitch math?
bitrate (in kbps) = filesize (in MiB) * 2^23 / 1000 / duration (in seconds)
and then multiply by 0.99 or something for some margin of error
>>
>>106708512
seems like you are too lmao this thread is fucking hopelessly and UNIRONICALLY RETARDED
>>
>>106708465
It's perfectly normal because modern video codecs were never intended to decrease filesize at SS2 90 (where visually lossless is achieved). Their main priority was to increase the quality at low bitrates. That's why people get so confused regarding video codecs because depending on your optics you'll see completely different pictures.

So it goes like this at extreme deltas:
A) VP9 achieves 80% better QUALITY over H264 at 800 kbps
B VP9 achieves 10% better QUALITY over H264 at 10 Mbps

So either VP9 is a meme or a miracle to the average tech illiterate retard.
>>
File: crab_ultra_4k.webm (2.93 MB, 2048x2048)
2.93 MB
2.93 MB WEBM
Behold, Crab Ultra.
>>
File: 1749574921706168.jpg (140 KB, 661x645)
140 KB
140 KB JPG
>>106708380
>drive root folder



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.