H264 TS - frames displayed out of order

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

H264 TS - frames displayed out of order

Postby payam » 02 Nov 2006 17:22

Hi

I am trying to play H264 TS on VLC but it doesn't decode it properly and I see a grey screen. Do you happen to have a debug build for windows so that I can trace the problem more?

I can send you the TS that doesn't work. It works fine on http://www.leadcodecs.com TS player.

Please let me know ASAP.

Cheers

Payam
Last edited by payam on 02 Nov 2006 20:18, edited 1 time in total.

eAi
Blank Cone
Blank Cone
Posts: 51
Joined: 04 Jun 2005 17:11

Postby eAi » 02 Nov 2006 17:27

You tried the 0.8.6 beta build or nightlies? I know they contain some fixes/improvements for H.264.

payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

Postby payam » 02 Nov 2006 17:35

You tried the 0.8.6 beta build or nightlies? I know they contain some fixes/improvements for H.264.
I just tried 8.6 test. Now it seems shows the movie at least but the problem now is that it seems that it is seems that is displaying frames in incorrect order, maybe B and I frames are being interchanged or something or ...

Is there any debug builds that would give more detail than the console?

Payam
Last edited by payam on 02 Nov 2006 20:19, edited 1 time in total.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 02 Nov 2006 18:02

Try looking at CPU usage. It may be that your machine can't play this file.

payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

Postby payam » 02 Nov 2006 18:27

It is a dual code 3.2Ghz with 2G of RAM. I don't think that's a problem.

Payam

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 02 Nov 2006 20:34

OK! Then I will need more info. Press ctrl i while playing the video and go to the advanced info tab. Post that info here.

Open your Task manager and look at cpu usage. Post that info here.

Be aware that VLC is a 32 bit program and will only use one processor. and in a playlist this may be a problem if you don't assign the program one processor. But I would assume owning this you have already discovered many programs that are this way.

payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

Postby payam » 02 Nov 2006 20:48

The advanced tab shows no info. Only the following:

Stream 0
Codec: H264
Lanugage:
Type: Video

One of my CPUs go up to %29 and the other one is goes up to %10 while playback.

It seems that is it playing the frames in incorrect order.

Payam

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 02 Nov 2006 20:55

I would try assigning VLC to one processor to see if this resolves the issue.

I have never experienced a time where VLC would not report the formats it was playing. Even when it can't play the file there is a reporting. :?: Try opening the menu before playing the file.

payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

Postby payam » 02 Nov 2006 21:12

I did assign VLC only to one CPU and it didn't make a difference.

Also I did try installing 8.6 test1 and 8.5 to see if they give out more information on the advanced tab but there was no change from what I posted up there. Only 8.6 actually shows the video where as in 8.5 is grey.

Do you have a debug build for windows?

Thanks

Payam

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 02 Nov 2006 22:15

VLC 0.8.5 does not support interlacing for h.264. This is most often encountered in the MPEG TS container whose source is a broadcaster running tests on one of the newer satellites. There was an interim version of 0.8.5 that did support MBAFF interlacing, but not the PAFF interlacing supported by many hardware vendors, showing up for the broadcasters to put this format onto the satellites in real time (well close to real time) was still not supported by VLC.

VLC 0.8.6 is supposed to resolve this issue. But the resolve is coming from the use of FFMpeg and I don't believe the system is working quite right in 0.8.6 test 1. Considering that the reporting does not include resolution or frame rate and that the file is MPEG TS it seems very likely that this is the problem. The only player I am aware of that may work properly at the moment is Gabest's MPC (Media Player Classic) using his internal source filter for MPEG TS and CoreAVC for the decoder. But be aware his stand alone source filter does not appear to work with other players like WMP. The Haali system for H.264 in an MPEG TS container is still not functioning as of the last revision (Oct 06). Mplayer in the last revision (compiled with the latest version of FFMpeg (mid OCT 06)) and it's still not working there as well.

To the best of my knowledge there is no way to debug this because it really isn't a player issue, at least not directly. You are just going to need to wait until the dust settles on this issue and more people get the bugs worked out. Software players from what I can gather are not the only ones having problems here but there also seems to be compatibility issues between hardware vendors.

In the last few revisions of x264 cli I have noticed that interlacing is now supported. I don't get these daily so I'm not exactly sure when the support started. This says nothing about the container and it is my understanding that h.264 (AVC) in a MP4 container will play 1080i material. As to how many other vendors like Main Concepts or Ateme are moving to also support this is unknown. But this change can help sort out the problems associated with 1080i AVC in a MPEG TS container.
Last edited by DJ on 02 Nov 2006 22:27, edited 1 time in total.

payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

Postby payam » 02 Nov 2006 22:24

Well then I guess VLC is not supporting H264 TS yet. I have seen two players that play this correctly. One is http://www.leadcodecs.com and the other one is VLPlayer (LSI Logic).

Please let me know if you come up with anything.

Payam

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 02 Nov 2006 22:32

Well then I guess VLC is not supporting H264 TS yet. I have seen two players that play this correctly. One is http://www.leadcodecs.com and the other one is VLPlayer (LSI Logic).

Please let me know if you come up with anything.

Payam
That is not what I said! I was very specific about this. :roll:

In fact it is you that has been very vague about the issue and forced me to write very long answers that I tried to avoid from the beginning. :twisted:

Given the price tags associated with your suggestions I think I will wait for VLC to resolve the issue. :P

In the mean time I can use MPC with CoreAVC it works fine. :)

payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

Postby payam » 02 Nov 2006 22:42

The media that I have is MBAFF. So I guess it is supported but it doesn't work properly yet. Let me know if there is anything else that I can tweek to see what is the problem. It seems to me that is because of how the decoding of TS is done and if they are using the time stamps or not.

Cheers
Payam

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 02 Nov 2006 23:01

VLC 0.8.5 didn't support interlaced AVC at all so you are wasting your time there.

You can try http://download.videolan.org/pub/testing/freehd/
MBAFF support
PAFF interlacing is not supported

But I never found any samples to know if it worked or not. The only thing I have run across is PAFF interlacing. I have seen this and I think the concept here is flawed. The product is not as good as 720p and none of the new TVs require that the picture is interlaced. So outside of being able to hype it and do it in close to real time what is the advantage? :P In my opinion time would be better spent with 720p streaming hardware. But then manufactures wouldn't have a way to advertise their new technology or worry the content provider quite so much about new forms of copy protection and all for what? Something that is worse that 480p in my opinion.

payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

Postby payam » 02 Nov 2006 23:15

This free-hd has the same issue as the 0.8.6 test. However, I think there is less shaking (out of order frames) than the 8.6 one.

Do you know how the frame ordering is happening? Is there a pool that the packets get inserted into and then to output them their time stamps is checked so that they are in correct order?
or they are just displayed without being buffered, so we get these out of order frames?

Payam

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 02 Nov 2006 23:33

In your case I would question if it could be a timing issue between processors that VLC was not designed to deal with. I think I would rather be testing this on a single processor at this juncture, knowing I'm dealing with only one issue. Or have it proved to me that VLC will work correctly on a dual processor system. Perhaps dealing with standard (non interlaced) forms of H.264 in say a MP4 container will help determine this. Resolution should not play a part on your machine but I would check this out too and be absolutely sure of the setup before jumping to any conclusions.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 03 Nov 2006 01:35

This free-hd has the same issue as the 0.8.6 test. However, I think there is less shaking (out of order frames) than the 8.6 one.

Do you know how the frame ordering is happening? Is there a pool that the packets get inserted into and then to output them their time stamps is checked so that they are in correct order?
or they are just displayed without being buffered, so we get these out of order frames?

Payam
Yes, there is a buffer but a FIFO can't place the packets out of order.

http://www.erg.abdn.ac.uk/research/futu ... trans.html

payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

Postby payam » 06 Nov 2006 16:17

Hi

Could any of you please tell me as soon as possible how VLC decodes a H264 TS stream with respect to time stamps? I would like to know when it uses "PTS" (like for display or decode) and when does it use "DTS-decoding time stamp" (like for display or decode) and if you could please point me to the source file where this happens I would really appreciate it.

I have a H264 TS stream that doesn't play properly, it seems that frames are being displayed out of order and I know my time stamps are correct because it displays fine on other players.

Thanks

Payam

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 06 Nov 2006 21:21

h264 should have both dts and pts. The dts determines when it is passed to the decoder, the pts determines when the data is presented to the viewer.

Note that many players ignore dts, and simply rely on the order in which the data is delivered to their codec.
Don't use PMs for support questions.

payam
Blank Cone
Blank Cone
Posts: 14
Joined: 02 Nov 2006 17:12

Postby payam » 06 Nov 2006 21:42

I understand that but could you please point me to the source code that uses PTS and DTS in VLC ? or are we relying on the way the data is delivered in VLC Player?

Also is MBAFF supported yet or no? This what I get in my log:
ffmpeg warning: MBAFF + spatial direct mode is not implemented
(h264@01149BA0)

Thanks
Payam

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 06 Nov 2006 22:12

grep -rI pts src/

and not MBAFF is not supported. that's why it says it's not supported !
Don't use PMs for support questions.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 4 guests