how to get sar (sample aspect ratio) of current stream?

This forum is about all development around libVLC.
ikarus76
Blank Cone
Blank Cone
Posts: 26
Joined: 13 May 2009 10:41

how to get sar (sample aspect ratio) of current stream?

Postby ikarus76 » 02 Sep 2009 10:42

hi community!

does anyone know, how i can get the sample aspect ratio parameter (sar) of the current stream? (using libvlc with version 1.0.1)

my problem is the following:
i use vlc for watching iptv. if the stream changes the aspect ratio, the picture gets streched, because the aspect ratio does not change "on the fly". I need to restart the stream or change the channel. in the debug messages of vlc i can see the used sar for the stream. i need to get this information from the stream, to dynamically change the ratio...

any hints? :)

best regards,
michael
Last edited by ikarus76 on 04 Sep 2009 14:11, edited 1 time in total.

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: how to get sar (stream aspect ratio) of current stream?

Postby XilasZ » 02 Sep 2009 12:09

I do it in my program. In the positionchanged event, i check the video size reported by libvlc, and if the ratio doesn't match the ratio of the window, my program resize itself.

ikarus76
Blank Cone
Blank Cone
Posts: 26
Joined: 13 May 2009 10:41

Re: how to get sar (stream aspect ratio) of current stream?

Postby ikarus76 » 03 Sep 2009 14:40

I have tried this.

The problem is, that I have a continous stream. The stream occasionally changes video size and aspect ratio, but vlc doesn't recognize it. if i reconnect to the stream, the video size is reported correctly. if i periodically check the video size, it's always the same. what i mean is, that vlc doesn't update the video size during receiving a stream...

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: how to get sar (stream aspect ratio) of current stream?

Postby XilasZ » 03 Sep 2009 16:59

The last time i had such a stream (a tv stream from my provider), it was working. Now the stream has changed and has always a 16/9 ratio, so i can't check again.
Maybe it's broken in 1.0.1 ....

ikarus76
Blank Cone
Blank Cone
Posts: 26
Joined: 13 May 2009 10:41

Re: how to get sar (stream aspect ratio) of current stream?

Postby ikarus76 » 07 Sep 2009 14:47

The last time i had such a stream (a tv stream from my provider), it was working. Now the stream has changed and has always a 16/9 ratio, so i can't check again.
Maybe it's broken in 1.0.1 ....
i have tried now with different versions (0.9.8a, 1.0.0, 1.0.1) and no one gave me a aspect ratio...

I get the video size, but this always keeps the same size. Also the original VideoLan Client doesn't check, if the sample aspect ratio has changed...

XilasZ
Developer
Developer
Posts: 189
Joined: 16 Jun 2009 20:35

Re: how to get sar (sample aspect ratio) of current stream?

Postby XilasZ » 07 Sep 2009 22:25

Maybe in my case, the video size was really changing over time, and not the aspect ratio.

wazer
Blank Cone
Blank Cone
Posts: 30
Joined: 19 Nov 2007 11:22

Re: how to get sar (sample aspect ratio) of current stream?

Postby wazer » 13 Dec 2010 23:19

You found the solution ? im from denmark and i have the same problem with my provider using iptv with vlc.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests