Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad aspect ratio of all channels #75

Closed
LubosD opened this issue Apr 18, 2016 · 30 comments
Closed

Bad aspect ratio of all channels #75

LubosD opened this issue Apr 18, 2016 · 30 comments

Comments

@LubosD
Copy link

LubosD commented Apr 18, 2016

I use OpenELEC 5.0.3 with vdr-vnsiserver latest Git code (but also tried several older releases).

All TV channels have 1:1 aspect ratio when I select "Normal" view mode, although the XVDR plugin works OK.

I can of course force a certain ratio for some/all channels, but many channels switch aspect ratio on the fly, so this is unusable. Switching on the fly also works with XVDR, but the OpenELEC folks claim that XVDR is "obsolete" and that I should use VNSI.

@FernetMenta
Copy link
Contributor

OpenELEC 5.0.3 is rather outdated and I can't do anything about it. Maybe the issue is log fixed. Please try a OE or libreELEC build with Kodi v17 and current development branch of VNSI. If the issue is still there, please pastebin a debug log.

@LubosD
Copy link
Author

LubosD commented Apr 18, 2016

Sorry, I meant OpenELEC 6.0.3 - simply the latest stable version. But I will try the beta.

@FernetMenta
Copy link
Contributor

would you have a short recording that shows the issue?

@LubosD
Copy link
Author

LubosD commented Apr 18, 2016

I'll have the video up in a few minutes. I have checked the problem more thoroughly and the aspect ratio is probably not 1:1, but rather 4:3. Plus it only affects MPEG-2 channels, H.264 channels (no matter if SD or HD) are OK.

@LubosD
Copy link
Author

LubosD commented Apr 18, 2016

Here it is: https://www.youtube.com/watch?v=eJqVTbfYhdQ

The first two channels are SD / MPEG-2 and have incorrect aspect ratio. It may not be so obvious from what was just playing on these channels, but they really should be 16:9. The first channel (Film+) sometimes uses 4:3, but this was a widescreen movie. The second (news) channel always uses 16:9.

This is followed by some HD channels which are correctly displayed as 16:9.

@FernetMenta
Copy link
Contributor

I meant a vdr recording that I can download to reproduce the issue.

@LubosD
Copy link
Author

LubosD commented Apr 18, 2016

Ah, sorry. Here it is: https://www.dropbox.com/s/1wrbuw0blyqrfj5/00001.ts?dl=0

@Jalle19
Copy link
Contributor

Jalle19 commented Apr 19, 2016

Any chance you're using an AML device?

@LubosD
Copy link
Author

LubosD commented Apr 19, 2016

AML? I don't know what that is. I use VDR with a quad tuner DVB-S2 PCIe card from TBS.

@FernetMenta
Copy link
Contributor

the provided sample has a display aspect ratio of 16:9 and it shows at 16:9. what is wrong with it?

@LubosD
Copy link
Author

LubosD commented Apr 19, 2016

When streamed from VDR to Kodi via VNSI it shows as 4:3. See at this time: https://youtu.be/eJqVTbfYhdQ?t=13s (it is the same channel)

@FernetMenta
Copy link
Contributor

It shows correctly here when streamed via VNSI. Aspect ratio is set by decoder, not demuxer. What system do you run Kodi on?

@LubosD
Copy link
Author

LubosD commented Apr 19, 2016

Raspberry Pi 2 + OpenELEC.

@LubosD
Copy link
Author

LubosD commented Apr 19, 2016

But as I said: for some reason, it did work with xvdr.

@FernetMenta
Copy link
Contributor

FernetMenta commented Apr 19, 2016

vnsi and ffmpeg do set the aspect ratio correct to 16:9 so it must be an issue specific to Pi @popcornmix how does Pi set aspect ratio for SD.

@popcornmix
Copy link

@LubosD
Is it better with omxplayer enabled/disabled?
Is it better with omxplayer disabled and deinterlace disabled?

@FernetMenta We use the aspect from demuxer if available, and if not from the decoder. The dropbox file does get 16:9 (seq->seq.aspect_ratio_information=3) from decoder.

There is a bug I'm aware of where changes in aspect ratio of a stream are not detected in the MMAL with deinterlace case. It correctly gets the aspect ratio at start of stream but misses changes. Enabling omxplayer or disabling deinterlace would avoid this issue (if this is the issue we are seeing).

@FernetMenta
Copy link
Contributor

vnsi fires a stream change event when aspect ratio changes mid stream. this triggers reopen of decoder.

@FernetMenta
Copy link
Contributor

Even if I force demuxer aspect ratio I get the correct one here.

@LubosD
Copy link
Author

LubosD commented Apr 20, 2016

It turns out OpenELEC uses MMAL only by default (I thought it uses omxplayer). Switching to omxplayer fixes the problem. Disabling deinterlace with MMAL also fixes the AR problem.

But I disagree that "It correctly gets the aspect ratio at start of stream but misses changes". MMAL+deinterlace gets the AR wrong for me from the very beginning.

@popcornmix
Copy link

Do you ever see the issue when playing a recorded file, or only when live?

@LubosD
Copy link
Author

LubosD commented Apr 20, 2016

Recorded as well. (Despite the playback details mentioning DAR 16:9.) But also only with MPEG-2 recordings, not with H.264.

@popcornmix
Copy link

So does the dropbox sample you posted above have the issue when played through Kodi's file browser?

@LubosD
Copy link
Author

LubosD commented Apr 20, 2016

Yes. I've put it on an SMB share and with MMAL+deinterlace the aspect ratio is wrong too.

@popcornmix
Copy link

Not what I'm seeing on master. Video is 720x576 and aspect ratio is 1.78, resulting in video that fills the (16:9) screen. You are playing from file browser interface (and not through PVR interface)?

@LubosD
Copy link
Author

LubosD commented Apr 20, 2016

Yes, from the file browser ("VIDEO" in main menu).

I've just tried OpenELEC 7.0 beta 2 (with Kodi 16.1 RC) and the problem persists. (Plus the VNSI plugin from OpenELEC's repository doesn't work there due to low API version.)

@popcornmix
Copy link

Do you have "deinterlace video" set to "auto" or "on"?
I only see the problem with "on".
"auto" would be the recommended setting, otherwise you will be deinterlacing (and so reducing image quality) or progressive video.

@LubosD
Copy link
Author

LubosD commented Apr 20, 2016

I use "on", the problem goes away with "auto". Great!

All TV channels here are interlaced and saving the settings for "all videos" only seems to apply to them to live TV (and not video files), so there was no reason to use "auto".

@popcornmix
Copy link

Okay, "auto" means we start without deinterlace and enable deinterlace after first video frame is decoded (using aspect ratio and interlaced flags from decoder).
"on" means we start with deinterlace enabled which stops us seeing the aspect ratio from decoder.

I am working on splitting the decoder and deinterlacer, partly to resolve this issue, but also to allow gpu deinterlace with software decoder, so this issue should be resolved in the future.

@LubosD
Copy link
Author

LubosD commented Apr 20, 2016

OK. I will close the issue here. Thanks @FernetMenta for getting me help and thanks @popcornmix for the advice :-)

@LubosD LubosD closed this as completed Apr 20, 2016
@keynet
Copy link

keynet commented May 23, 2016

I think I've noted the same or similar issue - the link explains how to reproduce it.
http://forum.kodi.tv/showthread.php?tid=275934&pid=2342698#pid2342698

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants