gkv311 / sview

Stereoscopic media player
GNU General Public License v3.0
93 stars 34 forks source link

jpeg size limit #110

Open tksharpless opened 2 years ago

tksharpless commented 2 years ago

Maybe not a bug, but it seems that jpegs wider or higher than 16384 pixels cannot be loaded (AVCodec library error 'not an image'). Is there a way around that?

gkv311 commented 2 years ago

Please attach file sample.

tksharpless commented 2 years ago

The file was made by Dean Zwikel and is available for download at https://drive.google.com/drive/folders/1-HzuqVk5YAsNzj6zSNqcy97_KYJOZzqr?usp=sharing The version called 'full resolution', about 19k square, would not load in sView. Photoshop could load it, so I tried saving as a new jpeg, but sView could not load that one either. Reducing the size to 16,000x16,000 in PS produced a jpeg that sView could load.

gkv311 commented 2 years ago

This is a bug/limitation of FFmpeg library, which seems to be not yet fixed even within the latest release: https://trac.ffmpeg.org/ticket/8030

ffmpeg.exe -i "0001_20220722_122118 Panorama_FullSize_OVER-UNDER.JPG"
...
ffmpeg version 2022-07-28-git-6f7d3bde11-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
...
[mjpeg @ 00000229d6594cc0] [IMGUTILS @ 0000008483bfeca0] Picture size 19116x19116 is invalid
[image2 @ 00000229d6581100] Could not find codec parameters for stream 0 (Video: mjpeg (Baseline), none(bt470bg/unknown/unknown)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, image2, from '0001_20220722_122118 Panorama_FullSize_OVER-UNDER.JPG':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 10365555 kb/s
  Stream #0:0: Video: mjpeg (Baseline), none(bt470bg/unknown/unknown), 25 fps, 25 tbr, 25 tbn
At least one output file must be specified

Fill free to ping FFmpeg team with this issue - maybe this would help somebody to start working on it.

As a workaround, you may open this image using FreeImage library instead of FFmpeg (considering that you are running Windows - it still comes with sView as an option):

sview.exe "0001_20220722_122118 Panorama_FullSize_OVER-UNDER.JPG" --imageLib=FreeImage

And to switch back to default FFmpeg (which is usually faster and better for most files):

sview.exe "0001_20220722_122118 Panorama_FullSize_OVER-UNDER.JPG" --imageLib=FFmpeg
tksharpless commented 2 years ago

Thanks, Kirill. I had not noticed this before as I rarely make stereo panos bigger than 16K. I will file a bug report with ffmpeg. And use your workaround in case they don't fix it :) Best regards, -- Tom

On Fri, Jul 29, 2022 at 5:30 AM Kirill Gavrilov Tartynskih < @.***> wrote:

This is a bug/limitation of FFmpeg library, which seems to be not yet fixed even within the latest release: https://trac.ffmpeg.org/ticket/8030

ffmpeg.exe -i "0001_20220722_122118 Panorama_FullSize_OVER-UNDER.JPG" ... ffmpeg version 2022-07-28-git-6f7d3bde11-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.1.0 (Rev2, Built by MSYS2 project) ... [mjpeg @ 00000229d6594cc0] [IMGUTILS @ 0000008483bfeca0] Picture size 19116x19116 is invalid [image2 @ 00000229d6581100] Could not find codec parameters for stream 0 (Video: mjpeg (Baseline), none(bt470bg/unknown/unknown)): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options Input #0, image2, from '0001_20220722_122118 Panorama_FullSize_OVER-UNDER.JPG': Duration: 00:00:00.04, start: 0.000000, bitrate: 10365555 kb/s Stream #0:0: Video: mjpeg (Baseline), none(bt470bg/unknown/unknown), 25 fps, 25 tbr, 25 tbn At least one output file must be specified

Fill free to ping FFmpeg team with this issue - maybe this would help somebody to start working on it.

As a workaround, you may open this image using FreeImage library instead of FFmpeg (considering that you are running Windows - it still comes with sView as an option):

sview.exe "0001_20220722_122118 Panorama_FullSize_OVER-UNDER.JPG" --imageLib=FreeImage

And to switch back to default FFmpeg (which is usually faster and better for most files):

sview.exe "0001_20220722_122118 Panorama_FullSize_OVER-UNDER.JPG" --imageLib=FFmpeg

— Reply to this email directly, view it on GitHub https://github.com/gkv311/sview/issues/110#issuecomment-1199068909, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBEZZRZAWPGLPZ2VLXPO3TVWOQD5ANCNFSM54XHEAZQ . You are receiving this because you authored the thread.Message ID: @.***>