5 ms·
My Ryzen system can do 2-pass 1080p24 x264 encoding on "slower" preset in real-time. That is, both passes finish in the time it would take to play the movie. It
by sp332 9y ago
My Ryzen system can do 2-pass 1080p24 x264 encoding on "slower" preset in real-time. That is, both passes finish in the time it would take to play the movie. It would only make sense for streaming if you had >10 users at a time, and at that point it would probably save a lot of work if you just did the transcoding ahead of time and kept the right format on disk!
- post_break 9y agoI'd do that but the amount of data I have, yeah I couldn't keep extras. Takes up too much space.
- deleted 9y ago[deleted]
- Dylan16807 9y agoDo you actually gain anything from two-pass encoding for streaming? It helps with file sizes but not with momentary bandwidth requirements, as far as I know.
- Filligree 9y agoA little bit. Configured for constant bit-rates, x264 can still do a bit of jiggling on the assumption that there's a buffer, which helps with quality in general. Two-pass gives it information to do that better. But constant-quality modes are far superior when you're not bandwidth-constrained.
- Dylan16807 9y agoSingle-pass will also juggle within a seconds-long buffer. Does two-pass help on that micro level, in addition to the way it can allocate bits across an entire file?
- sp332 9y agox264 has a ton of settings for that kind of thing. This page has a good summary: https://en.wikibooks.org/wiki/MeGUI/x264_Settings#qpstep https://en.wikibooks.org/wiki/MeGUI/x264_Settings#qpstep
- sp332 9y agoIt helps if you have a target filesize, or equivalently an average bitrate. The first pass sets the "budget" that each part of the video gets to use out of the total, and the second pass has to make the best encoding it can that fits in the budget for each part. This lets you re-allocate bits from easy parts and give harder parts a little extra. Edit: so no, it doesn't produce any of the final video during the first pass so you're just adding a huge amount of latency for nothing.