FallingSnow / h265ize

A node utility utilizing ffmpeg to encode videos with the hevc codec.
MIT License
527 stars 81 forks source link

Multipass using wrong input file on n-th pass? #106

Open rogueosb opened 7 years ago

rogueosb commented 7 years ago

I've been testing the multipass option in h265ize, and noticed that the ffmpeg command is not using the same input file on subsequent passes. Looking through the code I noticed the following: https://github.com/FallingSnow/h265ize/blob/d9746cbe18f54b78fd8d7e666fcd189eae085071/lib/classes/video.js#L975

Am I correct in assuming that the n+1 pass is therefore using the output of the n-th pass? From my understanding, shouldn't the input file for each pass be the original file? This is also what the FFmpeg documentation suggests.

I'm not sure what the side effects of using the temporary output would be, but I would imagine it could lead to image quality degradation as it is using the suboptimally compressed first pass. However, I am not an expert on the matter so I am happy to be wrong on this one!

FallingSnow commented 7 years ago

Am I correct in assuming that the n+1 pass is therefore using the output of the n-th pass?

Yes

From my understanding, shouldn't the input file for each pass be the original file?

Yes

Unfortunately multipass doesn't get a lot of attention from me because I never use it. This is an issue that will have to be fixed.

Just curious, why are you using multipass over crf?

rogueosb commented 7 years ago

Glad I'm not wasting your time in that case.

Just curious, why are you using multipass over crf?

I normally use CRF, but for some shows where quality isn't as important to me I prefer to have some more control over the final file size.

FallingSnow commented 7 years ago

I see.