Page 1 of 1

How to get output from vlc.py?

Posted: 23 Oct 2018 04:09
by wrybread
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)?

Re: How to get output from vlc.py?

Posted: 23 Oct 2018 06:30
by mfkl
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.

Re: How to get output from vlc.py?

Posted: 23 Oct 2018 09:24
by wrybread
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.

Re: How to get output from vlc.py?

Posted: 24 Oct 2018 04:55
by mfkl

Re: How to get output from vlc.py?

Posted: 24 Oct 2018 05:25
by wrybread
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.

Re: How to get output from vlc.py?

Posted: 25 Oct 2018 03:56
by mfkl