How to get output from vlc.py?

This forum is about all development around libVLC.
wrybread
Blank Cone
Blank Cone
Posts: 17
Joined: 24 Mar 2007 05:44

How to get output from vlc.py?

Postby wrybread » 23 Oct 2018 04:09

I'm using the VLC Python bindings (vlc.py) under wxPython on Windows, and trying to read the output from VLC. I'm playing an RTSP stream (security camera) and especially interested in the messages shown when it restarts the stream:

[0623b578] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 1443 ms)

I've tried hooking stdout and stderr, and neither are working.

I can suppress all output by initting VLC with:

self.Instance = vlc.Instance("--verbose=-1")

Does anyone have any idea how I might catch VLC's messages from my script? Modifying vlc.py is fine.

Or failing that, is there some way to obtain that "pts_delay" (the amount of buffering on an RTSP stream)?
Last edited by wrybread on 24 Oct 2018 00:32, edited 1 time in total.

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: How to get output from vlc.py?

Postby mfkl » 23 Oct 2018 06:30

by output you mean logs?

--verbose 2 should give you all the messages. Try checking logs with the VLC desktop app to verify your assumption that you're missing logs.
https://mfkl.github.io

wrybread
Blank Cone
Blank Cone
Posts: 17
Joined: 24 Mar 2007 05:44

Re: How to get output from vlc.py?

Postby wrybread » 23 Oct 2018 09:24

Sorry I wasn't clear. I can see all the output, but I'm trying to catch the output with my script so it can process it.

Specifically I'm trying to detect when the stream rebuffers (i.e. when the player outputs "[0623b578] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 1443 ms)"

I tried hooking stderr and stdout, but for some reason it's not hooking the VLC output, it still just prints to the console.

Let me know if that's still not clear.

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: How to get output from vlc.py?

Postby mfkl » 24 Oct 2018 04:55

https://mfkl.github.io

wrybread
Blank Cone
Blank Cone
Posts: 17
Joined: 24 Mar 2007 05:44

Re: How to get output from vlc.py?

Postby wrybread » 24 Oct 2018 05:25

That's what I'm using. The issue is that when using the Python bindings for VLC(the file you linked to), the output from VLC is printed to the console (which I know I can suppress with "--verbose=-1"), but I can't figure out how to hook the output for my script. In other words I'm trying to make it so my script can read and process the output from VLC.

I've already tried redirecting stdout and stderr, which isn't working for me.

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: How to get output from vlc.py?

Postby mfkl » 25 Oct 2018 03:56

https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 5 guests