Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6983009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:21:46+00:00 2026-05-27T18:21:46+00:00

I am currently on a java project that uses a vlc socket remote control

  • 0

I am currently on a java project that uses a vlc socket remote control interface to play audiovisual content (e.g. vlc -I rc --rc-host=localhost:[portnumber]). The interface leads to some particular cases that seem complex to deal with:

  • According to the vlc remote control help, the pause command is a toggle function so you
    have to keep trace of the current state of the player.

  • The add command will start the video only if the current video isn’t paused.

  • The is_playing command always outputs 1, whenever it is paused or not and the
    status command doesn’t say if it is paused or not.

A constraint of the client is that videos need to be paused on the last frame. Fortunately, there is a parameter to deal with it : --play-and-pause.

The problem is as following. If vlc gets to the last frame and pause the video by itself, how can I know about it ? For now, I use get_time in hope of simply considering the video paused if the countdown is equal to 0. However, it occurs that vlc pauses the video itself at 0:01, forcing me to also consier 0:01 as a finishing value. This results in a glitch when the user starts another video while there really is one second remaining before the last frame, since the 0:01 check is considering it as paused while it’s not. Here’s a summary of what happens:

  • 0:20 (not paused) + play button :
    send(“add [filepath]”);

    Fine

  • 0:00 (paused) + play button :
    send(“pause”);
    send(“add [filepath]”);

    Fine

  • 0:01 (paused) + play button :
    send(“pause”);
    send(“add [filepath]”);

    Fine

  • 0:01 (not paused) + play button :
    send(“pause”);
    send(“add [filepath]”);

    Unexpected behavior: it won’t play, because it is paused and we don’t know about it

Is there a safe approach to deal with the player state so there is no undefined behavior? I noticed that the remote control console sometime outputs something when vlc pauses by itself. However, it seems unsafe since it may output some events that are fired before of after this event.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:21:47+00:00Added an answer on May 27, 2026 at 6:21 pm

    What is the granularity of the countdown timer? Could you sample the time remaining twice with a gap equal to the smallest supported time unit? For example, if it’s seconds, you check the time, wait a second and then check it again. If the time has changed, it’s still playing, if it hasn’t it’s paused. Only downside is that it will introduces a one second delay to the responsiveness of your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a Java project which uses Tibco rendezvous control. I have
I'm currently working on a Java project that is emitting the following warning when
I am currently undertaking a project that involves extensive use of Java RMI and
I'm currently working on a project that is building a java-based desktop application to
I am currently working on a project that uses a Google Earth API library
I have a Java project that currently has a lot of JARs in its
I have a Flex/Java web application that uses Maven as a build tool. Currently,
I'm currently working on a project that is done in Java, on google appengine.
I have a java project that uses java.io.RandomAccessFile to manage data loading. It seeks
I am coming from Java and am currently working on a C# project. What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.