Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't show file path when playing video using VLCJ

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?

like image 599
Jason4Ever Avatar asked Oct 31 '25 01:10

Jason4Ever


1 Answers

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.

like image 114
ecle Avatar answered Nov 01 '25 16:11

ecle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!