Amazon Firestick and UMS

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
Trebly
Posts: 24
Joined: Tue Mar 06, 2018 2:28 am

Re: Amazon Firestick and UMS

Post by Trebly »

Hi,

I had to manage several priorities during last week and various discussion have remained pending.
I think that this projects is a long time project which will need a lot of time, I feel this because of the number and variety of problems that I have met until now.

About the language problem and my use of English
I am French but I have studied classical English and I used it all my life but I have never lived in England or USA.
When I have live conversations or at phone generally English and Americans understand well what I mean and I understand well what they say.
I read currently many books and articles in English and I can translate it into a good French without any error.
Nevertheless my English is not idiomatic and I can have difficulties to read the daily press and twitter or facebook, it is more easy for me to read litterary or technical documents.
I am missing some vocabulary and I have a lack of right expressions in informatics, because I uses commonly the French interface and I need often to use periphrases to translate from French, expressions that I should use in native.

I write directly in English and, after, I submit what I wrote to S3Translator (I have just now checked it and I have noticed significant differences with Google translator) to translate it in French. I discover generally a few mistakes, articles missing, lapsus (I mean something and I write something else), this process allows to get a perfect meaning translation to French with a good syntax. Generally when I uses a "French to English" translator when I read the English it is awful, I am myself unable to understand the sentences produced and I can notice the errors done by the translator.

A solution ?

So, I think that the solution is for me to slice the content of my message and to build two different way (sentence structure) with (explicitly) the same meaning (use of redondant meaning, used in general human communication in the principle of "reformulate") and for this to use two different fonts.

I will do it for the next days for my previous message ?

A detailed different question about conf parameters

For now, I have a specific question (I was last wekk testing the display of different image format on the different tools : direct connection of TV to the server, using smatHub, FireTV/VLC, FireTV/KODI) :
What behavior is generating, for UMS service, a conf including this :

# Supported images formats (others sizes can be declared, but this is the definition of the TV):
Supported = f:bmp m:image/bmp w:1920 h:1080
Supported = f:gif m:image/gif w:1920 h:1080
Supported = f:jpg m:image/jpeg w:1920 h:1080
Supported = f:png m:image/png w:1920 h:1080

OR
Supported = f:bmp m:image/bmp w:0 h:0
Supported = f:gif m:image/gif w:0 h:0
Supported = f:jpg m:image/jpeg w:0 h:0
Supported = f:png m:image/png w:0 h:0
Supported = f:webp m:image/webp w:0 h:0

OR
Supported = f:bmp m:image/bmp
Supported = f:gif m:image/gif
Supported = f:jpg m:image/jpeg
Supported = f:png m:image/png
Supported = f:webp m:image/webp

I found these "supported" definitions into various conf files but could not find the explanation of the syntax into DefaultRenderer.conf other documentations or FAQ or forum.
Which link with any other options of conf ?

The problem is that I have converted (new files in subdir for test) images defined in : 5472 x 3648 jpg :
- original size unable to display on fireTV/KODI
- to 1920 x 1080 : I am able to display all the images
- various sizes 5088 x 2864 ; 5144 x 2894 ; 5472 x 3078 reformat to a ratio = 16/9 (screen) : On fireTV/KODI the icons are visible but trying to display gives a black screen during ten seconds and we return to the icons

Nevertheless I am not sure of the conf used for these images. I think that for this I must read the detailed trace or debug

Waiting for instructions, thanks for your help

Best regards

Trebly
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Amazon Firestick and UMS

Post by Nadahar »

I'm sorry if you thought that I meant to say that your English was "bad", that's not for me to judge (I'm Norwegian so I'm not "native" either). The reason I asked was that I simply could not make sense of much of what you wrote. When you say that you are French, it all comes together :) I have a friend that is French, and we constantly suffer from the same issue :D I don't think it has to do with the vocabulary at all, and your understanding of English is probably great. I think it's the French way of building sentences that confuse me so much. It might be that this is merely a difficulty I have, and that others understand you perfectly well, but as long as I don't understand I can't do anything to help.

This is an example of a sentence that I really can't figure out what means:
What behavior is generating, for UMS service, a conf including this :
I'm guessing that any French speaker think the meaning is perfectly obvious, but I cannot figure out what it means.

That said, I do understand most of your last post, so I'll try to answer what i know.

The "supported" lines don't apply to images anymore. They used to, but this code has been refactored so that images are now handled entirely according to "DLNA rules", which renderers are expected to support. Therefore, all configuration of "supported" image formats will be ignored.

They way this works is that DLNA defines multiple "profiles" for JPEG, GIF and PNG. Other formats aren't supported, so UMS will convert other formats into JPEG if there's no alpha channel in the image, or PNG if the image has an alpha channel before presenting it to the renderer. There are many other detailed requirements in the DLNA standard regarding format versions, color specification etc, in addition to resolution, that dictates whether a particular image is "supported" or not. All images that doesn't comply with these rules are converted into one that is by UMS.

UMS will then present several alternatives in different resolutions to the renderer, and the renderer is supposed to pick one it can handle. The "largest" profile supported by DLNA is 4096 x 4096, so all images that are larger than that will be reduced to this at the maximum. But, it will present smaller versions. 1920 x 1080 isn't one of the DLNA profiles, so this exact resolution won't be offered. Many renderers can handle rescaling larger images themselves though, so they can choose to receive the 4096 x 4096 version and then downscale to 1920 x 1080 themselves.

This code seems to work pretty well in my experience, so I think it's likely that the problem lies somewhere else than in how UMS handles the images. I see a couple of "likely" scenarios:
  1. Java is quite slow at converting images, especially if you use Java 8 or later, since the image conversion library used in earlier versions of Java was proprietary and had to be replaced for Java 8 to make it completely open source. That can lead to that it can take several seconds to convert large images, depending on the hardware UMS is running on, the formats etc. The standard dictates that a renderer should wait for 30 seconds before timing out, but many don't follow this, and might decide to give up waiting long before this. Instead, they often issue multiple requests for the same image in rapid succession, leading to UMS starting multiple conversions in parallel, making things crawl almost to a halt. If it then impatiently doesn't end up with an image within it's timeout, it will either report an error or just go back to browsing.
  2. The renderer doesn't support DLNA and doesn't "understand" the DLNA profiles it is offered. Thus, it ends up concluding that it can't use any of the alternatives offered.
The fact that some images, probably those that don't require conversion, will display, points to that the first possibility is the most likely. If the renderer didnt understand DLNA profiles at all, one would expect that no images at all would display.

My experience with Kodi is that, although it's a great piece of software, it doesn't support DLNA at all. It does support UPnP AV (the "parent" standard to DLNA), but only very loosely and inconsistently. So, I wouldn't be surprised if it didn't consider the different profiles offered at all, and merely picks the first one listed. If that profile isn't supported, you might end up with a black screen/no image.

All this is speculation though, the only way to see what's actually happening is that you submit debug files as explained in red on the top of the forum pages.
Trebly
Posts: 24
Joined: Tue Mar 06, 2018 2:28 am

Re: Amazon Firestick and UMS

Post by Trebly »

Hi,

Thanks for your answer which provides a lot of useful informations.

First about my "not intelligible sentence" :
What behavior is generating, for UMS service, a conf including this :
Others ways to tell it :(translation) :
1- What are the behaviors of UMS generated by the following parameters included into a renderer configuration file ?
2- For the UMS service, which behavior is determined by the configurations files of renderers,
3- what behaviors are generated by the following parameters written into a configuration file ?
4- If a configuration files is including the following parameters, what behavior of UMS are generated ?

I think about the reasons of my language constructions :
I could (forty year ago) read and write : French, Latin, English (and US, not always the same organization and expressions), Spanish, German, so It seems that, today, I build my sentences using of all of these languages. Sometimes I note that I have said something in French which has Latin (or in one way German) structure and sometimes my wife tells me "what is this ? why you doesn't tell it... in common French"
And more in any language I never naturally make any translation (in my mind) from French before speaking or writing.

You have answered to many of my questions :
  • parameters "supported" "they are no more used". The consequence is that I must refer to DLNA specifications to understand the behavior of UMS.
    But I have not found a reference document.
  • Black screen waiting or no display of images : can be
    1- time to convert my files
    2- invalid definition : this is the case of my original jpg files (directly from my Canon) with 5472 x 3648 is out of 4096 x 4096 and no dlna compliant. The 3 others images not displayed have too one size greater than 4096. So, for these images I will exlude them from selection (a problem to optimize the directories structure) then I will check reduced format with a maximum size of 4096, and after I will check compliant with DLNA (different behavior) without the necessity of any java conversion (which probably leads to a timeout).
    Nevertheless the smartHub displays these images, I suppose after an internal conversion.
  • Why do you tell me that 1920 x 1080 is not supported, the native format of the TV ?
  • About the fireTV and /VLC or /KODI, see further.
UMS will then present several alternatives in different resolutions to the renderer, and the renderer is supposed to pick one it can handle. The "largest" profile supported by DLNA is 4096 x 4096, so all images that are larger than that will be reduced to this at the maximum. But, it will present smaller versions. 1920 x 1080 isn't one of the DLNA profiles, so this exact resolution won't be offered. Many renderers can handle rescaling larger images themselves though, so they can choose to receive the 4096 x 4096 version and then downscale to 1920 x 1080 themselves.
This leads me to several questions because my purpose, while I am building my media center, is to prepare the best rendering images with a minimum of job for UMS and for renderers :
  • Which is the best format for 16/9 rendering ? is 1920 x 1080 (common high definition while the next higher is 4K
  • Many renderers can handle rescaling larger images themselves though, so they can choose to receive the 4096 x 4096 version and then downscale to 1920 x 1080 themselves
    . This can lead, with constant w/h to images with two black lateral blocks. The best format for 16/9 seems 4096*2304 which can be reduced easily by the renderer DLNA compliant to a 16/9 full screen image. To reach this, from 5472 x 3648 I have to edit the image and to extract a 16/9 image or not, for the respect of the original frame - structure of image - of the photo, but with a maximum of 4096. But I am not sure that this manually generated format is the original image optimum format.
    The new fireTV 4K has probably advanced features (it is quicker surely) but I could not find his detailed specifications.
The renderer doesn't support DLNA and doesn't "understand" the DLNA profiles it is offered. Thus, it ends up concluding that it can't use any of the alternatives offered.
  • Where into the trace I can find the alternatives offered and verify that they are or not supported (note : I have provided a trace with such requests joined to my n-2 message)
  • Java is quite slow at converting images, especially if you use Java 8 or later, since the image conversion library used in earlier versions of Java was proprietary and had to be replaced for Java 8 to make it completely open source. That can lead to that it can take several seconds to convert large images, depending on the hardware UMS is running on, the formats etc. The standard dictates that a renderer should wait for 30 seconds before timing out, but many don't follow this, and might decide to give up waiting long before this. Instead, they often issue multiple requests for the same image in rapid succession, leading to UMS starting multiple conversions in parallel, making things crawl almost to a halt. If it then impatiently doesn't end up with an image within it's timeout, it will either report an error or just go back to browsing.
    I understand well what can happen, so I would try to give directly images (because I need anyway to convert my images) which are directly comptable or with a minimum in conversion.
    In another way I note that, as I uses a CoreI7 6700K ( UMS seems not to use a possible parallelism for conversions), and the computer load by UMS, quite never, exceeds 50% of one processor (8% allocated to UMS). But during preparation work it used near 1Go which is normal because of the size of my directories used for testing the whole behavior.
  • My experience with Kodi is that, although it's a great piece of software, it doesn't support DLNA at all. It does support UPnP AV (the "parent" standard to DLNA), but only very loosely and inconsistently. So, I wouldn't be surprised if it didn't consider the different profiles offered at all, and merely picks the first one listed. If that profile isn't supported, you might end up with a black screen/no image.
    OK, so, if I would use KODI (see just further) I would need to know which is the first UMS proposal, but I don't know how to find this into the detailed trace.
    Anyway I compare always the behavior of KODI and thoose of VLC.
New : The problem od the presentation of documents and titles
I would to be able to have an understandable presentation of the documents (photo and video).

The current problem is that the rendering chain (form server to renderer) seems to be able to hold only the files and folders names.
More the sorting and filtering process suppose the unicity of the names of the leaves of the original tree of folders of the documents : the file name.
My problem is that the Canon photo and video numbering generates duplicate files names (on each support - SDHC card - the auto created folders name are "CANON100" to "CANON900" (you can name your folders manually but it is, most of time, practically impossible because of time needed) and each photo can be (option) sequentially numeroted independtly of support and folders (my option) but only from 1 to 10,000 and after, the counter is reset to 1, so the unicity is not a guaranty. The solution is to build after transfer to PC a unique coded name with a treatment using the folders hierarchy (with reverse capability : when the card is directly used to display the images you can identify a photo in a unique way and generate the name on the PC, so the images have two names convertible one to the other (one independant and the other linked to the physical support).

On the pc, from the content of the card, the images are treated sequentially for quality and after separated into by batches (groups of photos) with the subject as criteria, a folder is associated to a sequential subject and, after, at the end I create subfolders depending of the treatments of images performed (for example UMS+DLNA compatible) . The files names get extensions for unicity and I uses metadata for more precise identifications (and I build the meta-subjects because for a subject I can have several sources, for this I uses keywords in IPTC which should be used to filter subjects).
The most important consequence of this way to work (the lonely valid that I found), is that I must be able to replace the filename by the "filetitle" for display (from the IPTC data) and, for video, the "description" which seems to be a generalized and unique and common property of video format.
Currently KODI seems to be the alone renderer able to choose to display the "title" to replace the file name (the best should be a language to build a "description" from exif and iptc data, description accessible by renderers). If I want that my files names the alone information accessible for the images should be understandable, I should have to replace the identification names by understandable and sortable names. To keep the identification I should use the identification name as an IPTC data (identication names are to be long and doing so they become not readable on most renderers (for example not horizontal scrollable name). This is terribly complicated.
Normally VLC has a "display metadata button" but the content is currently appearing empty... ?

I have not found any renderer able to display an "info" panel, user defined, built from EXIF and IPTC data, and something equivalent for video, the only valid solution in my opinion.
I tried with KODI the substitution of "title" to filename (default) but the option has not functioned nor description for video.

I open for this last subject a new thread.

News : 06/09/2020 :
- For fireTV, I checked with VLC (Android 3.2.12 seen by UMS as VLC-desktop, conf file missing for VLC android version) the display of images jpg resized (on disk) for ratio 16/9 : 4096*2304 and others various height the image, (less than 4096) is correctly displayed (the function "next image" on the fireTV remote control do not operate for this sizes while it functions for1920 x 1080 format, so you need tomanually choose the next image (from icons) in some not well determined cases where VLC has to convert the format. While this, the images with width > 4096 are never displayed (after near ten seconds VLC displays again the icons after the VLC spinner and blue spinner sometimes - DLNA Q&R fails ?).
- With VLC on fireTV the MVI image are cut 4/5 of the time, this seems a problem of data transmission via wifi (see next)
- FireTV with Kodi doesn't display anymore (don't understand) something else than folders names
- With Samsung TV directly selecting network entry (ethernet connection) for UMS I can get a correct display for all media (Note that Images are resized - the media info : date - format type - size - after treatment is displayed when pointing the icon (can see the max dlna size = 4096), MVI Video are perfect. (the access with the smarthub uses the same functions but the folders access is selecting twice "all-video-photo" is buggy, there is no photo into video and / or conversions are not performed)
Conclusion for the TV with my conf : TVSamsung[led40] everything is OK, UMS does the job

The video problem seems to come , either from the wifi, or from the treatment by fireTV because the UMS video delivery to TV directly, which is using the ethernet connection, is perfect.
Today I will switch to a FireTV Stick 4K (v3), I will know if the video problem (or others) come from the FireTV (V2) capabilities or from the Wifi.
Note that I could not find a tool to make mesurements of the transmission speed of media flow by wifi (ethernet from computer to FreeBox, then wifi from freeBox V6 to the FireTV)

Best regards

Trebly
Post Reply