Jump to content


Photo

[resolved] 0.7.14 Shuddering and audio drop outs and sync issues


  • Please log in to reply
122 replies to this topic

Poll: 1080p playback (30 member(s) have cast votes)

Is 1080p playback worse in .14 and up?

  1. Yes, The majority of my 1080p content plays better on .13 (28 votes [93.33%])

    Percentage of vote: 93.33%

  2. No, my 1080p content plays perfectly in .14 (2 votes [6.67%])

    Percentage of vote: 6.67%

Vote Guests cannot vote

#101 peter893

peter893

    Dedicated Member

  • Members
  • PipPipPip
  • 105 posts
  • Location: In Front Of My TV

Posted 21 May 2009 - 01:10 PM

at 24fps, your computer has ~42 ms to decode each frame, or you will get stutter, and this depends on memory speed, IO bandwidth etc, as well as CPU. I'm not saying you're wrong, or the problem doesn't exist, but it's unlikely to be straightforward. We are looking at it closely though.


I think we all kinda have a concept of how a computer works, thanks for the bandwidth tutorial though... ;)

whats this 24fps... all my movies are 24fps.... and they don't shudder under .13.

Clearly Aaron's reply shows more facts.

Have you actually tested the clips i provided yourself? If not, do.
Also be sure to get the longer clips, they show that the issue happens at low activity (cpu, bitrate, motion)
It sounds like your just putting stuff out there without testing these clips or having any experience with the real issue.

Ive moved them, so you can find them here now: http://digitalbuss.com/HTPC/plex/clips
im moving 2 over now as i write.

Again!!!! ALL these clips play fine on my 2.33c2d MBP with .13. AND DO NOT with .14 and up.




God, you guys look like Ben Affleck (Elan) and Nike Lachey (tokyovigilante) :lol: :D

The problem in that ticket is definitely more than a CPU bottleneck - the symptoms do lessen on a fast enough machine (for example, it's much less intrustive on my 2.8GHz unibody), but the cause appears to be the repeated failures to decode individual frames, where each failure causes a pause in playback.

[edit] The problem with the VC-1 samples seems to be that occasionally the frame decode returns 0 bytes, which causes the DVDPlayerVideo.cpp to b0rk:

int iDecoderState = m_pVideoCodec->Decode(pPacket->pData, pPacket->iSize, pPacket->pts);

iDecoderState becomes VC_ERROR and triggers this block:

if (iDecoderState & VC_ERROR)
		{
		  CLog::Log(LOGDEBUG, "CDVDPlayerVideo - video decoder returned error");
		  m_pVideoCodec->Reset();
		  break;
		}

I think it's actually the reset that causes the big stutter (which doesn't register as a dropped frame, because it isn't dropped - it just failed to decode).. but I strongly suspect the root cause is buried somewhere in the m2ts demuxing code, because the same error condition seems to trigger for H264 encoded m2ts video as well, which would imply that the VC-1 decoder is not, in this case, at fault.

[edit edit] Whoops, was using the XBMC code for the above examples, which is slightly different - the Plex code in the problematic area appears almost identical, but is lacking the log message seen above. In Plex it's:

507	   // if decoder had an error, tell it to reset to avoid more problems
508	   if( iDecoderState & VC_ERROR )
509		 m_pVideoCodec->Reset();


My Blog - Mac OSX Home Theater HD Mac Mini 1.83Ghz
Find out how to play your Blu-rays in Plex or XBMC: Blu-ray Ripping Tutorial
A great place for Blu-ray info Blu-ray.com Bitrate/Codec/Audio info for BD here: Blu-ray Movie Bitrates

OSX 10.5.8 Mac Mini 1.83ghz 4GB ram - 3 x MiniStack2.5 1GB HDs - Plex 0.8.5 - Panasonic TH-42PZ80U Plasma - Sony DTS/AC3 Receiver.
Parallels 5 - Windows XP - AnyDVDHD

#102 aaronjb

aaronjb

    Rock Star

  • Members
  • PipPipPipPipPip
  • 788 posts
  • Location: Berkshire, England

Posted 21 May 2009 - 02:05 PM

God, you guys look like Ben Affleck (Elan) and Nike Lachey (tokyovigilante) :lol: :D


Now you mention it, they do a bit, don't they! :lol:

#103 tokyovigilante

tokyovigilante

    Plex Dev Team

  • Doctor Of Plexville
  • PipPipPip
  • 364 posts
  • Location: Wellington. New Zealand

Posted 21 May 2009 - 06:29 PM

Now you mention it, they do a bit, don't they! :lol:

You're both bad men ;)

I take your point regarding performance, I wasn't trying to teach you to suck eggs. However, I have indeed been testing your clips. On my 2.4ghz MBP, I get stuttering associated with the avc_decode errors, but on my 3.2ghz quad core, playing from a RAID-Z, the clip plays perfectly, and there are no decode errors.

aaronjb, thanks for investigating the problem. I suspect that the demuxer is not returning enough data to the decoder in time at points in the movie on (relatively) slower systems, causing a buffer underrun and a decode error. This would be symptomatic of a m2ts demuxer problem, and some artificial slowdown has likely been introduced with ffmpeg 0.5.

As I said, don't panic, we're looking at it. Elan and I both have day jobs, but we do listen to you guys :).

#104 elan

elan

    Sheriff of Plexville

  • Sheriff Of Plexville
  • PipPipPipPipPipPip
  • 7412 posts
  • Location: Maui

Posted 22 May 2009 - 10:39 AM

I think we all kinda have a concept of how a computer works, thanks for the bandwidth tutorial though... ;)
...
Clearly Aaron's reply shows more facts.
...
Have you actually tested the clips i provided yourself? If not, do.
...
It sounds like your just putting stuff out there without testing these clips or having any experience with the real issue.


Peter, please try to be kind, we're all working on this in our spare time, and trying hard to be helpful. I understand that you're frustrated, but the tone of your responses are not up to the level of what we expect on this forum.

Instagram: @elan
The Plex blog.
The wife's photography site.
The brother's photography blog.
The dog's twitter feed.


#105 aaronjb

aaronjb

    Rock Star

  • Members
  • PipPipPipPipPip
  • 788 posts
  • Location: Berkshire, England

Posted 22 May 2009 - 10:48 AM

You're both bad men ;)


I'd never question that ;)

aaronjb, thanks for investigating the problem. I suspect that the demuxer is not returning enough data to the decoder in time at points in the movie on (relatively) slower systems, causing a buffer underrun and a decode error. This would be symptomatic of a m2ts demuxer problem, and some artificial slowdown has likely been introduced with ffmpeg 0.5.


Interesting - I'd not considered that possibility, I'd assumed the demuxer would either always work, or always fail.. but now you say that it does rather make sense - we're dealing with time sensitive actions, and perhaps on slower systems the demuxer is bailing early to try and preserve frame rate (or, ironically, drop less frames) and spitting out a half-frame to the decoder.


There's also an interesting note from davilla on the XBMC trac for this:

Just an update, problem seems to be with changes in mpegts demuxing or vc1 decoding. we are seeing out of order frames not being handled correctly. XBMC tries to adjust using these out of order frames and all hell breaks loose. The interesting thing is using vpdau to decode the same video does NOT skip or cause general mayhem. This suggests that the nvidia vdpau decoder can handle the output from mpegts without problem and we should be looking closer at the ffmpeg vc1 decoder.


I must double check the H264 samples I have from Peter and add them to the ticket. So much to do, so little time. But the fact that VDPAU 'cures' it might well tie up with what you were saying - since the load of decoding frames has suddenly been taken off the CPU in that scenario..

#106 elan

elan

    Sheriff of Plexville

  • Sheriff Of Plexville
  • PipPipPipPipPipPip
  • 7412 posts
  • Location: Maui

Posted 22 May 2009 - 11:32 AM

We've worked around the issue by reverting back to the older VC-1 decoder in use in 0.7.13. Ryan and I found that the newer version of the decoder takes much more CPU and shows up the issue that you're seeing. The reverted decoder will be in the next release of Plex, out very shortly.

Instagram: @elan
The Plex blog.
The wife's photography site.
The brother's photography blog.
The dog's twitter feed.


#107 peter893

peter893

    Dedicated Member

  • Members
  • PipPipPip
  • 105 posts
  • Location: In Front Of My TV

Posted 22 May 2009 - 12:50 PM

We've worked around the issue by reverting back to the older VC-1 decoder in use in 0.7.13. Ryan and I found that the newer version of the decoder takes much more CPU and shows up the issue that you're seeing. The reverted decoder will be in the next release of Plex, out very shortly.


Cool... but it does happen with h264 and even mpeg2, ill see if I can digup an mpeg2 two clip.

Again I apologies If I seem unkind. Its not the case. Just persistent, as I do believe this wouldn't have gotten that far without my bitchin :lol:
You guys still look lit movie stars.... :P


Pete
My Blog - Mac OSX Home Theater HD Mac Mini 1.83Ghz
Find out how to play your Blu-rays in Plex or XBMC: Blu-ray Ripping Tutorial
A great place for Blu-ray info Blu-ray.com Bitrate/Codec/Audio info for BD here: Blu-ray Movie Bitrates

OSX 10.5.8 Mac Mini 1.83ghz 4GB ram - 3 x MiniStack2.5 1GB HDs - Plex 0.8.5 - Panasonic TH-42PZ80U Plasma - Sony DTS/AC3 Receiver.
Parallels 5 - Windows XP - AnyDVDHD

#108 poofyhairguy

poofyhairguy

    Rock Star

  • Members
  • PipPipPipPipPip
  • 920 posts

Posted 22 May 2009 - 03:36 PM

We've worked around the issue by reverting back to the older VC-1 decoder in use in 0.7.13. Ryan and I found that the newer version of the decoder takes much more CPU and shows up the issue that you're seeing. The reverted decoder will be in the next release of Plex, out very shortly.



Thank you for your hard work on the issue.

#109 davilla

davilla

    Really, really hearts Plex

  • Plex Fanboy
  • PipPip
  • 84 posts

Posted 22 May 2009 - 04:07 PM

Thank you for your hard work on the issue.


You're welcome.

#110 peter893

peter893

    Dedicated Member

  • Members
  • PipPipPip
  • 105 posts
  • Location: In Front Of My TV

Posted 22 May 2009 - 05:54 PM

You're welcome.


Right? Thanks too everyone that has looked into this issue. Not that I totally know, but I suspect that this is what opensource projects are all about. Was that lame?...
My Blog - Mac OSX Home Theater HD Mac Mini 1.83Ghz
Find out how to play your Blu-rays in Plex or XBMC: Blu-ray Ripping Tutorial
A great place for Blu-ray info Blu-ray.com Bitrate/Codec/Audio info for BD here: Blu-ray Movie Bitrates

OSX 10.5.8 Mac Mini 1.83ghz 4GB ram - 3 x MiniStack2.5 1GB HDs - Plex 0.8.5 - Panasonic TH-42PZ80U Plasma - Sony DTS/AC3 Receiver.
Parallels 5 - Windows XP - AnyDVDHD

#111 elan

elan

    Sheriff of Plexville

  • Sheriff Of Plexville
  • PipPipPipPipPipPip
  • 7412 posts
  • Location: Maui

Posted 22 May 2009 - 05:55 PM

Cool... but it does happen with h264 and even mpeg2, ill see if I can digup an mpeg2 two clip.


Hey Pete, we checked all of the samples you uploaded, and they all worked much better. If you have other clips, please upload them :)

Instagram: @elan
The Plex blog.
The wife's photography site.
The brother's photography blog.
The dog's twitter feed.


#112 peter893

peter893

    Dedicated Member

  • Members
  • PipPipPip
  • 105 posts
  • Location: In Front Of My TV

Posted 22 May 2009 - 07:53 PM

Hey Pete, we checked all of the samples you uploaded, and they all worked much better. If you have other clips, please upload them :)



Hey Elan!! I can confirm that the clips play as expected under 0.8.0 with that patch you gave... on my MPB 2.33c2d

Im gonna install .8.0 with the patch on my Mini 1.83 and also report back.
My Blog - Mac OSX Home Theater HD Mac Mini 1.83Ghz
Find out how to play your Blu-rays in Plex or XBMC: Blu-ray Ripping Tutorial
A great place for Blu-ray info Blu-ray.com Bitrate/Codec/Audio info for BD here: Blu-ray Movie Bitrates

OSX 10.5.8 Mac Mini 1.83ghz 4GB ram - 3 x MiniStack2.5 1GB HDs - Plex 0.8.5 - Panasonic TH-42PZ80U Plasma - Sony DTS/AC3 Receiver.
Parallels 5 - Windows XP - AnyDVDHD

#113 elan

elan

    Sheriff of Plexville

  • Sheriff Of Plexville
  • PipPipPipPipPipPip
  • 7412 posts
  • Location: Maui

Posted 22 May 2009 - 08:08 PM

Hey Elan!! I can confirm that the clips play as expected under 0.8.0 with that patch you gave... on my MPB 2.33c2d

Im gonna install .8.0 with the patch on my Mini 1.83 and also report back.


Sounds great, we're just making a few tweaks over here; hopefully the new release will happen later on today.

Instagram: @elan
The Plex blog.
The wife's photography site.
The brother's photography blog.
The dog's twitter feed.


#114 peter893

peter893

    Dedicated Member

  • Members
  • PipPipPip
  • 105 posts
  • Location: In Front Of My TV

Posted 22 May 2009 - 08:12 PM

Sounds great, we're just making a few tweaks over here; hopefully the new release will happen later on today.


So was this just a reversion with VC-1 decoder, or where there any other optimizations done?
My Blog - Mac OSX Home Theater HD Mac Mini 1.83Ghz
Find out how to play your Blu-rays in Plex or XBMC: Blu-ray Ripping Tutorial
A great place for Blu-ray info Blu-ray.com Bitrate/Codec/Audio info for BD here: Blu-ray Movie Bitrates

OSX 10.5.8 Mac Mini 1.83ghz 4GB ram - 3 x MiniStack2.5 1GB HDs - Plex 0.8.5 - Panasonic TH-42PZ80U Plasma - Sony DTS/AC3 Receiver.
Parallels 5 - Windows XP - AnyDVDHD

#115 elan

elan

    Sheriff of Plexville

  • Sheriff Of Plexville
  • PipPipPipPipPipPip
  • 7412 posts
  • Location: Maui

Posted 22 May 2009 - 08:54 PM

So was this just a reversion with VC-1 decoder, or where there any other optimizations done?


Basically we're using the older VC-1 decoder, which uses 20%+ less CPU than the 0.5 version. I'm honestly not a codec expert, so I'm not sure if the newer version does more "correct" decoding, but the older decoder looks great and takes a lot less CPU. I'm sure the smart ffmpeg devs will eventually weigh in on the issue, but for now this seemed like the best way forward.

There is a bit of special sauce in the new Plex that may make 0.8.1 a bit faster than 0.7.13 :)

Instagram: @elan
The Plex blog.
The wife's photography site.
The brother's photography blog.
The dog's twitter feed.


#116 peter893

peter893

    Dedicated Member

  • Members
  • PipPipPip
  • 105 posts
  • Location: In Front Of My TV

Posted 22 May 2009 - 10:19 PM

Basically we're using the older VC-1 decoder, which uses 20%+ less CPU than the 0.5 version. I'm honestly not a codec expert, so I'm not sure if the newer version does more "correct" decoding, but the older decoder looks great and takes a lot less CPU. I'm sure the smart ffmpeg devs will eventually weigh in on the issue, but for now this seemed like the best way forward.

There is a bit of special sauce in the new Plex that may make 0.8.1 a bit faster than 0.7.13 :)


ahhh.. thats strange I thought Semi Pro was a AVC/h264.... I just dropped it into tsmuxer to see and its VC1.... I guess I looked it up insted.. blue-ray.com has it listed wrong. http://www.blu-ray.c...vies.php?id=787

anyway.... i guess I havent found any h264 content that was messed. Ill keep looking though <_<


Nice with the special sauce.. Im glad you decided to look into this insted of waiting.
My Blog - Mac OSX Home Theater HD Mac Mini 1.83Ghz
Find out how to play your Blu-rays in Plex or XBMC: Blu-ray Ripping Tutorial
A great place for Blu-ray info Blu-ray.com Bitrate/Codec/Audio info for BD here: Blu-ray Movie Bitrates

OSX 10.5.8 Mac Mini 1.83ghz 4GB ram - 3 x MiniStack2.5 1GB HDs - Plex 0.8.5 - Panasonic TH-42PZ80U Plasma - Sony DTS/AC3 Receiver.
Parallels 5 - Windows XP - AnyDVDHD

#117 aaronb

aaronb

    Member

  • Members
  • PipPip
  • 62 posts

Posted 24 May 2009 - 01:55 AM

I'm still having problems with h264 files with 0.8.1, 720p 60 fps files (recorded with the Haupaugge HDPVR) that played fine with 0.7.13 and earlier are only getting 30-40 fps and are unwatchable. There is a sample file here: www.aaronblackshear.com/hdpvr_sample.ts. This is killing the WAF, any help is greatly appreciated.

#118 tokyovigilante

tokyovigilante

    Plex Dev Team

  • Doctor Of Plexville
  • PipPipPip
  • 364 posts
  • Location: Wellington. New Zealand

Posted 24 May 2009 - 05:17 AM

I'm still having problems with h264 files with 0.8.1, 720p 60 fps files (recorded with the Haupaugge HDPVR) that played fine with 0.7.13 and earlier are only getting 30-40 fps and are unwatchable. There is a sample file here: www.aaronblackshear.com/hdpvr_sample.ts. This is killing the WAF, any help is greatly appreciated.

This is a similar but separate issue, I'll have a look at it with a few of my EyeTV recordings.

#119 davilla

davilla

    Really, really hearts Plex

  • Plex Fanboy
  • PipPip
  • 84 posts

Posted 24 May 2009 - 05:18 AM

I'm still having problems with h264 files with 0.8.1, 720p 60 fps files (recorded with the Haupaugge HDPVR) that played fine with 0.7.13 and earlier are only getting 30-40 fps and are unwatchable. There is a sample file here: www.aaronblackshear.com/hdpvr_sample.ts. This is killing the WAF, any help is greatly appreciated.


Hahaha, aaronb double teams his HD-PVR problem. I like it.

#120 aaronjb

aaronjb

    Rock Star

  • Members
  • PipPipPipPipPip
  • 788 posts
  • Location: Berkshire, England

Posted 24 May 2009 - 03:25 PM

There are far too many Aaron's around here, you know :D (With the same last initial too, even!)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users