Portrait Photo Orientation problem

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
augeydoggy
Posts: 4
Joined: Fri Dec 21, 2012 2:25 am

Portrait Photo Orientation problem

Post by augeydoggy »

Been away from UMS for awhile, and wanted to view recent travel photos on TV via PS3. I installed 7.0 and pulled up photos with no problem. Thumbnails all show correctly. But if I try to view a portrait-oriented photo, I get either "data is corrupt" or "network error". I also tried WMP for comparison - it shows the portrait files, but horizontally. Is there a simple fix? I didn't find any recent info when searching forums. Thx.
Attachments
ums_dbg.zip
(677.94 KiB) Downloaded 350 times
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Portrait Photo Orientation problem

Post by Nadahar »

I can't see anything obvious in the log. Can you give me the name of one of the images that failed to show while you made this log file? I need to know what to look for.
augeydoggy
Posts: 4
Joined: Fri Dec 21, 2012 2:25 am

Re: Portrait Photo Orientation problem

Post by augeydoggy »

SE_Asia_2018_0748.JPG

There is also a RAW (Canon CR2) image in folder with same name, but I don't believe the RAW images show up at all?

Also got a new twist - tried again and it displayed but squashed and stretched in horizontal display.
augeydoggy
Posts: 4
Joined: Fri Dec 21, 2012 2:25 am

Re: Portrait Photo Orientation problem

Post by augeydoggy »

Found sort of a work-around: UMS displays the images correctly via Roku. Little slower and more awkward to use.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Portrait Photo Orientation problem

Post by Nadahar »

UMS does show RAW images as long as they are supported by DCRaw. UMS also rotates the images according to their EXIF orientation before displaying them. DCRaw does have some issues with certain RAW images, and I remember having problems with the orientation of some of them.

Since there's no standard or even a public definition for most of the RAW formats, they are processed on a "best effort" basis. I can't see any attempt to play/view "SE_Asia_2018_0748.JPG" in the provided logfile. "SE_Asia_2018_0748.cr2" on the other hand is played:

Code: Select all

TRACE 2018-03-11 13:03:59.095 [HTTPv2 Request Worker 2] net.pms.network.RequestHandlerV2 Received a request from PlayStation 3 (192.168.1.167:59247):

GET /get/684/JPEG_RES5536x3693_SE_Asia_2018_0748.CR2 HTTP/1.1

HEADER:
  Host: 192.168.1.155:5001
  User-Agent: PLAYSTATION 3
  Connection: Keep-Alive
  Accept-Encoding: identity
  transferMode.dlna.org: Interactive
  X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment"; mn="PLAYSTATION 3"; mv="1.0";

TRACE 2018-03-11 13:03:59.095 [HTTPv2 Request Worker 2] net.pms.encoders.DCRaw Decoding image "N:\Photos\2018\SE Asia 2018\SE_Asia_2018_0748.CR2" with DCRaw
DEBUG 2018-03-11 13:03:59.095 [HTTPv2 Request Worker 2] net.pms.io.ProcessWrapperImpl Starting "P:\Program Files (x86)\Universal Media Server\win32\dcrawMS.exe" -c -M -w "N:\Photos\2018\SE Asia 2018\SE_Asia_2018_0748.CR2"
TRACE 2018-03-11 13:04:25.087 [HTTPv2 Request Worker 2] net.pms.image.ImagesUtil Converting input stream image source to JPEG_RES_5536_3693 format and type DLNAImage using the following parameters: PadToSize = False
TRACE 2018-03-11 13:04:31.104 [HTTPv2 Request Worker 2] net.pms.image.ImagesUtil Finished converting 3693×5536 PNM image. Output image resolution: 5536×3693, profile: JPEG_RES_5536_3693. Flags: Convert colors = False, Re-encode = False
TRACE 2018-03-11 13:04:31.104 [HTTPv2 Request Worker 2] net.pms.network.RequestV2 Available Content-Length: 21960864
DEBUG 2018-03-11 13:04:31.107 [HTTPv2 Request Worker 2] net.pms.network.RequestHandlerV2 Connection error: java.io.IOException: An established connection was aborted by the software in your host machine
DEBUG 2018-03-11 13:04:31.107 [HTTPv2 Request Worker 2] net.pms.network.RequestHandlerV2 Premature end, stopping...
I can't see anything wrong except for the fact that the conversion takes very long (13:03:59 to 13:04:25) plus that UMS takes another 6 seconds to convert it to JPEG. DCRaw converts everything to PNM format, so it must be converted twice before it can be presented as a JPEG (which is what the Playstation requests). My guess is that the Playstation times out (give up waiting for a reply) before the image conversion is completed, which is why you see the "connection aborted" error.

The reason it takes so long is probably a combination of several factors. UMS 7.x.x does a full library scan each time you start UMS, which means that your computer is very busy scanning and making thumbnails while this is going on. The slows down both disk access and the CPU. Your CPU isn't the fastest either, I'm not very familiar with AMD CPUs but I can see that your CPU has a PassMark score of 3466 compared to 12999 for mine. That will probably have significant impact on the conversion time.

I would downgrade to UMS 6.8.0 (just be aware that you must delete the "database" folder in "C:\ProgramData\UMS\" after downgrading) so that you won't have the disk scanning slowing your computer down while trying to convert it. Converting such huge files will be slow in any case though.

When it comes to stretching/deformation of the image, that is probably caused by DCRaw itself. You can try to run it manually from the command line and look at the output image with a PNM capable image viewer by running:

Code: Select all

"P:\Program Files (x86)\Universal Media Server\win32\dcrawMS.exe" -M -w "N:\Photos\2018\SE Asia 2018\SE_Asia_2018_0748.CR2"
..or:

Code: Select all

"P:\Program Files (x86)\Universal Media Server\win32\dcrawMS.exe" -T -M -w "N:\Photos\2018\SE Asia 2018\SE_Asia_2018_0748.CR2"
For DCRaw to produce a TIFF image instead of PNM.

Edit: It would be interesting to see a log where you try to open the JPEG image. If you can't tell them apart, turn off "hide file extensions" in UMS' configuration and restart UMS.
Post Reply