libVLC playback quality awfull compared to VLC

This forum is about all development around libVLC.
Agron
Blank Cone
Blank Cone
Posts: 10
Joined: 26 Jul 2013 15:48
Operating System: Linux

libVLC playback quality awfull compared to VLC

Postby Agron » 26 Jul 2013 16:55

Using xplayer.cpp for Qt I made a simple player to play RTSP streams. However the frames are delayed so much and dropped. Sometimes it freezes for a long time and floods the console with messages like this:

Code: Select all

[0x7f54d4000b88] main video output warning: picture is too late to be displayed (missing 668 ms) [h264 @ 0x7f54f8196460] Increasing reorder buffer to 3 [0x7f54d4000b88] main video output warning: picture is too late to be displayed (missing 669 ms) [0x7f54cc000ad8] main video output warning: picture is too late to be displayed (missing 1436 ms) [0x7f54cc000ad8] main video output warning: picture is too late to be displayed (missing 681 ms) [0x7f5498073918] main video output warning: picture is too late to be displayed (missing 1246 ms) [0x7f5498073918] main video output warning: picture is too late to be displayed (missing 474 ms) [0x7f54cc000ad8] main video output warning: picture is too late to be displayed (missing 721 ms) [0x7f54d4000b88] main video output warning: picture is too late to be displayed (missing 831 ms) [0x7f54d4000b88] main video output warning: picture is too late to be displayed (missing 844 ms) [0x7f54d4000b88] main video output warning: picture is too late to be displayed (missing 590 ms) [0x7f5494019db8] main vout display debug: auto hiding mouse cursor [0xfd7f38] main vout display debug: auto hiding mouse cursor
It often freezes at half painted images.

The actual VLC plays the RTSP streams very very well. It is flawless.

What can I do to make the libVLC perform as good as VLC?

Thanks,
//Agron

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libVLC playback quality awfull compared to VLC

Postby Rémi Denis-Courmont » 26 Jul 2013 17:17

Don't use the custom video callbacks...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Agron
Blank Cone
Blank Cone
Posts: 10
Joined: 26 Jul 2013 15:48
Operating System: Linux

Re: libVLC playback quality awfull compared to VLC

Postby Agron » 26 Jul 2013 19:36

I don't have anything custom.

Also opening a stream successfully is a random thing. But VLC opens it every time.

Code: Select all

[0x7fff48006768] live555 demux error: Failed to connect with rtsp://172.31.120.40:8554/PSIA/Streamming/channels/3 [0xd72b28] main input error: open of `rtsp://172.31.120.40:8554/PSIA/Streamming/channels/3' failed [0xd72b28] main input error: Your input can't be opened [0xd72b28] main input error: VLC is unable to open the MRL 'rtsp://172.31.120.40:8554/PSIA/Streamming/channels/3'. Check the log for details.
These are my arguments to libvlc_new:

Code: Select all

"-I", "dummy", /* Don't use any interface */ "--ignore-config", /* Don't use VLC's config */ "--aspect-ratio=4:3", "--no-snapshot-preview" , "--drop-late-frames" , "--skip-frames" , "--ffmpeg-hurry-up" , "--ffmpeg-hw" , "--ffmpeg-fast", "--network-caching=333" , "--file-caching=100" , "--postproc-q=0" , "--no-audio" , "--no-quiet", "--video-title-show", "--video-title-timeout=5000", "--video-title-position=8", "--no-xlib"

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libVLC playback quality awfull compared to VLC

Postby Rémi Denis-Courmont » 26 Jul 2013 20:28

That's a lot of options changing the behaviour of VLC, and that could affect performance...

It should be obvious, but remove them until you found which ones are causing problems.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Agron
Blank Cone
Blank Cone
Posts: 10
Joined: 26 Jul 2013 15:48
Operating System: Linux

Re: libVLC playback quality awfull compared to VLC

Postby Agron » 26 Jul 2013 20:58

I started with only 3 options but I had problems like described in previous posts.

Code: Select all

"-I", "dummy", /* Don't use any interface */ "--ignore-config", /* Don't use VLC's config */
I added other options hoping it would improve but it didn't.

Now I am looking at ./config/vlc/vlcrc to find options that are in effect in VLC but not in libvlc.

Oh, I tried loading these options with "--config ./vlcrc-special.conf" but libvlc_new didn't understand "--config". Do you know how to load a custom config file from libVlc?

In vlcrc-special.conf (which is a copy of what vlc is using) has "rtsp-tcp=1" under [live555] but it is complaiing with:

Code: Select all

vlc: unknown option or missing mandatory argument `--rtsp-tcp=1'
I think I have to load the module but "--video-filter=live555" is not working.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libVLC playback quality awfull compared to VLC

Postby Rémi Denis-Courmont » 26 Jul 2013 21:44

-I dummy is useless because you don't start any VLC interface.
--ignore-config is useless because that is the default.

This is called cargo cult.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Agron
Blank Cone
Blank Cone
Posts: 10
Joined: 26 Jul 2013 15:48
Operating System: Linux

Re: libVLC playback quality awfull compared to VLC

Postby Agron » 26 Jul 2013 22:31

Remi, it is not improving. My new line now is:

_vlcinstance = libvlc_new( 0, NULL);

Code: Select all

[0x14bfd58] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 4280 ms) [0x14bfd58] main input error: ES_OUT_RESET_PCR called [0x7f492400e038] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?) [0x7f490400d8d8] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
CPU usage is about 2% and network bandwidth usage is about 0% (gigabit).

How is VLC able to perform so good with this libVLC?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 39 guests