[vlc] Re: Mainconcept encode play error

Vaclav Koldus vaclav.koldus at avpark.cz
Fri Mar 3 02:36:08 CET 2006


Måns Rullgård napsal(a):

>Vaclav Koldus <vaclav.koldus at avpark.cz> writes:
>
>  
>
>>>>Hi Pete!
>>>>
>>>>The problem with main concept H.264 encoded videos is indeed that
>>>>these are mpeg files. Vlc can't recognize if the .mpeg file contains
>>>>mpeg2 or h.264 stream. It just assumes it is a mpeg2 stream. Only
>>>>solution I came with is to give up playing mpeg2 and consider all
>>>>mpegs to be h264s. I don't know whether this stream can be decoded
>>>>with ffmpeg.
>>>>        
>>>>
>>>The H.264 video is decoded correctly by ffmpeg.  The problem is
>>>identifying it as being H.264 in the first place.  Normally a Program
>>>Stream Map is included in MPEG-PS streams with non-MPEG2 video for
>>>precisely this purpose.
>>>
>>>      
>>>
>>Well, then there's only one thing to do. To patch ps/ts demuxer
>>modules to corretly identify h264 streams. When you look
>>into the source files ts.c and ps.c, you'll find out that this is
>>implemented well. It seems that MC signs the stream incorrectly
>>(or with their own id.) I'll have a look at it, it shouldn't be a big
>>prob.
>>    
>>
>
>The PS demuxer parses the PSM to determine the codecs for each stream.
>If there is no PSM it defaults to MPEG video and audio.  As I said,
>the file from Pete has no PSM.
>
>I haven't seen a sample from you, so I can't say what might be the
>problem there.
>
>  
>
I see it now too. MC H264 mpegs has no PSM indeed. However, this can be
"hacked" like this:

        else if( (i_id&0xf0) == 0xe0 && i_type == 0x00 )
        {
            es_format_Init( &tk->fmt, VIDEO_ES, 
VLC_FOURCC('h','2','6','4') );
        }

Obviously, this isn't clean, but it forces vlc to use H264 decoder for 
these files.
I'm affraid it can't be done cleanly, cause they have no PSM so there 
isn't any
way how to recognize h264 from mpeg2 without PSM. This is arguable, because
mpeg2 streams should have PSM, so it could be safe to assume that the file
is h264 when there's no PSM. Anyway, there's another prob. ffmpeg fails
decoding this stream like this:

[h264 @ 0xb7eae5b0]concealing 1620 DC, 1620 AC, 1620 MV errors
[h264 @ 0xb7eae5b0]left block unavailable for requested intra4x4 mode -1 
at 0 2
[h264 @ 0xb7eae5b0]error while decoding MB 0 2
[h264 @ 0xb7eae5b0]concealing 1579 DC, 1579 AC, 1579 MV errors
[h264 @ 0xb7eae5b0]left block unavailable for requested intra mode at 0 3
[h264 @ 0xb7eae5b0]error while decoding MB 0 3
[h264 @ 0xb7eae5b0]illegal short term buffer state detected
[h264 @ 0xb7eae5b0]concealing 1534 DC, 1534 AC, 1534 MV errors
vlc: h264.c:2584: mc_dir_part: Assertion `pic->data[0]' failed.


I don't know anything about h264, so I can't see why is this happening.
Please someone has an idea??

Here comes the possibility to implement MC H.264 decoder (SDK). But this
one isn't free.

-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the vlc mailing list