Embedded Media Player playback quality and latency

This forum is about all development around libVLC.
yasdnil1
New Cone
New Cone
Posts: 9
Joined: 13 May 2011 22:55

Embedded Media Player playback quality and latency

Postby yasdnil1 » 13 Oct 2011 18:10

How do I make the playback quality of an Embedded Media Player as good as it is with the VLC player?? Also, how do I cut the latency/ lag? I feel like I've tried soo many settings and it still isn't good. There's probably stuff I don't need, but I didn't know what to include or exclude so I included everything. It's playing an rtsp stream (rtsp://172.xx.xx.xx), that's in H.264 format. I'm using VLC 1.1.8 and vlcj 1.1.5.1. It seems to have good performance for a few seconds and then the video freezes and jumps ahead to the latest frames, which gives the appearance of bad latency. Also, the video can becomes fragmented. What are the best/optimal settings for the best playback quality and latency for the embedded media player?? Any suggestions would be appreciated. Please help, I'm at a loss.
Here are the settings I'm using:

private MediaPlayerFactory mediaPlayerFactory;
private EmbeddedMediaPlayer mediaPlayer;

List<String> vlcArgs = new ArrayList<String>();
vlcArgs.add( "--no-video-title-show" );
vlcArgs.add( "--no-snapshot-preview" );
vlcArgs.add( "--no-drop-late-frames" );
vlcArgs.add( "--no-skip-frames" );
vlcArgs.add( "--no-ffmpeg-hurry-up" );
vlcArgs.add( "--ffmpeg-hw" );
vlcArgs.add( "--rtsp-caching=0" );
vlcArgs.add( "--realrtsp-caching=0" );
vlcArgs.add( "--sout-rtp-caching=0" );
vlcArgs.add( "--network-caching=0" );
vlcArgs.add( "--screen-caching=0" );
vlcArgs.add( "--rtp-caching=0" );
vlcArgs.add( "--sout-mux-caching=0" );
vlcArgs.add( "--file-caching=0" );
vlcArgs.add( "--postproc-q=0" );
vlcArgs.add( "--no-audio" );
vlcArgs.add( "--no-hq-resampling" );
vlcArgs.add( "--no-quiet" );

mainFrame = new JFrame( "VLC" );
FullScreenStrategy fullScreenStrategy = new DefaultFullScreenStrategy( mainFrame );
mediaPlayerFactory = new MediaPlayerFactory( vlcArgs.toArray( new String[vlcArgs.size()] ) );

mediaPlayer = mediaPlayerFactory.newMediaPlayer( fullScreenStrategy );
mediaPlayer.setVideoSurface( canvas );
mediaPlayer.setPlaySubItems( true );
mediaPlayer.prepareMedia( currentSource );
mediaPlayer.play();
Last edited by yasdnil1 on 14 Oct 2011 14:19, edited 3 times in total.

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

Re: Embedded Media Player playback quality and latency

Postby Rémi Denis-Courmont » 13 Oct 2011 19:15

Do you really expect 0 milliseconds caching to work? That's most probably the reason why it's crashing.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests