VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    How do I change the dpi when making images with ffmpeg? Will it lower the quality of the images?

    Oh, and by the way, for webp files, do -lossless 0 and -lossless 1 both make lossless results or only the latter can?
    Last edited by Jay123210599; 19th Jan 2024 at 21:06.
    Quote Quote  
  2. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    Pixels have no physical dimension, DPI is just meta data used to give them a default physical size when you have a physical canvas. If you have a 300px*300px image using 72DPI and change just the DPI it's still a 300px*300px image, it's the exact same image data.

    If you were to display these images in web browser and don't specify a size with HTML it uses the native pixel size, they would display exactly the same each taking up an area 300px*300px on your screen because a browser doesn't use DPI. Insert these two images into a Word document which has a physical canvas and they will be different sizes.
    Quote Quote  
  3. Originally Posted by Jay123210599 View Post
    How do I change the dpi when making images with ffmpeg? Will it lower the quality of the images?
    Video screen cannot squeeze pixels as we wish. DPI does not apply. If we watch video/images, they get resized - either upscaled (so new pixels are interpolated/created) or downscales (less pixels is generated/interpolated) when watching it to fit your monitor/TV/viewing area.
    Almost every time you pull an image or video on screen using your PC player or web browser, it always resizes an image to your viewing area. You drag the corner of your video player or your browser, video/image gets constantly resized to fit your monitor area. You rarely see a content scaled exactly as 1:1, as you encoded.

    In some lucky moment or when watching specific content, like Blu-ray that has 1920x1080 resolution and watching it on full screen that has 1920x1080 resolution, you see pixels 1:1, as they were encoded. Or If you have a player and say 1280x720 video and you specify in settings of player (or click a dedicated button) to show 1:1, you get again original pixels on screen.

    That is why you are constantly bombarded with question what your intentions are with those images, what it is for. Because for example, as integrating images to a web page, you do not want to have images of large proportions squeezed to a lesser resolution (space that it has available on web page), because your increase web traffic and everything is slower. Your large image would be viewed as much smaller resized resolution anyway. For web, you try to integrate images with just a right/smaller resolution so it is ok for a web page to just fit and most certainly it would be jpg or something compressed. Photoshop has a feature for that, like optimizing jpg etc. , I forgot how it was called. For download on the other hand, you might offer a means how to get a full blown up image or sequences of images. But sequence of image as download makes little sense also, you are better off having available a compressed video sequence.

    Cartoons are compressible many many times better as video as oppose to separate images. 10 times fold at least? I'd say even more. Try to compress cartoon with high resolution, good quality and then calculate size per frame, you will be stunned comparing it to sizes of your standalone png's.
    Quote Quote  
  4. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    Well, the reason I want to make images sequences so I can manually select the best images to upload to DeviantArt. Since my videos are 10bit, how do I extract them as 10bit images? Do those types of images even exist?
    Quote Quote  
  5. Originally Posted by Jay123210599 View Post
    Well, the reason I want to make images sequences so I can manually select the best images to upload to DeviantArt.
    Why would you extract all of them , if you're only going to upload a few? - seems like an enormous waste of time

    Why not choose the few you are going upload in a media player, or vdub2 then export those?

    Since my videos are 10bit, how do I extract them as 10bit images? Do those types of images even exist?

    10Bit RGB images exist (e.g. DPX) - it's a very common format in films for production work - but nobody on DeviantArt will be able to see them . There is no browser support. Even if there was hypothetical browser support , it still wouldn't work, because DA wouldn't accept them

    Look at the DeviantArt supported files

    https://www.deviantartsupport.com/en/article/what-file-types-can-i-submit-to-deviantart

    For images, you have 3 choices
    Images: JPEG, PNG, GIF
    Quote Quote  
  6. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by Jay123210599 View Post
    Well, the reason I want to make images sequences so I can manually select the best images to upload to DeviantArt.
    Why would you extract all of them , if you're only going to upload a few? - seems like an enormous waste of time

    Why not choose the few you are going upload in a media player, or vdub2 then export those?

    Since my videos are 10bit, how do I extract them as 10bit images? Do those types of images even exist?

    10Bit RGB images exist (e.g. DPX) - it's a very common format in films for production work - but nobody on DeviantArt will be able to see them . There is no browser support. Even if there was hypothetical browser support , it still wouldn't work, because DA wouldn't accept them

    Look at the DeviantArt supported files

    https://www.deviantartsupport.com/en/article/what-file-types-can-i-submit-to-deviantart

    For images, you have 3 choices
    Images: JPEG, PNG, GIF
    Well, I used both ffmpeg and shutter encoder to make dpx and they both resulted in images that were 30bit. Do other file formats for 10bit images exist? Or am I doing something wrong?
    Quote Quote  
  7. Originally Posted by Jay123210599 View Post

    Well, I used both ffmpeg and shutter encoder to make dpx and they both resulted in images that were 30bit. Do other file formats for 10bit images exist? Or am I doing something wrong?

    It's the same thing

    "10bit" refers to 10bits per channel component "BPC" . 10 Red, 10 Green, 10 Blue . (Your source video in YUV is also 10 BPC . 10 Y, 10 U, 10 V)

    "30bit" refers to 30bits per pixel "BPP" . Think of it as the total R+G+B which make up a pixel
    Quote Quote  
  8. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by Jay123210599 View Post

    Well, I used both ffmpeg and shutter encoder to make dpx and they both resulted in images that were 30bit. Do other file formats for 10bit images exist? Or am I doing something wrong?

    It's the same thing

    "10bit" refers to 10bits per channel component "BPC" . 10 Red, 10 Green, 10 Blue . (Your source video in YUV is also 10 BPC . 10 Y, 10 U, 10 V)

    "30bit" refers to 30bits per pixel "BPP" . Think of it as the total R+G+B which make up a pixel
    But if I use 24bit (8 x 3) PNG files, people won't tell the difference? And changing the dpi won't change the file size?
    Quote Quote  
  9. Originally Posted by Jay123210599 View Post
    But if I use 24bit (8 x 3) PNG files, people won't tell the difference? And changing the dpi won't change the file size?
    Can't tell the difference (especially on the sources you posted - which were actually 8bit to begin with - people just re-encoded them lossy at 10bit. The original, original sources were 8bit)

    No filesize change
    Quote Quote  
  10. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Resolution is measured solely in pixels.

    DPI only affects the display size (think, zoom), whether electronic or paper. It also has nothing to do with quality, although human sensitivity to sharpness is a combination of rez, dpi/zoom level, contrast & distance (and individual sensitivity.

    I'll let someone else talk webp since I almost never use them.


    <Edit>doh! this got stuck and didn't send for an hour...
    Scott
    Last edited by Cornucopia; 20th Jan 2024 at 00:05.
    Quote Quote  
  11. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Also, (continuing on what was said), as previously mentioned, 99% of viewers will be viewing the images on an 8bit/24bit monitor or TV, so for them, you gain nothing by having your posted copies at 10bit/30bit. Nothing.
    (You MAY gain something if your intermediate format is higher bit and you do processing, because this reduces or avoids banding, but that is only true if the bitdepth reduction step at the end is done correctly, and the step may itself be considered lossy).


    Scott
    Quote Quote  
  12. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    Originally Posted by Jay123210599 View Post

    And changing the dpi won't change the file size?
    If you are changing just the DPI at the very most it might change by a byte or two, there is no change in the image data. The discrepancy would be because of changes to the header.

    Here is some examples. The image data is identical. Save the files and import into Word doc to see DPI in action.

    249x276 @72 DPI


    249x276 @600 DPI
    Last edited by thecoalman; 20th Jan 2024 at 07:08.
    Quote Quote  
  13. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    Originally Posted by _Al_ View Post
    Cartoons are compressible many many times better as video as oppose to separate images. 10 times fold at least? I'd say even more. Try to compress cartoon with high resolution, good quality and then calculate size per frame, you will be stunned comparing it to sizes of your standalone png's.
    For cartoons if the color pallete required is less than 256 colors using .gif you can get some very small file sizes without artifacts inherent with .jpg
    Quote Quote  
  14. Banned
    Join Date
    Oct 2023
    Location
    Los Angeles
    Search Comp PM
    Oh, and my question for lossless webp files?
    Quote Quote  
  15. Originally Posted by Jay123210599 View Post

    for webp files, do -lossless 0 and -lossless 1 both make lossless results or only the latter can?
    for webp
    -lossless 0 is lossy encoding, YUV420
    -lossless 1 is lossess encoding, RGBA
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!