3

I'm using VLC and VLCJ to play video and audio files in my Java application, which works fine.

But there appears a text when playing the video; this text is the path of the played video.

I don't want it to appear when playing a video, so how do I disable this using Java?

bluish
  • 26,356
  • 27
  • 122
  • 180
Jason4Ever
  • 1,439
  • 4
  • 23
  • 43

2 Answers2

5

Pass the option :no-video-title-show to disable media title on video. See http://wiki.videolan.org/VLC_command-line_help

Example using VLCJ 1.2.0:

                    String[] options = {
                            ":sharpen-sigma=2.0", 
                            ":blur-factor=127", 
                            ":ipv4-timeout=3000", 
                            ":no-video-title-show", 
                            ":loop", 
                            ":file-caching="+getFileCaching(),
                            ":sout-all",
                            ":sout-keep"
                    };

                    gc.getMediaPlayer().setRepeat(true);
                    gc.getMediaPlayer().setPlaySubItems(true);
                    gc.getMediaPlayer().playMedia(media, options);

Update:

Recent libVLC 2.0.x changes to vout feature may cause no-video-title-show not to work on per-playitem configuration :no-video-title-show anymore and may need to be set as per-global configuration --no-video-title-show. Pass per-global configuration options in the VLCJ factory constructor MediaPlayerFactory(options) instead of mediaplayer's xxxMedia method.

ecle
  • 3,952
  • 1
  • 18
  • 22
0

libVLC 2.1 has new native API to do this - from libvlc_media_player.h:

LIBVLC_API 
void libvlc_media_player_set_video_title_display( libvlc_media_player_t *p_mi, libvlc_position_t position, unsigned int timeout );

This is available in vlcj 2.4.1 - from MediaPlayer.java:

void setVideoTitleDisplay(libvlc_position_e position, int timeout);

This API should always be used in preference to using the unsupported "options" array.

Example:

mediaPlayer.setVideoTitleDisplay(libvlc_position_e.disable, 0);
caprica
  • 3,902
  • 4
  • 19
  • 39