Jump to content

Playback - Aspect Ratio bug ?


Recommended Posts

anderbytes
Posted

Lately I've noticed that in some devices, Playback of 4:3 videos get stretched to 16:9, making visualization very disturbing, and full screen is taken (instead of creating vertical black borders).

 

I've found out that depending of the video stream parameters... some devices behave wrong.

 

Video 1
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [sAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)

Android App: OK

LG DLNA and Samsung Emby App: OK (Black vertical on left and right)

Video 2
Stream #0:0: Video: h264 (High), yuv420p(progressive), 960x720 [sAR 1:1 DAR 4:3], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)

Android App: OK

LG DLNA and Samsung Emby App: OK (Black vertical on left and right)

Video 3
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [sAR 1:1 DAR 16:9], SAR 3:4 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 50 tbc (default)

Android App: OK

LG DLNA and Samsung Emby App: NOT OK (Stretched)

 

 

Seeing in VLC, Properties of the 3rd video file shows a new parameter that doesn't show in others: "Original Display aspect ratio" as 16:9, different than the usual parameter "Display aspect ratio", that is 4:3. The 3rd video is the only one that has that "Original" parameters... all the other 2 only have "Display aspect ratio"

 

Can Emby do something about it? To fix the aspect ratio sent to the device... or something...

 

Thanks.

Posted

Please provide the transcoding logs from the above examples. thanks.

anderbytes
Posted

It didn't transcode. There are no transcode logs. All direct stream

Posted

Were there ffmpeg_directstream or ffmpeg_remux logs?

anderbytes
Posted

It hasn't generated any. Do I have to activate debugging log?

Posted

No that's fine.

 

In that case, for example #3, there is nothing we can do about the Dlna playback, other than forcing transcoding. Can you supply the media info from the web app detail screen?

 

For the Samsung app, there is maybe something we can do. @@SamES what do you think, it might be related to that position code in the video player, which I'm assuming exists in both Samsung apps. Thanks.

anderbytes
Posted

I'll be able to do that tomorrow.

anderbytes
Posted

Here it goes:

 

-- MEDIA 1

5843fd0465262_info1.png

 

-- MEDIA 2

5843fd116327d_info2.png

 

-- MEDIA 3

5843fd1cddb08_info3.png

 

 

Maybe you got the bug asking for the media info. Look at the Resolution vs Aspect Ratio of the item 3. It doesn't match.

Posted

A

 

No that's fine.

 

In that case, for example #3, there is nothing we can do about the Dlna playback, other than forcing transcoding. Can you supply the media info from the web app detail screen?

 

For the Samsung app, there is maybe something we can do. @@SamES what do you think, it might be related to that position code in the video player, which I'm assuming exists in both Samsung apps. Thanks.

 

So this almost looks like the reverse of anamorphic.  We should force the player to match the aspect ratio, not the height/width.

 

I wonder what issues this would cause?

Posted (edited)

@@Luke, this would do it, but do we always trust the reported aspect ratio to be correct?  Of course this all assumes playback on a device with a 16:9 ratio.

 

You'll know where this code goes. Do you think this will have any unintended consequences?  I'll admit to having not thought too hard about this, and i don't have anything in this format to test it on. 

 

 

Added code between the lines

            var newResolutionX;
            var newResolutionY;
            var centering;
---------
            if (videoStream.AspectRatio == "4:3") {
                newResolutionX = Math.round(rect.height * 4 / 3);
                newResolutionY = rect.height;
                centering = Math.round((rect.width - newResolutionX) / 2);
                webapis.avplay.setDisplayRect(parseInt(centering), parseInt(0), parseInt(newResolutionX), parseInt(newResolutionY));
                return;
            }
--------                
            if (ratioToShrinkX < ratioToShrinkY) {
                newResolutionX = rect.width;

Edited by SamES
Posted

@@SamES I pretty sure he's using cmcg's app, so in order to get it tested quickly we should probably start with the fix there.

Posted

OK, @@anderbytes, assuming you are using the app from cmcg I can add this fix in.

 

Two questions, do you know which release/version you are currently using

 

     Stable : v2.1.3
     Beta : v2.2.0i
     Legacy (D series TVs): v1.0.6

 

Can you side load this from USB or your own web server?   I'm not sure where the current beta is published from.  @@Luke, is the beta published from your server?  (Currently hosted on 82.27.106.58 - who manages this?)

Posted

That's a good question. I am guessing we are not hosting the beta but i'll check.

anderbytes
Posted

I confirmed that my version is 2.2.0i

Posted

I confirmed that my version is 2.2.0i

 

Can you side load by USB or via own web-site?

anderbytes
Posted

I can try

Posted

I can try

 

I've sent you a PM with a new version to try.  Let me know how it goes.

  • Like 1
anderbytes
Posted

I've sent you a PM with a new version to try.  Let me know how it goes.

How do I install it? Always used the IP in the past

Posted

Sorry, I thought I'd posted this but obviously forgot to hit Post.

 

This instruction should get you close.  I've never done it but many others on the forum have.

  

Taken from here https://emby.media/community/index.php?/topic/29011-unable-to-install-bd-h6500/&do=findComment&comment=280637

4. Extract the content on a subfolder of your USB key (like "x:\emby")

5. Plug the key to your TV

6. The app should appear in the app list.

 

 

Search the Emby Samsung forum if you get stuck, there has been some good discussion there over the years.

anderbytes
Posted

The app didn't appear, as I told you in PM.

 

So if you could teach me how to use my internal webserver to fetch it...

FrostByte
Posted (edited)

I haven't side loaded in awhile, but don't believe it auto appears and you have to browse and tell your TV to go run it every time you turn on your TV.  Also, it doesn't actually install on your TV like it does from the IP and just runs off the usb instead.  Meaning you have to always have the usb in the TV.  Installing from your own internal webserver would be best unless Luke wants to also host the beta somewhere.  I doubt cmcg will want to host new or old betas forever now that he's done

 

Better yet, why not just replace the stable version being hosted by Emby with the beta (either cmcg's or SamES's tweaked one).  The beta is more stable and for all intents and purposes the final version until someone else picks the project up.

 

Edit: I just side loaded cmcg's latest and had to extract the files in the root of my usb to make the TV see the app.  Just placed the zip in root and extracted there.

Edited by FrostByte
anderbytes
Posted

I haven't side loaded in awhile, but don't believe it auto appears and you have to browse and tell your TV to go run it every time you turn on your TV.  Also, it doesn't actually install on your TV like it does from the IP and just runs off the usb instead.  Meaning you have to always have the usb in the TV.  Installing from your own internal webserver would be best unless Luke wants to also host the beta somewhere.  I doubt cmcg will want to host new or old betas forever now that he's done

 

Better yet, why not just replace the stable version being hosted by Emby with the beta (either cmcg's or SamES's tweaked one).  The beta is more stable and for all intents and purposes the final version until someone else picks the project up.

 

Edit: I just side loaded cmcg's latest and had to extract the files in the root of my usb to make the TV see the app.  Just placed the zip in root and extracted there.

 

Thanks for the tips!

But I decided to install it from a local web server. It's the easiest thing in the world... even doable from a notebook.

  • Like 1
FrostByte
Posted

Cool, ya installing is a lot better than side-loading and keeping your usb in the TV all the time.  I have it on my server also.

 

I still think Luke should host the latest as stable.  Eventually that other IP will be gone and others with a TV like yours can probably benefit from the changes also

anderbytes
Posted

Cool, ya installing is a lot better than side-loading and keeping your usb in the TV all the time.  I have it on my server also.

 

I still think Luke should host the latest as stable.  Eventually that other IP will be gone and others with a TV like yours can probably benefit from the changes also

Well... any solution with Samsung will be 1000x better than with a LG TV, that erases the dev App from time to time automatically and requires an active LG Developer account.

 

F.U. , LG.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...