how can I get current real-time buffer size in vlc streaming buffer?

This forum is about all development around libVLC.
maozezhong
New Cone
New Cone
Posts: 4
Joined: 29 Jul 2018 14:03

how can I get current real-time buffer size in vlc streaming buffer?

Postby maozezhong » 29 Jul 2018 14:05

I want to get the current real-time buffer size while vlc streaming video, How can I get it through python-vlc. real-time buffer size means like, a video is stream from one server to one client, vlc get it and stored it in a buffer pool, and vlc decode the data in the pool so as to show the video currently, what I want is the size or time of video data in the pool during the streaming.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: how can I get current real-time buffer size in vlc streaming buffer?

Postby Jean-Baptiste Kempf » 29 Jul 2018 15:26

You cannot.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

maozezhong
New Cone
New Cone
Posts: 4
Joined: 29 Jul 2018 14:03

Re: how can I get current real-time buffer size in vlc streaming buffer?

Postby maozezhong » 30 Jul 2018 03:24

@Jean-Baptiste Kempf Hello, thanks for your reply, as far as I know, I can get MediaStats when playing a streamed video, like:

MediaStats
read_bytes: 7901716
input_bitrate: 2.51318240166*
demux_read_bytes: 7843817
demux_bitrate: 2.56340408325*
demux_corrupted: 0
demux_discontinuity: 2
decoded_video: 192
decoded_audio: 291
displayed_pictures: 65
lost_pictures: 0
played_abuffers: 145
lost_abuffers: 0
sent_packets: 0
sent_bytes: 0
send_bitrate: 0.0

So is it possible to get the buffer size through some calculation depends on these parameters?

maozezhong
New Cone
New Cone
Posts: 4
Joined: 29 Jul 2018 14:03

Re: how can I get current real-time buffer size in vlc streaming buffer?

Postby maozezhong » 30 Jul 2018 03:27

Or, do you know where is the codes about buffer in vlc source code? https://github.com/videolan/vlc

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: how can I get current real-time buffer size in vlc streaming buffer?

Postby Jean-Baptiste Kempf » 30 Jul 2018 14:56

Yes, but the buffer is not what you expect it is. Else, stats are available.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

maozezhong
New Cone
New Cone
Posts: 4
Joined: 29 Jul 2018 14:03

Re: how can I get current real-time buffer size in vlc streaming buffer?

Postby maozezhong » 02 Aug 2018 14:50

Can you kindly explain what the buffer exactly is ? And how can I get it?

oviano
Cone that earned his stripes
Cone that earned his stripes
Posts: 120
Joined: 12 Jan 2012 11:12

Re: how can I get current real-time buffer size in vlc streaming buffer?

Postby oviano » 01 Oct 2018 08:35

Related to this - very roughly speaking how does libvlc buffer the input?

i.e. if I use the data callbacks in libvlc and throw TS packets at it, how much internal buffering of these does VLC do? I presume it needs to buffer a certain amount so it can identify what the stream is. But if it runs out of input packets (e.g. if they aren't provided quickly enough), does it increase the buffer? Or is buffering left entirely up to the calling application?

Hanks
New Cone
New Cone
Posts: 8
Joined: 05 Dec 2018 06:32

Re: how can I get current real-time buffer size in vlc streaming buffer?

Postby Hanks » 11 Dec 2018 03:06

i also have the same question. Do you figure it out now? where is the buffer in the code?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 22 guests