Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FAILS] - vlcj fail to allow --loop --repeat for auto replay #21

Closed
shamun opened this issue Mar 7, 2012 · 10 comments
Closed

[FAILS] - vlcj fail to allow --loop --repeat for auto replay #21

shamun opened this issue Mar 7, 2012 · 10 comments

Comments

@shamun
Copy link

shamun commented Mar 7, 2012

I have tried --loop or --repeat for auto replay but it fais. Also i have tried methods offered.
How do you fix it?

@shamun shamun closed this as completed Mar 7, 2012
@shamun shamun reopened this Mar 7, 2012
@caprica
Copy link
Owner

caprica commented Mar 7, 2012

--loop and --repeat are options for the command-line vlc. Of course they don't work with embedded libvlc.

Look at the Javadoc for MediaPlayer and you'll find an option to loop or autorepeat.

Otherwise, use the MediaListPlayer and set it to loop.

@caprica caprica closed this as completed Mar 7, 2012
@vlcjava
Copy link

vlcjava commented Mar 7, 2012

However does not work in Linux. Mind it tested and failed.

@caprica
Copy link
Owner

caprica commented Mar 7, 2012

This is not Twitter. You're providing a narrative about your day rather than providing any useful information. What "does not work in Linux"? I exclusively use Linux for this project and I don't have any problems.

@vlcjava
Copy link

vlcjava commented Mar 7, 2012

@caprica

In Linux that setRepeat(true) is not working please below, where its working in Windows as i already explained in my above seal.

@caprica
Copy link
Owner

caprica commented Mar 7, 2012

If you explained above, then you did not explain clearly enough.

Anyway, there is absoultely no reason whatsoever why the auto-repeat functionality would work in Windows and not in Linux. The code is exactly the same.

Post some useful information and I'll try to help, but don't post any more screenshots.

@vlcjava
Copy link

vlcjava commented Mar 7, 2012

@caprica:

You are 100% correct, thank you. I just now realized it was my mistake or my distro mistake because yum -y install vlc always install default old version which is lower then VLC 2.0.0.

Which was causing the latest VLCJ as following:

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: This version of vlcj requires version 2.0.0 or later of libvlc, found too old version 1.1.13 The Luggage.

Therfore, i was using old VLCJ with old VLC. That old VLCJ and VLC, is not working with following code, but if i do command line --loop it works.


mediaPlayer.setRepeat(true);
mediaPlayer.setPlaySubItems(true);    
mediaPlayer.playMedia(mrl, options); 

@caprica
Copy link
Owner

caprica commented Mar 7, 2012

If "--loop" on the command-line works, you don't need mediaPlayer.setRepeat(true).

@RajChanchal
Copy link

mediaPlayer.setRepeat(true) doesn't work for me too on Ubuntu. The video runs for the first time and as soon the video ends, the file path seems like changed for the 2nd loop to run. Therefore, it says file not found! The path seems like appended with the original path.

@caprica
Copy link
Owner

caprica commented May 1, 2015

That is a different issue, so please create a new issue to track it.

@caprica
Copy link
Owner

caprica commented May 1, 2015

I just tested what @RajChanchal said, and it worked for me.

If you still think you have a problem, create a new issue, enable vlcj logging, post the logs in that issue and I'll take a look. Have a look in the logs in particular for "auto repeat mrl=".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants