paulpacifico / shutter-encoder

A professional video compression tool accessible to all, mostly based on FFmpeg.
https://www.shutterencoder.com
GNU General Public License v3.0
1.08k stars 59 forks source link

Issues when setting file size #179

Closed RafaelLinux closed 9 months ago

RafaelLinux commented 9 months ago

For unknown reasons, since the last version, the functionality to adjust the final size of the video does not work as it should. Before, after setting the final size of the video, the bitrate of the selected codec (usually h264) was automatically adjusted correctly. But now, the bitrate value is automatically adjusted even to negative values. For example, a 450MB video I want to encode in h264 in VBR. I select:

paulpacifico commented 9 months ago

If you get a negative value this is because your size is too small for the duration of your file. Nothing has changes since a while for this option. Paul.

RafaelLinux commented 9 months ago

I have taken some time to double check my comment and it is indeed a problem that manifests itself in version 1.7.9, it did not occur in previous versions.

In my screenshots, you can see a screenshot with the same parameters in versions 1.7.8 and 1.7.9. The input video is the same. A 999MiB MKV file. In both versions, selected codec is "H264", the "Video Bitrate" and "Maximum" are set to "auto" and the final file size is set to 1MiB. The difference happens exactly after entering that size. While version 1.7.8 sets a "Video Bitrate" of 57kb/s and "Audio bitrate" is set to 1, according to the final file size, imagen however in version 1.7.9 suddenly a negative value is assigned to "Video bitrate" and doesn't auto-adjust "Audio bitrate" just after set file size to 1MiB imagen.

I'm using AppImage version, if it helps.

I take this opportunity (if necessary I will open another thread) to comment that I think it would be very useful if SE showed (as I do on the screenshot) the size of the selected file, in that place.

Thank you

paulpacifico commented 9 months ago

I get the same results between v17.8 & v17.9. But I repeat, your file size is way to low for a 2min video. You can't expect a normal bitrate value.

Paul.

RafaelLinux commented 9 months ago

I have put an extreme case in order to make the difference quickly visible. In any case, as extreme as the example is, at least version 1.7.8 did not generate out of range values, I could trust it to do "the best it could" and then adjust the quality. In 1.7.9, it directly proposes abnormal values that don't even allow you to adjust until you get what you want.

What I don't understand is how it is possible that the same thing doesn't happen to you. I have two teams. On one I already had version 1.7.9 and I quickly noticed the problem. On the other (the one I'm writing from) I had version 1.7.8 and I've checked that with that version, the issue doesn't occur. I have installed version 1.7.9, and the issue is already happening, so there must be some change (even if they are libraries included in the AppImage). You tell me that it doesn't happen to you, are you using the Linux AppImage or Windows version?

paulpacifico commented 9 months ago

But does the results is the same between v17.8 & v17.9 for a normal file size like 50? I've tried on Mac & Pc but I didn't change anything into the code for since a while for the calculation.

Paul.

RafaelLinux commented 9 months ago

As I had overwritten with version 1.7.9 the previous one (I always rename it as "Shutter Encoder.AppImage") I downloaded version 1.7.8 and 1.7.5. And "mysteriously" (I can't explain it) the behaviour in all versions is the same. Same values, same results. I have no logical explanation for the 1.7.8 version that I still had, to behave as it did. I therefore close the thread.

However, before I close it, and taking advantage of the fact that it is about the automatic values, I would like to have a little more clarity on how "auto" works, as the help available on the website doesn't mention it. By default, the video bitrate is set to "auto", but what does this imply? What calculation is made to calculate the bitrate? In the example of the 999MiB video, the "auto" mode shows me that the final size will be 23MiB, but curiously, the applied bitrate is not shown unless you manually change the final file size or, curiously, if you use "Ctrl + C" in that control field after selecting the number that appears in that control field. The same applies to the "better" and "good" modes. I think it would be clearer for the user if there was an additional drop-down list to choose "auto", "better" or "good" next to the bitrate. That way, the audio bitrate would always be displayed, even when in automatic mode (the presence of "auto" in the drop-down list would no longer be necessary).

Also, as an additional suggestion from the user's point of view, when the user sets an arbitrary final file size, it would be interesting to also adjust the audio bitrate (reduce it) to achieve the desired size.

Thanks in any case for reading my suggestions and for taking care so quickly of the problem that "no longer exists".