INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Scrubbing a video makes MC hang  (Read 3258 times)

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Scrubbing a video makes MC hang
« on: September 25, 2011, 10:10:34 pm »

Hi,

I have a problem with scrubbing video from MCRemote. When a video plays just like with a song I can move the position slider to scrub the video. When I move the slider I send this:

Code: [Select]
http://speedy:52199/MCWS/v1/Playback/Position?Position=102064&Zone=0&ZoneType=ID
I do the same when I scrub a video. Now what I see is that the first command is processed correctly and the video moves to the position I told it to go. The next command however does nothing and the video plays on normally. At this point MC is dead in the water. It still processes the command I send it (I can see the time counting up every 500 Ms) so it still processes calls for Playback information. But the program doesn't respond to mouse input anymore on the PC. In fact Windows tells me the program doesn't respond anymore and ask me if I want to kill the app. Killing the app and restarting it is the only way to get it working again.

Regards
Paul

Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #1 on: November 11, 2011, 09:23:10 am »

Anyone?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Scrubbing a video makes MC hang
« Reply #2 on: November 11, 2011, 02:16:36 pm »

Confirmed.  It'll be fixed in 17.0.33 and later:
SDK: Seeking a video using the web service (MCWS) could lead to problems.
Logged
Matt Ashland, JRiver Media Center

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #3 on: December 25, 2011, 06:06:14 am »

Hi Matt,

It seems to be working better now. I still have something strange though. During Scrubbing of movies I set values using a slider in my app. Very often when I send a position to MC it returns PositionMS = 0 in the PlayBackInfo. I can't put my finger on it.

In the attached image you can see what I send. In the retrieval of the next PlayBackInfo the position was returned 0.

Regards
Paul
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #4 on: December 28, 2011, 06:06:41 am »

Hi Matt,

I've debugged this a bit more. I was afraid that somewhere in my code I was setting the positiion to zero. This is however not the case. I never set a value below 2000 other then when the slider is to the complete left (which is the zero position).

What I notice is that with a DVD playing the issue is more severe then with an AVI playing. When scrubbing a video the slider in Display mode is shown at the bottom of the video. I see the time of the slider alternating between 0:00 and n:nn so fast that it looks like both times are displayed simultaniously (this is for DVD and AVI both).

Regards
Paul
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #5 on: December 28, 2011, 07:59:15 am »

Hi Matt,

Just noticed that the same thing is happening when playing music. I didn't notice this before because I never play music in 'Display' mode. Something else I noticed is that the thing does not happen if I scrub slowly (that is move the slider very slow). It only happens when the slider is moved more rapid.

Regards
Paul
Logged

JohnT

  • Citizen of the Universe
  • *****
  • Posts: 4627
Re: Scrubbing a video makes MC hang
« Reply #6 on: December 28, 2011, 09:05:43 am »

Thanks for providing more debugging info Paul.  We'll take a closer look on Monday when we get back to the office after the holiday.
- John
Logged
John Thompson, JRiver Media Center

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #7 on: January 07, 2012, 07:02:08 am »

Hi John,

When you have the time please take a look at this. As long as this is not fixed I can not release the latest version of MC Remote.

Regards
Paul
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #8 on: January 10, 2012, 04:58:06 am »

Hi John,

It is defenitely related to the amount of commands sent to MC. When I scrub an AVI (local or via network) the effect is less prominent then when I scrub a DVD.

I've introduced a sleep in the scrubbing routine of 30 ms and that solves if for the AVI's but not for DVD. I do believe the sleep is a dirty work-arround for the problem. I think it should be solved in MC.

Regards
Paul
Logged

JohnT

  • Citizen of the Universe
  • *****
  • Posts: 4627
Re: Scrubbing a video makes MC hang
« Reply #9 on: January 26, 2012, 02:50:38 pm »

I'm trying to repro the problem here.  For testing, I've created a worker thread in Media Center which hits the web service repeatedly with a Position request.  I can vary the amount of time increment and the wait between requests.  So far I've tried sending requests constantly with an increment ranging from 1 ms (.001 s) up to 1 second.  I've tried wait periods between requests from zero up to 100ms.
Logged
John Thompson, JRiver Media Center

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #10 on: January 26, 2012, 05:48:18 pm »

Hi John,

Thanks for the reply.

I understand the way you're approaching this. I guess we're in two worlds here. I'm trying to test this from a remote point of view and this is what I experience. Mind you we're talking about a very complex process here with asynchronous multithreaded routines acting together.

The way MC Remote acts is: send a scrub (set position)command and wait for the result asynchronously. In the mean time a second thread on the remote is inquiring the current playing whatever for it's position. I never set the position myself. I always wait for what MC reports to me.

Now what I experience is that MC sometimes reports position 0 (zero) to me for the currently playing. When however I reduce the frequency the 'set current position' command is set with only a few microseconds the thing does not occur (except when a relatively slow device is playing, like a DVD).

If you want I can make you a beta tester for version 2. I will need an email address that is registered as a Windows Live ID. You will need a Windows Phone 7.1 (Mango) to run the App (or thw Emulator).

Regards,
Paul
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #11 on: January 27, 2012, 02:24:43 am »

Hi John,

For a moment there I thought it was an error in MC Remote but debugging the problem told me otherwise. Here's the reply I sometimes get when scrubbing a movie (an AVI in this case):

Code: [Select]
<Response Status="OK">
  <Item Name="State">2</Item>
  <Item Name="FileKey">38580</Item>
  <Item Name="PositionMS">0</Item>
  <Item Name="DurationMS">9083650</Item>
  <Item Name="ElapsedTimeDisplay">0:00</Item>
  <Item Name="RemainingTimeDisplay">-2:31:23</Item>
  <Item Name="TotalTimeDisplay">2:31:23</Item>
  <Item Name="PositionDisplay">0:00 / 2:31:23</Item>
  <Item Name="PlayingNowPosition">0</Item>
  <Item Name="PlayingNowTracks">1</Item>
  <Item Name="PlayingNowPositionDisplay">1 of 1</Item>
  <Item Name="PlayingNowChangeCounter">5</Item>
  <Item Name="Bitrate">2000</Item>
  <Item Name="SampleRate">0</Item>
  <Item Name="Channels">0</Item>
  <Item Name="Chapter">0</Item>
  <Item Name="Volume">0,58045</Item>
  <Item Name="VolumeDisplay">58%</Item>
  <Item Name="ImageURL">MCWS/v1/File/GetImage?File=38580</Item>
  <Item Name="Name">2012 {2009} DVDRIP. Jaybob</Item>
</Response>

You can clearly see that the position is 0 (zero) in this case. I've also tested if I'm sending the 0 position to MC but I do not. If the slider is moved between let's say 30% and 100% I never send a value below 1000 ms.

Something else I noticed is that it happens when the display is full screen. If I show the movie in the a detached display and make it very small it happens less frequent.

I've attached a little screen capture video that shows the problem.

Regards,
Paul
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #12 on: January 27, 2012, 03:23:09 am »

And here is how it looks when I chew on my command for 60 ms.
Logged

JohnT

  • Citizen of the Universe
  • *****
  • Posts: 4627
Re: Scrubbing a video makes MC hang
« Reply #13 on: January 27, 2012, 09:06:03 am »

Hey Paul, try running the next beta build of Media Center and see if it works better for you.  We added a lock on a member variable that may have been getting updated by multiple threads and consequently alternating between -1 and some normal position value.  Thanks.
Logged
John Thompson, JRiver Media Center

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Scrubbing a video makes MC hang
« Reply #14 on: January 27, 2012, 09:29:44 am »

Hi John,

The build is not available yet, right?

Regards
Paul
Logged

JohnT

  • Citizen of the Universe
  • *****
  • Posts: 4627
Re: Scrubbing a video makes MC hang
« Reply #15 on: January 27, 2012, 09:30:23 am »

That's right, check tonight's build.
Logged
John Thompson, JRiver Media Center
Pages: [1]   Go Up