Closed stepman0 closed 5 years ago
Looks good! I'll try this with some of my video and will merge it if it works. ;-)
Wow, that was a quite impressive ! I didn't realize how bad the video quality of the accompanying lower-res videos actually is! The plugin is not just lowering the resolution (as one would expect), it is also lowering the Bits/(Pixel*Framerate) dramatically, which is not what you would expect!
Example: I have a 19201080 (=2073600 px)/50fps video with a 27.1Mb/s bitrate ( =336MByte filesize) and I rescale it to 426240 (= 102240px)/50fps, which is roughly 5% of the original size, I would expect a resulting birate of (5%*27.1Mb/s) = 1,3 Mb/s and a filesize of 5% of the original. Currently the bitrate of the 240p resolution is fixed to 256kb/s resulting in a video filesize if about 1.2 % of the original ( 4 MByte). So, 512kb/s is definitely more appropriate, but I would rather suggest at least 1Mb/s Similar calculation have to be done for the other resolutions.
Honestly, I didn't care about those video codec params so far: copied from another app, done! So, this time I digged a little bit deeper and found this post on Understanding Rate Control Modes, which was really opening my eyes! After reading the post, I tend to swithch from the current 2-pass ABR approach to the 1-pass CRF approach. I played aroung with it an was quite satisfied with -crf 23 (default): the resulting bitrate / filesize is very close to my above described espectations. This approach has 2 important benefits:
I'll send you the patched PSConvert.lua later, so you may check if it works for you.
Using CRF seems to be a good idea, indeed. I just have to check if the resulting bandwidth is still low enough to stream it over the internet.
Actually I am still thinking about using Intel Quicksync for video transcoding, ffmpeg should support this. It should save even more time.
I will give it a try as soon as I have enough time...
PSConvert.zip @stepman0 Please exchange the PSConvert.lua with this one.
Thanks for the motivating discussions! I rewrote large parts of the video conversion configuration. Beginning with Version 6.8.0 you are now able to define your own video conversion presets in a presets file, easily. No coding or reloading of the plugin is needed to introduce and test new video conversion presets. Cheers, Martin
Hi Martin, sorry for answering so late. I was very busy last weeks. This sounds very promising!! Thanks again for your great work!!!
I just wanted to give it a try, but after updating to 6.8.1 (via git) the plugin is not loading anymore. I will look into it and create a new issue if necessary.
I use the preview videos in all my mobile apps, as the native videos have high bandwith which is not suitable for online streaming.
Unfortunately, the default settings for the preview videos have very poor quality. Therefore, I doubled the bitrate of the preview videos, which is still small enough but has significant better quality.