Since the problem with LG devices (and possibly other brands too) not being able to show jpeg images > 4 MB due to bugs/incompliance with the dlna specs seems unsolvable, I had to come up with another solution to be able to show my photos on my LG TV. I just thought I should share this if anyone could make use of it.
The solution is basically about creating a mirrored image library where the images are resized to a height of 1080 pixels (to match the TVs resolution) and renamed to "<name>_s", and then adding the mirror library to Serviio. This enhances the loading speed when browsing images while not impairing quality noticabily. With jpg-quality = 95 I get filesizes 250-600 kB.
From the beginning I had to do this semi automatically using IrfanView, but during the holidays I spent some time figuring out a script that may be run from a remote client, that does all the work for me. So whenever I have added new images to the main library, I just run the script and the mirror is updated. IrfanView is required on the server, and to run the script remotly, psexec (google!) is required on the client. A limitation is that the you can't have more that two levels in the library's folder structure. I have:
<year 1>
----<folder 1>
----<folder n>
<year n>
----<folder 1>
etc.
No imagefiles allowed directly in the <year> folders, only in subfolders! The script runs for the current year only, and thus has to be updated for each new year.
This is the batchfile "resize.bat" placed in the "Bilder" folder on the server:
- Code:
chcp 1252
dir D:\Gemensamt\Bilder\Foto\2012 /A:-D-S-H /s /b | FIND /V "picasaoriginals" > D:\Gemensamt\Bilder\bilder.txt
"%ProgramFiles%\IrfanView\i_view32.exe" /filelist=D:\Gemensamt\Bilder\bilder.txt /advancedbatch /ini="D:\Gemensamt\Bilder" /jpgq=95 /convert=D:\Gemensamt\Foto\2012\$d\$N_s.jpg
chcp 850
rem pause
This is the target string in the shortcut on the client:
- Code:
C:\Windows\System32\cmd.exe /k psexec \\filur D:\Gemensamt\Bilder\resize.bat
and here's the i_view32.ini file I use:
- Code:
[Batch]
AdvCrop=0
AdvCropX=0
AdvCropY=0
AdvCropW=0
AdvCropH=0
AdvCropC=0
AdvResize=1
AdvResizeOpt=0
AdvResizeW=0.00
AdvResizeH=1080.00
AdvResizeL=0.00
AdvResizeS=0.00
AdvResample=1
AdvResizePerc=0
AdvResizePercW=0.00
AdvResizePercH=0.00
AdvDPI=0
AdvResizeUnit=0
AdvResizeRatio=1
AdvNoEnlarge=1
AdvResizeOnDpi=0
AdvCanvas=0
AdvAddText=0
AdvUseBPP=0
AdvBPP=0
AdvUseFSDither=1
AdvAutoRGB=0
AdvHFlip=0
AdvVFlip=0
AdvRLeft=0
AdvRRight=0
AdvGray=0
AdvInvert=0
AdvSharpen=0
AdvGamma=0
AdvContrast=0
AdvBrightness=0
AdvSaturation=0
AdvColR=0
AdvColG=0
AdvColB=0
AdvSharpenVal=1
AdvGammaVal=0.00
AdvContrastVal=0
AdvBrightnessVal=0
AdvSaturationVal=0
AdvColRVal=0
AdvColGVal=0
AdvColBVal=0
AdvDelOrg=0
AdvOverwrite=0
AdvSubdirs=1
AdvSaveOldDate=1
AdvAllPages=0
AdvFineR=0
AdvFineRVal=0.00
AdvBlur=0
AdvBlurVal=1
AdvMedian=0
AdvMedianVal=3
AdvRbg=0
AdvBgr=0
AdvBrg=0
AdvGrb=0
AdvGbr=0
AdvAutoCrop=0
[BatchText]
AddText=
TextCoord=0;0;100;100;
Corner=0
Orientation=0
TranspText=1
FontColor=65280
TxtBgkr=16777215
FontParam=-13|0|0|0|400|0|0|0|0|1|2|1|49|
Font=Courier
[Effects]
CanvL=10
CanvR=10
CanvT=10
CanvB=10
CanvInside=1
CanvColor=0
[Open]
OpenDir=B:\
[JPEG]
Save Quality=95
\\filur is the server with the main library "D:\Gemensamt\Bilder\Foto\", and the mirror library "D:\Gemensamt\Foto\".
If you don't use the same usn + pwd on both client and server, a username+password may be added like: "psexec -u <usn> -p <pwd>.
The script points at a folder where a saved IrfanView ini-file is (/ini="D:\Gem....).
The chcp entries are necessary since my foldernames contain "å,ä,ö".
Also note that any deletes or image edits in the main library after the script is run will not be reflected in the mirror library! You would have to delete the mirror files first to get a new copy!