Code Monkey home page Code Monkey logo

Comments (5)

k4yt3x avatar k4yt3x commented on May 10, 2024

The difference in quality is too big between PNG and JPEG. Therefore, this feature request will not be implemented at this point.

PNG

extracted_34

JPEG

extracted_34

from video2x.

cr08 avatar cr08 commented on May 10, 2024

To be fair, and this is just additional technical info on the topic, it does look like the default jpg output in ffmpeg without specifying a quality rate is pretty poor not only from your test images but a brief test of my own. Selecting the jpg output quality is done using the same -q or -qscale modifiers like other codecs. Looks like it ranges from 2-32 for jpeg with 2 being the best and 32 being the worst. Not setting it, looks like with my test samples it was defaulting to about 24-25. Setting to 1 (before I found that it MAY be limited to a max of 2 for jpeg, but doesn't seem to make much difference) seems to produce VERY minor artifacting at best which takes zooming in past 100% to identify. YMMV however.

Sample size of 750 720x576 frames. Current PNG output is 390MB, JPEG at -q 1 is 35.3MB. So there IS a significant size difference at minimal quality loss.

With that said this is where my opinion and bias on this request comes in: JPEG is lossy and PNG is lossless. When dealing with the numerous conversion stages here (source video > png/jpg/etc frames > waifu2x processing and encoding to another set of png/jpg/etc frames > h264) especially with the focus of improving the quality of the source content, I would never trust a lossy intermediate format like jpg no matter how good of quality you can get it to produce. Disk space is cheap and for your average ~24 minute SD episode (again, based off my current working set of content at 720x576 source resolution, being processed up to 1440x1080) it should only be producing around ~130-150GB of frames both source and output.

from video2x.

k4yt3x avatar k4yt3x commented on May 10, 2024

@cr08 I understood the problem afterwards.
DeadSix27/waifu2x-converter-cpp#114

Here was my conversation with waifu2x-converter-cpp's developer on this topic.
I might still try JPEG later.

from video2x.

k4yt3x avatar k4yt3x commented on May 10, 2024

It's so sad that I've already written the code, but I git reset --hard'ed the thing.

from video2x.

k4yt3x avatar k4yt3x commented on May 10, 2024

Added JPEG support in the newest version

from video2x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.